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 --- Bug Reports --- 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.243 Appliance on a Raspberry Pi 4/Pi 400  (Read 81189 times)

0 Members and 1 Guest are viewing this topic.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Hi all,

I worked on a personal project for the last months.

The objective was to use a Raspberry Pi 4B and make it as a dedicated MAME Appliance. The system is minimal (following the JeOS principle) and boot straight into the very latest version of MAME. No clutter, no waste of resources and most of all, no useless GUI/window manager (X11).

The performances are really good, as most of the '80s and '90s arcade games run at full speed. Many 2000s games run at full speed as well.

Features and functionalities:
  • Based on Raspbian Lite (minimal Linux edition based on Debian);
  • At startup, display of a custom splash screen (for example, the MAME logo);
  • The MAME emulator starts automatically and displays the ROM selection screen;
  • Choice of 2 Front-ends available: Attract Mode or AdvanceMENU. If selected, automatic start at boot (instead of the MAME GUI);
  • NEW (2021-10-24): Addition of Hypseus Singe, LaserDisc emulator (v2.8.0-RPi);
  • When you exit MAME, the system initiates a shutdown;
  • During the shutdown, display of a personalized splash screen (for example, the MAME logo);
  • When the stop operations are completed, the system powers off;
  • To preserve the life of the SD card, the root filesystem is kept in read-only mode;
  • ROMs Hiscores are persistent;
  • A maintenance mode is proposed (it's called the Service Mode) to allow system updates and the management of ROMs and Snapshots (via a Samba file share).
  • While in Service Mode:
    • As soon as you add new ROM files, the snapshots/titles (and others, if available) images will be scraped/downloaded automatically.
    • As soon as you remove/delete ROM files, the associated graphic files will be deleted.

Youtube demonstration video:


I made a How-To Guide and hosted it on GitHub, but as I am French-speaking, it is written in French. Feel free to translate it to English with Google Translate.

Here is the link to the Step-by-Step How-to Guide:

https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

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

Feel free to comment.

Thanks and happy classic/arcade gaming!  :D
-------------------
EDIT 2022/02/25: Here is a new 12 GB SD card image of the system with MAME 0.243 (arcade systems *and* classic computer systems), without ROMs (just put them into /data/roms using the Samba share while in Service mode). The download file size is reduced to 1 GB, once compressed (gzip).

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

Important information:
   - The password of the user pi is left to default (raspberry)
   - The Wi-Fi has not been disabled
   - No overclocking has been configured in /boot/config.txt
   - No controller has been configured in mame.ini
   - You will have to expand the /data partition by executing a script (see below)

The system will initially boot in Service mode. Just log in and type:

Code: [Select]
./expand-data-partition.sh
This script will expand /data from 100 MB to all the available free space of the SD Card.

Please refer to the README.txt file once logged in the system.

Please note:
  • This edition include 2 front-ends that you can use in place of the MAME GUI (default): Attract Mode and AdvanceMENU
  • Attract Mode is pre-configured with an emulator called "MAME", so you will need to complete the setup using the [Tab] key to (generate the Romlist, etc.).
  • The front-ends are provided as-is and I will not provide support for them.
  • If you choose to use them, you should know how to configure them by your own.
  • There is a known issue with configuring the Wi-Fi with raspi-config. Please use the offline method with creating wpa_supplicant.conf in the boot partition (https://linuxhint.com/rasperberry_pi_wifi_wpa_supplicant/).
  • 2021-10-31: From MAME 0.237, you will need to move your Hi-Scores files from /data/mame/hi to /data/mame/lua/highscore folder.


----

Let me know how you appreciate the system!  :-)
« Last Edit: May 07, 2022, 03:16:08 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

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #1 on: May 26, 2020, 04:57:54 pm »
Interesting project. I guess you could get an even more trimmed down OS by using something else thatn Raspbian, but it would be much more complicated.

One question though: the default SDL2 raspbian package doesn't have KMS support ???

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #2 on: May 26, 2020, 07:50:08 pm »
Interesting project. I guess you could get an even more trimmed down OS by using something else thatn Raspbian, but it would be much more complicated.

Yes, you are correct (at least in my opinion).

One question though: the default SDL2 raspbian package doesn't have KMS support ???

There are two (2) problems with the available SDL2 pre-built .deb package from Raspbian repository:
1) SDL2 is built with X11 support, wich drain way too much resources from the Rasperry Pi 4. We are rather using Open GL ES 2 as the graphic rendering engine.
2) Starting from version 2.0.11 of SDL2, a bug is introduced when using KMS/DRM backend and MAME will systematically output a Segmentation fault as soon as we select a game (graphic mode switching).
« Last Edit: May 26, 2020, 07:54:28 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

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #3 on: May 27, 2020, 01:57:43 pm »
Yes, cool project.
I'm building it right now with gcc8 on armbian buster minimal for an odroid xu4.
I'm curious if it'll work out and how its performance will be.
Always nice to try something new.
Thank you.

Edit: I just looked at your video - you really should try https://github.com/mgzme/MAME-PSGS as it looks stunning.
« Last Edit: May 27, 2020, 02:06:02 pm by ZoOl007 »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #4 on: May 27, 2020, 07:36:11 pm »
Yes, cool project.
I'm building it right now with gcc8 on armbian buster minimal for an odroid xu4.
I'm curious if it'll work out and how its performance will be.
Always nice to try something new.
Thank you.

Edit: I just looked at your video - you really should try https://github.com/mgzme/MAME-PSGS as it looks stunning.

Yes, most of the steps (if not all of them) should work with your Odroid XU4 based on Armbian Buster.

Please keep me informed of the level of performance you get on game emulation with MAME. :)

Thanks,
« Last Edit: May 27, 2020, 11:52:23 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

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #5 on: May 28, 2020, 08:26:32 am »
Not trying to sell groovyarcade, but Arch Linux is a great and up to date distro, and pretty lightweight. You could give a try to archlinuxarm (the mame binary should be compatible). The main adgantage is that the steps would be pretty much the same for pi, xu4 or whichever SBC.

See https://archlinuxarm.org/platforms
.
The real question is: did they compile SDL2 with KMS ... If it's using the same package as on x86, the answer should be yes as I've tried MAME on KMS on x86 and it was working pretty well.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #6 on: May 28, 2020, 04:55:56 pm »
Not trying to sell groovyarcade, but Arch Linux is a great and up to date distro, and pretty lightweight. You could give a try to archlinuxarm (the mame binary should be compatible). The main adgantage is that the steps would be pretty much the same for pi, xu4 or whichever SBC.

See https://archlinuxarm.org/platforms

Thanks for the suggestion, Substring.

I took a look at ArchLinux ARM, installed it and got stucked at installing the proper build tools (gcc) to build and install SDL2 with KMS and OpenGL ES 2 support enabled, but X11 and OpenGL support disabled. I'm really not familiar at all with pacman.

I was able to enable the Fake KMS driver (in /boot/config.txt) and I can see /dev/dri is successfully enumerated.

I think I will stick with Raspbian Buster Lite as it is based on Debian and I am way more confortable with this flavor of Linux.  ;D
« Last Edit: May 28, 2020, 07:13:24 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

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #7 on: May 29, 2020, 02:12:54 am »
Just
Code: [Select]
pacman -Sy base-devel sdl2 mame, it should be enough. Arch already has sdl 2.0.12, so you don't need to compile anything. It will probably install some X dependencies, but it doesn't mean you must start mame in X rather than KMS

mamemaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • Last login:May 12, 2022, 04:19:38 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #8 on: May 29, 2020, 09:09:13 am »
Can you just upload a torrent? We can add the roms.


Hi all,

I worked on a personal project for the last 2 months.

The objective was to use a Raspberry Pi 4B and make it as a dedicated MAME Appliance. The system is minimal (following the JeOS principle) and boot straight into MAME 0.221, the latest version as of today. No clutter, no waste of resources and most of all, no useless GUI (X11).

The performances are really good, as most of the '80s and '90s arcade games run at full speed. Many 2000s games run at full speed as well.

Features and functionalities:
  • Based on Raspbian Lite (minimal Linux edition based on Debian);
  • At startup, display of a custom splash screen (for example, the MAME logo);
  • The MAME emulator starts automatically and displays the ROM selection screen;
  • When you exit MAME, the system initiates a shutdown;
  • During the shutdown, display of a personalized splash screen (for example, the MAME logo);
  • When the stop operations are completed, the system powers off;
  • To preserve the life of the SD card, the root filesystem is kept in read-only mode;
  • A maintenance mode is proposed (it's called the Service Mode) to allow system updates and the management of ROMs and Snapshots (via a Samba file share).

Youtube demonstration video:


I made a How-To Guide and hosted it on GitHub, but as I am French-speaking, it is written in French. Feel free to translate it to English with Google Translate.

Here is the link to the Step-by-Step How-to Guide:

https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

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

Feel free to comment.

Thanks and happy classic/arcade gaming!  :D

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #9 on: May 29, 2020, 10:07:22 am »
Can you just upload a torrent? We can add the roms.

Yes, I will provide a link with a pre-built image ready to be flashed to the SD card.

The only thing to do will be to add ROMs to the /data/roms folder.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #10 on: May 29, 2020, 01:10:01 pm »
On the xu4 the newly compiled binary bombs with 'Illegal instruction'.
the assembler also gave the following warning:
IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and Armv8R just before linking.
If you have any idea or you encountered the same thing please do share or could you provide your binary through pm? I'm curious if yours does the same on my os.
We can exchange them through wetransfer or something...
edit: oh yes, I compiled mame 0219
« Last Edit: May 29, 2020, 01:15:06 pm by ZoOl007 »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #11 on: May 29, 2020, 01:55:20 pm »
On the xu4 the newly compiled binary bombs with 'Illegal instruction'.
the assembler also gave the following warning:
IT blocks containing 32-bit Thumb instructions are performance deprecated in ARMv8-A and Armv8R just before linking.
If you have any idea or you encountered the same thing please do share or could you provide your binary through pm? I'm curious if yours does the same on my os.

I'm sorry, I've never had this message while linking MAME. I think it has to do the build architecture flags (ARCHOPTS) when building MAME.

You may take a look at this page to select the proper values for your ARM system:
https://gist.github.com/fm4dd/c663217935dc17f0fc73c9c81b0aa845

We can exchange them through wetransfer or something...
edit: oh yes, I compiled mame 0219

Here is my mamearcade binary (0.221) via Firefox Send : https://send.firefox.com/download/d25b295c469e7fdf/#KR9ojBH4J08N2mY_Ep7BuQ
« Last Edit: May 29, 2020, 02:22:16 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

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #12 on: May 29, 2020, 03:02:04 pm »
ha... your binary runs. I can create mame.ini but then it fails with
MESA-LOADER: failed to retrieve device information
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory
failed to load driver: exynos
OpenGL not supported on this driver: Could not initialize EGL
video_init: Initialization failed!

Oh well... it's proving to be more difficult than I assumed. I'll have a look at the link you gave me for the archopts... It's just that it takes hours to compile... but, I guess you've been through that rabbit hole a lot. ;-)

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #13 on: May 29, 2020, 03:20:14 pm »
ha... your binary runs. I can create mame.ini but then it fails with
MESA-LOADER: failed to retrieve device information
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory
failed to load driver: exynos
OpenGL not supported on this driver: Could not initialize EGL
video_init: Initialization failed!

Oh well... it's proving to be more difficult than I assumed. I'll have a look at the link you gave me for the archopts... It's just that it takes hours to compile... but, I guess you've been through that rabbit hole a lot. ;-)

Do the DRI drivers are created under /dev ? To check, just type:

ls -l /dev/dri*

You should see "card0" and "renderD128" under /dev/dri.

Did you compiled SDL2 with KMS and OpenGL ES 2 support enabled, and X11 and OpenGL support disabled as per the procedure I made?

If so, you should check carefully in the summary of the configuration utility and the keyword "dynamic" should apper next to "kmsdrm" at the "Video drivers" line (meaning it was dynamically detected):

Video drivers   : dummy kmsdrm(dynamic) opengl_es2
« Last Edit: May 29, 2020, 03:58:42 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

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #14 on: May 30, 2020, 01:41:48 am »

Do the DRI drivers are created under /dev ? To check, just type:

ls -l /dev/dri*

You should see "card0" and "renderD128" under /dev/dri.

Did you compiled SDL2 with KMS and OpenGL ES 2 support enabled, and X11 and OpenGL support disabled as per the procedure I made?

If so, you should check carefully in the summary of the configuration utility and the keyword "dynamic" should apper next to "kmsdrm" at the "Video drivers" line (meaning it was dynamically detected):

Video drivers   : dummy kmsdrm(dynamic) opengl_es2

well yes it all checks out as far I see

drwxr-xr-x  2 root root        120 Mar 26 23:47 by-path
crw-rw----+ 1 root video  226,   0 Mar 26 23:47 card0
crw-rw----+ 1 root video  226,   1 Mar 26 23:47 card1
crw-rw----+ 1 root render 226, 128 Mar 26 23:47 renderD128
crw-rw----+ 1 root render 226, 129 Mar 26 23:47 renderD129

Enabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly
Assembly Math   :
Audio drivers   : disk dummy oss alsa(dynamic) sndio(dynamic)
Video drivers   : dummy kmsdrm(dynamic) opengl_es2
Input drivers   : linuxev linuxkd
Using libsamplerate : NO
Using libudev       : YES
Using dbus          : YES
Using ime           : YES
Using ibus          : YES
Using fcitx         : NO

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #15 on: May 30, 2020, 02:58:33 am »
What about the missing exynos_dri.so ? Can you find it on your FS ?

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #16 on: May 30, 2020, 12:01:06 pm »
What about the missing exynos_dri.so ? Can you find it on your FS ?

nope - no exynos_dri.so to be found. I've been looking around a bit but I haven't figured it out yet.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #17 on: May 30, 2020, 12:53:15 pm »
No wonder DRM is not working then ;) which distro are you using; n your xu4 ? Hardkernel's ubuntu ?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #18 on: May 30, 2020, 02:30:30 pm »
As promised, here is a 32 GB SD card image of the system, without ROMs (just put them into /data/roms using the Samba share while in Service mode):

https://drive.google.com/file/d/1I6N4ocQxNH-PhAUYzS8f-6PA_lkmCLeq

Important information:
  • The password of the user pi is left to default (raspberry)
  • The Wi-Fi has not been disabled
  • No overclocking has been configured in /boot/config.txt
  • No controller has been configured in mame.ini

Let me know how your appreciation of the system!
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #19 on: May 30, 2020, 02:32:02 pm »
No wonder DRM is not working then ;) which distro are you using; n your xu4 ? Hardkernel's ubuntu ?

 :o indeed - no, I'm using Armbian_20.02.7_Odroidxu4_buster_current_5.4.28_minimal.img
No idea how to add that feature as of yet...

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #20 on: May 30, 2020, 06:04:30 pm »
As promised, here is a 32 GB SD card image of the system, without ROMs (just put them into /data/roms using the Samba share while in Service mode):

https://drive.google.com/file/d/1I6N4ocQxNH-PhAUYzS8f-6PA_lkmCLeq

Important information:
  • The password of the user pi is left to default (raspberry)
  • The Wi-Fi has not been disabled
  • No overclocking has been configured in /boot/config.txt
  • No controller has been configured in mame.ini

Let me know how your appreciation of the system!

