randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
479 stars 56 forks source link

With GPIO 5 Custom defined, USB Joystick not working #133

Open LouCipher666 opened 4 years ago

LouCipher666 commented 4 years ago

Hello, here's the problem.

When I select GPIO configuration 5, I cannot use my USB joystick in games. I would like to connect a joystick via GPIO and control 2 buttons that already have a GPIO port (I use the case as PI1541 when playing on the original c64). Therefore I use GPIO configuration 5.

On the usb port I use the Thec64 joystick. In the menu everything works without problems. But as soon as I try to use the joystick in the game nothing works.

If I set GPIO to a different configuration the joystick works again immediately.

randyrossi commented 4 years ago

Hi. Thanks for the report. I think I see the issue. The custom GPIO option assumes you have joystick directions or buttons in the config and will clobber any usb signals. I'll have to change it to only set joystick values if you have at least one joystick direction/button set. (I assume your two buttons are not joystick related? They are other functions?)

On Thu, May 28, 2020 at 1:20 AM LouCipher666 notifications@github.com wrote:

Hello, here's the problem.

When I select GPIO configuration 5, I cannot use my USB joystick in games. I would like to connect a joystick via GPIO and control 2 buttons that already have a GPIO port (I use the case as PI1541 when playing on the original c64). Therefore I use GPIO configuration 5.

On the usb port I use the Thec64 joystick. In the menu everything works without problems. But as soon as I try to use the joystick in the game nothing works.

If I set GPIO to a different configuration the joystick works again immediately.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKBAHFG37Z2OVGN7JG3RTXYCFANCNFSM4NMX7W2A .

-- Randy Rossi

LouCipher666 commented 4 years ago

Hi. Thanks for the answer.I use the buttons as menu and menu back buttons. But I also want to control a joystick via GPIO. My configuration is: a joystick port via GPIO for an original joystick and a THEC64 joystick via USB. The TheC64 joystick has many buttons, which makes it easy to use the BMC64 without a keyboard. Currently I use the GPIO 1 configuration, because I connected the joystick port according to the GPIO 1 scheme. This works fine, only the two buttons are connected to the wrong GPIO. But since I want to continue using the case for the PI1541, I don't want to change the buttons. I would like to take this opportunity to thank you for this great project. Through people like you, the Commodore 64 will live forever.