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: How to make a dedicated MAME 0.250 Appliance on a Raspberry Pi 4/Pi 400  (Read 127088 times)

0 Members and 1 Guest are viewing this topic.

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #160 on: March 16, 2021, 03:15:37 pm »
Is there any way to enable wifi on first boot?  I cannot SSH into the pi because I do not have an Ethernet cable to plug in.  I got the image running and expanded to fill my SD card so that's a start...

Thanks!

Ond

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2267
  • Last login:Yesterday at 11:41:19 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #161 on: March 16, 2021, 04:21:46 pm »
The image should support the pi 4 wifi on boot.  I don't yet have a pi 4 or the image so I don't know what features are enabled.  Can you access the command line shell on a monitor?  If so type ifconfig to reveal your networking capabilities.  wlan0 is the wireless status.  A quick way to gain access via ssh is to plug it straight into your house modems network port/s that provides connection to your ISP.  That will enable network connectivity until you get WiFi working.  Needs a network cable of course.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #162 on: March 16, 2021, 04:34:25 pm »
Is there any way to enable wifi on first boot?  I cannot SSH into the pi because I do not have an Ethernet cable to plug in.  I got the image running and expanded to fill my SD card so that's a start...

Thanks!

The Wi-Fi interface is enabled on the image provided. However, you should configure it according to your Access Point's SSID and associated security settings.

You can do this offline from another computer, just plug the SD card in a reader and access the "boot" partition and follow these steps:

https://linuxhint.com/rasperberry_pi_wifi_wpa_supplicant/
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #163 on: March 16, 2021, 05:45:21 pm »
Is there any way to enable wifi on first boot?  I cannot SSH into the pi because I do not have an Ethernet cable to plug in.  I got the image running and expanded to fill my SD card so that's a start...

Thanks!

The Wi-Fi interface is enabled on the image provided. However, you should configure it according to your Access Point's SSID and associated security settings.

You can do this offline from another computer, just plug the SD card in a reader and access the "boot" partition and follow these steps:

https://linuxhint.com/rasperberry_pi_wifi_wpa_supplicant/

Wow thanks.  This worked.  I can now access command line via Putty over WiFi.  Next, I need to figure out how to transfer roms to the SD card and then figure out how to get the front end layered overtop of MAME.  Right now I'm kind of stuck on pi@arcade(ro):~$ at the command prompt.  I found the README.txt by typing nano README.txt at the command prompt and it says to add roms via Samba share but I have no idea what that means so off to Google!

I've already learned a lot just by messing around today and I'm having fun.

Ond

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2267
  • Last login:Yesterday at 11:41:19 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #164 on: March 16, 2021, 05:51:58 pm »
Is there any way to enable wifi on first boot?  I cannot SSH into the pi because I do not have an Ethernet cable to plug in.  I got the image running and expanded to fill my SD card so that's a start...

Thanks!

The Wi-Fi interface is enabled on the image provided. However, you should configure it according to your Access Point's SSID and associated security settings.

You can do this offline from another computer, just plug the SD card in a reader and access the "boot" partition and follow these steps:

https://linuxhint.com/rasperberry_pi_wifi_wpa_supplicant/

Wow thanks.  This worked.  I can now access command line via Putty over WiFi.  Next, I need to figure out how to transfer roms to the SD card and then figure out how to get the front end layered overtop of MAME.  Right now I'm kind of stuck on pi@arcade(ro):~$ at the command prompt.  I found the README.txt by typing nano README.txt at the command prompt and it says to add roms via Samba share but I have no idea what that means so off to Google!

I've already learned a lot just by messing around today and I'm having fun.

Great!  Check out Filezila, super easy drag and drop ftp for transferring files.

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #165 on: March 16, 2021, 09:25:13 pm »
Great!  Check out Filezila, super easy drag and drop ftp for transferring files.

Thanks.  I’ll check it out tomorrow while I’m “working”.  I’m just trying to get my arms around the basics at this point.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #166 on: March 19, 2021, 10:33:12 am »
I use Winscp. Really simple. You can drag and drop.

https://winscp.net/eng/index.php