I haven't tried your img, but if you allow me to share my experience :
- sharibg an image of a sd card can be risky as most cards thay say 32GB don't have the same size, so the flashing fails
- there is a raspbian image maker that you can very easily customize. This would be a great improvement. See https://github.com/RPi-Distro/pi-gen

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #21 on: May 30, 2020, 06:07:07 pm »
No wonder DRM is not working then ;) which distro are you using; n your xu4 ? Hardkernel's ubuntu ?

 :o indeed - no, I'm using Armbian_20.02.7_Odroidxu4_buster_current_5.4.28_minimal.img
No idea how to add that feature as of yet...
The so may bot be in the search path listed in the mesa error, but the file may indeed exist. Find it, then symlink it to one of the paths listed

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #22 on: May 30, 2020, 06:48:29 pm »
As promised, here is a 32 GB SD card image of the system, without ROMs (just put them into /data/roms using the Samba share while in Service mode):

https://drive.google.com/file/d/1I6N4ocQxNH-PhAUYzS8f-6PA_lkmCLeq

Important information:
  • The password of the user pi is left to default (raspberry)
  • The Wi-Fi has not been disabled
  • No overclocking has been configured in /boot/config.txt
  • No controller has been configured in mame.ini

Let me know how your appreciation of the system!

I haven't tried your img, but if you allow me to share my experience :
- sharibg an image of a sd card can be risky as most cards thay say 32GB don't have the same size, so the flashing fails
- there is a raspbian image maker that you can very easily customize. This would be a great improvement. See https://github.com/RPi-Distro/pi-gen

I agree that that flashing will fail if the SD Card is smaller than 32 GB in capacity. I just did a quick image with dd and then I compressed it.

I will use a more elaborate imaging solution to make let's say a 8 GB image so it could fit on the vast majority of the SD Cards. The 3rd partition (data) may then be expanded with a utility like gparted or similar.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #23 on: May 31, 2020, 03:29:17 am »
You can find some tools that can trim down a partition or image to almost the bare necessary. Some distros (like raspbian) have a script that can resize the / partition to extend it to the full capacity. This could be a better idea than having a second partition that require some tools to edit partitions. Not all people are comfortable with this

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #24 on: June 01, 2020, 02:49:22 pm »
You can find some tools that can trim down a partition or image to almost the bare necessary. Some distros (like raspbian) have a script that can resize the / partition to extend it to the full capacity. This could be a better idea than having a second partition that require some tools to edit partitions. Not all people are comfortable with this

I published a new 8 GB version of the image (see the original post of the topic).

In the next version, I will automate the resizing of /data (using the same principle from Raspbian with expanding the root filesystem).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #25 on: June 02, 2020, 10:32:54 am »
In the mean time I managed to compile an odoid xu4 version using the same methodology as you.
I'm using other archops reflecting my cpu etc.
ARCHOPTS = -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -mfpu=auto -mfloat-abi=hard -funsafe-math-optimizations -fexpensive-optimizations -fprefetch-loop-arrays
build cmd
make -j $(nproc) CFLAGS="-Wno-error=format-truncation -fPIC" SUBTARGET=arcade OSD=sdl NO_X11=1 NOWERROR=1 NO_USE_XINPUT=1 NO_USE_XINPUT_WII_LIGHTGUN_HACK=1 NO_OPENGL=1 USE_QTDEBUG=0 DEBUG=0 REGENIE=1 NO_BGFX=1
It all checks out but it is extremely slow.
Cabal runs at 16% for example. The mouse barely moves when the qt window is open.
I find it odd. It is just too slow so something must still be wrong. I am thinking that maybe it's not using the gpu but I do not (yet) know how I can check that.
I first made a non optimized version and than the optimized one but both are very very slow.
The board is connected to a 1200*1920 tft at the moment. It is a 32bit cpu so a 32bit os.
I'm using ubuntu-18.04.3-4.14-minimal-odroid-xu4-20190910 atm.
If anyone has an idea (or some test program/code) do share please. 
« Last Edit: June 02, 2020, 10:36:01 am by ZoOl007 »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #26 on: June 02, 2020, 11:35:47 am »
In the mean time I managed to compile an odoid xu4 version using the same methodology as you.
I'm using other archops reflecting my cpu etc.
ARCHOPTS = -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -mfpu=auto -mfloat-abi=hard -funsafe-math-optimizations -fexpensive-optimizations -fprefetch-loop-arrays
build cmd
make -j $(nproc) CFLAGS="-Wno-error=format-truncation -fPIC" SUBTARGET=arcade OSD=sdl NO_X11=1 NOWERROR=1 NO_USE_XINPUT=1 NO_USE_XINPUT_WII_LIGHTGUN_HACK=1 NO_OPENGL=1 USE_QTDEBUG=0 DEBUG=0 REGENIE=1 NO_BGFX=1
It all checks out but it is extremely slow.
Cabal runs at 16% for example. The mouse barely moves when the qt window is open.
I find it odd. It is just too slow so something must still be wrong. I am thinking that maybe it's not using the gpu but I do not (yet) know how I can check that.
I first made a non optimized version and than the optimized one but both are very very slow.
The board is connected to a 1200*1920 tft at the moment. It is a 32bit cpu so a 32bit os.
I'm using ubuntu-18.04.3-4.14-minimal-odroid-xu4-20190910 atm.
If anyone has an idea (or some test program/code) do share please.

Hi ZoOl007,

Did you also compiled SDL2 with the provided build parameters?

Did you forced MAME to use the KMSDRM backend and OpenGL ES rendering engine (start MAME with -videodriver kmsdrm -renderdriver opengles2 -video accel)?

Make sure your user account running MAME is a member of the render group (see my procedure).
You could test if your hardware acceleration is OK with the kmscube test utility (https://gitlab.freedesktop.org/mesa/kmscube/).
 
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #27 on: June 02, 2020, 07:12:49 pm »
Hi all,

Here is a new 4GB image file of the system. Again, without ROMs (just put them in /data/roms) - see the link in the original topic post.

I put the system in Service mode, so you can start with expanding the /data partition and add ROMs with Samba.

To put back in Arcade mode, just issue:

rw
arcademode
sudo reboot
« Last Edit: June 02, 2020, 07:50:26 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

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 723
  • Last login:Today at 09:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #28 on: June 03, 2020, 03:10:58 am »
Nice !

Have you tried sdl 2.0.12 ?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #29 on: June 03, 2020, 06:25:01 pm »
Nice !

Have you tried sdl 2.0.12 ?

Thanks!

FYI, we need to build SDL 2.0.10, not 2.0.12 (as stated in the How-to Guide, there is a bug with version 2.0.11 and up, so we should stay at 2.0.10 until the bug is fixed).
« Last Edit: June 03, 2020, 06:53:02 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

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #30 on: June 06, 2020, 11:36:06 am »
I managed to get it to work on the OdroidXU4. I did not yet set it up as a dedicated tv appliance as you did but I did get mame 0.219 running smoothly.
I tried several games including the ones in your movie and performance is top. WonderBoy3 isn't running at 100% - does that run 100% on the Pi4?
As for audio I can't say as I'm using hdmi to dvi atm.
The only thing that is a pity is that glsl can't work. If that could work it would be perfect.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #31 on: June 06, 2020, 01:09:09 pm »
I managed to get it to work on the OdroidXU4. I did not yet set it up as a dedicated tv appliance as you did but I did get mame 0.219 running smoothly.
I tried several games including the ones in your movie and performance is top. WonderBoy3 isn't running at 100% - does that run 100% on the Pi4?
As for audio I can't say as I'm using hdmi to dvi atm.
The only thing that is a pity is that glsl can't work. If that could work it would be perfect.

Great to know that you've been able to successfully replicate the steps on your Odroid XU4 :)

The objective for me is to integrate the Raspberry 4B in a bartop arcade cabinet.

FYI, I also tried Wonder Boy 3, as you proposed and the speed isn't running at 100 % for me too on the Raspberry Pi 4.
« Last Edit: June 06, 2020, 01:18:41 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

HannibalAnthrope

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:August 27, 2020, 10:00:25 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #32 on: August 25, 2020, 09:34:35 pm »
I burned your latest chip image to a clean chip and tried to boot it in a Pi4B 2gb.  Mame splash appears, boot never completes.  On tty3 I see a number of "FAILED" messages (Load/Save RF Kill Switch, dependency failed for local file systems, dependency failed for MAME autostart, etc..etc..) and then finally emergency mode.  Except it cannot open access to the console and reports the root account is locked.  LOL
Can't even get to a # prompt to try to fix it.  Shame too because it looks like you put a lotta work into this.  Seems like you may have overcooked the soup!  A bit too much automation maybe?  No offense intended.  I'll take a look around it and see if I can find the main issues.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #33 on: August 25, 2020, 10:08:22 pm »
I burned your latest chip image to a clean chip and tried to boot it in a Pi4B 2gb.  Mame splash appears, boot never completes.  On tty3 I see a number of "FAILED" messages (Load/Save RF Kill Switch, dependency failed for local file systems, dependency failed for MAME autostart, etc..etc..) and then finally emergency mode.  Except it cannot open access to the console and reports the root account is locked.  LOL
Can't even get to a # prompt to try to fix it.  Shame too because it looks like you put a lotta work into this.  Seems like you may have overcooked the soup!  A bit too much automation maybe?  No offense intended.  I'll take a look around it and see if I can find the main issues.

I would try first to get back the kernel messages on the console so you can pinpoint the problem.

From another computer, you can edit the file /boot/cmdline.txt on the SD card and remove the following arguments from the kernel command-line:

    logo.nologo vt.global_cursor_default=0 quiet

And put back "console=tty1", instead of "console=tty3".

Can you take a picture of the kernel messages (and post it here) once the boot process is stucked?

To make an offline switch to Service mode, delete these 2 files from the SD card:
/etc/systemd/systm/network.target.wants/mame-autostart.service.
/etc/systemd/system/multi-user.target.wants/shutdown.service.
« Last Edit: August 25, 2020, 10:50:58 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

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #34 on: August 25, 2020, 10:53:00 pm »
I burned your latest chip image to a clean chip and tried to boot it in a Pi4B 2gb.  Mame splash appears, boot never completes.  On tty3 I see a number of "FAILED" messages (Load/Save RF Kill Switch, dependency failed for local file systems, dependency failed for MAME autostart, etc..etc..) and then finally emergency mode.  Except it cannot open access to the console and reports the root account is locked.  LOL
Can't even get to a # prompt to try to fix it.  Shame too because it looks like you put a lotta work into this.  Seems like you may have overcooked the soup!  A bit too much automation maybe?  No offense intended.  I'll take a look around it and see if I can find the main issues.

I would try first to get back the kernel messages on the console so you can pinpoint the problem.

From another computer, you can edit the file /boot/cmdline.txt on the SD card and remove the following arguments from the kernel command-line:

    logo.nologo vt.global_cursor_default=0 quiet

And put back "console=tty1", instead of "console=tty3".

Can you take a picture of the kernel messages (and post it here) once the boot process is stucked?

To make an offline switch to Service mode, delete these 2 files from the SD card:
  -  /etc/systemd/systm/network.target.wants/mame-autostart.service          OR (old name)        autostart-mame.service
  -  /etc/systemd/system/multi-user.target.wants/shutdown.service
« Last Edit: August 26, 2020, 09:03:26 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

HannibalAnthrope

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:August 27, 2020, 10:00:25 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #35 on: August 27, 2020, 09:56:09 am »
I had the same ideas, plus I just loaded the overlay to disable wifi because I don't use it.
I got the failed messages pretty much cleared up, and I cleaned up the filesystems on another Pi but I was never able to get past the root account locked problem and a few hours trying to research that on the net was painful and unfruitful.  I still don't know what to do to solve it or what causes it because there were as many "answers" as people.  I did try more than one Pi even though this one was brand new and is running fine now (and it ran RetroPie just fine too although that was a short test because I hate it and think it's garbage LOL).

If you'd like me to test again I can probably do that, but I would ask that you re-download the image you've posted, burn it to a chip and test it on your Pi4 to verify - and not that I don't appreciate your work, I do - but debugging a bootable chip image is time consuming and frustrating.  And I'm pretty sure the final result is going to be confirming for me that MAME still does NOT work right on a Pi4, at least not with the classic games I use (Space Invaders for one).  Even back to build .078 and having compiled SDL2 correctly MAME just eats the cpu and is far too slow to even play Space Invaders.  I'm not sure how others are reporting it to work ok for them <shrug>.  Anyway, let me know if you want try fixing it.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #36 on: August 27, 2020, 02:53:43 pm »
I had the same ideas, plus I just loaded the overlay to disable wifi because I don't use it.
I got the failed messages pretty much cleared up, and I cleaned up the filesystems on another Pi but I was never able to get past the root account locked problem and a few hours trying to research that on the net was painful and unfruitful.  I still don't know what to do to solve it or what causes it because there were as many "answers" as people.  I did try more than one Pi even though this one was brand new and is running fine now (and it ran RetroPie just fine too although that was a short test because I hate it and think it's garbage LOL).

I think your problem is caused by the kernel not being able to mount the root filesystem (for some reason). Maybe because of the wrong PARTUUID, depending the tool you used to write the .img file to the SD card. I will update the procedure to switch to LABEL= in /etc/fstab.

Can you try this solution, please:
1. Mount the Raspberry Pi SD card on another computer
2. Edit the file /etc/fstab
3. Make sure you update these 3 lines (notice the LABEL= at leftmost):

LABEL=boot            /boot           vfat    defaults,ro                 0    2
LABEL=rootfs          /               ext4    defaults,noatime,ro         0    1
LABEL=data            /data           f2fs    defaults,noatime,discard    0    2


4. Edit /boot/cmdline.txt and replace the parameter "root=PARTUUID=xxxxxxxx" by:
root=/dev/mmcblk0p2

If you'd like me to test again I can probably do that, but I would ask that you re-download the image you've posted, burn it to a chip and test it on your Pi4 to verify - and not that I don't appreciate your work, I do - but debugging a bootable chip image is time consuming and frustrating.  And I'm pretty sure the final result is going to be confirming for me that MAME still does NOT work right on a Pi4, at least not with the classic games I use (Space Invaders for one).  Even back to build .078 and having compiled SDL2 correctly MAME just eats the cpu and is far too slow to even play Space Invaders.  I'm not sure how others are reporting it to work ok for them <shrug>.  Anyway, let me know if you want try fixing it.

If you are not able to emulate Space Invaders on a Raspberry Pi with MAME, it's because the hardware acceleration is not enabled.
I am able to emulate much more complex games with full speed (DoDonPachi, Truxton II, etc.) on my Raspberry Pi 4 with the provided How-To.
« Last Edit: August 27, 2020, 06:01:51 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #37 on: September 16, 2020, 03:03:30 am »
I got your image running and it's a great project! I would like to know how I can update MAME to the latest version (0.224). As far I followed to your step-by-step tutorial you excluded MESS. I would like to include the whole MAME (with the systems from MESS). What do I need to modify in the update script?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #38 on: September 16, 2020, 08:30:54 am »
Hi teller,

To get the full MAME (arcade and classic systems), just remove SUBTARGET=arcade from MAKEOPTS variable asingment.

Be advised that I did not tested this build/compilation.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #39 on: September 16, 2020, 08:51:36 am »
Thanks for your quick reply.
So I better make a backup before I update.
What are the update commands in servicemode?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #40 on: September 16, 2020, 09:48:34 am »
Thanks for your quick reply.
So I better make a backup before I update.
What are the update commands in servicemode?

Yes, make ŗ backup of the MAME binary before starting ŗ MESS/MAME build.

Start the build with (provided you already made the ajustments to drawbgfx.cpp):

