Jump to content
IGNORED

jzintv, remapping left analog stick to right analog stick on logitech F310?


Swami

Recommended Posts

So, using the ultimate pc interface controller configuration file (hackfile.cfg), I am able to use a vision-dapter with a standard intellivision controller or use a Logitech F310 by direct USB. The problem I am running into is with the keypad being the dpad and the disk being the left analog stick. Is it possible to map the right analog stick to the disk?The right analog stick registers as X and Y rotation in the game controller config for windows. Thanks.

hackfile.txt

Link to comment
Share on other sites

Yes, js0b refers to the second analog stick. You'd have to map all 16 directions.

 

JS0b_E PD0L_J_E

JS0b_ENE PD0L_J_ENE

JS0b_NE PD0L_J_NE

JS0b_NNE PD0L_J_NNE

JS0b_N PD0L_J_N

...

 

Okay. I've got up and down working on the right stick, but not left and right...and the left stick is still working all around, which it doesn't seem like it should.

hackfile.txt

Link to comment
Share on other sites

Check the command window to see how many axes jzintv reports for each controller found. You might have to temporarily remove the kbdhackfile switch. It should say four for the f310. Do you get up/down when pushing the stick diagonally? Assuming you're using the latest jzintv.

 

Jzintv, by default, maps the first analog stick unless you tell it not to. So that is normal.

Edited by mr_me
Link to comment
Share on other sites

Check the command window to see how many axes jzintv reports for each controller found. You might have to temporarily remove the kbdhackfile switch. It should say four for the f310. Do you get up/down when pushing the stick diagonally? Assuming you're using the latest jzintv.

 

Jzintv, by default, maps the first analog stick unless you tell it not to. So that is normal.

 

This is what I go below. Also, if the left stick is more than 45 degrees toward a direction in 4-way games, it will move that direction. In 16-way games it moves in whatever direction the stick is pointed.

post-54985-0-30138500-1552248797_thumb.png

Link to comment
Share on other sites

For whatever reason jzintv is picking up five analog axis (0,1,2,3,4). By default I think it puts 0,1 on js0 and 2,3 on js0b. Try adding the following switch to your command.

 

--js0b="xaxis=3,yaxis=4"

 

That fixed it, except it is xaxis=4 yaxis=3. I suspect the five axis are x, y, x rotation, y rotation and z rotation. Z rotation being the two analog shoulder buttons.There's also the hat, which I think is an 8-way digital version of x and y (e.g., Dpad).

Link to comment
Share on other sites

The dpad is detected by jzintv as a hat and mapped as JS0_HAT0_dd e.g. JS0_HAT0_NE

 

And for night stalker, ad&d, and deadly discs; you can map the dpad to the opposite keypad so you can run & fire at the same time.

 

For microsurgeon, you can map the left stick to the right controller disc so you can move and fire at the same time.

Edited by mr_me
Link to comment
Share on other sites

The dpad is detected by jzintv as a hat and mapped as JS0_HAT0_dd e.g. JS0_HAT0_NE

 

And for night stalker, ad&d, and deadly discs; you can map the dpad to the opposite keypad so you can run & fire at the same time.

 

For microsurgeon, you can map the left stick to the right controller disc so you can move and fire at the same time.

 

I've been using the F310 for Ms. Night Stalker to play it Robotron-style. Works pretty slick, although I'm may attempt to get the dpad to be the disk for such 4-way games and the right stick for fire as the analog stick can be imprecise..

It seems unlikely, but is there a rom for jzintv that works like the controller diagnostics application in the diagnostic cart that would detect what a button push on a PC controller corresponds to what intellivision intellivision controller button in jzINTV?

Link to comment
Share on other sites

I had a similar issue with imprecision when mapping 4-way games to an Xbox 360 controller. The solution I settled on was to map directional shooting to A/B/X/Y and then use combo button presses for any games requiring 8-way shooting. The resulting keyboard hack file would look like below (for an Xbox 360 controller), including mr_me's opposite keypad trick which was unknown to me until I saw this post! This approach also works well in sports games requiring 1-9 keypad zone press e.g. Slam Dunk, Spiker & Super Pro Football (4 buttons and 4 combos for 1-4 and 6-9, plus RB as "5").

.

ADD_COMBO 0 JS0_BTN_02 JS0_BTN_03
ADD_COMBO 1 JS0_BTN_03 JS0_BTN_01
ADD_COMBO 2 JS0_BTN_00 JS0_BTN_01
ADD_COMBO 3 JS0_BTN_00 JS0_BTN_02
COMBO0 PD0R_KP1
COMBO1 PD0R_KP3
COMBO2 PD0R_KP9
COMBO3 PD0R_KP7
JS0_BTN_00 PD0R_KP8
JS0_BTN_01 PD0R_KP6
JS0_BTN_02 PD0R_KP4
JS0_BTN_03 PD0R_KP2
Edited by ts-x
  • Like 1
