Jump to content
IGNORED

Need help Key mapping for Tron Deadly Discs:


SavedByZero

Recommended Posts

Hey all, so I have a keyboard hack file for Tron DD that attempts to use my player 1 RetroPie joystick to move Tron and my player 2 RetroPie joystick to throw the disc in whatever direction. I need to do it this way because using buttons to throw with my setup would be too awkward. 
 

anyhow, it works...for all of five seconds. Then the disc tossing joystick stops responding and Tron walks indefinitely in one direction. I have commands like this for moving:

JS2A_E PD0L_J_E

 

and commands like this for throwing using the second joystick: 

JS3A_E PD0L_KP6 ; throw disc east

 

any idea what’s wrong with this format? Is it just not possible to map joystick input to Intellivision button input? 

 

 

Link to comment
Share on other sites

I don't put the A in js3A.  I would just put js3_e for example.  I would put js3b_e if I was referencing the second analog stick on a dual stick controller.  But if it works for five seconds I don't see why it should stop.

 

Are you using the jzintv that comes with retropie or the one from the jzintv website?

 

Once you get it working you can map the second joystick to the right keypad.  That way you can run and throw at the same time.

 

Edit:

Does it fail if you run but don't throw the disc?

Edited by mr_me
Link to comment
Share on other sites

1 hour ago, mr_me said:

I don't put the A in js3A.  I would just put js3_e for example.  I would put js3b_e if I was referencing the second analog stick on a dual stick controller.  But if it works for five seconds I don't see why it should stop.

 

Are you using the jzintv that comes with retropie or the one from the jzintv website?

 

Once you get it working you can map the second joystick to the right keypad.  That way you can run and throw at the same time.

 

Edit:

Does it fail if you run but don't throw the disc?

Actually, the disc throwing does seem connected to it. Never fails if I don’t throw the disc.  It doesn’t *always* fail when I throw the disc — often it works as expected, but the more often I do it, the greater chance of all the controls getting screwed up. Joysticks switch tasks sometimes. Things generally go nuts.

 

I ended up installing it through RetroPie but used some of the files from the GitHub repo because the launch commands weren’t finding anything in that whole opt/retropie structure, and it wasn’t working. 
 

Other than this game it has mostly worked as expected (with the exception of Jetsons Ways with Words, which seems to ignore my ecs mod of the keyboard hack and I can’t move George Jetson at all)

Link to comment
Share on other sites

Update: I found the exact behavior causing this. Not a combo of joysticks as I originally thought. It happens when I hold the second joystick after I use it to toss the disc, then without releasing it, move it to another direction (East to northeast, for example, without releasing it). That, for reasons beyond my understanding, fubars the key and joystick mapping.

Link to comment
Share on other sites

My entire map:

 

;** Side buttons and Numeric Keypad **
JS2_BTN_00 PD0L_A_T
JS2_BTN_01 PD0L_A_L
JS2_BTN_02 PD0L_A_R
JS2_BTN_03 PD0L_KP5

;*** left DISC (move tron) ***
JS2_E PD0L_J_E
JS2_NE PD0L_J_NE
JS2_N PD0L_J_N
JS2_NW PD0L_J_NW
JS2_W PD0L_J_W
JS2_SW PD0L_J_SW
JS2_S PD0L_J_S
JS2_SE PD0L_J_SE


;*** right DISC (throw disc) ***
JS3_E PD0L_KP6
JS3_NE PD0L_KP3
JS3_N PD0L_KP2
JS3_NW PD0L_KP1
JS3_W PD0L_KP4
JS3_SW PD0L_KPC
JS3_S PD0L_KP0
JS3_SE PD0L_KPE


;** offload standard second disc input, so signals don't get scrambled 
JS3_BTN_00  PD0R_J_E
JS3_BTN_01  PD0R_J_NE
JS3_BTN_02  PD0R_J_N
JS3_BTN_03  PD0R_J_NW
JS3_BTN_04  PD0R_J_W
JS3_BTN_05  PD0R_J_SW
JS3_BTN_06  PD0R_J_S
JS3_BTN_07  PD0R_J_SE

Link to comment
Share on other sites

Your last set is assigning running actions to buttons.  Try mapping to right keypad buttons.  Do you have a map 0 statement at the top?

 

Do the controls work again if you reset jzintv?  If you exit jzintv and restart the game?

Edited by mr_me
Link to comment
Share on other sites

Yes to Map 0 at the top, I just neglected to copy that part. And yes, when I exit to the list of games and restart, the controls work again (until I move the firing joystick in an arc again, it doesn’t matter which direction the arc goes).

 

How do you mean, try mapping to right keypad buttons? That last set is only my way of making sure the right joystick movements aren’t assigned to the right joystick itself, since I use the right joystick for firing.

Link to comment
Share on other sites

The last section is mapping buttons, not the joystick. Is joystick three an analog stick or a digital 8-way stick? Also what is controller "0" doing, it's still the default map.

 

Does your jzintv command line have any --js switches?

 

I don't see how the hackfile can cause your problem but unintentional button presses or joystick moves could.  If you're sure there's no interference in the physical controls you might have to report it to the author.

Edited by mr_me
Link to comment
Share on other sites

8 hours ago, mr_me said:

The last section is mapping buttons, not the joystick. Is joystick three an analog stick or a digital 8-way stick? Also what is controller "0" doing, it's still the default map.

 

Does your jzintv command line have any --js switches?

 

I don't see how the hackfile can cause your problem but unintentional button presses or joystick moves could.  If you're sure there's no interference in the physical controls you might have to report it to the author.

