Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Single Boot Pi - Shut down button script question help  (Read 2531 times)

0 Members and 1 Guest are viewing this topic.

jdevane

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:September 29, 2023, 09:27:07 pm
  • I want to build my own arcade controls!
Single Boot Pi - Shut down button script question help
« on: May 07, 2019, 12:28:52 pm »
What I would like to do is use a pi with a single rom for a cabinet build.  I would like to have a power button ont he machine that is actually a keypress to exit MAME..

I have used retropie to setup my system, but all I am doing is running that one game.  I'd like MAME to be closed first so that it will save state, instead of just cutting power at the game screen.  I have noticed that when I close my game right now the system proceeds to load emulation station...

So I'm guessing after the autostart script runs the MAME single game boot command, and that sessions is closed, that linux is telling the system to run the rest of the autostart script correct?  Which is why it loads emulationstation.  What I would like to do is make the system close Mame when you press a button that closes mame and would then run a timed shutdown sequence.  Say after ten seconds it will complete a power down, but if you press player 1 button it will cancel the shutdown and proceed to emulation station...        I've been looking at doing something simple with Dialog in linux but it doesn't have something from what I've read that can work quite like I want.  Seems like the -pause command still requires user input.

Any ideas?  I really want to make the Pi platform work, because I know I could make this work on a windows PC, but I'm learning linux still and I'm sure there is something that will make this work like I want...

keilmillerjr

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1847
  • Last login:October 06, 2023, 10:20:39 pm
  • Web Developer.
Re: Single Boot Pi - Shut down button script question help
« Reply #1 on: May 07, 2019, 04:39:40 pm »
Check out the retroflag script on GitHub. Easy enough to modify it for what you want.