Link to comment
Share on other sites

 

I had a similar issue with imprecision when mapping 4-way games to an Xbox 360 controller. The solution I settled on was to map directional shooting to A/B/X/Y and then use combo button presses for any games requiring 8-way shooting. The resulting keyboard hack file would look like below (for an Xbox 360 controller), including mr_me's opposite keypad trick which was unknown to me until I saw this post! This approach also works well in sports games requiring 1-9 keypad zone press e.g. Slam Dunk, Spiker & Super Pro Football (4 buttons and 4 combos for 1-4 and 6-9, plus RB as "5").

.

ADD_COMBO 0 JS0_BTN_02 JS0_BTN_03
ADD_COMBO 1 JS0_BTN_03 JS0_BTN_01
ADD_COMBO 2 JS0_BTN_00 JS0_BTN_01
ADD_COMBO 3 JS0_BTN_00 JS0_BTN_02
COMBO0 PD0R_KP1
COMBO1 PD0R_KP3
COMBO2 PD0R_KP9
COMBO3 PD0R_KP7
JS0_BTN_00 PD0R_KP8
JS0_BTN_01 PD0R_KP6
JS0_BTN_02 PD0R_KP4
JS0_BTN_03 PD0R_KP2

I'm finding the Dpad on the F310 surprisingly bad for 4-way games, not only for jzintv but also MAME arcade games like pac-man. In fact, it seems like the analog stick works better than the dpad. I may have to try the 4-button approach or maybe the PS2 dual shock works better. Seems like that worked well on pac-man on the Atari 7800 with its adapter.

Link to comment
Share on other sites

Just a note on the analog sticks: You can tell jzIntv to "quantize" analog sticks to 4 way, which may help in some games. Just add ",4dir" to the --js flag for that analog axis.

 

Also, you can also have jzintv map an analog stick to joystick buttons.

 

I discovered w/ my wife's generic Xbox360 controller that yes, you get 5 analog axes and the pairs are 0,1 and 3,4. The shoulder buttons formed a weird axis on axis #2, where one shoulder gave a negative swing and the other gave a positive swing. But, that only happened on Windows. If I used it on my Mac, I only got 4 analog axes.

 

The "button" mode was to allow that other non-stick axis to become a button. "button" mode is really a "2 direction mode."

 

The command line I came up with to make that controller work for another user looked like this:

 

--js0a="xaxis=0,yaxis=1" --js0b="xaxis=3,yaxis=4" --js0c="xaxis=2,button"

 

The corresponding kbdhackfile contained:

JS0C_E PD0L_A_R
JS0C_W PD0L_A_L
That mapped the shoulder buttons to the lower left/right action buttons.
All of this should be in the 12-25-2018 jzIntv release.
Link to comment
Share on other sites

  • 3 years later...
On 3/14/2019 at 12:39 AM, intvnut said:

Just a note on the analog sticks: You can tell jzIntv to "quantize" analog sticks to 4 way, which may help in some games. Just add ",4dir" to the --js flag for that analog axis.

 

Also, you can also have jzintv map an analog stick to joystick buttons.

 

I discovered w/ my wife's generic Xbox360 controller that yes, you get 5 analog axes and the pairs are 0,1 and 3,4. The shoulder buttons formed a weird axis on axis #2, where one shoulder gave a negative swing and the other gave a positive swing. But, that only happened on Windows. If I used it on my Mac, I only got 4 analog axes.

 

The "button" mode was to allow that other non-stick axis to become a button. "button" mode is really a "2 direction mode."

 

The command line I came up with to make that controller work for another user looked like this:

 

--js0a="xaxis=0,yaxis=1" --js0b="xaxis=3,yaxis=4" --js0c="xaxis=2,button"

 

The corresponding kbdhackfile contained:

 
JS0C_E PD0L_A_R
JS0C_W PD0L_A_L
 
That mapped the shoulder buttons to the lower left/right action buttons.
 
All of this should be in the 12-25-2018 jzIntv release.

Just downloaded the latest 2020 version of jzIntv for Windows and I must say it's awesome once I read everything and figured how how to map the controls.  However, the commands above along with the kbdhackfile entries listed (which are duplicated in the joystick.txt file) just do not work for me.  I'm just trying to get the triggers to work in Super Pro Baseball for batting, and in both the XBox 360 controller and the XBox Series X/S they don't work.  In event_diag.rom, with "--js0a="xaxis=0,yaxis=1" --js0b="xaxis=3,yaxis=4" --js0c="xaxis=2,buttonentered, in both the USB connected XBox Series X/S and using a wireless adapter for Windows with the XBox 360, the left trigger is coming up JS0C_E and JS0C_W, and the right trigger is showing up JS0D_E and JS0D_W.  I've resorted to using JoyToKey to map the triggers and have jzIntv set up everything else.  (BTW, JoyToKey now has an option to map the additional Share key for the XBox Series X/S and the latest version works now with a USB wired connection, though the website says it only works for bluetooth.)

 