But you will need a connection to the pi. So may not have helped you in your original problem.
« Last Edit: March 19, 2021, 10:34:48 am by DaOld Man »

Gilrock

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1049
  • Last login:March 14, 2024, 05:47:24 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #167 on: March 19, 2021, 11:26:09 am »
Yeah I used WinSCP as well.  I like FilleZilla but didn't realize it would work I was just following online instruction for RetroPie.  Right now its the most convenient game system for me to access I just plugged in a small wireless USB dongle and I access the Pi from my main PC.  I use WinSCP for file transfers and Putty for command line access.

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 06, 2024, 07:26:06 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #168 on: March 21, 2021, 11:07:49 am »
getting mame to compile on a 64 bit OS on a pi4 with only 2gb of ram and 2 gb of swap file will be harder than i thought so i'll just not clutter this up and post a new thread when i get something that works and I can compare performance.
« Last Edit: March 24, 2021, 11:18:58 am by nitrogen_widget »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #169 on: March 31, 2021, 09:41:47 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.230 (please see the original post of this thread for the download link).  :cheers:
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

SunExerion

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:April 05, 2021, 09:39:58 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #170 on: April 05, 2021, 08:53:27 am »
First thx a lot for sharing the pre built image of your great work!  :applaud:

I have few questions: is it possible to enable scanlines (a filter) and rotate the screen?.

Which other filters are available in your compiled executable?.

I think i have to edit mame.ini while in service mode can you point me toward a dedicated tutorial?

Again thx a lot
See you
« Last Edit: April 05, 2021, 08:55:50 am by SunExerion »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #171 on: April 05, 2021, 05:25:07 pm »
First thx a lot for sharing the pre built image of your great work!  :applaud:

I have few questions: is it possible to enable scanlines (a filter) and rotate the screen?.

Hi SunExerion, thanks very much for your kind words!

Yes, it is possible to enable a scanlines effect.

Just edit mame.ini and set the effect configuration option:

Code: [Select]
effect                    scanlines

To rotate the screen, just follow the steps outlined at the section named (from the How-To Guide I made available):

[Optional] Screen rotation 90 degrees

https://translate.google.ca/translate?hl=fr&tab=wT&sl=fr&tl=en&u=https%3A%2F%2Fgist.github.com%2Fsonicprod%2Ff5a7bb10fb9ed1cc5124766831e120c4

Which other filters are available in your compiled executable?.

You can use basically every filter file from the /data/artwork path. Just put the filename (without the extension) in mame.ini at the effect configuration option.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #172 on: April 11, 2021, 05:09:53 pm »
OK, I downloaded the new image for .230 and booted up my pi.  I logged in as user "pi" and password "raspberry" and got a message that SSH was enabled and the default password has not been changed.  Right now I am stuck on the pi@arcade(ro):~$ command prompt and not sure what to do next. 

I enabled (sudo systemctl enable ssh) and started (sudo systemctl start ssh) and those commands seemed to work.

If I type "hostname -i" it returns 127.0.1.1 but I cannot use this to connect via putty or WinSCP (after following the instructions to enable SSH above... which worked on the .229 image).  I get an error saying "Network error: Connection to "127.0.1.1" refused."

EDIT: OK, I'm in.  I was typing "-i" to get the IP address and I should have been typing "-I" instead.  So it looks like I can SSH into the pi.  I'm going to try and drop some roms into the roms folder and then type "arcademode" at the command prompt and see if it works...

EDIT 2:  I dropped a few roms into the "roms" folder but they do not appear as "available".  I changed to read/write, moved the roms, changed back to read only and then typed "arcademode" at the command prompt.  The pi rebooted into the MAME GUI but there were no games "available".  I am using MAME .217 roms but I only tried moving Frogger, Pac-Man, Donkey Kong and Ms. Pac-Man so at least one of them should have shown up.. right?
« Last Edit: May 05, 2021, 03:58:04 pm by javeryh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #173 on: April 11, 2021, 06:14:10 pm »
EDIT: OK, I'm in.  I was typing "-i" to get the IP address and I should have been typing "-I" instead.  So it looks like I can SSH into the pi.  I'm going to try and drop some roms into the roms folder and then type "arcademode" at the command prompt and see if it works...

