xrip / pico-megadrive

Raspberry Pi Pico Sega Megadrive / Sega Genesis emulator for MURMULATOR devboard
https://murmulator.ru
GNU Affero General Public License v3.0
14 stars 3 forks source link

Direct joystick connection #3

Open bobricius opened 1 week ago

bobricius commented 1 week ago

Hi, My friend need build few arcade machines in to museum, Because we do not need extra features, is posible to make build with direct connected buttons to etc. Gpio 0,1,2,3,20,21,26,27 HDMI, PWM sound, no PSRAM, maybe for PICO2?

best with autorun file, etc menu on separed GPIO > etc GP22

I have no idea where to start,

Can somebody help? Megadrive / SNES looks like have best graphics from this old systems

xrip commented 1 week ago

I think you can do some DIY yourself. You can connect any Famiclone gamepad to it, DPAD will work the same , select will be start, start will be A, a will be B, and b will be C. Start+Select will trigger menu Famiclone PINS are

NES_GPIO_CLK=14
NES_GPIO_DATA=16
NES_GPIO_LAT=15

Fancy block scheme

Overal scheme of dev board are https://file.murmulator.ru/data/murmulator-types/mm1-3/img/sh-1-3.pdf More useful info at https://murmulator.ru/

bobricius commented 1 week ago

Thanks for reply, I wanted a simple device, I need to connect arcade joystick and arcade burtons. I bought 5 gamepads, one works, 2 don't work at all, Next 2 gamepads not read pressing 2 buttons at the same time, for example, when I hold the arrow, fire doesn't work. That's why I thought it would be better if I connect the switches directly to the unused gpio because I certainly won't need PS2, gamepad or audio input.

I looked at the source code, but I'm a bad programmer, I don't know where to start, maybe It just need to edit the shift registry code.

DnCraptor commented 1 week ago

https://github.com/xrip/pico-megadrive/blob/main/src/main.cpp#L104 - good entry point to experiment. It is association from DPAD to related actions.