Anyway, just curiious why the triggers aren't working for me.  The batter will either swing once and everything will then freeze, or he will repeatedly swing by himself after subsequent pitches after pushing one of the triggers once.   Some changes in the 2020 jzIntv release maybe?  XBox Series X/S controller Windows update from Microsoft?  

Link to comment
Share on other sites

Sorry the second button parameter is wrong and does not nothing, --js0c="button" --js0d="button" is correct.  If you add the xaxis= parameter to remap the axis you have to know how analog axis are numbered for your controllers and specify the correct number.  Normally mapping analog inputs to buttons in jzintv screws with the emulation, but it seems to work with the button parameter.   You'll also have to adjust the kbdhackfile mapping if your controller differs from the example given.

Edited by mr_me
Link to comment
Share on other sites

13 hours ago, mr_me said:

Sorry the second button parameter is wrong and does not nothing, --js0c="button" --js0d="button" is correct.  If you add the xaxis= parameter to remap the axis you have to know how analog axis are numbered for your controllers and specify the correct number.  Normally mapping analog inputs to buttons in jzintv screws with the emulation, but it seems to work with the button parameter.   You'll also have to adjust the kbdhackfile mapping if your controller differs from the example given.

Nope.  Unfortunately, same result.  In the baseball game you use the right controller, so I tried all sorts of variations on JS0C_E  PD0R_A_R, JS0C_W PD0R_A_L, JS0D_E  PD0R_A_R, JS0D_W PD0R_A_L.  Both C, both D, one of each, 2 entries, 4 entries...  It will either 1. Do nothing  2. Repeatedly swing after one trigger pull or 3. Work for one swing then the game freezes.  BTW, defining the xaxis as 2 or 5 (in JoyToKey it lists it as 5) will at least get a result.  However, just the glitchy ones that either keep repeating or work once then freeze the screen.

Link to comment
Share on other sites

5 hours ago, larryvgs said:

Nope.  Unfortunately, same result.

I notice event-diag shows both directions with your triggers.  Normally it shows the same direction on push and release in one axis.  Maybe jzintv needs some threshold, or range settings.  Not sure what it is but that doesn't seem right.

 

With both your controllers, one trigger is analog axis number two and the other one axis number five?  Did you put both in the command line with the button parameter?  I'm assuming you're using the digital shoulders for other functions, jzintv always had trouble mapping analog inputs to buttons where joytokey has no problem with it, although I can get it working in jzintv with the button parameter.

Link to comment
Share on other sites

17 hours ago, mr_me said:

I notice event-diag shows both directions with your triggers.  Normally it shows the same direction on push and release in one axis.  Maybe jzintv needs some threshold, or range settings.  Not sure what it is but that doesn't seem right.

 

With both your controllers, one trigger is analog axis number two and the other one axis number five?  Did you put both in the command line with the button parameter?  I'm assuming you're using the digital shoulders for other functions, jzintv always had trouble mapping analog inputs to buttons where joytokey has no problem with it, although I can get it working in jzintv with the button parameter.

I'm sorry, I should have been more clear.  Using an XBox Series X/S controller connected via USB.  In event-diag with the commandline entries as shown below, the left trigger shows both JS0C_W and JS0C_E when held and the same when released, and for the right trigger shows both JSOD_W and JS0D_E when held and the same when released.  For the command line I tried both js0c and js0d with xaxis as 2, and both with xaxis as 5 with the same result.  So I tried js0c="xaxis=2, button" js0d="xaxis=2, button" as well as js0c="xaxis=5, button" js0d="xaxis=5, button".  I also tried js0c="button" js0d="button" which is what is it currently.  Yes, I am using the digital shoulders for other functions (to select left and right fielders) and I'm trying to get it to work in Super Pro Baseball, with the same result in World Championship Baseball.

 

Current commandline entries: --js0a="xaxis=0,yaxis=1" --js0b="xaxis=3,yaxis=4" --js0c="button" --js0d="button"

 

Currently with the below config, when coming to bat in the bottom of the inning, the right or left trigger to swing or bunt will both work on first try, then it will keep swinging or bunting on its own after that.  Then when the next inning starts, no fielder can be selected.

 

