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

A way to map GPIO pins not included in the default list? #186

Open PaulSlocum opened 3 years ago

PaulSlocum commented 3 years ago

Is there any way to change the default GPIO numbers in the "Configure Custom GPIO" menu? I was hoping to use BMC64 with the Boffintronics C64 DB9 GPIO adapter (link below), but it uses GPIO pins that aren't included in the BMC64 menu like GPIO2 and GPIO3.

https://boffintronics.com/2019/12/03/using-the-boffintronics-c64-atari-joystick-adapter-with-a-raspberry-pi/

randyrossi commented 3 years ago

Can't do it from config unfortunately. It will take a change to src code. I'm not sure why I didn't include 2 & 3 but they can be added. I think it's just a matter of extending the gpioPins array and initializing those pins. I can probably make the change and send you a kernel to see if it works for you. Are there any other pins missing? Does the adapter expect the pins to be pulled up?

On Wed, Jul 21, 2021 at 8:04 PM Paul Slocum @.***> wrote:

Is there any way to change the default GPIO numbers in the "Configure Custom GPIO" menu? I was hoping to use BMC64 with the Boffintronics C64 DB9 GPIO adapter (link below), but it uses GPIO pins that aren't included in the BMC64 menu like GPIO2 and GPIO3.

https://boffintronics.com/2019/12/03/using-the-boffintronics-c64-atari-joystick-adapter-with-a-raspberry-pi/

— 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/186, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKGMY2WKBIE6RW56WCLTY5N7PANCNFSM5AY6QNWA .

-- Randy Rossi

PaulSlocum commented 3 years ago

It does not include any resistors on the board, it just passes through the GPIO pins and ground directly to the DB9 connectors. I would appreciate it if you could add support for the extra GPIO pins. A list of all the GPIO pins that the board uses is below, and here is a link to the schematic:

http://bit.ly/2yy3Xlx

GPIO2 GPIO3 GPIO4 GPIO9 GPIO10 GPIO17 GPIO18 GPIO23 GPIO25 GPIO27

randyrossi commented 3 years ago

Try these kernel replacement files for the C64. Not sure which Pi you are using so I have both Pi3 and Pi2 files. I added the missing GPIOs but I didn't do any testing. If this works for you, I will roll this into the repo:

https://accentual.com/bmc64/downloads/boffintronics/kernel8-32.img https://accentual.com/bmc64/downloads/boffintronics/kernel7.img

On Thu, Jul 22, 2021 at 2:25 AM Paul Slocum @.***> wrote:

It does not include any resistors on the board, it just passes through the GPIO pins and ground directly to the DB9 connectors. I would appreciate it if you could add support for the extra GPIO pins. A list of all the GPIO pins that the board uses is below, and here is a link to the schematic:

http://bit.ly/2yy3Xlx

GPIO2 GPIO3 GPIO4 GPIO9 GPIO10 GPIO17 GPIO18 GPIO23 GPIO25 GPIO27

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/186#issuecomment-884683352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKGKNTM6V7MAB4NNAVTTY62UJANCNFSM5AY6QNWA .

-- Randy Rossi

PaulSlocum commented 3 years ago

Great, thanks for the new version. I tried the new version and tested both ports of the Boffintronics GPIO adapter with a C64 joystick tester program, and everything worked.