SavedByZero Posted December 27, 2019 Share Posted December 27, 2019 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? Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 27, 2019 Share Posted December 27, 2019 (edited) 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 December 27, 2019 by mr_me Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 27, 2019 Author Share Posted December 27, 2019 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) Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 28, 2019 Author Share Posted December 28, 2019 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. Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 28, 2019 Share Posted December 28, 2019 Did you map the four throwing diagonals? E.g. js3_ne pd0r_kp3 If you don't map diagonals then they can cause tron to move rather than throwing the disc. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 28, 2019 Author Share Posted December 28, 2019 Well, I added this, to no avail: ;** 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 Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 28, 2019 Author Share Posted December 28, 2019 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 Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 28, 2019 Share Posted December 28, 2019 (edited) 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 December 28, 2019 by mr_me Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 28, 2019 Author Share Posted December 28, 2019 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. Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 28, 2019 Share Posted December 28, 2019 (edited) 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 December 28, 2019 by mr_me Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 29, 2019 Author Share Posted December 29, 2019 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. Quote Link to comment Share on other sites More sharing options...
+fdr4prez Posted December 29, 2019 Share Posted December 29, 2019 There is a rom for testing the controllers, so you can test out the kdbhackfile to see if it is working as intended. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 29, 2019 Author Share Posted December 29, 2019 32 minutes ago, fdr4prez said: There is a rom for testing the controllers, so you can test out the kdbhackfile to see if it is working as intended. I’ve already used event_diag.rom to identify my controllers and their outputs, or did you mean something else? Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 29, 2019 Share Posted December 29, 2019 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. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 29, 2019 Author Share Posted December 29, 2019 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. Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 29, 2019 Share Posted December 29, 2019 If returning the joystick to center lets you run normally then the software is working as expected. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 29, 2019 Author Share Posted December 29, 2019 (edited) 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 December 29, 2019 by SavedByZero Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 29, 2019 Share Posted December 29, 2019 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. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 29, 2019 Author Share Posted December 29, 2019 (edited) 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 December 29, 2019 by SavedByZero Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 29, 2019 Share Posted December 29, 2019 (edited) 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 December 29, 2019 by mr_me Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 29, 2019 Author Share Posted December 29, 2019 Yeah, was afraid of that. That must mean it’s tied to jzintv and we need to contact the authors... Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted December 31, 2019 Author Share Posted December 31, 2019 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. Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 31, 2019 Share Posted December 31, 2019 (edited) 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 December 31, 2019 by mr_me Quote Link to comment Share on other sites More sharing options...
CeleritasBob Posted November 7, 2020 Share Posted November 7, 2020 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. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted July 2, 2021 Author Share Posted July 2, 2021 (edited) 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 July 2, 2021 by SavedByZero Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.