You should execute the script named expand-data-partition.sh to expand the /data partition to use all the free space on your SD card.

EDIT 2:  I dropped a few roms into the "roms" folder but they do not appear as "available".  I changed to read/write, moved the roms, changed back to read only and then typed "arcademode" at the command prompt.  The pi rebooted into the MAME GUI but there were no games "available".  I am using MAME .217 roms but I only tried moving Frogger, Pac-Man, Donkey Kong and Ms. Pac-Man so at least one of them should have shown up.. right?

As soon as you put roms in /data/roms folder (while in Service mode), the system should automatically download the related graphics (screen snapshots, etc.).

You are correct, MAME should see the roms and display the game name under the Available filter. You could try to add some more roms, just to make sure that the issue persist.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #174 on: April 11, 2021, 07:14:53 pm »
You should execute the script named expand-data-partition.sh to expand the /data partition to use all the free space on your SD card.

I did this successfully - I have 109 GB on a 128GB card to work with.

As soon as you put roms in /data/roms folder (while in Service mode), the system should automatically download the related graphics (screen snapshots, etc.).

You are correct, MAME should see the roms and display the game name under the Available filter. You could try to add some more roms, just to make sure that the issue persist.

OK here is where I might have done something wrong.  I didn't really pay attention to where I put the roms other than in the rom folder under mame .230 like you would on a PC but maybe I missed something.  I do not remember going into a data folder... Next time I boot it up I'll see if that changes things.

Thanks!

EDIT: So I can't even get the pi to boot any more.  I selected Exit from the menu and shut down the pi about 2 hours ago.  But when I turned the pi back on (by unplugging it and plugging it back in) I saw the MAME logo for a split second and then it turned off and my monitor is saying no signal.  I can't SSH in either.  Hmmm...

« Last Edit: April 11, 2021, 09:22:13 pm by javeryh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #175 on: April 11, 2021, 08:53:46 pm »
You should execute the script named expand-data-partition.sh to expand the /data partition to use all the free space on your SD card.

I did this successfully - I have 109 GB on a 128GB card to work with.

As soon as you put roms in /data/roms folder (while in Service mode), the system should automatically download the related graphics (screen snapshots, etc.).

You are correct, MAME should see the roms and display the game name under the Available filter. You could try to add some more roms, just to make sure that the issue persist.

OK here is where I might have done something wrong.  I didn't really pay attention to where I put the roms other than in the rom folder under mame .230 like you would on a PC but maybe I missed something.  I do not remember going into a data folder... Next time I boot it up I'll see if that changes things.

Thanks!

EDIT: So I can't even get the pi to boot any more.  I selected Exit from the menu and shut down the pi about 2 hours ago.  But when I turned the pi back on (by unplugging it and plugging it back in) I saw the MAME logo for a split second and then it turned off and my monitor is saying no signal.  I can't SSH in either.  Hmmm...

Hi, just unplug the Pi and plug it again. It should then boot normally. For an unknown reason, the system boot and immediately shutdown. It may be related to a race condition in the systemd units that start MAME and shutdown unit that is activated upon a clean exit of MAME.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #176 on: April 11, 2021, 09:23:19 pm »
Hi, just unplug the Pi and plug it again. It should then boot normally. For an unknown reason, the system boot and immediately shutdown. It may be related to a race condition in the systemd units that start MAME and shutdown unit that is activated upon a clean exit of MAME.

Thanks - After a few tries it booted back up again and I was able to SSH in... I moved the roms to the data/roms folder and rebooted in arcade mode.  The games I added are listed and they work but just barely.  They all "work" but the frame rate has to be like 10fps.  Everything is moving in super slow motion.

After reading through the thread on github someone else had the same problem I think I'm having.  I am outputting to a 4K display.  Apparently to force 1080p, I have to set these values ​​in /boot/config.txt:

  hdmi_group=1
  hdmi_mode=16

But no matter what I do, I am not allowed to save changes.  I change to servicemode and change to read/write and nothing.  I always don't have permission to edit /boot/config.txt

