[Gambas-user] New open-source app (mamemenu) with a question
Kevin Fishburne
kevinfishburne at ...1887...
Wed Jul 15 08:57:08 CEST 2015
I've been working on an arcade cabinet over the last few weeks and it's
almost done. I started work tonight on the front end because existing
ones aren't suitable for a real-world cabinet. This is the first
open-source project I've released and you can find it here (we'll say
it's GPLv2 for now, maybe BSD later):
http://eightvirtues.com/misc/MAMEMENU/
Here is the first of five parts (with a sixth to follow) showing my
progress building it:
https://youtu.be/yiy8T7ihZOk
It was a bit tricky because it uses SDL and OpenGL but must still work
with MAME which also uses those libraries. I grab the first/primary
joystick using:
Public PadDevice As Process
PadDevice = Exec ["cat", "/dev/input/js0"] For Read As "Gamepad"
which allows both MAME and the GAMBAS app to accept joystick commands
simultaneously (keyboard events are hoarded by MAME since SDL handles
them). These lines:
Public MenuButton1 As Byte = 8 ' Buttons to be held
simultaneously to quit game and return to main menu.
Public MenuButton2 As Byte = 9 ' Buttons to be held
simultaneously to quit game and return to main menu.
assign which gamepad buttons cause MAMEMENU to kill the MAME process and
return to MAMEMENU. When a gamepad button is pressed its number is
printed, so when running this on your system/gamepad use that as a
reference for changing those lines to use whatever two buttons you'd
like to terminate MAME when held simultaneously. I've included my
mame.ini file which you can modify to fit your needs, although the
screen options are tuned to work with MAMEMENU which is designed to run
full-screen on an arcade cabinet.
MAMEMENU is in its infancy (just started on it tonight), so it's
functionally rough, but is pretty solid outside of a single issue. When
I kill the MAME process in GAMBAS it doesn't "shut down gracefully", and
the OS (Linux Mint 17.1 Cinnamon) thinks the resolution MAME was using
when killed is the resolution that should be used when MAMEMENU/GAMBAS
exits, despite me manually telling GAMBAS to use the initial desktop
resolution upon exiting. The solution I think is to shut down MAME
"gracefully", but I don't know how to do that.
Is there a way to gracefully kill a process, such as by sending it a
command to exit instead of using Process.Kill?
Also let me know if you need help getting it up and running. All the
needed files have been supplied but there's no documentation. Thanks!
--
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271
More information about the User
mailing list