./mame-update.sh 0224
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #41 on: September 16, 2020, 09:52:18 am »
Ok, I will try out tonight and let you know.
Thanks!

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #42 on: September 16, 2020, 02:15:43 pm »
To remove the line "MAKEOPTS='SUBTARGET=arcade",
where is the "mame-update.sh" located?
In servicemode if I type
Code: [Select]
nano ~/mame-update.shall I get is a blank GNU nano 3.2.
Sorry for the noob question, I'm a Windows user ;).
And always, thanks for taking your time.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #43 on: September 16, 2020, 04:29:04 pm »
To remove the line "MAKEOPTS='SUBTARGET=arcade",
where is the "mame-update.sh" located?
In servicemode if I type
Code: [Select]
nano ~/mame-update.shall I get is a blank GNU nano 3.2.
Sorry for the noob question, I'm a Windows user ;).
And always, thanks for taking your time.

Hi, you should be able to edit the mame-update.sh script with the command you specified. Are you logged with the user "pi" ?

If not, you should use this user account to log in. The password is the default one: raspberry

All the scripts are under /home/pi, including mame-update.sh

As a side note, you should only remove SUBTARGET=arcade from the options. All the remaining options have to remain there, unchanged.
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #44 on: September 16, 2020, 04:32:47 pm »
ANNOUNCEMENT - NEW IMAGE AVAILABLE WITH MAME 0.224

Just to let everyone know that I published today a new version of the image with MAME 0.224. The minimum size of the SD card should be 16 GB (10 GB for the root filesystem and the remaining space for the data partition for storing ROMs).

Please see the original post at the beginning of this thread for the download link and the first steps do do once the image is written to the SD card.

Thanks and happy gaming!
« Last Edit: September 17, 2020, 07:42:15 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #45 on: September 16, 2020, 04:36:18 pm »
wow, many thanks!
is this the full mame version (with mess)?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #46 on: September 16, 2020, 05:11:52 pm »
wow, many thanks!
is this the full mame version (with mess)?

Hi, no this version does not include MESS. I am currently compiling the full version, as a first try. Let's see how it goes. Stay tuned.
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #47 on: September 16, 2020, 11:05:38 pm »
wow, many thanks!
is this the full mame version (with mess)?

Hi, no this version does not include MESS. I am currently compiling the full version, as a first try. Let's see how it goes. Stay tuned.

Hi, just to let you know that I successfully compiled the complete MAME (including the MESS code). I decided to include the MESS code, as it has no impact on ressource consumption on the system.

I will update the image file tomorrow.
« Last Edit: September 17, 2020, 07:40:24 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #48 on: September 17, 2020, 01:43:18 am »
 :applaud:
Thanks a lot‼️

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #49 on: September 17, 2020, 12:32:58 pm »
Just to let know to everyone that I uploaded today a new version of the disk image file. The MAME binary now include the MESS code for the emulation of classic computer systems in addition to arcade systems.

The original post of this thread has been upated with the new download link.

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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #50 on: September 17, 2020, 12:45:20 pm »
Fantastic news!
I will try out tonight.
One question:
Is there also a folder for "artwork" on "\\arcade\data"?
I ask because the "Game & Watch" system needs an artwork folder.

Thanks!
« Last Edit: September 17, 2020, 12:47:45 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #51 on: September 17, 2020, 12:50:16 pm »
Fantastic news!
I will try out tonight.
One question:
Is there also a folder for "artwork" on "\\arcade\data"?

Thanks!

Hi, the answer is yes. I externalized (among others) the "artwork" folder, so you can use your own effect masks for emulating a CRT. Not to be confused with the "snap" folder, where all the game snapshots should be placed (also under \\arcade\data).

I hope this anwser your question.

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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #52 on: September 17, 2020, 12:50:49 pm »
First of all it's really amazing getting a working MAME 0.224 on a Raspberry Pi 4, many thanks for your effort and time!

I just tested your image and have some feedback/questions/issues:
Somehow the software list per system won't get recognized automatically which means you cannot load the game instantly in the software list menu. For example the game system "VIDEOPAC" has a voice module which has to get loaded in -cart1 and then the actual game in -cart2. I can only select one slot (cart, floppy or whatever the system needs). That's because somehow the system can't see its software.
Maybe this setting or feature is manually turned off or not yet implemented?

Further issues/questions:
- How can I change "Video Options"? Somehow I cannot enter it. I would like to have "bilinear filtering" off.
- Under "Machine options" when I set "UI Active ON", MAME is freezing (nothing can be edited).
- When I connect a USB Joystick it doesn't get recognized and cannot be mapped. Do I need to set it manually in the "cfg" folder (default.cfg)?
« Last Edit: September 17, 2020, 05:29:19 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #53 on: September 18, 2020, 06:11:37 pm »
First of all it's really amazing getting a working MAME 0.224 on a Raspberry Pi 4, many thanks for your effort and time!

I just tested your image and have some feedback/questions/issues:
Somehow the software list per system won't get recognized automatically which means you cannot load the game instantly in the software list menu. For example the game system "VIDEOPAC" has a voice module which has to get loaded in -cart1 and then the actual game in -cart2. I can only select one slot (cart, floppy or whatever the system needs). That's because somehow the system can't see its software.
Maybe this setting or feature is manually turned off or not yet implemented?

Further issues/questions:
- How can I change "Video Options"? Somehow I cannot enter it. I would like to have "bilinear filtering" off.
- Under "Machine options" when I set "UI Active ON", MAME is freezing (nothing can be edited).
- When I connect a USB Joystick it doesn't get recognized and cannot be mapped. Do I need to set it manually in the "cfg" folder (default.cfg)?

First, let me say that I am very happy to hear comments and feedback like yours, teller! :)

I will try to answer your issues/questions the best I can.
For MESS emulation, I did not made tests, as this part of the code has been enabled very recently (as you know). Can you explain me how to reproduce your problem? Do I need to download the BIOS of the Phillips Videopac+ system first? What voice module does need loading from cartridge1 and what game are you trying to emulate in cartridge2? I will try to reproduce your issue and see what I can do.

The "Video Options" menu is unfortunately not working for me too (I get a Segmentation fault when I try to use it). If you want to turn off "bilinear filtering" globally, just ajust mame.ini in that way:

#
# OSD ACCELERATED VIDEO OPTIONS
#
filter                    0


For your "Machine Options" issue, do you mean the "Configure Machine" from the main selection screen?

For the USB Joystick to be recognized, you first need to be in read/write mode (use the alias "rw" in an SSH session) when connecting it. This way, Linux will be able to write the values to the root filesystem persistently. Also make sure your joystick is supported natively by the Linux kernel (lsusb -t). Once recognized by the Linux kernel, you assign the joystick configuration file (mappings) in /data/ini/mame.ini:

#
# CORE INPUT OPTIONS
#
ctrlr                     
<name-of-cfg-file-without-extension>

The mapping file is ending with a .cfg extension and should be placed in "/data/ctrlr" folder.

I hope these answers helps you a bit!
« Last Edit: September 19, 2020, 09:31:48 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #54 on: September 19, 2020, 10:22:41 am »
Where is my reply?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #55 on: September 19, 2020, 10:25:40 am »
Hi teller,

I think your last post was deleted (it contained a link to a copywrited software, I guess). Can you post it again (without the link), please?

Regarding the problem with enabling "UI Active" to "On", I do not have this problem. But I think I know the cause. I just want to confirm something with your version of the file "mame-launcher.sh". Can you confirm that you have the line in red below in the script?

#!/bin/bash

# This script launch the MAME emulator and respawn it if quit unexpectedly.

export SDL_VIDEODRIVER=kmsdrm
export SDL_RENDER_DRIVER=opengles2
export SDL_RENDER_VSYNC=1
export SDL_GRAB_KEYBOARD=1
export SDL_VIDEO_GLES2=1


if [ ! -z $MAMEPATH ] && [ -f $MAMEPATH/mame ]; then
    cd $MAMEPATH
    while
        $MAMEPATH/mame -nojoy -nomouse > /dev/null 2>&1
        (( $? != 0 ))
    do
        :
    done
else
    echo $0 - Variable MAMEPATH is not defined or invalid!
    read -n 1 -s -r -p "Press any key to continue..."
    echo
fi

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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #56 on: September 19, 2020, 10:48:33 am »
I don't have that red line in "mame-launcher.sh".
Shall I add it?

I posted a video about how the "software package list" looks in MAME on Windows and how you use The Voice module for the Videopac.
Here's the video again:


"filter 0" and "UI active On" I could set successfully in mame.ini.

I still cannot map my usb joystick, but in "rw" mode I can see it under js0 and I also tested the directions but when I try to map it in MAME under "General Options/General Inputs/Player 1 Controls" the Joystick controls cannot be mapped.
« Last Edit: September 19, 2020, 11:54:00 am by teller »

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #57 on: September 19, 2020, 10:53:58 am »
I just added the red line you mentioned and now the software list appears!
thanks for the fix!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #58 on: September 19, 2020, 11:09:02 am »
I just added the red line you mentioned and now the software list appears!
thanks for the fix!

Great, things look good so far!

For your joystick, I think I have the solution :

Edit mame-launcher.sh and remove "-nojoy" from the Line calling the MAME binary. The Line in question begin with:

$MAMEPATH/mame -nojoy -nomouse

If you don't have any specific joystick mappings in Windows, that means you don't need them on the Raspberry Pi, so leave the "ctrlr" option empty in mame.ini.


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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #59 on: September 19, 2020, 11:42:21 am »
The Joystick works too!
Thanks!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #60 on: September 19, 2020, 11:58:01 am »
The Joystick works too!
Thanks!

Great news!

So everything works as expected?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #61 on: September 19, 2020, 12:11:49 pm »
somehow i get a segmentation fault line 24 when starting some games.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #62 on: September 19, 2020, 12:19:30 pm »
somehow i get a segmentation fault line 24 when starting some games.

You talk about the Odyssey2 games emulated by the MESS codebase?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #63 on: September 19, 2020, 12:36:59 pm »
yep. It worked before but after loading the voice module and adding a game in -cart2. I cannot play any of the odyssey2 games  :hissy: and I don't know why. All I get is a segmentation fault line 21 error.
all other systems work very well. I also tried the Intellivison with Intellivoice (2 cart-mode too) and there is no issue at all.


bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #64 on: September 19, 2020, 12:47:24 pm »
yep. It worked before but after loading the voice module and adding a game in -cart2. I cannot play any of the odyssey2 games  :hissy: and I don't know why. All I get is a segmentation fault line 21 error.
all other systems work very well. I also tried the Intellivison with Intellivoice (2 cart-mode too) and there is no issue at all.

Maybe flush the content of /data/nvram and any persistent data that might have been written to /data for the Odyssey2. We ajusted mame-launcher.sh so MAME can work correctly, so there may be an before/after effect/inconsistency in data files of the Odyssey2 system.
« Last Edit: September 19, 2020, 03:18:07 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #65 on: September 19, 2020, 04:23:37 pm »
To get the voice module working the odyssey2.cfg should be generated as this:
Code: [Select]
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="odyssey2">
        <image_directories>
        <device instance="cartridge1" directory="/home/pi/mame0224" />
            <device instance="cartridge2" directory="/home/pi/mame0224" />
        </image_directories>
    </system>
</mameconfig>

But somehow it won't generate those directories properly.


I've also tested thos "Game & Watch" games and they are sadly too slowly for the Pi4. They must be cpu-hungry because of the vectorized svg's, maybe?
« Last Edit: September 19, 2020, 06:02:34 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #66 on: September 19, 2020, 06:44:45 pm »
To get the voice module working the odyssey2.cfg should be generated as this:
Code: [Select]
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="odyssey2">
        <image_directories>
        <device instance="cartridge1" directory="/home/pi/mame0224" />
            <device instance="cartridge2" directory="/home/pi/mame0224" />
        </image_directories>
    </system>
</mameconfig>

But somehow it won't generate those directories properly.

What directories are not generated properly? If you specify the path "/home/pi/mame0224", please note that this path is read-only in normal operation. If you need write access, we need to externalize it to /data first. But first, I need to know what kind of files are generated.

Quote from: teller
I've also tested thos "Game & Watch" games and they are sadly too slowly for the Pi4. They must be cpu-hungry because of the vectorized svg's, maybe?

I didn't tested these games, so I can't comment, sorry about that.
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #67 on: September 19, 2020, 06:54:36 pm »
Teller, please note that I will be uploading a new version of the disk image-file.

Today, I made some additions that may (or not) fix your problem with the Odyssey2 system.

CHANGES:

1. In /data/ini/mame.ini, these paths have changed (please make the ajustments):

Code: [Select]
homepath             $HOME/.mame/lua
input_directory      $HOME/.mame/inp
diff_directory       $HOME/.mame/diff

2. Create the new folders on /data:

Code: [Select]
cd /data
mkdir lua inp diff
sudo chown -R nobody:pi /data
sudo chmod -R 3774 /data

3. Create the related symlinks in ~/.mame folder:

Code: [Select]
ln -s /data/lua      ~/.mame/lua
ln -s /data/inp      ~/.mame/inp
ln -s /data/diff     ~/.mame/diff
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #68 on: September 20, 2020, 04:12:47 am »
you're a unstoppable!😜

I just tested your new image and for the sake of Videopac G7400 I still get an error but this time with more infos, see screenshot below.
I am sure that all my files are working because I copied them from my Windows MAME 0.224 set and they should be identical. This "charset_ef9340_1.rom" which is inside the "ef9340_1.zip" is working on my pc but somehow it doesn't get tolerated here as a proper BIOS. And that strange message: Invalid BIOS "1", reverting to default.
Maybe there is still something missing, needed, buggy?

All the best and thanks again.
« Last Edit: September 20, 2020, 06:10:16 am by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #69 on: September 20, 2020, 09:23:14 am »
you're a unstoppable!😜

I just tested your new image and for the sake of Videopac G7400 I still get an error but this time with more infos, see screenshot below.
I am sure that all my files are working because I copied them from my Windows MAME 0.224 set and they should be identical. This "charset_ef9340_1.rom" which is inside the "ef9340_1.zip" is working on my pc but somehow it doesn't get tolerated here as a proper BIOS. And that strange message: Invalid BIOS "1", reverting to default.
Maybe there is still something missing, needed, buggy?

All the best and thanks again.

Thanks teller!

I suggest you copy the hash files related to Odyssey2 from your Windows machine to your Raspberry Pi in /home/pi/mame0224/hash folder. MAME is using those files to check if romsets are the expected version.

As a side note, you see more information (error messages) because there is a little error in mame-launcher.sh. I will upload a new fixed version today. The script will behave differently if called in Service mode or Arcade mode.

So to get full debug, with the new image, just switch to Service mode in an SSH session and start MAME with verbose mode :

Code: [Select]
rw
servicemode
sudo reboot

./mame-launcher.sh -v
« Last Edit: September 20, 2020, 09:30:00 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #70 on: September 20, 2020, 02:02:52 pm »
Thanks but it's not the hash files, I tried that. I also tried swapping out the dependent bios files with the latest ones but had still no luck.
I tried verbose mode but can't find out why most of the odyssey2 or g7400 games won't start. Weirdly I can load every game as a .bin file via File Loader when using Tab menu. But sadly it's not possible loading 'The Voice' directly from the software list menu and then loading a voice supported game into the 2nd cartridge slot.

I don't think that this 0.224 version would need different bios content than from Windows as it comes from the same source, which makes sense.
« Last Edit: September 20, 2020, 02:16:49 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #71 on: September 20, 2020, 02:36:31 pm »
Thanks but it's not the hash files, I tried that. I also tried swapping out the dependent bios files with the latest ones but had still no luck.
I tried verbose mode but can't find out why most of the odyssey2 or g7400 games won't start. Weirdly I can load every game as a .bin file via File Loader when using Tab menu. But sadly it's not possible loading 'The Voice' directly from the software list menu and then loading a voice supported game into the 2nd cartridge slot.

I don't think that this 0.224 version would need different bios content than from Windows as it comes from the same source, which makes sense.

The only thing I can see is that MAME (for some reason) try to write data to the root filesystem, wich is read-only by default. To validate this, you can put the system in read/write mode (while in Service mode) and try to load Odissey2 or G7400 games. You can also start MAME with -oslog and -log options to get more information on what's going on (in Service mode).
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #72 on: September 20, 2020, 09:04:32 pm »
FYI, the new disk image-file has been uploaded and is now available from the link in the original post of this topic. Enjoy!
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #73 on: September 21, 2020, 01:04:28 pm »
Thanks!
I made further investigations why Odyssey2/Videopac crashes when starting from the Software list. It's not because my files are wrong or missing or because of your image.
It's simply because it crashes generally on Linux. I just installed the latest MAME 0.224 on Linux (Ubuntu) and directed the same roms which I have on a SD card. Also The Voice module won't work.
For the moment it only works on Windows, so time will tell and hopefully it will on 0.225.
I've also heard that Odyssey/Videopac won't work normally on the latest SDL MAME on Mac.
« Last Edit: September 21, 2020, 01:40:19 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #74 on: September 21, 2020, 01:47:35 pm »
Thanks!
I made further investigations why Odyssey2/Videopac crashes when starting from the Software list. It's not because my files are wrong or missing or because of your image.
It's simply because it crashes generally on Linux. I just installed the latest MAME 0.224 on Linux (Ubuntu) and directed the same roms which I have on a SD card. Also The Voice module won't work.
For the moment it only works on Windows, so time will tell and hopefully it will on 0.225.
I've also heard that Odyssey/Videopac won't work normally on the latest SDL MAME on Mac.

I'm very glad to hear that my image is not related to the Odyssey2/Videopac problem. As I understand it, it looks like it is related to the use of the SDL layer by MAME. Maybe you could file a bug report to MAME devs.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
« Last Edit: September 22, 2020, 12:18:29 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #76 on: September 23, 2020, 05:16:21 pm »
Somebody already mentioned it:
https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=117746

Great, at least the bug is known and documented. Do you know if it has been filed on the official MAME testers team (on mametesters.org)?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 8883
  • Last login:Today at 09:21:00 pm
  • Designated spam hunter
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #77 on: September 23, 2020, 08:34:14 pm »
Somebody already mentioned it:
https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=117746

Great, at least the bug is known and documented. Do you know if it has been filed on the official MAME testers team (on mametesters.org)?
Looks like there's no need to report it to MAME testers -- the "m_b = get_feature("b_pin") && bool(strtoul(get_feature("b_pin"), nullptr, 0)) ? 1 : 0;" code mentioned by hap in that thread was added to lines 146 and 147 of src/devices/bus/odyssey2/slot.cpp on August 30th.

You can see the before(pink)/after(green) code about half-way down the page of this commit.
https://github.com/mamedev/mame/commit/3624b416ba81e5e17f051005f5bd39cb1f6d1130#diff-c903dd5a8ba87be3732bd5fca46d20c7


Scott

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #78 on: September 24, 2020, 12:10:34 pm »
Does that mean if we would compile MAME again it would be fixed or do we have to wait for 0.225?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #79 on: September 24, 2020, 12:38:29 pm »
Does that mean if we would compile MAME again it would be fixed or do we have to wait for 0.225?

Hi teller, if you download the master branch (from GitHub), then yes you will get all the fixes that have been already integrated in the master branch. You will get ŗ file named mame-master.zip. You will have to uncompress in a folder you create manually (like mame0224a) and call the build script with: ./mame-update 0224a
« Last Edit: September 24, 2020, 12:54:20 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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #80 on: September 24, 2020, 01:20:46 pm »
Cool, I will try it out!

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #81 on: September 25, 2020, 01:52:49 am »
I built it over night. it's done but I don't know where it's placed. I named it mame0224a. The old mame0224 is still there.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #82 on: September 25, 2020, 07:17:16 am »
I built it over night. it's done but I don't know where it's placed. I named it mame0224a. The old mame0224 is still there.

If the build was successful, it produced a binary named mame in /home/pi/mame0224a. The mame-launcher.sh script expect the environment variable $MAMEPATH to be set. Make sure this variable is ajusted to /home/pi/mame0224a (sudo edit /etc/environment). You may have to reboot for this to take effect.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #83 on: September 25, 2020, 12:19:04 pm »
Unfortunately I don't see any mame binary in /home/pi/mame0224a and tried again with ./mame-update.sh 0224a. During the make1 this error occured: "3rdparty/genie/build/gmake.linux -> No such file or directory".
What could be wrong?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #84 on: September 25, 2020, 12:34:35 pm »
Unfortunately I don't see any mame binary in /home/pi/mame0224a and tried again with ./mame-update.sh 0224a. During the make1 this error occured: "3rdparty/genie/build/gmake.linux -> No such file or directory".
What could be wrong?

It may be because there is not enough free space for the build process to complete (check with "df"). Can you check if the file exist in the specified location? How much RAM your Raspberry Pi 4 has? To build with 4 threads in parallel, you need 4 GB of RAM.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #85 on: September 25, 2020, 02:45:20 pm »
Indeed that 3rdparty folder was missing. Will copy mame-master again and try from scratch.
I have a Pi4 4G Model B.
Happy weekend.
« Last Edit: September 25, 2020, 03:09:52 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #86 on: September 25, 2020, 10:49:08 pm »
Indeed that 3rdparty folder was missing. Will copy mame-master again and try from scratch.
I have a Pi4 4G Model B.
Happy weekend.

I think the fact that the 3rdparty folder was missing is due to a logic error in the mame-update.sh script (we should only do the cleanup if the build is successful - I just fixed this and uploaded a new version of the image-file and also updated the How-To, if you want to ajust the script, wich is faster).

Thanks and have a great weekend you too!
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #87 on: September 26, 2020, 10:44:33 am »
Build FAILED with your latest image.
make: *** [makefile:1375: linux] Error 2
Wasted more than 5h...

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #88 on: September 26, 2020, 11:29:09 am »
Build FAILED with your latest image.
make: *** [makefile:1375: linux] Error 2
Wasted more than 5h...

What's the build error message (look upward in the scrollback).

Personnally, I successfully compiled the master branch without any issue.

I can send you the binary, if you want. Here we go (just put the binary in /home/pi/mame0224a):

https://drive.google.com/file/d/1NNdl2eDRnf3l5O8iePnfoMuaPKswH5QM/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

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #89 on: September 26, 2020, 11:32:29 am »
Thanks for the binary, it's finally working!
Now I can play all the VIDEOPAC games with full Voice support!
Amazing work and lots of help from you, thanks again!
« Last Edit: September 26, 2020, 06:35:39 pm by teller »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #90 on: September 26, 2020, 03:32:54 pm »
Thanks, it's finally working!
Now I can play all the VIDEOPAC games with full Voice support!
Amazing work and lots of help from you, thanks again!

Great, my pleasure! :)
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #91 on: October 01, 2020, 07:15:21 am »
MAME v0.225 just released!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #92 on: October 01, 2020, 08:20:29 am »
MAME v0.225 just released!

Yes, and I built it successfully yesterday. I will post ŗ new image today with MAME 0.225.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #93 on: October 01, 2020, 10:38:13 am »
Glad you will keep it updated, thanks!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #94 on: October 01, 2020, 01:12:32 pm »
Just to let you know the availability of the new disk image file with MAME 0.225 (please see the original post of this thread for the download link).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #95 on: October 01, 2020, 02:52:23 pm »
I updated successfully! thanks again and happy gaming!

teller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:March 13, 2021, 10:29:40 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #96 on: October 09, 2020, 06:14:52 pm »
I could see great potential seeing a port of latest MAME on the Nintendo Switch. The Switch uses the Tegra X1 chipset from NVIDIA and would be powerful enough to run more even more modern arcade games. Meanwhile it's possible to run the systems Android (Oreo v8.1) and Linux (Ubuntu LTS 18.04) (see switchroot.org) but as far I know nobody ported the lastest version of MAME yet. I tried to install it on Ubuntu LTS 18.04 but it somehow it won't run.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #97 on: October 28, 2020, 08:54:48 pm »
Just to let you know the availability of the new disk image file with MAME 0.226 (please see the original post of this thread for the download link).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 684
  • Last login:May 14, 2022, 12:42:41 pm
  • Time to coin up!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #98 on: October 31, 2020, 12:55:19 pm »
Can I use the gpio pins on the pi4 to interface controls with this or will it only accept input from an encoder that emulates a keyboard?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #99 on: October 31, 2020, 04:56:55 pm »
Can I use the gpio pins on the pi4 to interface controls with this or will it only accept input from an encoder that emulates a keyboard?

Yes, you can definitely use the GPIO pins to hook up an arcade joystick and buttons.

Please refer to:
https://www.crackedconsole.com/2019/03/21/mk_arcade_joystick_rpi/
https://www.cuddleburrito.com/blog/2015/5/31/connecting-raspberry-pi-arcade-buttons-to-gpio
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #100 on: November 02, 2020, 08:45:19 pm »
Hi all,

I updated the How-To Guide today to incorporate a new feature:

Now, while in Service Mode:
  • As soon as you add new ROM files, the snapshots/titles (and others, if available) images will be scraped/downloaded automatically.
  • As soon as you remove/delete ROM files, the associated graphic files will be deleted.

The pre-built disk image file is not yet updated with this change. I will notify you as soon as it's done.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #101 on: November 05, 2020, 07:26:45 pm »
Quote
Can I use the gpio pins on the pi4 to interface controls with this or will it only accept input from an encoder that emulates a keyboard?

You can. I've done it, but I prefer to use the GPIO for other stuff personally.

This a really cheap encoder that works really well with the pi, and has decent software available to configure the key mapping from the /boot/config.txt
https://www.adafruit.com/product/4518

It also makes it simple to wire a button to power off and on the pi.

Usually I use its bigger brother directly on the pi
https://www.adafruit.com/product/3402

Anyway, you can use the GPIO, it just takes a bit of scripting to make it work. Lots of tutorials out there on that subject.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #102 on: November 14, 2020, 03:43:39 pm »
By the way, I used some of the information in the article to do my last MAME build. While I know a lot of tricks with the Pi, I definitely learned some new ones.

I didn't use the instructions completely. I wanted to automate the build / patching process on mame to work with the Pi4 though, and the instructions work really well for that, but it requires some serious attention to sort out what parts of that article are about compiling a solid version of mame vs all the other stuff that makes the "appliance" part.

In the end, I have a working copy of 225 running on a Pi4. Without overclocking, 225 runs over 99% speed without frameskipping on games like DigDug and Galaga. I just wanted a version of MAME that has the output system that will work with LEDSpicer. I started with MAME v 189 and manually applied the patch changes (since the suggested patch doesn't work on versions that old), but it still chokes at the linking stage after compiling, due to some requirement for X11 that's buried in the MAME code somewhere... I ended up just trying to see if a modern MAME version worked well enough, and 225 was fine.

Anyway, based on my experience, the only thing I'd add to that guide  would be a really obvious subsection that strictly deals with MAME compiling for anyone else that isn't looking for the full appliance experience. I think the automation script for downloading, patching and building MAME is really solid and is really valuable information just by itself.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #103 on: November 14, 2020, 08:27:52 pm »
Hi mahuti,

Thanks for using the instructions (at least partially) from the How-To Guide. :)

I am glad you were able to get a fully working MAME 0.225 on your Pi 4. By curiosity, what are the new tricks you learned from the guide? ;)

About your suggestion, the thing is that this How-To Guide is all about building a dedicated and optimized system for MAME, nothing less, nothing more. Although there is the steps to build the latest version of MAME optimized for the Pi 4, this How-To Guide is nonetheless broader.

I will add more comments in the mame-update.sh script (witch have a double use: first-time setup of MAME and also build/update it).

Thanks again,

Benoit
« Last Edit: November 15, 2020, 11:44:30 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

warty

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:December 23, 2020, 06:33:00 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #104 on: December 20, 2020, 10:25:44 am »
An other noob question from  a Windows user
When I'm in arcademode, how can I switch back to service mode ??

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #105 on: December 20, 2020, 01:59:55 pm »
An other noob question from  a Windows user
When I'm in arcademode, how can I switch back to service mode ??

Just connect to the IP address of the Pi 4 with PuTTY (a popular Windows SSH client) and start an SSH session. Once logged in, issue the following commands:

Code: [Select]
rw
servicemode
sudo reboot
« Last Edit: December 20, 2020, 08:14:53 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

warty

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:December 23, 2020, 06:33:00 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #106 on: December 23, 2020, 05:47:53 am »
ok, thanks for your reply, but what is the default Pi address ?

warty

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:December 23, 2020, 06:33:00 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #107 on: December 23, 2020, 06:09:33 am »
ok, thanks for your reply, but what is the default Pi address ?
I scanned the network and finally found it at 169.254.148.87

ivwshane

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1036
  • Last login:February 11, 2022, 12:05:40 pm
    • My first mame cab! (WIP)
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #108 on: January 04, 2021, 10:44:30 pm »
So what kind of mame performance are you guys seeing on the pi 4? Does it have cps3 well? As gauge of performance, how does it do on 3d games like blitz or mk4 (I don't expect it to be playable but if it does 10+ frames a second that's pretty good).

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #109 on: January 05, 2021, 02:25:46 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.227 (please see the original post of this thread for the download link).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #110 on: January 05, 2021, 04:09:14 pm »
Does your compiled version allow the user to skip warnings and nag screens?
Raspberry Pi, AttractMode, and Skeletor enthusiast.

jhummel

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 25, 2021, 08:41:55 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #111 on: January 05, 2021, 09:05:11 pm »
Sorry for the total noob question here. I was able to download your image and expand the file system. I'm not able to connect to my wifi however. I know you said that wifi isn't disabled in the image, but it seems like the OS doesn't even find the interface. Trying to set things up with raspi-config gives me a "No wireless interfaces found" message. Is that something I screwed up?

Thanks for all the work

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #112 on: January 06, 2021, 12:04:20 am »
Sorry for the total noob question here. I was able to download your image and expand the file system. I'm not able to connect to my wifi however. I know you said that wifi isn't disabled in the image, but it seems like the OS doesn't even find the interface. Trying to set things up with raspi-config gives me a "No wireless interfaces found" message. Is that something I screwed up?

Thanks for all the work

Hi jhummel,

I forgot a little ajustment (in my staging process) when I published the image of 0.227 and it has to do with Wi-Fi.

You will need to reinstall wpasupplicant with the following command and reboot:

Code: [Select]
sudo apt-get install wpasupplicant -y
Sorry for the mistake.
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #113 on: January 06, 2021, 12:17:46 am »
Does your compiled version allow the user to skip warnings and nag screens?

The "skip_gameinfo" setting is enabled in mame.ini.

Other than that, nag screens will do appear (I did'nt used the build option to disable them).

I noticed with 0.227, the emulator systematically displays "One or more ROMs/CHDs for this machine are incorrect.  The machine may not run correctly." when launching a ROM. Maybe a flag has been forgotten by the devs or something.

Anyway, I worked around this with a copy (and overwrite) of all the .xml files from the hash folder of MAME 0.226 to the hash folder of my MAME 0.227 ans everything is OK (no more nag screen with every single ROMs).
« Last Edit: January 06, 2021, 10:21:35 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

jhummel

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 25, 2021, 08:41:55 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #114 on: January 06, 2021, 12:01:34 pm »

You will need to reinstall wpasupplicant with the following command and reboot:


Unfortunately, I had already ran that. Still no wlan interfaces found. I might just wait for a new image, to see if that fixes my issue. I plugged in the pi  via ethernet, and I, unfortunately, wasn't able to get Mame to start up either. Running the mame-launcher.sh script with the verbose flag in service mode showed:

Code: [Select]

The path /dev/dri/ cannot be opened or is not available
Could not initialize SDL kmsdrm not available


Looking into that error. I found some topics about building SDL that I'll try later. Just wanted to bring it up, in case it was something misconfigured in the image.


Sorry for the mistake.


Not a problem, thanks again for all the work on this.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #115 on: January 06, 2021, 12:10:37 pm »
Hi jhummel,

Thanks for these informations. I will post an updated image with the Wi-Fi functionnal, as well as the problem related to the /dev/dri.

For this problem, maybe you can execute this command to fix (meanwhile):

Code: [Select]
sudo usermod -a -G render pi
Stay tuned for the updated image.
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #116 on: January 06, 2021, 03:25:08 pm »
Hi all,

I just uploaded a NEW updated and fixed version of the MAME 0.227 image file with working Wi-Fi and accelerated video (devices under /dev/dri).

Thanks and I apologize for the inconvenience.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

jhummel

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 25, 2021, 08:41:55 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #117 on: January 06, 2021, 08:45:39 pm »
Is there a new link? I think the link on your first post is still pointed at the old image?

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #118 on: January 06, 2021, 09:22:19 pm »
Is there a new link? I think the link on your first post is still pointed at the old image?

I double-checked the link and it's the new one, pointing to the new version of the fixed image file.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

jhummel

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 25, 2021, 08:41:55 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #119 on: January 06, 2021, 09:28:10 pm »
Actually, I guess I can tell it's a new image. It looks like it boots into arcade mode initially now instead of service mode. Unfortunately, I'm getting the same error with no wireless interface and the path /dev/dri not being available.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #120 on: January 06, 2021, 10:04:00 pm »
Actually, I guess I can tell it's a new image. It looks like it boots into arcade mode initially now instead of service mode. Unfortunately, I'm getting the same error with no wireless interface and the path /dev/dri not being available.

 :o

I don't understand, I carefully tested the new image before publishing it.

Could you execute this command and send me the output, please?

Code: [Select]
ls -la /lib/modules/$(uname -r)
If the ls command returns no files, you could execute this command to solve the problem:

Code: [Select]
sudo rpi-update stable
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

jhummel

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 25, 2021, 08:41:55 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #121 on: January 06, 2021, 11:07:32 pm »

If the ls command returns no files, you could execute this command to solve the problem:


rpi-update solved it! There wasn't any files in the /lib/modules directory before. Afterwards, I was able to config wireless and start Mame. Thanks!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #122 on: January 06, 2021, 11:30:54 pm »

If the ls command returns no files, you could execute this command to solve the problem:


rpi-update solved it! There wasn't any files in the /lib/modules directory before. Afterwards, I was able to config wireless and start Mame. Thanks!

Glad to know it now works beautifully.

This has given me the opportunity to spot a little bug in my staging script that I now fixed for the next image files. Thanks for your feedback!
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

fgh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • Last login:May 01, 2022, 09:26:10 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #123 on: January 10, 2021, 10:16:11 pm »
Thanks for doing this! Iíve been trying to run super sprint but getting 40-45% performance with the .206 version in the rpi os package manager. Will try your image tomorrow!

Do you know if older builds like .139 (Ďmame2010í from libretro) can be compiled for pi4 on current rpi os?
It should be a bit faster, and still have the layout system that I want for my cab.

fgh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • Last login:May 01, 2022, 09:26:10 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #124 on: January 11, 2021, 08:49:23 am »
I tried the image now, great work!!
(And of course, ssprint now flies)

The thing is though - I've made a python front-end I wanted to use on my next dual monitor cabinet (like my present cab, attached, but pi based and with three super sprint wheels).
But it uses the tkinter python module for the images, and tkinter requires a window manager installed.. (Doesn't need a full desktop interface)

I'm a linux (and python) n00b, and would like to avoid redoing the front-end if possible.
Can I install X11 on top of your image without f*cking anything up?
« Last Edit: January 11, 2021, 08:51:30 am by fgh »

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #125 on: January 11, 2021, 10:03:54 am »
You could recreate the same thing pretty easily in AttractMode
Raspberry Pi, AttractMode, and Skeletor enthusiast.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #126 on: January 11, 2021, 10:09:58 am »
I tried the image now, great work!!
(And of course, ssprint now flies)

The thing is though - I've made a python front-end I wanted to use on my next dual monitor cabinet (like my present cab, attached, but pi based and with three super sprint wheels).
But it uses the tkinter python module for the images, and tkinter requires a window manager installed.. (Doesn't need a full desktop interface)

I'm a linux (and python) n00b, and would like to avoid redoing the front-end if possible.
Can I install X11 on top of your image without f*cking anything up?

Glad to know that your rom Super Sprint is running at full speed. :)

If you install X11, I think it will break some things, unfortunately. I specifically choose to not install it for the best performance/resource consumption ratio. MAME is compiled to exclusively use SDL2 for graphics, not X11.

You would need a python module for usig SDL2 (like pySDL2) or try to compile/build (or configure) tkinter to use SDL2.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

SirRey

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:February 03, 2021, 05:30:30 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #127 on: January 11, 2021, 01:01:41 pm »
Hey, have been using RetroPi for so long having to get back to the basics with just MAME. 

I have a USB Arcade Stick that is recognized when I run lsusb -t.  When in a game and hit Tab to set up the stick and buttons it doesn't recognize any input.  Not sure what I'm doing wrong, are there instructions on setting up a usb Arcade Stick?

Appreciate the Prebuilt image, was originally going through your instructions and compiling MAME.  Seems you have written several scripts on this image that weren't part of your instructions on compiling everything from source.

Thanks
Ray

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #128 on: January 11, 2021, 02:35:45 pm »
Hey, have been using RetroPi for so long having to get back to the basics with just MAME. 

I have a USB Arcade Stick that is recognized when I run lsusb -t.  When in a game and hit Tab to set up the stick and buttons it doesn't recognize any input.  Not sure what I'm doing wrong, are there instructions on setting up a usb Arcade Stick?

Appreciate the Prebuilt image, was originally going through your instructions and compiling MAME.  Seems you have written several scripts on this image that weren't part of your instructions on compiling everything from source.

Thanks
Ray

Hi Ray,

If you are using an old image file, the launcher script for MAME was using the -nojoy command-line argument. Just remove it, if present.

If you are using an X-Arcade joystick, you could tell MAME to use the configuration file for this joystick by editing /data/ini/mame.ini:

Code: [Select]
ctrlr        xarcade
You are correct, I added a couple of weeks ago a bash script to automate the steps to build/compile MAME from source code.
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

fgh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • Last login:May 01, 2022, 09:26:10 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #129 on: January 11, 2021, 04:51:54 pm »
You could recreate the same thing pretty easily in AttractMode

Thanks. I've never used it, but I see it can use two monitors..
Making my own frontend  has been fun though, so I'll put in some more effort before giving up on that.
(I'm only running a few top down racers, like ssprint and super off road, so attract mode feels like overkill as well)

I tried the image now, great work!!
(And of course, ssprint now flies)

The thing is though - I've made a python front-end I wanted to use on my next dual monitor cabinet (like my present cab, attached, but pi based and with three super sprint wheels).
But it uses the tkinter python module for the images, and tkinter requires a window manager installed.. (Doesn't need a full desktop interface)

I'm a linux (and python) n00b, and would like to avoid redoing the front-end if possible.
Can I install X11 on top of your image without f*cking anything up?

Glad to know that your rom Super Sprint is running at full speed. :)

If you install X11, I think it will break some things, unfortunately. I specifically choose to not install it for the best performance/resource consumption ratio. MAME is compiled to exclusively use SDL2 for graphics, not X11.

You would need a python module for usig SDL2 (like pySDL2) or try to compile/build (or configure) tkinter to use SDL2.

Ok, too bad..
It seems the PyGame module (SDL based) can be set up to use the linux framebuffer directly.
Guess I'll have a look at that then :)
Thanks for your help!
« Last Edit: January 11, 2021, 04:54:16 pm by fgh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #130 on: January 11, 2021, 07:27:08 pm »
Quote from: fgh
Ok, too bad..
It seems the PyGame module (SDL based) can be set up to use the linux framebuffer directly.
Guess I'll have a look at that then :)
Thanks for your help!

I'm glad to help. :) I would be curious to see your final python SDL frontend, once completed and integrated.
« Last Edit: January 11, 2021, 10:20:29 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

fgh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • Last login:May 01, 2022, 09:26:10 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #131 on: January 12, 2021, 05:35:42 pm »
Iíll let you know when (if?) I finish it!

But itís super simple, just reads my very short game list (top five or so ssprint type games), lets you press left/right to swap the two preview images (top and bottom monitor), and starts the game. Not intended for anyone else, really :)

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #132 on: January 12, 2021, 07:36:48 pm »
Iíll let you know when (if?) I finish it!

But itís super simple, just reads my very short game list (top five or so ssprint type games), lets you press left/right to swap the two preview images (top and bottom monitor), and starts the game. Not intended for anyone else, really :)

Oh well, okay then. :)

Happy arcade gaming!
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

SirRey

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:February 03, 2021, 05:30:30 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #133 on: January 25, 2021, 04:10:55 pm »
so you have put several shell scripts in the home directory.  Can you create a read.me file on what they do and how to run them.  I know expand-data-partition.sh expands the /data partition. 

Thanks
Ray

SirRey

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:February 03, 2021, 05:30:30 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #134 on: January 26, 2021, 04:34:50 pm »
FYI tried to update to MAME 228 today via your script and it threw a error and failed.  I've attached the full output as well.

Done. Generated 384/384 projects.
Creating ../../../../linux_gcc/bin/x32/Release
Precompiling src/emu/emu.h...
g++: error: unrecognized command line option Ď-m32í; did you mean Ď-mbe32í?
g++: error: unrecognized command line option Ď-m32í; did you mean Ď-mbe32í?
make[2]: *** [precompile.make:317: ../../../../linux_gcc/obj/x32/Release/emu.h.gch] Error 1
make[1]: *** [Makefile:88: precompile] Error 2
make: *** [makefile:1389: linux_x86] Error 2
Build time took: 0h 6m 37s.
-----------------------------------------------------------------------------------
Build FAILED.
----------------------------------------------------------------------------------
« Last Edit: January 26, 2021, 04:55:09 pm by SirRey »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #135 on: January 26, 2021, 09:53:46 pm »
I don't know why, but to fix the build error with MAME 0.228, I had to specify the target OS as Linux in $MAKEOPTS.

Code: [Select]
nano mame-updater.sh
Go to the line #10 and insert this in the value of MAKEOPTS variable assignment:

Code: [Select]
MAKEOPTS='TARGETOS=linux [...]
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

SirRey

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:February 03, 2021, 05:30:30 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #136 on: January 27, 2021, 10:15:57 am »
Made the change and it seems to have fixed it,  currently compiling.

Thanks!
Ray
 
I don't know why, but to fix the build error with MAME 0.228, I had to specify the target OS as Linux in $MAKEOPTS.

Code: [Select]
nano mame-updater.sh
Go to the line #10 and insert this in the value of MAKEOPTS variable assignment:

Code: [Select]
MAKEOPTS='TARGETOS=linux [...]

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #137 on: January 31, 2021, 05:15:56 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.228 (please see the original post of this thread for the download link).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

SirRey

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:February 03, 2021, 05:30:30 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #138 on: January 31, 2021, 09:57:07 pm »
Just flashed the 0228 image.  Thanks for the README.txt file :)

simon0331

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:April 13, 2021, 09:05:02 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #139 on: February 09, 2021, 02:43:26 am »
COOL! Its a very interesting project! Thanks! And, here`s my noobs problem: is it possible that I can link the roms folder to the same name folder in external usb drive? Then I can easily manage rom files.  ;D

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #140 on: February 09, 2021, 11:48:31 pm »
COOL! Its a very interesting project! Thanks! And, here`s my noobs problem: is it possible that I can link the roms folder to the same name folder in external usb drive? Then I can easily manage rom files.  ;D

Sure, to use a different ROMs folder, just update the symbolic link in ~/.mame folder.

So for example, if your USB drive is mounted to /media/My-USB-Drive, just type the following commands (while in Service mode and read/write mode):

Code: [Select]
rm ~/.mame/roms

# If the ROMs .zip files are at the root, type:
ln -s /media/My-USB-Drive ~/.mame/roms

# If the ROMs .zip files are in a folder, for example roms, type:
ln -s /media/My-USB-Drive/roms ~/.mame/roms

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

simon0331

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:April 13, 2021, 09:05:02 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #141 on: February 12, 2021, 09:52:51 pm »
Thanks for your help!

2012

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:May 25, 2021, 12:39:48 am
  • I'm a llama
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #142 on: February 22, 2021, 03:31:31 am »
I'm very thankful for your project and instructional documentation! I don't have a 4B yet, but when there is time for my next project I will definitely look at this.

Has anyone tried benchmarking with this setup? Do you get significantly improved results compared to those linked below?

Relevant links
Benchmarking toolset: https://github.com/PeterBortas/mame-tools
Benchmarking results: http://mame-test.lysator.liu.se/bench/

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #143 on: February 23, 2021, 10:20:05 pm »
I haven't done benchmarking, but the speed difference  is noticeable.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

Retrolou

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:June 24, 2021, 12:16:36 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #144 on: February 24, 2021, 01:31:53 am »
Is there an image that can be run on usb or ssd?  I know thereís an sd card image, but havenít seen one that can be run on usb or ssd?  Also, all the folders in /data, can they be recreated so we can make the /data folder something like an ext4 filesystem since it's dos right now.  This will make it easier to recapture this image and use tools like pishrink./  If i wanted to wipe out the /data and recreate it as ext4, which folders need to be sym links and which ones need to be actually on /data?
« Last Edit: February 24, 2021, 09:12:50 am by Retrolou »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #145 on: February 24, 2021, 11:55:45 am »
Is there an image that can be run on usb or ssd?  I know thereís an sd card image, but havenít seen one that can be run on usb or ssd?  Also, all the folders in /data, can they be recreated so we can make the /data folder something like an ext4 filesystem since it's dos right now.  This will make it easier to recapture this image and use tools like pishrink./  If i wanted to wipe out the /data and recreate it as ext4, which folders need to be sym links and which ones need to be actually on /data?

Hi,
Although I did not tested it, technically speaking the SD card image should boot on a SSD, as long as the boot loader on the Pi is able to boot from USB, I see no problem.

Please refer to: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

Retrolou

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:June 24, 2021, 12:16:36 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #146 on: February 24, 2021, 01:05:34 pm »
Yeah i know there is, in the retropie world SSD and USB is heavily used to give additional performance over the sd.  Was just asking if you had already created a pre-made image for USB or SSD, but sounds like no.  What about /data question?  Can that be removed as long as .mame folder has all the same files/structure?  Basically have two filesystems only, boot and root, which will make portability a bit easier.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #147 on: February 24, 2021, 01:06:14 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.229 (please see the original post of this thread for the download link).
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #148 on: March 12, 2021, 10:19:35 am »
Yeah i know there is, in the retropie world SSD and USB is heavily used to give additional performance over the sd.  Was just asking if you had already created a pre-made image for USB or SSD, but sounds like no.  What about /data question?  Can that be removed as long as .mame folder has all the same files/structure?  Basically have two filesystems only, boot and root, which will make portability a bit easier.

No, I did not produced a USB-bootable image, sorry (I use the built-in SD-card reader of the Pi for booting).

For your second question about the folders under /data. They can be recreated anywhere. The only thing to take care is to update the symlinks under /home/pi/.mame

You can easily script the dynamic creation of /data folder (see the How-To link in the first post of this topic).
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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #149 on: March 12, 2021, 03:00:22 pm »
This looks like an ideal solution to get a dedicated MAME setup up and running cheaply.  Is there any way to add a very simple "front end" to something like this so all you see is a list of games based on what is in the roms folder and a screenshot?  Something simple like THIS instead of the regular MAME GUI?

Great work here!
 

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #150 on: March 12, 2021, 06:05:07 pm »
This looks like an ideal solution to get a dedicated MAME setup up and running cheaply.  Is there any way to add a very simple "front end" to something like this so all you see is a list of games based on what is in the roms folder and a screenshot?  Something simple like THIS instead of the regular MAME GUI?

Great work here!
 

Yes, definitely. You can use the Attract Mode front-end and use a simple/basic theme.
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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #151 on: March 13, 2021, 11:08:54 am »
This looks like an ideal solution to get a dedicated MAME setup up and running cheaply.  Is there any way to add a very simple "front end" to something like this so all you see is a list of games based on what is in the roms folder and a screenshot?  Something simple like THIS instead of the regular MAME GUI?

Great work here!
 

Yes, definitely. You can use the Attract Mode front-end and use a simple/basic theme.
Wow awesome.  Is there a tutorial somewhere that can walk me through it?  Iíve got a pi4 laying around and Iím going to try to get your image working this weekend if I can...

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #152 on: March 13, 2021, 08:09:37 pm »
This looks like an ideal solution to get a dedicated MAME setup up and running cheaply.  Is there any way to add a very simple "front end" to something like this so all you see is a list of games based on what is in the roms folder and a screenshot?  Something simple like THIS instead of the regular MAME GUI?

Great work here!
 

Yes, definitely. You can use the Attract Mode front-end and use a simple/basic theme.
Wow awesome.  Is there a tutorial somewhere that can walk me through it?  Iíve got a pi4 laying around and Iím going to try to get your image working this weekend if I can...

Hi javeryh,

You can build Attract Mode on a Raspberry Pi in following these steps, from the link below:

[EDIT: Updated URL for Raspberry Pi 4]

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster)
« Last Edit: March 13, 2021, 08:36:15 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

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #153 on: March 13, 2021, 09:04:45 pm »
This looks like an ideal solution to get a dedicated MAME setup up and running cheaply.  Is there any way to add a very simple "front end" to something like this so all you see is a list of games based on what is in the roms folder and a screenshot?  Something simple like THIS instead of the regular MAME GUI?

Great work here!
 

Yes, definitely. You can use the Attract Mode front-end and use a simple/basic theme.
Wow awesome.  Is there a tutorial somewhere that can walk me through it?  Iíve got a pi4 laying around and Iím going to try to get your image working this weekend if I can...

Hi javeryh,

You can build Attract Mode on a Raspberry Pi in following these steps, from the link below:

[EDIT: Updated URL for Raspberry Pi 4]

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster)

[EDIT2: The Raspberry Pi 4 steps depends on X11, wich is not available (and not wanted) on my image. Please use this URL:]

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-(Raspbian-Jessie)

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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #154 on: March 13, 2021, 09:04:52 pm »
This looks like an ideal solution to get a dedicated MAME setup up and running cheaply.  Is there any way to add a very simple "front end" to something like this so all you see is a list of games based on what is in the roms folder and a screenshot?  Something simple like THIS instead of the regular MAME GUI?

Great work here!
 

Yes, definitely. You can use the Attract Mode front-end and use a simple/basic theme.
Wow awesome.  Is there a tutorial somewhere that can walk me through it?  Iíve got a pi4 laying around and Iím going to try to get your image working this weekend if I can...

Hi javeryh,

You can build Attract Mode on a Raspberry Pi in following these steps, from the link below:

[EDIT: Updated URL for Raspberry Pi 4]

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-4-(Raspbian-Buster)
Thanks for the link!  So all I have to do is get your image working and then follow these Attract Mode instructions?  Iím new to all of this...

fgh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • Last login:May 01, 2022, 09:26:10 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #155 on: March 14, 2021, 04:45:34 am »
I tried the image now, great work!!
(And of course, ssprint now flies)

The thing is though - I've made a python front-end I wanted to use on my next dual monitor cabinet (like my present cab, attached, but pi based and with three super sprint wheels).
But it uses the tkinter python module for the images, and tkinter requires a window manager installed.. (Doesn't need a full desktop interface)

I'm a linux (and python) n00b, and would like to avoid redoing the front-end if possible.
Can I install X11 on top of your image without f*cking anything up?

Glad to know that your rom Super Sprint is running at full speed. :)

If you install X11, I think it will break some things, unfortunately. I specifically choose to not install it for the best performance/resource consumption ratio. MAME is compiled to exclusively use SDL2 for graphics, not X11.

You would need a python module for usig SDL2 (like pySDL2) or try to compile/build (or configure) tkinter to use SDL2.

Hey there Bbegin,
AFAIK, itís possible to run X11 and still have programs using SDL2.
Would compiling latest mame WITH SDL2 GRAPHICS for a standard rpi os install (with X11) be a lot if work?
It could go in the repository as well, and probably be appreciated by a lot of people, as the one in there is old and very slow.

(It seems itís not easy to handle two monitors in python with SDL, so Iím stuck again, haha)

Best regards,
Frode

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #156 on: March 15, 2021, 04:48:04 pm »
Quote from: javeryh
Thanks for the link!  So all I have to do is get your image working and then follow these Attract Mode instructions?  Iím new to all of this...

I made several build tests with Attract Mode on the image I provide and unfortunately, the SFML-pi layer is not ready for KMS/DRM without X11 on a Raspberry Pi 4 (it works on Pi 0-3, thought).

You are better to try the Pegasus front-end (tested successfully on the image I provide), but is a bit harder to configure:

https://pegasus-frontend.org/
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

Ond

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2223
  • Last login:February 28, 2022, 02:20:28 am
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #157 on: March 15, 2021, 07:14:19 pm »
Moving beyond RetroPie is the next evolutionary step in using Raspberry Pi as a platform IMO.  Great work going on here bbegin!  I'm going to have a go at this solution and test it for performance/usability.   :cheers:

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #158 on: March 15, 2021, 08:29:28 pm »
Quote from: fgh
Hey there Bbegin,
AFAIK, itís possible to run X11 and still have programs using SDL2.
Would compiling latest mame WITH SDL2 GRAPHICS for a standard rpi os install (with X11) be a lot if work?
It could go in the repository as well, and probably be appreciated by a lot of people, as the one in there is old and very slow.

(It seems itís not easy to handle two monitors in python with SDL, so Iím stuck again, haha)

Best regards,
Frode

Hi Frode,

For MAME to work both with SDL2 and X11, I would build MAME with these options removed from the make command-line:

Code: [Select]
NO_X11=1 NO_USE_XINPUT=1 NO_USE_XINPUT_WII_LIGHTGUN_HACK=1 NO_OPENGL=1 NO_BGFX=1
Good luck,

Benoit
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #159 on: March 15, 2021, 08:32:06 pm »
Moving beyond RetroPie is the next evolutionary step in using Raspberry Pi as a platform IMO.  Great work going on here bbegin!  I'm going to have a go at this solution and test it for performance/usability.   :cheers:

I think it could be nice if you post your comments/appreciation and performance tests (versus RetroPie), thanks!  :cheers:
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: 7778
  • Last login:Today at 06:09:00 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: 2223
  • Last login:February 28, 2022, 02:20:28 am
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 2223
  • Last login:February 28, 2022, 02:20:28 am
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: 7778
  • Last login:Today at 06:09:00 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: 5116
  • Last login:May 03, 2022, 09:49:12 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: 1021
  • Last login:Today at 05:23:56 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: 1654
  • Last login:Today at 05:11:34 pm
  • 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 2383
  • Last login:March 23, 2022, 05:46:25 pm
  • 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: 2383
  • Last login:March 23, 2022, 05:46:25 pm
  • 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: 7778
  • Last login:Today at 06:09:00 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:March 21, 2022, 12:12:21 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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:March 21, 2022, 12:12:21 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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • 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: 7778
  • Last login:Today at 06:09:00 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!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #200 on: April 29, 2021, 05:40:05 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!

What do you mean?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

Gilrock

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1021
  • Last login:Today at 05:23:56 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #201 on: April 29, 2021, 05:45:04 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!

What do you mean?

"here goes nothing" means "I'm about to try something with fingers crossed"

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #202 on: April 29, 2021, 06:16:07 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!

What do you mean?
Yeah - like Gilrock said, ďHere goes nothingĒ just means ďIím about to try something unfamiliar and I hope it all goes well!Ē

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #203 on: April 29, 2021, 06:31:36 pm »
Thanks, guys (for the translation)!  :D :D
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #204 on: April 30, 2021, 09:58:06 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.231 (please see the original post of this thread for the download link).   :cheers:

This image and onwards will include 2 Front-ends: Attract Mode and AdvanceMENU.

To select them, while in Service Mode:

Code: [Select]
sudo nano /etc/environment
And set the FRONTEND variable (see comments from the file).
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #205 on: May 04, 2021, 09:54:49 pm »
I'm just wondering if you guys had a chance to test drive the new image?
If so, how do you like (or not) the new image?

Thanks in advance for your comments/appreciation.
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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #206 on: May 05, 2021, 07:14:21 am »
I'm just wondering if you guys had a chance to test drive the new image?
If so, how do you like (or not) the new image?

Thanks in advance for your comments/appreciation.
I have the image burned, WiFi working, forced 1080p, and now Iím trying to figure out how select the front end.  Should be able to tinker with it more today and Iíll report back.

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #207 on: May 05, 2021, 04:07:59 pm »
I'm just wondering if you guys had a chance to test drive the new image?
If so, how do you like (or not) the new image?

Thanks in advance for your comments/appreciation.
I have the image burned, WiFi working, forced 1080p, and now Iím trying to figure out how select the front end.  Should be able to tinker with it more today and Iíll report back.

I spoke too soon.  I keep getting an error message saying "No wireless interface found" when I'm in the raspi-config menu trying to set up WiFi. 

If I type hostname -I at the command prompt to get the IP address there is none.  I don't get an error but nothing happens.  Is WiFi diasbled somehow with this new image?

EDIT: every time I create the wpa_supplicant.conf file with my WiFi information inside, it gets deleted as soon as I move it over to the pi.  On the memory card connected to my PC it shows and I save it and I've even popped the card in and out of the PC multiple times just to be sure it is still there but when I bring it to the pi and boot up, it is gone.  I cannot figure out why and this wasn't happening with an earlier image I was using.

Also, when I insert the memory card into my PC, it shows the "boot" drive as D:\ but it also shows "Removeable Drive" for E:\ and "Removeable Drive" for F:\ which doesn't seem right either.

Any ideas?

EDIT#2: I connected via ethernet and could find an IP address so I can use WinSCP to move files around.  Weird.  I'd like to figure out the WiFi but I guess this isn't too bad.  Presumably I'll tinker with the image to get it just how I want and when it goes into an arcade cabinet I won't need to connect to WiFi or anything.

EDIT#3:  So I'm back in Service Mode... How do I select the front end from the command prompt?  I'm at pi@arcade(rw):

The instructions above say: 

Quote
To select, just type:

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

But I am not sure what to do.  When you say, "see comment from the file" what file am I supposed to be looking at?

Thanks!!   :cheers:
« Last Edit: May 05, 2021, 06:19:42 pm by javeryh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #208 on: May 05, 2021, 09:48:23 pm »
The content of /etc/environment is:

Code: [Select]
MAMEVER=0231

# FRONTEND accept one of these values:
# attract, advance, mame
FRONTEND=mame

SDL_VIDEODRIVER=kmsdrm
SDL_RENDER_DRIVER=opengles2
SDL_RENDER_VSYNC=1
SDL_GRAB_KEYBOARD=1
SDL_VIDEO_GLES2=1

To select the front-end of your choice, just set the related value to the FRONTEND variable.

For example:

If you want to use Attract Mode, the line would be:

Code: [Select]
FRONTEND=attract
If you want to use AdvanceMENU, the line would be:

Code: [Select]
FRONTEND=advance
If you want to use MAME GUI, the line would be:

Code: [Select]
FRONTEND=mame
« Last Edit: May 05, 2021, 09:50:49 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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #209 on: May 06, 2021, 01:14:07 pm »
The content of /etc/environment is:

Code: [Select]
MAMEVER=0231

# FRONTEND accept one of these values:
# attract, advance, mame
FRONTEND=mame

SDL_VIDEODRIVER=kmsdrm
SDL_RENDER_DRIVER=opengles2
SDL_RENDER_VSYNC=1
SDL_GRAB_KEYBOARD=1
SDL_VIDEO_GLES2=1

To select the front-end of your choice, just set the related value to the FRONTEND variable.

For example:

If you want to use Attract Mode, the line would be:

Code: [Select]
FRONTEND=attract
If you want to use AdvanceMENU, the line would be:

Code: [Select]
FRONTEND=advance
If you want to use MAME GUI, the line would be:

Code: [Select]
FRONTEND=mame

Ahhh.... OK.  I was trying commands from the command prompt.  Typing "sudo nano /etc/environment" does open the file and I was able to make changes and save.  However, I changed to "arcademode" and rebooted and all I'm getting is a black screen with the word "MAME 1/0" displaying in the bottom right corner of the screen.  I assume I screwed something up?  MAME GUI was working fine before I switched to "attract" in the /etc/environment file.

Editing the file back to say FRONTEND=mame does get the MAME GUI working just fine again. 

EDIT: When I tried "FRONTEND=advance"  I get an error saying my display sucks.  It says try setting it to be "-display_size 1280x1024" but I didn't know what that meant.  Maybe my stupid 4K TV is causing issues.  I'm going to see if I can connect to another display in the house...
« Last Edit: May 06, 2021, 02:03:48 pm by javeryh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #210 on: May 06, 2021, 05:19:22 pm »
Ahhh.... OK.  I was trying commands from the command prompt.  Typing "sudo nano /etc/environment" does open the file and I was able to make changes and save.  However, I changed to "arcademode" and rebooted and all I'm getting is a black screen with the word "MAME 1/0" displaying in the bottom right corner of the screen.  I assume I screwed something up?  MAME GUI was working fine before I switched to "attract" in the /etc/environment file.

Editing the file back to say FRONTEND=mame does get the MAME GUI working just fine again. 

EDIT: When I tried "FRONTEND=advance"  I get an error saying my display sucks.  It says try setting it to be "-display_size 1280x1024" but I didn't know what that meant.  Maybe my stupid 4K TV is causing issues.  I'm going to see if I can connect to another display in the house...

To set the corret video mode with AdvanceMENU, you should run the AdvCfg binary and set the resolution to the one EDID has detected:

Code: [Select]
./frontend/advance/advcfg
If you want to switch the desired Front-end more easily, just add this line in /home/pi/.bash_alias:   :)

Code: [Select]
alias frontend='_frontend(){ if [[ "$1" =~ ^(mame|attract|advance)$ ]]; then sudo sed -i "s/FRONTEND=.*$/FRONTEND="$1"/g" /etc/environment && echo "Frontend set to: "$1" (reboot to apply)."; else echo "Invalid or missing argument. Try: mame, attract or advance"; fi;}; _frontend'
Then, logoff/logon and now you just have to issue one of these 3 commands to switch the Front-end:

Code: [Select]
frontend mame
frontend advance
frontend attract
« Last Edit: May 06, 2021, 05:23:43 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

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #211 on: May 06, 2021, 08:43:12 pm »
Hi javeryh,

Just to let you know that I uploaded a new revision with the Wi-Fi fixed (including the new alias definition, named frontend).

Sorry for the Wi-Fi issue (my mistake).
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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #212 on: May 07, 2021, 01:10:17 pm »
Hi javeryh,

Just to let you know that I uploaded a new revision with the Wi-Fi fixed (including the new alias definition, named frontend).

Sorry for the Wi-Fi issue (my mistake).

Sweet.  I will download this new version and see if I can get it working.  Thanks!!   :cheers:

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #213 on: May 07, 2021, 04:23:50 pm »
Hi javeryh,

Just to let you know that I uploaded a new revision with the Wi-Fi fixed (including the new alias definition, named frontend).

Sorry for the Wi-Fi issue (my mistake).

OK - I'm using the new image and WiFi seems to be working again - thank you!  MAME GUI works fine but there are a few issues I'm running into with Attract Mode and AdvanceMENU.

When booting into Attract Mode the screen just displays "MAME I/O" in the lower right corner.  Not sure how to fix that.

When booting into AdvanceMENU, I am getting a video display error (no video mode available for your configuration) and when I go into ./frontend/advance/advcfg and set it to what EDID detects it doesn't work.  I'm sure this is because I am using a 4K TLC TV for this right now.  I really need to buy a small HDMI enabled monitor for testing, which I am doing now.

Also, how do I force downloading of artwork (screen shots, etc.)?  In the MAME GUI there is a blank area on the right that says "No image Available" but on the previous build I was messing with yesterday this was all automatically populated.

rizel67

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:May 18, 2021, 06:46:22 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #214 on: May 08, 2021, 05:47:59 pm »
Hi.
First of all. Good job.  :applaud: :applaud:

I think i'm kind of dumb because i'm not able to make your sd card image working. I'm using balena etcher and when i want to flash with your image it send me a pop up telling me "missing partition table. It looks like this is not a bootable image. The image does not appear to contain a partition table, and might not be recognized or bootable by your device."
I continue and then when i put my card inside my Pi. It tell me "unable to read partition as FAT"
Should i change the format of the card to FAT or FAT 32 or even ExtFat ? it's a 32gb sd card by the way.
Thanks for your time.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #215 on: May 09, 2021, 02:30:01 pm »
@rizel67,

I just uploaded a new version of the image file that should fix the FAT partition/partition table issue. The download link is the same.

@javeryh

The automatic artwork management service should be taking care of the automatic download of the snapshots. Just make sure it is running by issuing the following command:

Code: [Select]
systemctl status mame-artwork-mgmt.service
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

Nelviticus

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:November 07, 2021, 06:10:52 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.231 Appliance on a Raspberry Pi 4B
« Reply #216 on: May 22, 2021, 06:00:05 pm »
Hi there, I just registered to say thank you for all your hard work. I've been using your image for a couple of days now on my new Pi400 and it works great.

Awesome stuff!

Nelviticus

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.231 Appliance on a Raspberry Pi 4B
« Reply #217 on: May 24, 2021, 06:42:47 pm »
Thank you very much, Nelviticus!

Very glad you appreciate the system!  :cheers:
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #218 on: June 01, 2021, 12:12:59 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.232 (please see the original post of this thread for the download link).   :cheers:

As with the previous release, this image (and onwards) include 2 Front-ends: Attract Mode and AdvanceMENU.

To select one of them, just issue one of the following commands:

Code: [Select]
# To use Attract Mode:
frontend attract

# To use AdvanceMENU:
frontend advance

# To use the MAME GUI (default):
frontend mame

Reboot the system (sudo reboot).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

beernite

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:June 15, 2021, 04:12:18 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #219 on: June 03, 2021, 03:19:12 pm »
Sorry for the total noob question here. I was able to download your image and expand the file system. I'm not able to connect to my wifi however. I know you said that wifi isn't disabled in the image, but it seems like the OS doesn't even find the interface. Trying to set things up with raspi-config gives me a "No wireless interfaces found" message. Is that something I screwed up?

Thanks for all the work

Hi jhummel,

I forgot a little ajustment (in my staging process) when I published the image of 0.227 and it has to do with Wi-Fi.

You will need to reinstall wpasupplicant with the following command and reboot:

Code: [Select]
sudo apt-get install wpasupplicant -y
Sorry for the mistake.

Hi, bbegin -

First off, thank you for this wonderful thread and for sharing your image file. I built a MAME cabinet powered by a PC many years ago. I am now replacing the CRT display with a flat screen, and the PC with a raspberry pi 4. I have installed the June 1st 2021 image and am now experiencing the same issue that jhummel was encountering. Any advice as to how to proceed would be greatly appreciated. I tried some of the steps you suggested to him, but with no luck.

update: I should add that changing the password upon initial start did not work. The system replied "passwd: Authentication token manipulation error". Perhaps this issue is related to the "cannot lock /etc/password" reply when I tried the command sudo usermod -a -G render pi

« Last Edit: June 03, 2021, 03:31:24 pm by beernite »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #220 on: June 03, 2021, 11:11:36 pm »
Hi, bbegin -

First off, thank you for this wonderful thread and for sharing your image file. I built a MAME cabinet powered by a PC many years ago. I am now replacing the CRT display with a flat screen, and the PC with a raspberry pi 4. I have installed the June 1st 2021 image and am now experiencing the same issue that jhummel was encountering. Any advice as to how to proceed would be greatly appreciated. I tried some of the steps you suggested to him, but with no luck.

update: I should add that changing the password upon initial start did not work. The system replied "passwd: Authentication token manipulation error". Perhaps this issue is related to the "cannot lock /etc/password" reply when I tried the command sudo usermod -a -G render pi

Hi beernite, thanks! :)

You mean when you run raspi-config, you get "No wireless interfaces found" message? If so, it may be caused by the fact I forgot to remove some lines from a file.

To check, issue this command:
Code: [Select]
cat /etc/modprobe.d/raspi-blacklist.conf
Make sure the lines below are NOT in the file (remove them, if they are there):

Code: [Select]
# WiFi
blacklist brcmfmac
blacklist brcmutil

EDIT: I double-checked on the image I provide and the lines are not there, so the Wi-Fi interface should work (be detected/enabled).

The second issue you are experiencing is because the root filesystem is kept in read-only mode, by default. To put it in read/write mode, so you can make changes to the system (in this case, configuration changes), you should type this command, prior:

Code: [Select]
rw

The prompt suffix will then change to (rw). Then, you can make your changes and they will be persistent.

To put the system back in read-only mode, just type:

Code: [Select]
ro

The prompt suffix will be back to (ro).
« Last Edit: June 04, 2021, 02:19:58 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

beernite

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:June 15, 2021, 04:12:18 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #221 on: June 05, 2021, 10:51:51 am »
You mean when you run raspi-config, you get "No wireless interfaces found" message?

What is happening is that when I run raspi-config to set up my network, it says "Could not communicate with wpa_supplicant". After hitting Ok it says "There was an error running  option S1 Wireless LAN". I then reviewed the contents of wpa_supplicant by typing 'sudo cat /etc/wpa_supplicant/wpa_supplicant.conf' :

Code: [Select]
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config==1

Is there anything incorrect about this file? I apologize in advance if this is a basic Linux problem/question and is inappropriate for this thread. I will not take it personally if I am told that is indeed the case :)

Finally, thank you for the information about read/write mode. I had forgotten that from your README file.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME Appliance on a Raspberry Pi 4B
« Reply #222 on: June 05, 2021, 12:50:00 pm »
You mean when you run raspi-config, you get "No wireless interfaces found" message?

What is happening is that when I run raspi-config to set up my network, it says "Could not communicate with wpa_supplicant". After hitting Ok it says "There was an error running  option S1 Wireless LAN". I then reviewed the contents of wpa_supplicant by typing 'sudo cat /etc/wpa_supplicant/wpa_supplicant.conf' :

Code: [Select]
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config==1

Is there anything incorrect about this file? I apologize in advance if this is a basic Linux problem/question and is inappropriate for this thread. I will not take it personally if I am told that is indeed the case :)

Finally, thank you for the information about read/write mode. I had forgotten that from your README file.

You should configure the Wi-Fi interface 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

beernite

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:June 15, 2021, 04:12:18 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #223 on: June 05, 2021, 03:10:59 pm »
I didn't have any luck with that either. I ended up reimaging the SD card and am now having no problems. Thanks for your patience with me!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #224 on: June 05, 2021, 05:59:17 pm »
I didn't have any luck with that either. I ended up reimaging the SD card and am now having no problems. Thanks for your patience with me!

Good to know that all is working OK! :D

It is a pleasure for me to help, if I can!

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

j3rk

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:June 19, 2021, 07:51:08 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #225 on: June 19, 2021, 07:51:08 pm »
I just got this set up today, made a few tweaks, did a slight overclock, and it works SO well!

Nice!!!

I registered so I could thank you.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #226 on: June 20, 2021, 01:17:02 pm »
I just got this set up today, made a few tweaks, did a slight overclock, and it works SO well!

Nice!!!

I registered so I could thank you.

Thanks to you, I'm very glad you appreciate the system!  :D
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

sboultbee

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:August 28, 2021, 04:12:13 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #227 on: June 21, 2021, 10:51:11 pm »
Thank you for creating this image.  I've been using it for the last week or so (with the latest MAME 0.232 version), but have been coming across a few issues that others have described in this thread.

The first is that when I switch the frontend to AttractMode, it boots to a solid black screen with 'MAME 0/1' in the lower right and goes no further.  At least one other poster had the exact same issue, but if they resolved it, I didn't see the solution.  SSH'ing back into the system and changing the frontend back to 'mame' gets everything going again.

My second issue is that I've had to overclock my Pi4 (4GB version) to get some games to run smoothly without exhibiting choppy audio.  At the default settings, Mario Bros. (1983) has very choppy audio on the first animation screen before the first level.  Ms. Pac Man also had a few minor instances of an audio breakup, but nowhere near as bad as Mario Bros.  Overclocking fixed the issue, but elsewhere in the thread, it's stated that 1980s games should run at full speed on the Pi4 without the need to overclock.

My third and final issue is that during setup my WiFi doesn't work and I can't connect to my network - it throws errors on the raspi-config screen where I would connect to the network. I've had to resort to the wpa_supplicant manual method to get it to work.  My understanding was that this issue was fixed in earlier versions of the image, so I shouldn't be experiencing this problem.  I've been able to fix it, but any ideas of why I'm running into this issue?

Again, thanks for the image.  It's well put together and simple to use.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #228 on: June 22, 2021, 12:06:17 pm »
Thank you for creating this image.  I've been using it for the last week or so (with the latest MAME 0.232 version), but have been coming across a few issues that others have described in this thread.

The first is that when I switch the frontend to AttractMode, it boots to a solid black screen with 'MAME 0/1' in the lower right and goes no further.  At least one other poster had the exact same issue, but if they resolved it, I didn't see the solution.  SSH'ing back into the system and changing the frontend back to 'mame' gets everything going again.

You should first build your Romlist for any games to appear in Attract Mode. You then have to scrape your Romlist to get the graphic material associated with your ROMs. You all do this from the menu with the Tab key. Please refer to the Attract Mode documentation for all the details.

My second issue is that I've had to overclock my Pi4 (4GB version) to get some games to run smoothly without exhibiting choppy audio.  At the default settings, Mario Bros. (1983) has very choppy audio on the first animation screen before the first level.  Ms. Pac Man also had a few minor instances of an audio breakup, but nowhere near as bad as Mario Bros.  Overclocking fixed the issue, but elsewhere in the thread, it's stated that 1980s games should run at full speed on the Pi4 without the need to overclock.

My mistake: I should have stated virtually all 80's games run at full speed. The problem is that some system/platforms are poorly supported in MAME via an old or poorly written driver and thus is not optimized, resulting in a lot of CPU consumption. The only solution is to file an issue on mametesters.org and wait for a newer version of MAME with updated driver code.

My third and final issue is that during setup my WiFi doesn't work and I can't connect to my network - it throws errors on the raspi-config screen where I would connect to the network. I've had to resort to the wpa_supplicant manual method to get it to work.  My understanding was that this issue was fixed in earlier versions of the image, so I shouldn't be experiencing this problem.  I've been able to fix it, but any ideas of why I'm running into this issue?

Again, thanks for the image.  It's well put together and simple to use.

I have not investigated yet the Wi-Fi issue using raspi-config. It may have to do with the fact that the root filesystem is kept in read-only mode. Can you tell me what steps/options you are doing in raspi-config, what behavior and error messages you get? Thanks very much in advance!
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

sboultbee

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:August 28, 2021, 04:12:13 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #229 on: June 22, 2021, 06:02:43 pm »
Thank you for creating this image.  I've been using it for the last week or so (with the latest MAME 0.232 version), but have been coming across a few issues that others have described in this thread.

The first is that when I switch the frontend to AttractMode, it boots to a solid black screen with 'MAME 0/1' in the lower right and goes no further.  At least one other poster had the exact same issue, but if they resolved it, I didn't see the solution.  SSH'ing back into the system and changing the frontend back to 'mame' gets everything going again.

You should first build your Romlist for any games to appear in Attract Mode. You then have to scrape your Romlist to get the graphic material associated with your ROMs. You all do this from the menu with the Tab key. Please refer to the Attract Mode documentation for all the details.

My second issue is that I've had to overclock my Pi4 (4GB version) to get some games to run smoothly without exhibiting choppy audio.  At the default settings, Mario Bros. (1983) has very choppy audio on the first animation screen before the first level.  Ms. Pac Man also had a few minor instances of an audio breakup, but nowhere near as bad as Mario Bros.  Overclocking fixed the issue, but elsewhere in the thread, it's stated that 1980s games should run at full speed on the Pi4 without the need to overclock.

My mistake: I should have stated virtually all 80's games run at full speed. The problem is that some system/platforms are poorly supported in MAME via an old or poorly written driver and thus is not optimized, resulting in a lot of CPU consumption. The only solution is to file an issue on mametesters.org and wait for a newer version of MAME with updated driver code.

My third and final issue is that during setup my WiFi doesn't work and I can't connect to my network - it throws errors on the raspi-config screen where I would connect to the network. I've had to resort to the wpa_supplicant manual method to get it to work.  My understanding was that this issue was fixed in earlier versions of the image, so I shouldn't be experiencing this problem.  I've been able to fix it, but any ideas of why I'm running into this issue?

Again, thanks for the image.  It's well put together and simple to use.

I have not investigated yet the Wi-Fi issue using raspi-config. It may have to do with the fact that the root filesystem is kept in read-only mode. Can you tell me what steps/options you are doing in raspi-config, what behavior and error messages you get? Thanks very much in advance!

From the documentation of AttractMode, I was under the impression that upon its first use I'd get a menu from where I could generate the ROMs list and handle other matters.  I don't get a menu at all, just the black screen with the 'MAME 0/1' in the corner.  I was able to get it running on a very basic level by using the command-line option to generate the ROMs list.

With overclocking the Pi4, Mario Bros. does appear to run at full speed with good sound, so at least that's an option.  I feel that the old Nintendo games are often the ones that will have issues as I believe that many still use sound samples rather than emulating the audio chips.

Raspi-config is the only option that a Linux novice like myself was aware of for setting up the WiFi.  I get the errors regardless of whether I'm in read-only or read-write mode.  I tried both as I suspected that read-only mode might be the cause - it's not.  The first message I get when configuring the WiFi is 'Could not communicate with wpa_supplicant' with 'OK' being the only button.  Pressing 'OK' brings up another message saying "There was an error running option S1 Wireless LAN' also with an OK button.  Pressing 'OK' this time just takes me back to the main raspi-config screen.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #230 on: June 22, 2021, 10:13:06 pm »
Raspi-config is the only option that a Linux novice like myself was aware of for setting up the WiFi.  I get the errors regardless of whether I'm in read-only or read-write mode.  I tried both as I suspected that read-only mode might be the cause - it's not.  The first message I get when configuring the WiFi is 'Could not communicate with wpa_supplicant' with 'OK' being the only button.  Pressing 'OK' brings up another message saying "There was an error running option S1 Wireless LAN' also with an OK button.  Pressing 'OK' this time just takes me back to the main raspi-config screen.


Could you make a test for me?

Reset your Wi-Fi configuration (re-flash the image to a new SD-card, if you have an extra one)
Put the system in read/write mode by typing:  rw
Run sudo raspi-config and set the wifi country code by going to:

Code: [Select]
5 Localisation Options
Then:

Code: [Select]
L4. WLAN Country
Then select your country code from the list.

Then try to go to and setup your Wi-Fi interface (as you tried earlier):

Code: [Select]
S1 Wireless Lan
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #231 on: June 22, 2021, 10:16:38 pm »
From the documentation of AttractMode, I was under the impression that upon its first use I'd get a menu from where I could generate the ROMs list and handle other matters.  I don't get a menu at all, just the black screen with the 'MAME 0/1' in the corner.  I was able to get it running on a very basic level by using the command-line option to generate the ROMs list.

The reason you get a black screen is because I kind of pre-configured Attract Mode with an emulator called MAME. I did this because I wanted to pre-configure the MAME binary path ($HOME/mame/mame). To remove this, just delete this emulator and start from scratch. Sorry, I think this cause more confusion than I was expecting... :\

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

sboultbee

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:August 28, 2021, 04:12:13 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #232 on: June 22, 2021, 11:18:12 pm »

Could you make a test for me?

Reset your Wi-Fi configuration (re-flash the image to a new SD-card, if you have an extra one)
Put the system in read/write mode by typing:  rw
Run sudo raspi-config and set the wifi country code by going to:

Code: [Select]
5 Localisation Options
Then:

Code: [Select]
L4. WLAN Country
Then select your country code from the list.

Then try to go to and setup your Wi-Fi interface (as you tried earlier):

Code: [Select]
S1 Wireless Lan

No luck - I get the 'Could not communicate with wpa_supplicant' when I select the L4 option to set the WiFi country.  The next screen then says 'There was an error running option L4 WLAN Country'.

I'd just used an article online about how to set up the wpa_supplicant.conf file manually, so that's what I've done to get WiFi working.

sboultbee

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:August 28, 2021, 04:12:13 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #233 on: June 23, 2021, 10:59:29 am »
From the documentation of AttractMode, I was under the impression that upon its first use I'd get a menu from where I could generate the ROMs list and handle other matters.  I don't get a menu at all, just the black screen with the 'MAME 0/1' in the corner.  I was able to get it running on a very basic level by using the command-line option to generate the ROMs list.

The reason you get a black screen is because I kind of pre-configured Attract Mode with an emulator called MAME. I did this because I wanted to pre-configure the MAME binary path ($HOME/mame/mame). To remove this, just delete this emulator and start from scratch. Sorry, I think this cause more confusion than I was expecting... :\

The pre-configuring of AttractMode is what confused me. I was expecting it to boot into a menu where Iíd generate the ROMs list and take care of other matters. It never occurred to me that AM was working but that I needed to press the ĎTabí key to get into the menu system to continue the setup. It just looked like something had broken.

I think it would help to add a line to the first post that says something like ďIf using AttractMode, youíll need to press Tab at the black screen to open the menus and complete set up.Ē

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #234 on: June 23, 2021, 11:11:10 am »
The pre-configuring of AttractMode is what confused me. I was expecting it to boot into a menu where Iíd generate the ROMs list and take care of other matters. It never occurred to me that AM was working but that I needed to press the ĎTabí key to get into the menu system to continue the setup. It just looked like something had broken.

I think it would help to add a line to the first post that says something like ďIf using AttractMode, youíll need to press Tab at the black screen to open the menus and complete set up.Ē

You're right. I will add information in the first post to specify that Attract Mode is pre-configured with an emulator called "MAME" and use the Tab key to complete the setup (generate the Romlist, etc.).
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #235 on: June 23, 2021, 11:16:19 am »
No luck - I get the 'Could not communicate with wpa_supplicant' when I select the L4 option to set the WiFi country.  The next screen then says 'There was an error running option L4 WLAN Country'.

Can you try this:

Code: [Select]
systemctl status wpa_supplicant.service
rfkill unblock all
sudo systemctl restart wpa_supplicant.service
sudo raspi-config

And try again (with first setup the country code)?

I'd just used an article online about how to set up the wpa_supplicant.conf file manually, so that's what I've done to get WiFi working.

Yes, there is a neat offline method of pre-configuring the Wi-Fi on on Raspbian/RaspiOS (creating and configuring the wpa_supplicant.conf file in the boot partition).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

sboultbee

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:August 28, 2021, 04:12:13 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #236 on: June 24, 2021, 01:39:14 am »
No luck - I get the 'Could not communicate with wpa_supplicant' when I select the L4 option to set the WiFi country.  The next screen then says 'There was an error running option L4 WLAN Country'.

Can you try this:

Code: [Select]
systemctl status wpa_supplicant.service
rfkill unblock all
sudo systemctl restart wpa_supplicant.service
sudo raspi-config

And try again (with first setup the country code)?

I'd just used an article online about how to set up the wpa_supplicant.conf file manually, so that's what I've done to get WiFi working.

Yes, there is a neat offline method of pre-configuring the Wi-Fi on on Raspbian/RaspiOS (creating and configuring the wpa_supplicant.conf file in the boot partition).

Yep, preparing the offline version of the wpa_supplicant.conf file is basically what I did to get WiFi working.

Went through the steps in your last post from a freshly flashed image with the same error messages.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.232 Appliance on a Raspberry Pi 4B
« Reply #237 on: July 05, 2021, 12:18:59 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.233 (please see the original post of this thread for the download link).   :cheers:

As with the previous releases, this image (and onwards) include 2 Front-ends: Attract Mode and AdvanceMENU.

To select one of them, just issue one of the following commands:

Code: [Select]
# To use Attract Mode:
frontend attract

# To use AdvanceMENU:
frontend advance

# To use the MAME GUI (default):
frontend mame

Reboot the system (sudo reboot).
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

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 0.233 Appliance on a Raspberry Pi 4B
« Reply #238 on: July 12, 2021, 12:14:39 pm »
Hi @bbegin,

Once again, thank you very much for all the time you offered to the community, to make this project alive and fully functional! It is a unique chance for us to learn from you, your passion and how MAME works.

Concerning about performances, I was reading this article on the excellent site RetroRGB : https://www.retrorgb.com/raspberry-pi-mame-benchmarks.html

Unfortunately, It is not detailed on how the benches have been performed (from X11 ?), but it shows how clearly the RPI4 can be a solution for a short selection of great titles. In contrast,  it also shows, how the RPI4 is not the solution to play to all devices supported,  with more or less success, by MAME.

My final understanding is, if you know which games you want to play, and understand why it is important to keep MAME up-to-date, then YES, your approach here, getting a JeOS and MAME, is the best for all players who love accuracy, in memory of video games.

Thank you and keep playing!
« Last Edit: July 12, 2021, 12:53:24 pm by exonaax »
More pixels here, best it is!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.235 Appliance on a Raspberry Pi 4B
« Reply #239 on: September 06, 2021, 04:18:21 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.235 (please see the original post of this thread for the download link).  :cheers:

Enjoy!
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: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #240 on: September 30, 2021, 07:43:22 am »
Just to let you know the availability of the NEW disk image file with MAME 0.236 (please see the original post of this thread for the download link).  :cheers:

Enjoy!
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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #241 on: September 30, 2021, 08:25:38 am »
Just to let you know the availability of the NEW disk image file with MAME 0.236 (please see the original post of this thread for the download link).  :cheers:

Enjoy!
Thanks so much for continuing with this.  Iím finally back to working on my project after a break over the summer.

Iím going to try (again) to get this working so that when I press the power button, AttractMode will show up on screen with the list of MAME games and when I press the power button again everything shuts down safely.

My CP will consist of one 4-way joystick, 2 buttons, P1 Start, P2 Start and an Exit button.  Ideally, Exit will double as Pause (press to Pause/hold down for 2 seconds to Exit to game list).

My deadline is Christmas so I need to get moving!

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #242 on: September 30, 2021, 06:21:08 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.236 (please see the original post of this thread for the download link).  :cheers:

Enjoy!
Thanks so much for continuing with this.  Iím finally back to working on my project after a break over the summer.

Iím going to try (again) to get this working so that when I press the power button, AttractMode will show up on screen with the list of MAME games and when I press the power button again everything shuts down safely.

My CP will consist of one 4-way joystick, 2 buttons, P1 Start, P2 Start and an Exit button.  Ideally, Exit will double as Pause (press to Pause/hold down for 2 seconds to Exit to game list).

My deadline is Christmas so I need to get moving!

Seems to be a very nice project! I guess you will use some form of relay for the power-on and power-off button (after a clean shutdown)? Alternatively, if the Pi is still powered-on, once in a shutdown state, you can wake it up by simply shorting 2 of the GPIO pins (see https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi). Anyway, the behavior of the image is that once you quit the front-end, the system shuts itself automatically and cleanly.
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: 7778
  • Last login:Today at 06:09:00 pm
How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #243 on: October 06, 2021, 07:20:04 pm »
OK I've been messing around and I figured out how to get Attract Mode to at least display properly - there are a few people in this thread wondering what was happening when you typed "frontend attract" in rw mode and then "sudo reboot".  Attract Mode definitely works but it just says "MAME 0/1" in the bottom right corner.  This is because the default name for the Game List is "MAME" and the "0/1" means you have no games in this list.  So hit TAB and the Attract Mode menu will come up and you can play around with the settings, including populating the game list.

EDIT: I've made some progress on this.  Upon boot-up, Attract Mode launches and displays the "SDarcadeMod_v3f" theme in vertical orientation.  I got this theme off of the Attract Mode website.  It's pretty slick.  Looks exactly like the ArcadeSD menu.  I only have a keyboard connected but so far games are launching.  One thing I cannot figure out is why the menu doesn't recognize the vertical orientation - pressing left/right should scroll through the games but you still need to press up/down.  Not a huge deal but something I'd like to fix, if possible.

To make the games launch vertically, I had to go into the MAME settings ("frontend mame") and change the Advanced Configuration Options to turn on "Rotate Right".

I still have several things I need to figure out but I think this is going to be a great solution.
« Last Edit: October 07, 2021, 04:41:12 pm by javeryh »

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7778
  • Last login:Today at 06:09:00 pm
How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #244 on: October 07, 2021, 04:52:29 pm »
bbegin - I was hoping you could help me with something.  I have your image up and running and it works great.  I made a little video of it running Attract Mode.



After playing for a while, there is lots of text that appears on the screen when switching between games.  It looks like this:



Is there a way to not make this appear?  It's not a huge deal but I thought I'd ask in case there was a simple fix.

Thanks!
« Last Edit: October 08, 2021, 05:41:02 pm by javeryh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #245 on: October 09, 2021, 12:04:37 am »
Hi Javeryh,

To answer your question, yes there is a way to suppress those messages, wich are produced by the MAME emulator.

What you need to do is to customize the command-line used to launch MAME (configured in Attract Mode under your Emulator menu). You need to add this below at the END of the command-line:

Code: [Select]
>/dev/null 2>/dev/null
EDIT (2021-10-10): in fact, you should append the line above to the "Command Arguments", from the properties of your MAME emulator definition in Attract Mode.
« Last Edit: October 10, 2021, 11:53:26 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: 7778
  • Last login:Today at 06:09:00 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #246 on: October 10, 2021, 12:32:56 pm »
Hi Javeryh,

To answer your question, yes there is a way to suppress those messages, wich are produced by the MAME emulator.

What you need to do is to customize the command-line used to launch MAME (configured in Attract Mode under your Emulator menu). You need to add this below at the END of the command-line:

Code: [Select]
>/dev/null 2>/dev/null
EDIT (2021-10-10): in fact, you should append the line above to the "Command Arguments", from the properties of your MAME emulator definition in Attract Mode.

Thanks for this.  I am not sure I am doing it correctly.  I hit "Tab" while in Attract Mode and select Emulators -> MAME -> Command Arguments and change the default "[name]" to ">/dev/null 2>/dev/null".  When I exit back to the Attract Mode game list and select a game to play, it launches the MAME GUI instead of the game.   I also tried "[name]>/dev/null 2>/dev/null" in that spot with the same result.

I'm sure I'm missing something simple...

Also, another question not really related to your application but I thought you might know the answer... I added a power button to the pi by modifying "sudo nano /boot/config.txt" and adding these two lines to the file at the end:

Code: [Select]
#shutdown button
dtoverlay=gpio-shutdown

Now bridging GPIO3 and Ground (pins 5 and 6) will shut the pi off.  Doing it again will turn it back on.  Is this a "safe shutdown"?  The shutdown is a little abrupt but it seems to be working.  I've powered on/off probably 20 times now with no issues.  It almost seems too easy!  Boots right into the Attract Mode game list.
« Last Edit: October 10, 2021, 12:42:36 pm by javeryh »

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:May 13, 2022, 11:02:30 am
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4B
« Reply #247 on: October 10, 2021, 01:10:12 pm »
Thanks for this.  I am not sure I am doing it correctly.  I hit "Tab" while in Attract Mode and select Emulators -> MAME -> Command Arguments and change the default "[name]" to ">/dev/null 2>/dev/null".  When I exit back to the Attract Mode game list and select a game to play, it launches the MAME GUI instead of the game.   I also tried "[name]>/dev/null 2>/dev/null" in that spot with the same result.

I'm sure I'm missing something simple...

I suspect that Attract Mode is validating the input from the GUI and strip some characters (like the ">").

As an alternative way to do this, edit mame.cfg (if you called your emulator "mame"):

Code: [Select]
nano /data/attract/mame.cfg
From:

Code: [Select]
args                 [name]
To:

Code: [Select]
args                 [name] >/dev/null 2>/dev/null
Also, another question not really related to your application but I thought you might know the answer... I added a power button to the pi by modifying "sudo nano /boot/config.txt" and adding these two lines to the file at the end:

Code: [Select]
#shutdown button
dtoverlay=gpio-shutdown

Now bridging GPIO3 and Ground (pins 5 and 6) will shut the pi off.  Doing it again will turn it back on.  Is this a "safe shutdown"?  The shutdown is a little abrupt but it seems to be working.  I've powered on/off probably 20 times now with no issues.  It almost seems too easy!  Boots right into the Attract Mode game list.

Yes, I can confirm this method is good to safely shutdown the Raspberry Pi (clean unmount of the filesystem, including the read/write /data partition).
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
  • ***