I don't have any other HDMI monitors in my house to test with!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #177 on: April 11, 2021, 10:09:18 pm »
After reading through the thread on github someone else had the same problem I think I'm having.  I am outputting to a 4K display.  Apparently to force 1080p, I have to set these values ​​in /boot/config.txt:

  hdmi_group=1
  hdmi_mode=16

But no matter what I do, I am not allowed to save changes.  I change to servicemode and change to read/write and nothing.  I always don't have permission to edit /boot/config.txt

I don't have any other HDMI monitors in my house to test with!

Yes, with a 4K resolution, you will get very poor performance, that's a known issue. You should force your Pi to use 1080p.

You should always edit /boot/config.txt with the prefix sudo (while in read/write mode), so:

Code: [Select]
rw
sudo nano /boot/config.txt

To force 1080p resolution on your 4K TV, in addition to these 2 lines in config.txt:

Code: [Select]
hdmi_group=1
hdmi_mode=16

You may also add (if necessary) this line:

Code: [Select]
hdmi_force_mode=1
« Last Edit: April 12, 2021, 08:36:25 am by bbegin »
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #178 on: April 12, 2021, 10:04:47 am »
After reading through the thread on github someone else had the same problem I think I'm having.  I am outputting to a 4K display.  Apparently to force 1080p, I have to set these values ​​in /boot/config.txt:

  hdmi_group=1
  hdmi_mode=16

But no matter what I do, I am not allowed to save changes.  I change to servicemode and change to read/write and nothing.  I always don't have permission to edit /boot/config.txt

I don't have any other HDMI monitors in my house to test with!

Yes, with a 4K resolution, you will get very poor performance, that's a known issue. You should force your Pi to use 1080p.

You should always edit /boot/config.txt with the prefix sudo (while in read/write mode), so:

Code: [Select]
rw
sudo nano /boot/config.txt

To force 1080p resolution on your 4K TV, in addition to these 2 lines in config.txt:

Code: [Select]
hdmi_group=1
hdmi_mode=16

You may also add (if necessary) this line:

Code: [Select]
hdmi_force_mode=1

Got it - thanks!  I did not need hdmi_force_mode=1 to get it to work.  I tested Donkey Kong, DK Jr., Eyes, Frogger, Pac-Man, Ms. Pac-Man and Jr. Pac-man and they all work.  There is a small audio glitch when the games first start up (except for DK and Eyes) but I have a feeling that is because of the monitor frame rate not being right for the game.  Ultimately, I'll be connecting this to a regular old LCD via VGA.  Hopefully I'll be able to force native resolutions somehow but that's a ways off.

Next up is figuring out how to layer a front end on top of MAME... no idea how I'm going to sort that out LOL

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #179 on: April 12, 2021, 11:30:56 am »
Next up is figuring out how to layer a front end on top of MAME... no idea how I'm going to sort that out LOL

For the front-end, you can use AdvanceMENU or AdvMenuPLUS (a fork of AdvanceMENU with theming support).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #180 on: April 12, 2021, 01:00:11 pm »
Next up is figuring out how to layer a front end on top of MAME... no idea how I'm going to sort that out LOL

For the front-end, you can use AdvanceMENU or AdvMenuPLUS (a fork of AdvanceMENU with theming support).

Thanks.  I will read up on both today.  How simple is this?  I'm used to front ends where you install the program and then just point it at the MAME.exe.  Probably not that easy if I had to guess...  I really just want to boot straight to a simple game list with nothing else but your MAME image to run the games...

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #181 on: April 12, 2021, 01:49:08 pm »
To run AdvanceMENU as a frond-end, you simply have to download the .deb, extract the advmenu binary from it (open with an Archive Manager).

Download the .deb for Raspberry Pi:
https://github.com/amadvance/advancemame/releases/download/v3.9/advancemame_3.9-1_armhf.deb

Copy the advmenu binary to the Pi (with scp/WinSCP).

The documentation about AdvanceMENU is there:
https://www.advancemame.it/doc-advmenu

Setup AdvanceMENU (be sure to refer to the MAME binary with $MAMEBINPATH/mame) and make it replace the MAME binary at startup/boot-up (just edit /home/pi/mame-launcher.sh script).