; ***** Joystick #0 - Right Controller *****
; ** Side Buttons and Numeric Keypad **
JS0_BTN_04  PD0R_KP1  ; left upper shoulder
JS0_BTN_05  PD0R_KP3  ; right upper shoulder
JS0_BTN_02  PD0R_KP7  ; X
JS0_BTN_03  PD0R_KP5  ; Y
JS0_BTN_00  PD0R_KP0  ; A
JS0_BTN_01  PD0R_KP9  ; B
JS0_BTN_10  PD0R_KP2  ; XBox
JS0_BTN_06  PD0R_KP4  ; View
JS0_BTN_07  PD0R_KP8  ; Menu
JS0C_E         PD0R_A_R  ; left lower trigger (bunt)
JS0D_W        PD0R_A_T  ; right lower trigger (swing)

 

Link to comment
Share on other sites

There really shouldn't be a js0d unless jzintv is finding a sixth axis.  How many axes does Jzintv says it finds when it starts?  Also each trigger shouldn't be giving both axes directions as event-diag shows.  I'm assuming joytokey and other game controller diags shows five axes with both triggers on the same axes.  If jzintv recognised it properly then your original settings would be correct. --js0a="xaxis=0,yaxis=1" --js0b="xaxis=3,yaxis=4" --js0c="xaxis=2,button"

 

I don't have a controller with analog triggers but I have no problem mapping buttons to the analog axes it does have using current jzintv and the button parameter.  Which SDL version of Jzintv are you using?  You can try the other to see if it makes a difference. 

 

 

Link to comment
Share on other sites

"I'm assuming joytokey and other game controller diags shows five axes with both triggers on the same axes."  No, JoyToKey is finding 6 with the triggers sharing axis 5.

jzIntv is finding 6 also.

 

Ok, so with --js0a="xaxis=0,yaxis=1" --js0b="xaxis=3,yaxis=4" --js0c="xaxis=2,button", and in the config file...

JS0C_E    PD0R_A_R
JS0C_W   PD0R_A_T

...the triggers do not work at all.

 

Here is what jzIntv shows...

Found 1 joystick(s)
joy:  Joystick JS0 "Xbox One Elite Controller"
joy:     6 axes, 0 trackball(s), 1 hat(s), 11 button(s)
joy:     JS0A: X-Axis = axis 0  Y-Axis = axis 1  Autocenter = ON
joy:           Push threshold = 25%  Release threshold = 17%
joy:           X range = [-49%,50%]  Y range = [-49%,50%]
joy:           Directions = 16
--js0a="xaxis=0,yaxis=1,ac,push=25,rels=17,xrng=-49:50,yrng=-49:50,16dir"
joy:     JS0B: X-Axis = axis 3  Y-Axis = axis 4  Autocenter = ON
joy:           Push threshold = 25%  Release threshold = 17%
joy:           X range = [-48%,51%]  Y range = [-47%,52%]
joy:           Directions = 16
--js0b="xaxis=3,yaxis=4,ac,push=25,rels=17,xrng=-48:51,yrng=-47:52,16dir"
joy:     JS0C: X-Axis = axis 2  Y-Axis = None  Autocenter = ON
joy:           Push threshold = 25%  Release threshold = 17%
joy:           X range = [-49%,50%]  Y range = N/A
joy:           Directions = 2
--js0c="xaxis=2,ac,push=25,rels=17,xrng=-49:50,button"

 

I'm using the SDL2 build.  Will try SDL1 I guess.

 

Edited by larryvgs
Link to comment
Share on other sites

UPDATE AND SUCCESS!  The SDL1 build using the above entries works!

 

In jzIntv SDL2 it shows...

Found 1 joystick(s)
joy:  Joystick JS0 "Xbox One Elite Controller"
joy:     6 axes, 0 trackball(s), 1 hat(s), 11 button(s)

 

But in jzIntv SDL1...

Found 1 joystick(s)
joy:  Joystick JS0 "Controller (Xbox One For Windows)"
joy:     5 axes, 0 trackball(s), 1 hat(s), 16 button(s)

 

So the same XBox Series X/S controller is recognized as different controllers in SDL1 and SDL2.

And apparently from what I'm reading this might be a recent Microsoft firmware bug where it's showing up as a generic 6 axes controller if connected to Bluetooth, but as an XBox One controller if connected via USB.  Would not explain why the SDL2 build is seeing 6 axes since I am connected via USB though.

 

Anyway, I don't care.  It works now.  ?

Link to comment
Share on other sites

BTW, similar results using an XBox 360 wireless controller.  SDL2 reports 6 axes and SDL1 reports 5.

 

SDL2

Found 1 joystick(s)
joy:  Joystick JS0 "XInput Controller #1"
joy:     6 axes, 0 trackball(s), 1 hat(s), 11 button(s)

 

SDL1

Found 1 joystick(s)
joy:  Joystick JS0 "Controller (XBOX 360 For Windows)"
joy:     5 axes, 0 trackball(s), 1 hat(s), 10 button(s)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...