Added AdvMame to GPi Case installation, how do I tell it about the controller?
-
I got a gpi case yesterday morning, installed the official pi zero image, applied all the updates, reconfigured it to 'start emulation station at boot' (when that broke due to the updating); installed 'advmame' (3.x) from the extras menu, worked out where all the files are supposed to go, tweaked the config to add '/rom' so as not to mix in all the roms with the various subdirectories, copied in the vector arcade roms from my PC installation of advmame (I have the 0.106 romset hence why I installed advmame)... and presto, games like tailgunner start up OK... but have no button input at all. I read the docs on how retropie has the three different kinds of controller input, but since the GPI case physically blocks you adding other USB devices such as a keyboard, and ssh access doesn't let you run advmame graphically, I can't see any way to manually enter key bindings. Is there a config file somewhere that I can copy in which will set up the basic keys as supplied by the GPI case? I appreciate that all this must be documented somewhere but the problem with this project isn't too little documentation but too much! I've spent about 6 hours trying to solve this using Google, before asking here for help.
Later update: since I only expected to be using advmame and none of the other emulators, I didn't notice this until quite a bit later... as a result of running the update, I had actually lost all keyboard input in the other emulators. I eventually found https://sinisterspatula.github.io/RetroflagGpiGuides/AdvancedControlFramework.html which let me rebuild the main gpi case controls. However select_start to exit a game was also broken and the above did not fix it. I then went down a rabbit hole for a couple of hours trying the many different suggestions on how to restore select as the hotkey but never managed it, so as a work around I modified the safe shutdown script to only exit a game if a game is running, but to shutdown as before if at the menu level:
pi@retropie:~ $ cat /opt/RetroFlag/SafeShutdown.py #!/usr/bin/env python3 from gpiozero import Button, LED import os from signal import pause powerPin = 26 powerenPin = 27 hold = 1 power = LED(powerenPin) power.on() #functions that handle button events def when_pressed(): os.system("/home/pi/Safe-Shutdown.sh") # os.system("sudo killall emulationstation && sleep 5s && sudo shutdown -h now") btn = Button(powerPin, hold_time=hold) btn.when_pressed = when_pressed pause() pi@retropie:~ $ cat /home/pi/Safe-Shutdown.sh #!/bin/bash sudo pkill advmame && exit 0 sudo pkill retroarch && exit 0 sudo killall emulationstation && sleep 5s && sudo shutdown -h now
So, still looking for a pre-configured file from another GPi Case user to configure keyboard input for advmame - and if anyone can tell me a foolproof way to re-run the initial setup script that assigns the keys - and the default hotkey config - please let me know, bearing in mind that the 320x240 GPi Case screen is tiny and you cannot tell what most of the menu options are because the strings are so long they're pushed off the screen, and you can't very easily take the SD out and run it in another Pi with a bigger screen because by the time you get the GPi working, it has disabled the HDMI display in favour of the tiny LCD...
Thanks again,
G
-
( First of all: sorry for the necro-reply. )
I noticed I'm not able to exit advmame either when using
Start+Select on my GPi case.- This is how exiting is defined in the advmame.rc config file:
input_map[ui_cancel] joystick_button[0,8] joystick_button[0,9] or keyboard[0,esc] - It is configured likewise in the advmame-1.4.rc config file and it does exit using that version.
- Tip: setting MISC_SAFEQUIT = no should allow for exiting without a confirmation popup.
I'm wondering though: since I'd like to use advmame instead of advmame-1.4 for some particular roms, does anyone have a solution to the exit not working on advmame (when using GPi case)?
Addition #1: advmame-1.4.rc (Exit Working)
Addition #2: advmame.rc (Exit Not Working)
- This is how exiting is defined in the advmame.rc config file:
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.