I may publish a pre-built version of the SD image file with AdvanceMENU as the front-end and ready to use.
« Last Edit: April 12, 2021, 02:21:30 pm by bbegin »
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #182 on: April 12, 2021, 03:26:51 pm »
To run AdvanceMENU as a frond-end, you simply have to download the .deb, extract the advmenu binary from it (open with an Archive Manager).

Download the .deb for Raspberry Pi:
https://github.com/amadvance/advancemame/releases/download/v3.9/advancemame_3.9-1_armhf.deb

Copy the advmenu binary to the Pi (with scp/WinSCP).

The documentation about AdvanceMENU is there:
https://www.advancemame.it/doc-advmenu

Setup AdvanceMENU (be sure to refer to the MAME binary with $MAMEBINPATH/mame) and make it replace the MAME binary at startup/boot-up (just edit /home/pi/mame-launcher.sh script).

Thanks for the help - really appreciate it.  Seems easy enough but I am not at all familiar with the linux environment so even copying and opening files is difficult for me right now.  I'll give it a shot - I definitely want to learn.

I may publish a pre-built version of the SD image file with AdvanceMENU as the front-end and ready to use.

Now this would be awesome!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #183 on: April 12, 2021, 09:48:05 pm »
@javeryh:

I made several tests tonight with AdvanceMENU and I was able to run it successfully on the image I provide.

Unfortunately, I noticed that (for an unknown reason at this time), the emulation speed is considerably reduced. ROMs that were running at 100% speed now run at around 80%, wich is obviously unacceptable...

It reminded me as well that the user interface is aging and not so modern/actual. There is no theming support, so the hardcoded layouts are not customizable (except text/background colors).

I will wait for the sfml-pi component to work correctly with KMS/DRM on the Pi 4 to recommend the Attract Mode front-end. Once ready, I will provide a pre-configured image with Attract Mode.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #184 on: April 13, 2021, 09:22:24 am »
@javeryh:

I made several tests tonight with AdvanceMENU and I was able to run it successfully on the image I provide.

Unfortunately, I noticed that (for an unknown reason at this time), the emulation speed is considerably reduced. ROMs that were running at 100% speed now run at around 80%, wich is obviously unacceptable...

It reminded me as well that the user interface is aging and not so modern/actual. There is no theming support, so the hardcoded layouts are not customizable (except text/background colors).

I will wait for the sfml-pi component to work correctly with KMS/DRM on the Pi 4 to recommend the Attract Mode front-end. Once ready, I will provide a pre-configured image with Attract Mode.

That's good to know -- thanks for trying.  I really think you've got something here with an image that runs recent MAME and doesn't have any other nonsense.  I'm going to keep playing with the pi and maybe I'll learn a thing or two...

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #185 on: April 14, 2021, 04:23:04 pm »
I got 2 very good news  :cheers:

First, I did some more testing yesterday and found the reason why MAME was slower under AdvanceMENU. It has nothing to do with AdvanceMENU. It is caused by the way I was calling the MAME binary. In the script file mame-launcher.sh, I set these environment variables:

Code: [Select]
export SDL_VIDEODRIVER=kmsdrm
export SDL_RENDER_DRIVER=opengles2
export SDL_RENDER_VSYNC=1
export SDL_GRAB_KEYBOARD=1
export SDL_VIDEO_GLES2=1

I was calling the MAME binary directly, so these variables were not set. I will fix that (I will move these variables assignments to /etc/environment, wich is executed at boot time).

Secondly, I successfully built the latest version of Attract Mode (and its dependency, sfml-pi). Attract Mode works nicely and perflectly in KMS/DRM mode.

As a result, I will publish a new version of the image wich will include AdvanceMENU and Attract Mode. The image will boot to AdvanceMENU, but Attract Mode will be selectable with just a quick edit of a configuration file.

Stay tuned  :cheers:
« Last Edit: April 14, 2021, 04:25:10 pm by bbegin »
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #186 on: April 16, 2021, 09:57:32 am »
I got 2 very good news  :cheers:

