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
474 stars 56 forks source link

Joystick without legacy keyboard on Upverter board? #230

Closed Deadweasel closed 1 year ago

Deadweasel commented 1 year ago

I am attempting to build my own C64 breadbin from-scratch, 3D-printing the case, building my own mechanical keyboard and using a Raspberry Pi 3A as the heart of the beast.

I have one of the Keyboard/Joystick interface boards, and am coupling it with a RPi 3A+ via brand-new 40pin IDE cable, exactly as shown in images, and have set BMC64 to use GPIO Config #2 (keybd/joy). It's powered with a 5V 3A wall wart, also brand new and seemingly working just fine.

I have also built my own joystick using new Sanwa arcade components, which seems to be working as intended if my multimeter is to be believed, which is to say that I get continuity on the expected pins with any given control input.

However, I still can't get any reaction from BMC64 on those joystick ports. I have even tried manually shorting pins on the ports themselves to emulate control inputs, and nothing seems to be getting through, as observed with multiple games and even a dedicated joystick testing program.

I don't have the keyboard built up yet, and have been using a Logitech K400 wireless keyboard/mouse combo for key inputs instead, and that has seemingly worked well enough for interacting with the system so far, so I'm now wondering: does the legacy keyboard harness need to be connected for the joystick ports to work? I've looked at the schematics for the board, and can see where the ports are joining up on the keyboard interface, but I can't tell if they need a keyboard connected to complete the circuit for them as well.

Can somebody advise if that's the case, and if so, might I be able to jump a couple of pins on the keyboard harness to get the joysticks working until I have the final keyboard actually built?

randyrossi commented 1 year ago

First make sure the 40 pin IDE cable is actually a 40 pin conductor. I don't think it can be an 80 conductor cable. They both have 40 pin connectors on the end so they may look similar. You can tell by counting the ridges along the cable.

The keyboard connector does not have to be hooked up for the joystick ports to work. I would suggest removing the cable from the Pi and shorting the pins on the Pi header directly as described by the table here: https://github.com/randyrossi/bmc64/blob/master/README.md#gpio-config-2--gpio-keyboard-and-joysticks

Can you also attach your settings.txt file as well?

On Sun, Jan 15, 2023 at 6:39 AM Deadweasel @.***> wrote:

I am attempting to build my own C64 breadbin from-scratch, 3D-printing the case, building my own mechanical keyboard and using a Raspberry Pi 3A as the heart of the beast.

I have one of the Keyboard/Joystick interface boards, and am coupling it with a RPi 3A+ via brand-new 40pin IDE cable, exactly as shown in images, and have set BMC64 to use GPIO Config #2 https://github.com/randyrossi/bmc64/issues/2 (keybd/joy). It's powered with a 5V 3A wall wart, also brand new and seemingly working just fine.

I have also built my own joystick using new Sanwa arcade components, which seems to be working as intended if my multimeter is to be believed, which is to say that I get continuity on the expected pins with any given control input.

However, I still can't get any reaction from BMC64 on those joystick ports. I have even tried manually shorting pins on the ports themselves to emulate control inputs, and nothing seems to be getting through, as observed with multiple games and even a dedicated joystick testing program.

I don't have the keyboard built up yet, and have been using a Logitech K400 wireless keyboard/mouse combo for key inputs instead, and that has seemingly worked well enough for interacting with the system so far, so I'm now wondering: does the legacy keyboard harness need to be connected for the joystick ports to work? I've looked at the schematics for the board, and can see where the ports are joining up on the keyboard interface, but I can't tell if they need a keyboard connected to complete the circuit for them as well.

Can somebody advise if that's the case, and if so, might I be able to jump a couple of pins on the keyboard harness to get the joysticks working until I have the final keyboard actually built?

— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/230, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKE7JZ2SS6DKWOGZ3HLWSPOXDANCNFSM6AAAAAAT32CTSQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Randy Rossi

Deadweasel commented 1 year ago

Okay, I checked on that, still no reaction. I tried shorting pins 20 and 21 to simulate Up, and nothing. I'm pretty certain I've just misinterpreted a setting somewhere, somehow. Attached is the settings.txt you asked for, and here are a couple of additional photos, if they're of any help. settings.txt PXL_20230116_005039973 PXL_20230116_005104298

randyrossi commented 1 year ago

You are shorting the wrong pins. GPIO #'s do not correspond to pin #'s. For up, you would short pin #'s 38 and 40. Also, use Bank 1 and Bank 2, one for each port. I see in your pic you have both ports set to Bank 2.

[image: image.png] raspi

On Sun, Jan 15, 2023 at 7:57 PM Deadweasel @.***> wrote:

Okay, I checked on that, still no reaction. I tried shorting pins 20 and 21 to simulate Up, and nothing. I'm pretty certain I've just misinterpreted a setting somewhere, somehow. Attached is the settings.txt you asked for, and here are a couple of additional photos, if they're of any help. settings.txt https://github.com/randyrossi/bmc64/files/10421699/settings.txt [image: PXL_20230116_005039973] https://user-images.githubusercontent.com/1332439/212577279-15512fe7-c340-464c-b162-9c14e9f5c390.jpg [image: PXL_20230116_005104298] https://user-images.githubusercontent.com/1332439/212577287-8a8fdcff-7840-4b1c-8c50-59f2c1fa3818.jpg

— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/230#issuecomment-1383313317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKDK4IPQNZ2LBORYZ4LWSSMGDANCNFSM6AAAAAAT32CTSQ . You are receiving this because you commented.Message ID: @.***>

-- Randy Rossi

Deadweasel commented 1 year ago

Okay, I swear I knew that once upon a time. Thank you for the correction; shorting the CORRECT pins does result in the expected behavior. Okay, so now it's either the ribbon or the aux board. The ribbon is definitely 40 conductor, but it's a cheapie Amazon item, so definitely worth reviewing in detail. From there, I at least have a solid map to check conductivity from the controller port to the GPIO pins, so thanks very much for calling me out for that blunder. I feel like a dope, but at least now I know I'm not going completely nuts. :)

Deadweasel commented 1 year ago

Well howdy hey, am I moron!
Thanks very much for the pointers, they led me right back to where I should have been checking in the first place.

So I had the plug wired up backward. Turns out I was looking at a diagram of the joystick port pinout, when I really should have been looking at it from the plug side, as that's how I was toning out what pin led to what wire.

Anyway, after fixing that bonehead mistake, the rig is working perfectly!