irixxxx / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
51 stars 24 forks source link

[Miyoo/PocketGo] Gamepad input doesn't work #42

Closed freq-mod closed 2 years ago

freq-mod commented 2 years ago

I don't know if it's the problem with device itself, OS it runs on, but anyway:

I tried to build Picodrive for Miyoo devices, the cheap handhelds running on ARM Allwinner F1C100s working with some kind of Linux OS. The version of emulator included in CFW was 1.93, no not good enough. Using the toolchain made for these devices, I managed to build it. Works really well, one problem: the input doesn't work. Only dpad is functioning, but everything else, including the menu buttion is dead, so the only way out is the hard reset of the device. Tried to run it via built-in terminal emulator: input: new device #0 "sdl:keys" input: async-only deviced detected drv probed binds name 0 0 y y sdl:keys buch of errors about font.png, selector.png, background.png config_readsect: unhandled var: SRAM/BRAM saves or gzip savestates or status line in main menu aaand input: bad key" 'R1' for device 'sdl:keys' the same repeated twice and for L1 and Start

irixxxx commented 2 years ago

The "bad key" comes from reading the config file. Throw it away. The sdl key mappings are in platform/opendingux/inputmap.c for opendingux devices, and platform/common/inputmap_kbd.c for other linux devices. Maybe you just need to use the opendingux keymap?

freq-mod commented 2 years ago

The "bad key" comes from reading the config file. Throw it away.

Just doing that did a trick! With no previous config, a lot more buttons worked, including the menu buttton, so I could quickly remap all keys to function properly. Thanks for the help!

RocknRace commented 1 year ago

Instead of deleting it, i change the config script with the Binds from early Picodrive version on the NxHope:

binddev = sdl:keys bind backspace = player1 Z bind tab = player1 Y bind tab = Save State bind return = player1 START bind escape = player1 MODE bind escape = Load State bind space = player1 A bind up = player1 UP bind down = player1 DOWN bind right = player1 RIGHT bind left = player1 LEFT bind f1 = Reset Game bind f4 = Prev Save Slot bind f5 = Next Save Slot bind f6 = Switch Renderer bind f7 = Pico Prev page bind f8 = Pico Next page bind f9 = Pico Switch input bind f10 = Fast forward bind left shift = player1 B bind left shift = player1 X bind right ctrl = Enter Menu bind left ctrl = player1 B turbo bind left alt = player1 C Sound Volume = 90


This bring me free to point with the D-Pad and using Start and Select buttons to Choose.

D-Pad = All arrows Start = Return (Enter) Select = Escape

picodrive