First, I did some more testing yesterday and found the reason why MAME was slower under AdvanceMENU. It has nothing to do with AdvanceMENU. It is caused by the way I was calling the MAME binary. In the script file mame-launcher.sh, I set these environment variables:

Code: [Select]
export SDL_VIDEODRIVER=kmsdrm
export SDL_RENDER_DRIVER=opengles2
export SDL_RENDER_VSYNC=1
export SDL_GRAB_KEYBOARD=1
export SDL_VIDEO_GLES2=1

I was calling the MAME binary directly, so these variables were not set. I will fix that (I will move these variables assignments to /etc/environment, wich is executed at boot time).

Secondly, I successfully built the latest version of Attract Mode (and its dependency, sfml-pi). Attract Mode works nicely and perflectly in KMS/DRM mode.

As a result, I will publish a new version of the image wich will include AdvanceMENU and Attract Mode. The image will boot to AdvanceMENU, but Attract Mode will be selectable with just a quick edit of a configuration file.

Stay tuned  :cheers:

This is VERY exciting news!  Can't wait to see the end result.   :cheers:

exonaax

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:July 12, 2021, 01:14:04 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #187 on: April 19, 2021, 07:44:14 am »
Hi,

First thank you very much for all the work you have done on this. It is amazing and a huge donnation to the community.  Realy appreciated and the best in return we can do, it is to contribute with you.

As far as understand, the PI 400 use the same architecture as the PI 4 or at leat organised arround the same CPU/GPU.

Do you think that the PI 400 will support the build image you posted in header of this topic?

Thank you.
« Last Edit: April 19, 2021, 07:54:10 am by exonaax »
More pixels here, best it is!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #188 on: April 19, 2021, 10:25:42 am »
Hi,

First thank you very much for all the work you have done on this. It is amazing and a huge donnation to the community.  Realy appreciated and the best in return we can do, it is to contribute with you.

As far as understand, the PI 400 use the same architecture as the PI 4 or at leat organised arround the same CPU/GPU.

Do you think that the PI 400 will support the build image you posted in header of this topic?

Thank you.

Thanks for your appreciation, it touches me a lot to realize that people like my contribution.

I did not tested the image on a Pi 400, but as it is the same exact hardware as the Pi 4 (chipset, CPU, devices), it should work perfectly.  :)
« Last Edit: April 19, 2021, 10:27:39 am by bbegin »
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #189 on: April 24, 2021, 05:28:38 pm »
ANNOUNCEMENT :cheers:

Here it is, a first version of the Front-end Edition of the MAME image for Raspberry Pi 4.

You can select the UI/front-end that will start automatically at boot from one of these 3 choices (Arcade Mode):
  • MAME GUI (default)
  • Attract Mode
  • AdvanceMENU

To select, just type:

Code: [Select]
sudo nano /etc/environment
And ajust the value of the FRONTEND variable (see comment from the file).

Let me know of your appreciation, or if you find any issue.

https://drive.google.com/file/d/1gt3qrtnvEf7N4aBoGVwswhXjEeYLsVzT/view?usp=sharing
« Last Edit: April 28, 2021, 06:10:34 pm by bbegin »
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #190 on: April 24, 2021, 06:55:47 pm »
I will be trying to get this to work tomorrow!  I’m psyched - thanks for all of your hard work on this.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #191 on: April 27, 2021, 09:27:28 am »
I will be trying to get this to work tomorrow!  I’m psyched - thanks for all of your hard work on this.

Hi javeryh,

I am wondering if you had any chance to test the image (I call it the Front-end Edition) yet?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

Grasshopper

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2380
  • Last login:November 08, 2023, 07:20:31 am
  • life, don't talk to me about life
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #192 on: April 27, 2021, 10:06:32 am »
If you haven't already done so, would it be possible to add an option to make the root filesystem read-only, and overlaid with a RAM disk?

If you do that, then there will be no danger of corrupting the SD card if you cut the power without doing a clean shutdown.

As a starting point, check out the following link:

https://github.com/janztec/empc-arpi-linux-readonly

A few years ago, I applied the above changes to an old Retropie image, and I can confirm it worked.
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

