Getting emulators to see controller input as a keyboard?
-
Hello,
Over the last few months I've been casually putting together some portable raspberry-pi emulator consoles. The most recent one I've put together is using a pi-zero and built within an original gameboy case. I purchased a gameboy controller pcb (this one http://store.kitsch-bent.com/product/common-ground-dmg-button-pcb) so that i could use the original buttons and such(A, B, START, SELECT, UP, DOWN, LEFT, RIGHT). Using Adafruits RetroGame I was FINALLY able to get emulation-station to work with the controls! However I can only navigate the menus of emulation station... as soon as i launch a game the emulator will not recognize my button inputs. I've mapped the gameboy buttons to keyboard inputs (the same ones that an actual keyboard uses if plugged in to control) but for some reason the emulators still wont recognize my gameboy pcb inputs!any ideas?
thanks! -
You can map your controller pcb to a virtual keyboad device using the built-in xboxdrv.
Keyboard Emulation
The following configuration will cause xboxdrv to emulate a keyboard, which can be useful for games that are played with keyboard, like Flash games or games that don't support a joystick. Since different games use different keyboard keys you might have to adjust the keybindings to fit the game:
$ xboxdrv
--ui-clear
--ui-buttonmap a=XK_a,b=XK_b,x=XK_x,y=XK_y
--ui-buttonmap dl=XK_Left,dr=XK_Right,du=XK_Up,dd=XK_DownTaken from:
http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.htmlThere is also "Linux Joystick Mapper" that is very similar and a good choice as well. It's not included with RetroPie, so you'll have to make and install it.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.