SlithyMatt/x16-chasevault

Joystick support broken

Closed this issue · 3 comments

On both the emulator and FPGA hardware, only the start button works on real joysticks. This is because the joystick_tick routine assumes JOYSTICK_GET will set X to 0x01, which it only does for keyboard joystick emulation.

What emulator release broke this? I'm not sure if I tested my USB SNES-style controller with the latest build (R37), but it definitely worked for earlier builds.

I've only tested on r37. Not sure when/if it changed, but here's the current documentation for joystick_get. This should be reproduceable in the emulator, I tried with both "-joy1 SNES" and "-joy1 NES".

Fix committed to master. Same bug also existed with joystick 2, but only showed up in joystick test program, not game. Added that fix in addition to pull request.