Grasshopper

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2380
  • Last login:November 08, 2023, 07:20:31 am
  • life, don't talk to me about life
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #193 on: April 27, 2021, 10:09:37 am »
Please ignore my previous post. I've just re-read the first post in the thread, and see you've already made the filesystem readonly.
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #194 on: April 27, 2021, 11:03:02 am »
I will be trying to get this to work tomorrow!  I’m psyched - thanks for all of your hard work on this.

Hi javeryh,

I am wondering if you had any chance to test the image (I call it the Front-end Edition) yet?
Not yet!  I downloaded the image but haven’t had a chance to mess around with it yet.  Work has been busy and I haven’t been able to goof off yet this week...  I will post updates once I do (or more likely dumb questions haha)...

kegga

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:February 12, 2024, 12:43:04 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #195 on: April 27, 2021, 11:19:22 am »
I tried it last night Mame works just fine but when I try and use Attract Mode it launches in vertical mode with just a Mame 1/0 down in the bottom right corner I can hit tab and get into the configuration but kind of stuck after that. Also I don't think your artwork scripts are working I looked at them and you are calling the other scripts from the /home/pi when they are actually in /home/pi/scripts/. I didn't try AdvanceMenu yet.

OK went in and conf file for Attract and generated a list and now I see my games but they will not launch.

Here is what my mame.cfg looks like in /data/attract/emulators/

# Generated by Attract-Mode v2.6.1
#
executable           /home/pi/mame230/mame
args                 [name]
rompath              $HOME/.mame/roms/
romext               .zip;.7z
system               Arcade
info_source          thegamesdb.net
artwork    marquee         $HOME/.mame/marquee
artwork    snap            $HOME/mame/video;$HOME/.mame/snap
« Last Edit: April 27, 2021, 03:51:24 pm by kegga »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #196 on: April 27, 2021, 05:13:49 pm »
I tried it last night Mame works just fine but when I try and use Attract Mode it launches in vertical mode with just a Mame 1/0 down in the bottom right corner I can hit tab and get into the configuration but kind of stuck after that. Also I don't think your artwork scripts are working I looked at them and you are calling the other scripts from the /home/pi when they are actually in /home/pi/scripts/. I didn't try AdvanceMenu yet.

Oh, thanks for the input, I will ajust the artwork scripts with the new paths.

For the rotated screen, I forgot to set enabled to no in this section of /data/attract/attract.cfg :

Code: [Select]
plugin RotationControl
enabled              yes
param                auto_rot 270
param                default_rot 90
param                preserve_aspect_ratio Default


OK went in and conf file for Attract and generated a list and now I see my games but they will not launch.

Here is what my mame.cfg looks like in /data/attract/emulators/

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           /home/pi/mame230/mame
args                 [name]
rompath              $HOME/.mame/roms/
romext               .zip;.7z
system               Arcade
info_source          thegamesdb.net
artwork    marquee         $HOME/.mame/marquee
artwork    snap            $HOME/mame/video;$HOME/.mame/snap

Your games will not launch, because of the incorrect path of the MAME binary (mame230, instead of mame0230). Use the path with the symlink:

Code: [Select]
executable           /home/pi/mame/mame
« Last Edit: April 27, 2021, 08:54:19 pm by bbegin »
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

kegga

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:February 12, 2024, 12:43:04 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #197 on: April 27, 2021, 06:30:57 pm »
OK games are launching, now I need to get attract looking nice. This is great thanks for all the work you have put into this.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #198 on: April 28, 2021, 09:42:09 pm »
Just to let you know that I now fixed the incorrect paths from the scripts provided in the image file.

The new/updated download link is:

https://drive.google.com/file/d/1gt3qrtnvEf7N4aBoGVwswhXjEeYLsVzT/view?usp=sharing
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:March 17, 2024, 05:35:40 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #199 on: April 29, 2021, 04:53:21 pm »
Just to let you know that I now fixed the incorrect paths from the scripts provided in the image file.

The new/updated download link is:

https://drive.google.com/file/d/1gt3qrtnvEf7N4aBoGVwswhXjEeYLsVzT/view?usp=sharing

Downloaded... here goes nothing!