I use this: https://www.amazon.com/gp/aw/d/B07JFXQSM5

 

My command for this particular setup is: jzint-trondd="/opt/retropie/emulators/jzintv/bin/jzintv -v1 --kbdhackfile=/opt/retropie/configs/intellivision/hackfile_trondd.cfg -f1 -q -p /home/pi/RetroPie/BIOS %ROM%"

 

I don’t have a controller 0 that I know of; js2 is actually controller 1, js3 is controller two, and the one listed as js1 is controller 3 (event_diag.rom has different ideas about what the controllers are named than my emulationstation config).

 

You’re right though, I think this may be a bug in the emulator, or something to do with how there’s no “Up” signal called on the disc throwing if I don’t move the joystick back to the middle after throwing it.

Link to comment
Share on other sites

5 minutes ago, mr_me said:

What I don't understand is why you're holding the throwing joystick rather than releasing it back to center; because you can't run while you're doing that.

Like I said, it’s not intentional. I move and release to throw, but sometimes my hand might stick and slide sideways a little before releasing.  I’ll try messing with the rels and push thresholds to see if I can make the rels automatic maybe.

Link to comment
Share on other sites

8 hours ago, mr_me said:

If returning the joystick to center lets you run normally then the software is working as expected.

No no. I’m saying that if I move the joystick one direction, then *without returning it to the center* slide it one way or another, the whole system breaks. Even if I return it to the center *after* doing that, it remains broken.

 

Thanks for to help but at this point I’m thinking it’s probably a bug. If I run event_diag, I can see that when I slide any given joystick before returning it to the center, it’s missing an “Up” signal for every position but the final one, and I bet that has something to do with it. Changing the maps for joystick 3 didn’t do anything either. I’ll find a way to report it.

Edited by SavedByZero
Link to comment
Share on other sites

I tried duplicating this bug but couldn't, although I am using the latest windows version.  If it's a bug it could be specific to the rpi version.  If it's a bug, it could be in the sdl components which the jzintv author has no control over.  And someone else with an rpi should be able to duplicate it.

Link to comment
Share on other sites

You took my exact hackfile and ran it with Tron Deadly Discs, used two joysticks, slid the disc throwing joystick around in an arc before returning it to the center, and it worked? In that case, what is your overall joystick setup like? Did you only have two or did you also have a keyboard and game pad plugged in, or some other setup?

What command did your emulator.cfg run? That may be most important .

Edited by SavedByZero
Link to comment
Share on other sites

I take it all back as I've duplicated your problem on windows with the latest jzintv.  It happens as soon as you press a diagonal joystick direction mapped to the intellivision keypad.  Not sure if the problem is sdl or jzintv.

 

I'm testing with a dpad, which is functionally equivalent to an 8-way joystick.  At first I used a d-pad seen as a digital hat which worked correctly but not the same as what you're doing.  A dpad or digital joystick seen as an analog joystick or any analog joystick would have this problem.  I tried adding --js1="8dir" to the command to force eight rather than 16 directions but it made no difference.

 

To work around the problem don't map the joystick to the intellivision keypad in jzintv.  Map the joystick to keyboard buttons outside of jzintv.  In windows I use something called joytokey.

Edited by mr_me
Link to comment
Share on other sites

Further investigation: swapping the diagonals for the straights in the key map doesn’t change anything; I still have to drag the joystick to a diagonal position to break the key map.

 

my theory is that it’s related to how none of the diagonal joystick movements ever signal an “up” response in event_diag — only the straight ones do. Maybe button presses weren’t designed to be tied to joystick movements that have no return signal?

 

still would be nice if they accounted for this, though I’ve had trouble finding a working email for the jzintv author. Not that I have any proof it’s something they can access.

Link to comment
Share on other sites

If it's fixable the author will fix it.  In the mean time you can workaround it by mapping the second joystick to computer keyboard buttons outside jzintv.

 

There's a jzintv readme file with a contact email address.  The file is missing from the compiled archive however, but it is in the source code archive.  Or you can send a private message to atariage user intvnut.

Edited by mr_me
Link to comment
Share on other sites

  • 10 months later...

There is an excellent fix for this if you haven't found it yet. You have to use dudleydes' xboxdrv configuration. If you use the xpad driver, it can be mapped, but it hangs, as you noticed. If you use xboxdrv to create js1, the dpad and right analog stick can be swapped and the system no longer freezes when you move the right stick in an arc. You'll have to use event_diag.rom to identify the buttons, as they are different codes with xboxdrv. I have it working with a Wireless Xbox One Controller on retropie.  

Link to comment
Share on other sites

  • 7 months later...
On 11/7/2020 at 9:47 AM, CeleritasBob said:

There is an excellent fix for this if you haven't found it yet. You have to use dudleydes' xboxdrv configuration. If you use the xpad driver, it can be mapped, but it hangs, as you noticed. If you use xboxdrv to create js1, the dpad and right analog stick can be swapped and the system no longer freezes when you move the right stick in an arc. You'll have to use event_diag.rom to identify the buttons, as they are different codes with xboxdrv. I have it working with a Wireless Xbox One Controller on retropie.  

Finally getting around to this a year and a half late.  Where do I put this file?  I was able to change the PS3 controller name near the top to the name of the PC/Xbox controller I just hooked up, but  I'm not sure where the actual .xboxdrv file belongs.  Is it in opt/retrope/configs/intellivision, where I stored my other keyboard hack files, or elsewhere?

Or is there just a long process for installing this kind of configuration that I need to brush up on?

Edited by SavedByZero
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...