New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default joystick mapping incompatible with Retro-bit USB device. #13

Closed
Deledrius opened this Issue Feb 18, 2017 · 10 comments

Comments

Projects
None yet
2 participants
@Deledrius

Deledrius commented Feb 18, 2017

After setting up an installation of v9t9 on OSX with a Retro-bit Atari USB (I couldn't find a TI replica, sadly), I was disappointed to discover that the emulator seems to believe the joystick is stuck pressing "left". Using Enjoyable, I was able to emulate keypresses using the joystick (so I know the joystick is working correctly). This is not an ideal solution however, because in addition to needing to be enabled before each play session, it only appears to support simulating presses and not holds. Games like Parsec and Burgertime quickly become tedious if the player needs to pump the joystick in order to move. 😉

Is there a way to change the default mapping, or perhaps calibrate the joystick?

@eswartz

This comment has been minimized.

Show comment
Hide comment
@eswartz

eswartz Feb 19, 2017

Owner

Sorry about the trouble. As far as controllers go, I've only tested with USB gamepad controllers so far (XBox, PS3, Logitech T310), which map analog-style inputs to "hat switch left", "hat switch right", or "axis left", "axis right", etc. I'm not sure if all joysticks act the way you describe or just yours.

And unfortunately the retro-bit site is down at the moment, so I can't order one of those for myself.

Are you willing to do some testing? There's a way to query the lwjgl library directly for how it sees the joystick, which may help me see what's wrong.

If you download lwjgl_test.jar and put it alongside the other extracted v9t9j libraries (note the path printed on startup of v9t9.sh, something like /var/folders/.....longRandomChars/T/.v9t9j/exec/libs), then try:

java -cp .:lwjgl.jar:lwjgl_test.jar:jinput.jar org.lwjgl.test.input.TestControllers

it will put up a UI showing the ways various joystick/controller inputs map to various directions. Any axis-like ones (X, Y, Z, RZ, POV X, POV Y) are the ones to note. Are any of those stuck? They should rest at 0 and range from -1.0 to 1.0.

Owner

eswartz commented Feb 19, 2017

Sorry about the trouble. As far as controllers go, I've only tested with USB gamepad controllers so far (XBox, PS3, Logitech T310), which map analog-style inputs to "hat switch left", "hat switch right", or "axis left", "axis right", etc. I'm not sure if all joysticks act the way you describe or just yours.

And unfortunately the retro-bit site is down at the moment, so I can't order one of those for myself.

Are you willing to do some testing? There's a way to query the lwjgl library directly for how it sees the joystick, which may help me see what's wrong.

If you download lwjgl_test.jar and put it alongside the other extracted v9t9j libraries (note the path printed on startup of v9t9.sh, something like /var/folders/.....longRandomChars/T/.v9t9j/exec/libs), then try:

java -cp .:lwjgl.jar:lwjgl_test.jar:jinput.jar org.lwjgl.test.input.TestControllers

it will put up a UI showing the ways various joystick/controller inputs map to various directions. Any axis-like ones (X, Y, Z, RZ, POV X, POV Y) are the ones to note. Are any of those stuck? They should rest at 0 and range from -1.0 to 1.0.

@Deledrius

This comment has been minimized.

Show comment
Hide comment
@Deledrius

Deledrius Feb 20, 2017

Ah, that's a good guess. I know I had tried it out with a gamepad myself and it worked fine. Unfortunately I don't have access to the equipment in question at the moment (I left it with the person for whom it was purchased) but I will hopefully be able to try out your test next week. I will report back with the results then. Thanks for your help!

Deledrius commented Feb 20, 2017

Ah, that's a good guess. I know I had tried it out with a gamepad myself and it worked fine. Unfortunately I don't have access to the equipment in question at the moment (I left it with the person for whom it was purchased) but I will hopefully be able to try out your test next week. I will report back with the results then. Thanks for your help!

@eswartz

This comment has been minimized.

Show comment
Hide comment
@eswartz

eswartz Mar 4, 2017

Owner

I acquired one of these joysticks and see that it has an... interesting... configuration. (lwjgl thinks this thing exposes four X axes, the first of which is stuck at -0.99, the next two at zero, and the fourth actually representing the X of the stick). Enchanting.

Owner

eswartz commented Mar 4, 2017

I acquired one of these joysticks and see that it has an... interesting... configuration. (lwjgl thinks this thing exposes four X axes, the first of which is stuck at -0.99, the next two at zero, and the fourth actually representing the X of the stick). Enchanting.

@Deledrius

This comment has been minimized.

Show comment
Hide comment
@Deledrius

Deledrius Mar 5, 2017

Wow, thanks for looking into it! I'm sorry I haven't yet had access to test it for myself. What a strange configuration they chose for the device... it's no wonder the emulator was confused by it.

Does controller-fixes-13 fix the issue for you? I didn't have any difficulty building the project, so I'll give this a try against ours soon (I hope).

Deledrius commented Mar 5, 2017

Wow, thanks for looking into it! I'm sorry I haven't yet had access to test it for myself. What a strange configuration they chose for the device... it's no wonder the emulator was confused by it.

Does controller-fixes-13 fix the issue for you? I didn't have any difficulty building the project, so I'll give this a try against ours soon (I hope).

@eswartz

This comment has been minimized.

Show comment
Hide comment
@eswartz

eswartz Mar 5, 2017

Owner

Yes, I was able to work around it initially by hacking the way buttons/axes are detected. But the default detection leaves a lot to be desired, so I'm beefing it up with user-editable configurations. Working on that now.

Owner

eswartz commented Mar 5, 2017

Yes, I was able to work around it initially by hacking the way buttons/axes are detected. But the default detection leaves a lot to be desired, so I'm beefing it up with user-editable configurations. Working on that now.

@Deledrius

This comment has been minimized.

Show comment
Hide comment
@Deledrius

Deledrius Mar 5, 2017

Excellent. 😄 Incidentally, building that branch last night required me to manually add the log4j dependency to the v9t9-server module's .classpath and build.xml. I see you've done considerably more work on it this morning, so you may have already caught it, but just in case...

Deledrius commented Mar 5, 2017

Excellent. 😄 Incidentally, building that branch last night required me to manually add the log4j dependency to the v9t9-server module's .classpath and build.xml. I see you've done considerably more work on it this morning, so you may have already caught it, but just in case...

@eswartz

This comment has been minimized.

Show comment
Hide comment
@eswartz

eswartz Mar 5, 2017

Owner

Good, thanks for catching that. I would have seen it eventually -- still in Eclipse at the moment.

The UI is mostly done, but still has a flaw in that only one combination of controllers is remembered at a time, so one's painstakingly established settings are lost if you run with a different setup. I'll work on that. But as for now, if you want to try with only that joystick and disable that bogus X axis, have at it.

Owner

eswartz commented Mar 5, 2017

Good, thanks for catching that. I would have seen it eventually -- still in Eclipse at the moment.

The UI is mostly done, but still has a flaw in that only one combination of controllers is remembered at a time, so one's painstakingly established settings are lost if you run with a different setup. I'll work on that. But as for now, if you want to try with only that joystick and disable that bogus X axis, have at it.

@eswartz

This comment has been minimized.

Show comment
Hide comment
@eswartz

eswartz Mar 6, 2017

Owner

I think this should be fixed satisfactorily in the 2017/03/05 release.

Owner

eswartz commented Mar 6, 2017

I think this should be fixed satisfactorily in the 2017/03/05 release.

@eswartz eswartz closed this Mar 6, 2017

@Deledrius

This comment has been minimized.

Show comment
Hide comment
@Deledrius

Deledrius Mar 8, 2017

Terrific! It works fine with my gamepad. I hope to try it with the Retro-bit soon. Thanks for adding this!

👍

Deledrius commented Mar 8, 2017

Terrific! It works fine with my gamepad. I hope to try it with the Retro-bit soon. Thanks for adding this!

👍

@Deledrius

This comment has been minimized.

Show comment
Hide comment
@Deledrius

Deledrius Aug 27, 2017

Sorry, I forgot to update this after testing with the Retro-bit, but it works! Thanks again. 😃

Deledrius commented Aug 27, 2017

Sorry, I forgot to update this after testing with the Retro-bit, but it works! Thanks again. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment