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

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

  

Author Topic: How to make a dedicated MAME 0.250 Appliance on a Raspberry Pi 4/Pi 400  (Read 127817 times)

0 Members and 3 Guests are viewing this topic.

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #280 on: October 23, 2021, 04:28:38 am »
Maybe that's because I maintain the boot splash (I use fim and it uses SDL) even after the boot is complete... I will validate if this could be the cause or not.

Yeah, that might explain why the SDL_Quit() call was having some difficulty too.

I suspect you are gonna need to patch it by default, to run and maintain, your custom environment.

All the best with this.

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #281 on: October 23, 2021, 05:46:49 am »
Sorry to thread Hijack.

Hi can you fix the bug that is stopping Daphne and Hypseus from detecting the Dragonrise encoder?

No matter how you change the daphinput file, the controls are reversed for left and right and up and down does not work.

It has been a pain to get working for like ever.  Works fine on Xbox controller and keyboard so it could be a mapping issue.

Thanks.

This may be also of interest, if the encoder is disconnecting:

https://retropie.org.uk/forum/topic/31488/solved-repeated-disconnect-of-zero-delay-usb-encoder-dragonrise/4

Hope it helps.

Vocalitus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:October 25, 2021, 06:16:58 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #282 on: October 23, 2021, 07:02:31 am »
Sorry to thread Hijack.

Hi can you fix the bug that is stopping Daphne and Hypseus from detecting the Dragonrise encoder?

No matter how you change the daphinput file, the controls are reversed for left and right and up and down does not work.

It has been a pain to get working for like ever.  Works fine on Xbox controller and keyboard so it could be a mapping issue.

Thanks.

Hi,

Not certain what you are seeing here, I have an Arcade1Up with two DragonRise controllers that map fine.

Reports from RetroPie users have also successfully used DragonRise controllers without issues I am aware of.

Are you seeing the axis changes and button pushes with `jstest` ?

Are you doing the appropriate transposition of the controller number definitions in config ?

I would post my DR config, but would probably not correlate to anything like you have.

Edit: Noticed you stated "daphinput file" - Hypseus will ignore that.
It uses the hypinput,ini file and SDL2 scancode values as per the example: https://github.com/DirtBagXon/hypseus-singe/blob/master/doc/hypinput.ini

Hijacking again.

I could not install Hypseus with my current installation as I was running Jessie on the Pi3.
I wiped the card and installed Buster.
Installed Daphne which went perfectly.

Visited: https://github.com/DirtBagXon/hypseus-singe/blob/master/src/3rdparty/retropie/RETROPIE.md

Followed the tut.  Installation failed with errors after cmake ../src

Quote
-- Detected 32bit: Compiling with -D_FILE_OFFSET_BITS=64
-- Checking for one of the modules 'SDL2_ttf'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'SDL2_ttf' found
Call Stack (most recent call first):
  CMakeLists.txt:54 (PKG_SEARCH_MODULE)


-- Checking for one of the modules 'SDL2_image'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'SDL2_image' found
Call Stack (most recent call first):
  CMakeLists.txt:55 (PKG_SEARCH_MODULE)


-- Checking for one of the modules 'libmpeg2'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'libmpeg2' found
Call Stack (most recent call first):
  CMakeLists.txt:56 (PKG_SEARCH_MODULE)


-- Target: Linux armv6
-- Version: v2.6.16-RPi-1
-- Configuring incomplete, errors occurred!

So this is for the Pi4 only?  Just noticed the last line.  PizeroW has the arm6.  Have I compiled the wrong version?
 
« Last Edit: October 23, 2021, 07:40:07 am by Vocalitus »

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #283 on: October 23, 2021, 08:04:34 am »

Hijacking again.

I could not install Hypseus with my current installation as I was running Jessie on the Pi3.
I wiped the card and installed Buster.
Installed Daphne which went perfectly.

Visited: https://github.com/DirtBagXon/hypseus-singe/blob/master/src/3rdparty/retropie/RETROPIE.md

Followed the tut.  Installation failed with errors after cmake ../src

Quote
-- Detected 32bit: Compiling with -D_FILE_OFFSET_BITS=64
-- Checking for one of the modules 'SDL2_ttf'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'SDL2_ttf' found
Call Stack (most recent call first):
  CMakeLists.txt:54 (PKG_SEARCH_MODULE)


-- Checking for one of the modules 'SDL2_image'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'SDL2_image' found
Call Stack (most recent call first):
  CMakeLists.txt:55 (PKG_SEARCH_MODULE)


-- Checking for one of the modules 'libmpeg2'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'libmpeg2' found
Call Stack (most recent call first):
  CMakeLists.txt:56 (PKG_SEARCH_MODULE)


-- Target: Linux armv6
-- Version: v2.6.16-RPi-1
-- Configuring incomplete, errors occurred!

So this is for the Pi4 only?  Just noticed the last line.  PizeroW has the arm6.  Have I compiled the wrong version?


I think you missed the first line of that tutorial:

Code: [Select]
sudo apt-get install libmpeg2-4-dev libsdl2-image-dev libsdl2-ttf-dev
The errors do tell you what's missing.

However, assuming you are using RetroPie:  You would be better using the RetroPie-Setup script currently in a pull request detailed here:

https://retropie.org.uk/forum/topic/31155/integrate-daphne-emulator-back-into-the-retropie-script-for-ubuntu/14?_=1634990585290

arm6/arm7 is fine, I have it running on a Pi Zero:




Note: You will need to keep (recode) the bitrate low on those m2v files for the zero (640/720x480 only)

Also note, that the Zero doesn't have enough RAM to compile some of the assembly routines by default.
The RetroPie-Setup script should take care of that for you, otherwise you will have to set some swap for successful compilation.


« Last Edit: October 24, 2021, 08:58:32 am by DirtBagXon »

Vocalitus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:October 25, 2021, 06:16:58 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #284 on: October 23, 2021, 09:55:32 am »
Thanks.

Reminds me when I tried to run Daphne on a P2 64mb.

Mpeg 1 if I remember correctly.   :)

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #285 on: October 23, 2021, 11:31:26 am »
Thanks.

Reminds me when I tried to run Daphne on a P2 64mb.

Mpeg 1 if I remember correctly.   :)

MPEG-2 actually but yeah.

Also to confirm, the swap is only needed for the compilation on the Pi Zero, not to run. Although there are better choices of Pi model for resources....


« Last Edit: October 23, 2021, 11:45:33 am by DirtBagXon »

Vocalitus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:October 25, 2021, 06:16:58 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #286 on: October 23, 2021, 07:49:18 pm »
Thanks for the help.

Singe is installed and working.

Cool video showing the pizero in action.

Are you restricted to hand held screen sizes or will it display in 640x480?

Nice work!  :applaud:

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #287 on: October 23, 2021, 08:44:15 pm »
Thanks for the help.

Singe is installed and working.

Cool video showing the pizero in action.

Are you restricted to hand held screen sizes or will it display in 640x480?

Nice work!  :applaud:

For the Pi Zero, the resolution remains at 640x480 (for the overlays) but I reduced the bitrate with ffmpeg. The .ogg files were unchanged.

I should also note that Hypseus will play upscaled, and enhanced, 4k m2v files (they are out there) with the Daphne ROMS.

Even the Pi4 will struggle at that resolution, but Linux Desktops, or the Windows Port, will handle them with any reasonable CPU.

e.g.










bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #288 on: October 23, 2021, 11:22:29 pm »
Just to let you know the availability of the updated image file wich includes the patched Hypseus binary, now fully functionnal. Big thanks to DirtBagXon for his great help!

The download link remain the same, please see original post of this thread.

Some quick informations:
  • Place the video/audio files under /data/hypseus/framefile/<your-game>
  • Place the ROMs files (unzipped) under /data/hypseus/roms/<your-game>
  • Run Hypseus from the /home/pi/hypseus location. You can take a look at the 2 launch scripts already there (Dragon's Lair II and Space Ace).

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

Vocalitus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:October 25, 2021, 06:16:58 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #289 on: October 24, 2021, 03:24:45 am »
Thanks for the help.

Singe is installed and working.

Cool video showing the pizero in action.

Are you restricted to hand held screen sizes or will it display in 640x480?

Nice work!  :applaud:

For the Pi Zero, the resolution remains at 640x480 (for the overlays) but I reduced the bitrate with ffmpeg. The .ogg files were unchanged.

I should also note that Hypseus will play upscaled, and enhanced, 4k m2v files (they are out there) with the Daphne ROMS.

Even the Pi4 will struggle at that resolution, but Linux Desktops, or the Windows Port, will handle them with any reasonable CPU.

e.g.





I didn't know there was a windows port. 

Is there an executable or do I have to compile it myself?

I have the old Singe 2.0 installed already.

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #290 on: October 24, 2021, 08:06:28 am »
I didn't know there was a windows port. 

Is t an executable or do I have to compile it myself?

I have the old Singe 2.0 installed already.

There are compiled Windows executables on the main repo: https://github.com/DirtBagXon/hypseus-singe

Also it should compile on Mac OSX

There is no frontend for the Windows port (happy to accept contributions here), it is run from .bat files or could use Windows Frontends like Launchbox I suspect.

So you will need to construct the .bat files to your preference, I put a zip with example defaults in the repo as a starting point.

The 'extended' argument list for all versions of Hypseus are here: https://github.com/DirtBagXon/hypseus-singe#extended-arguments-and-keys

This is getting all very off-topic for the thread now, so will leave it there.

Thanks to @bbegin for the inclusion in this image.  :applaud:

« Last Edit: October 25, 2021, 08:05:53 pm by DirtBagXon »

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:Yesterday at 07:02:12 am
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #291 on: October 25, 2021, 06:34:30 pm »
not sure if mentioned yet but, there was a recent bios update for the rpi4 and rp400 that lets you boot and run the OS from an SSD using a cheap usb3 to SSD adaptor.
no extra power needed.
no Sdcard to tell it to boot off usb needed either.

I have my 2gb rpi4 hooked up now and it's fast to boot and load stuff.
not doing arcade with it (amiga 500 stuff).
I imagine compile times for something like this would go noticeably faster.

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #292 on: October 26, 2021, 04:57:17 pm »
I was able to pick up a PI4 today and I got this installed. It works really great. BUT...I need to use RGB Commander for the U360 joystick (unless you have a way to set the mode for each game). I cannot install because the main part of the card is read only (I'm assuming that is the problem). Any ideas on how to make that work so it will set the joystick mode for each game?

J_K_M_A_N

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #293 on: October 26, 2021, 07:59:49 pm »
I was able to pick up a PI4 today and I got this installed. It works really great. BUT...I need to use RGB Commander for the U360 joystick (unless you have a way to set the mode for each game). I cannot install because the main part of the card is read only (I'm assuming that is the problem). Any ideas on how to make that work so it will set the joystick mode for each game?

J_K_M_A_N

Hi J_K_M_A_N,

I don't know what RGB Commander is, but if you want to make changes to the root filesystem (the partition kept in read-only mode), you just have to issue the "rw" command, from a shell. You make your changes and once done, to go back to read-only mode, either logout, reboot or issue the "ro" command.

If you want to configure a particular joystick mapping, you do not need to put the root filesystem in read/write mode. Instead, just make sure you put the .cfg file of your U360 joystick under /data/mame/ctrlr and tell MAME to use this mapping, by default by editing /data/mame/ini/mame.ini and specifying your .cfg file under the "ctrlr" directive (no need to put the .cfg extension). If you only want specific games to use your U360 joystick, just put a file with the name of the romname of the game under /data/mame/ini with the .ini extension and put the "ctrlr" directive in there. Do this for each game you want to use your U360 joystick.

I hope this helps,

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

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #294 on: October 26, 2021, 08:59:03 pm »
Do you know how the U360 works? You can "upload" a configuration to the joystick so it will act like a 4 way or 8 way or even 2 way or diagonal 4 way (for Q*Bert). RGB commander is mostly used for LED buttons and lights but it also handles the U360 configurations and it automatically loads them for each game you want to play. It uses an XML file that has things like this.

Code: [Select]
ULTRASTIK 360s (These are the different settings you can use)
###################
Valid values:
   4 4-Way
   8 8-Way
   10 2-Way, Left & Right
   11 2-Way, Up & Down
   12 4-Way, Diagonals Only (Qbert, Zaxxon, Congo Bongo)
   13 4-Way, No Sticky, Up-Down bias (no joystick play in the center. Good for fast movements)
   20 8-Way Easy Diagonals (fighting games)
   21 Analog (Sinistar, Arch Rivals, Pigskin 621 AD)
   22 Mouse Pointer
Any invalid value greater than 4 will default to 8-way

Then you can add entries for each game like so.

Code: [Select]
        <rom id="dkong" way="13">
<control name="P1_COIN" colour="Blue"/>
<control name="P1_START" colour="Blue"/>
<control name="P1_BUTTON1" colour="Orange"/>
<control name="P1_JOYSTICK" colour="Black"/>
<control name="P2_COIN" colour="Blue"/>
<control name="P2_START" colour="Blue"/>
<control name="P2_BUTTON1" colour="Orange"/>
<control name="P2_JOYSTICK" colour="Black"/>
</rom>
<rom id="dkongx" way="13">

</rom>
        <rom id="qbert" way="12">
<control name="P1_COIN" colour="Red"/>
<control name="P1_START" colour="Red"/>
<control name="P1_JOYSTICK" colour="Black"/>
<control name="P2_COIN" colour="Red"/>
<control name="P2_START" colour="Red"/>
<control name="P2_JOYSTICK" colour="Black"/>
</rom>

The control name and color is for the LEDs (that I don't use) but the "way=" is for which setting the U360 should use.

So I think I need to make the root file system read-write, at least to load RGB Commander. Do I just type "rw" in SSH in a certain directory? Sorry, I don't know much about Linux at all. Thanks for the help.

J_K_M_A_N

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #295 on: October 26, 2021, 09:49:58 pm »
Hi J_K_M_A_N,

I read your post on RGB Commander to better understand how it is working under the hood. The setup script basically create a systemd unit (a service in the Windows world) to upload the config files to the hardware.

http://forum.arcadecontrols.com/index.php?topic=165288.0

The problem is see with the details I read is about the logging of the daemon to this location:

/usr/sbin/rgbcommander/rgbcmdd.log

This location is read-only, so the daemon will not be able to create this file, per se. We can overcome this with a symlink (a pointer to another location).

I suggest you create the symlink this way (once the installation is done, but with the daemon stopped):

Code: [Select]
rw                                      # This alias can be executed from any location
cd /home/pi/RGBInstall        # Provided you unzipped RGB Commander files at this location
sudo ./setup.sh install
sudo systemctl stop rgbcommander
if [ -f /usr/sbin/rgbcommander/rgbcmdd.log ]; then sudo rm /usr/sbin/rgbcommander/rgbcmdd.log; fi
ln -s /var/log/rgbcmdd.log /usr/sbin/rgbcommander/rgbcmdd.log
sudo systemctl start rgbcommander
sudo systemctl status rgbcommander
cat /var/log/rgbcmdd.log    # To make sure the symlink is working as expected and to troubleshoot RGB Commander.
ro                                      # This alias can be executed from any location

Everytime you have to modify your config files (xml files), you should:

Code: [Select]
rw         # This alias can be executed from any location
nano /<location of your rgbcmdd.xml file>/rgbcmdd.xml
ro          # This alias can be executed from any location
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #296 on: October 26, 2021, 10:10:15 pm »
Fantastic. Thank you so much for looking into that.  :cheers: I will try it tomorrow as soon as I can and let you know how it goes.

J_K_M_A_N

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #297 on: October 27, 2021, 08:56:14 am »
I gave it a shot but I cannot get it to work. I think it was made with Retropie in mind. I took out the retropie="1" in the mame entries but the log shows a socket failed error.

Code: [Select]
17/04/21 12:37:52 [DEBUG] [processMonitorWorker] starting processMonitorWorker
17/04/21 12:37:52 [INFO] [startListening] selectserver: listening on IP 0.0.0.0, socket 11
17/04/21 12:37:52 [WARNING] [startListening] selectserver: socket failed, error: 97

I do not know Linux and RGB Commander enough to figure out how to make it hook this version of Mame. I am going to keep trying though. I will probably switch to attract mode and see if I can't figure that out somehow. Thanks again for the help.

J_K_M_A_N

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #298 on: October 27, 2021, 10:27:11 am »
Hi J_K_M_A_N,

I suspect that the rgbcommander service unit needs to write something somewhere while starting/initializing. We can overcome this on a read-only root filesystem with a systemd drop-in file (a customization of a service, if you will).

To do this:

Code: [Select]
rw
sudo mkdir /etc/systemd/system/rgbcommander.service.d
sudo nano /etc/systemd/system/rgbcommander.service.d/readonlyfs-fixup.conf

Paste those lines below and save:

Code: [Select]
[Service]
ExecStartPre=/bin/sh  -c "mount -o remount,rw /"
ExecStartPost=/bin/sh -c "mount -o remount,ro /"

Then, restart rgbcommander service unit and show status:

Code: [Select]
ro
sudo systemctl restart rgbcommander.service
systemctl status rgbcommander.service

Can you please include the output of the last command (systemctl status rgbcommander.service) here?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #299 on: October 27, 2021, 11:06:02 am »
Here you go.

Code: [Select]
pi@arcade(rw):~/RGBCommander$ systemctl status rgbcommander.service
● rgbcommander.service - RGBcommander arcade led and joystick daemon
   Loaded: loaded (/etc/systemd/system/rgbcommander.service; enabled; vendor pre
  Drop-In: /etc/systemd/system/rgbcommander.service.d
           └─readonlyfs-fixup.conf
   Active: active (running) since Wed 2021-10-27 11:04:23 EDT; 33s ago
 Main PID: 910 (rgbcmdd)
    Tasks: 8 (limit: 4915)
   CGroup: /system.slice/rgbcommander.service
           └─910 /usr/sbin/rgbcommander/rgbcmdd

Oct 27 11:04:23 arcade systemd[1]: Starting RGBcommander arcade led and joystick
Oct 27 11:04:23 arcade systemd[1]: Started RGBcommander arcade led and joystick
Oct 27 11:04:26 arcade rgbcmdd[909]: sh: 1: /usr/sbin/rgbcommander/scripts/OnDae

J_K_M_A_N

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #300 on: October 27, 2021, 11:15:05 am »
Here you go.

Code: [Select]
pi@arcade(rw):~/RGBCommander$ systemctl status rgbcommander.service
● rgbcommander.service - RGBcommander arcade led and joystick daemon
   Loaded: loaded (/etc/systemd/system/rgbcommander.service; enabled; vendor pre
  Drop-In: /etc/systemd/system/rgbcommander.service.d
           └─readonlyfs-fixup.conf
   Active: active (running) since Wed 2021-10-27 11:04:23 EDT; 33s ago
 Main PID: 910 (rgbcmdd)
    Tasks: 8 (limit: 4915)
   CGroup: /system.slice/rgbcommander.service
           └─910 /usr/sbin/rgbcommander/rgbcmdd

Oct 27 11:04:23 arcade systemd[1]: Starting RGBcommander arcade led and joystick
Oct 27 11:04:23 arcade systemd[1]: Started RGBcommander arcade led and joystick
Oct 27 11:04:26 arcade rgbcmdd[909]: sh: 1: /usr/sbin/rgbcommander/scripts/OnDae

J_K_M_A_N

Ok, I see that the daemon/service is at state "active (running)", si it is a good start.

Did you issue the "ro" command to switch back to read-only (I see the Bash prompt is indicating we are in read/write mode)?

Is RGB Commander leds are now working? Is your U360 joystick is wirking as expected?
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #301 on: October 27, 2021, 11:19:17 am »
I am still getting the socket failed error. Here is the whole log after a reboot and launching a game.

Code: [Select]
17/04/21 12:37:49  _____ _____ _____                               _         
17/04/21 12:37:49 | __  |   __| __  |___ ___ _____ _____ ___ ___ _| |___ ___
17/04/21 12:37:49 |    -|  |  | __ -|  _| . |     |     | .'|   | . | -_|  _|
17/04/21 12:37:49 |__|__|_____|_____|___|___|_|_|_|_|_|_|__,|_|_|___|___|_| 0.4.0.5
17/04/21 12:37:49 Copyright 2015-2018 Gijsbrecht De Waegeneer
17/04/21 12:37:49 RGBcommander 0.4.0.5 linux
17/04/21 12:37:49 a *nix arcade cabinet led and joystick driver
17/04/21 12:37:49 
17/04/21 12:37:49 compilation date Dec 23 2017 18:53:06
17/04/21 12:37:49 
17/04/21 12:37:49 [INFO] [Init] installation directory -> /usr/sbin/rgbcommander/
17/04/21 12:37:49 [INFO] [Init] daemon binary -> rgbcmdd
17/04/21 12:37:49 [INFO] [Init] working directory set to -> /usr/sbin/rgbcommander/
17/04/21 12:37:49 [INFO] [Init] minimame binary build source -> 0.187 (mame0187) -> processed 38098 structures
17/04/21 12:37:49 [INFO] [Init] processed 0 buttons
17/04/21 12:37:50 [DEBUG] [Hardware] constructed U360_1 hwthrottle -> 417
17/04/21 12:37:50 [INFO] [create360Maps] U360_1 -> physical restrictor absent (default)
17/04/21 12:37:50 [INFO] [Init] processed Joystick U360_1
17/04/21 12:37:50 [INFO] [Init] daemon listening port number 2724
17/04/21 12:37:50 [INFO] [Init] blinking mame led mappings : led 0 -> P1_START led 1 -> P2_START led 2 -> P1_BUTTON1
17/04/21 12:37:50 [INFO] [Init] joystick way override insertion for rom entry arcade -> dkong -> 10
17/04/21 12:37:50 [INFO] [Init] joystick way override insertion for rom entry arcade -> dkongx -> 13
17/04/21 12:37:50 [INFO] [Init] joystick way override insertion for rom entry arcade -> galaga -> 10
17/04/21 12:37:50 [INFO] [Init] joystick way override insertion for rom entry arcade -> galagamf -> 10
17/04/21 12:37:50 [INFO] [Init] joystick way override insertion for rom entry arcade -> joust -> 10
17/04/21 12:37:50 [WARNING] [Init] likely incorrect rom name detected -> machridr -> arcade
17/04/21 12:37:50 [WARNING] [Init] likely incorrect rom name detected -> mightybj -> arcade
17/04/21 12:37:50 [WARNING] [Init] likely incorrect rom name detected -> platoon -> arcade
17/04/21 12:37:50 [INFO] [Init] joystick way override insertion for rom entry arcade -> qbert -> 12
17/04/21 12:37:51 [INFO] [Init] joystick way override insertion for rom entry arcade -> sinistar -> 21
17/04/21 12:37:52 [INFO] [Init] static maps defined -> true
17/04/21 12:37:52 [INFO] [Init] # defined emulators in data structure -> 7
17/04/21 12:37:52 [INFO] [Init] -> arcade
17/04/21 12:37:52 [INFO] [Init] -> mame
17/04/21 12:37:52 [INFO] [Init] -> mame-advmame
17/04/21 12:37:52 [INFO] [Init] -> megadrive
17/04/21 12:37:52 [INFO] [Init] -> n64
17/04/21 12:37:52 [INFO] [Init] -> psx
17/04/21 12:37:52 [INFO] [Init] -> snes
17/04/21 12:37:52 [INFO] [Init] # defined process to watch -> 4
17/04/21 12:37:52 [INFO] [Init] -> mame-advmame
17/04/21 12:37:52 [INFO] [Init] -> mame
17/04/21 12:37:52 [INFO] [Init] -> arcade
17/04/21 12:37:52 [INFO] [Init] -> retroarch
17/04/21 12:37:52 [INFO] [Init] # emulators defined as retropie (retroarch cores and/or normal processes) -> 4
17/04/21 12:37:52 [INFO] [Init] -> megadrive
17/04/21 12:37:52 [INFO] [Init] -> snes
17/04/21 12:37:52 [INFO] [Init] -> n64
17/04/21 12:37:52 [INFO] [Init] -> psx
17/04/21 12:37:52 [INFO] [Init] # emulators defined as arcade (mame derivates) -> 3
17/04/21 12:37:52 [INFO] [Init] -> mame-advmame
17/04/21 12:37:52 [INFO] [Init] -> mame
17/04/21 12:37:52 [INFO] [Init] -> arcade
17/04/21 12:37:52 [INFO] [Init] # retropie folder to process mappings -> 4
17/04/21 12:37:52 [INFO] [Init] psx -> retroarch
17/04/21 12:37:52 [INFO] [Init] n64 -> retroarch
17/04/21 12:37:52 [INFO] [Init] snes -> retroarch
17/04/21 12:37:52 [INFO] [Init] megadrive -> retroarch
17/04/21 12:37:52 [INFO] [Init] processed 3 flash animations
17/04/21 12:37:52 [INFO] [Init] processed 80 animations
17/04/21 12:37:52 [INFO] [Init] total Init processing time -> 2.88101s
17/04/21 12:37:52 [DEBUG] [ControlPanel] constructed ControlPanel
17/04/21 12:37:52 [INFO] [execOutputHook] exec hook -> "/usr/sbin/rgbcommander/scripts/OnDaemonStart.sh"
17/04/21 12:37:52 [INFO] [main] successfully created ControlPanel abstraction
17/04/21 12:37:52 [INFO] [rgbcmddMsgQueue] starting rgbcmdd message queue thread
17/04/21 12:37:52 [INFO] [mamefifo] starting sdlmame monitoring thread
17/04/21 12:37:52 [INFO] [mameNetworkCommunicator] mameNetworkCommunicator started
17/04/21 12:37:52 [INFO] [processMonitor] awaiting FrontEnd (emulationstatio) start...
17/04/21 12:37:52 [DEBUG] [processMonitorWorker] starting processMonitorWorker
17/04/21 12:37:52 [INFO] [startListening] selectserver: listening on IP 0.0.0.0, socket 10
17/04/21 12:37:52 [WARNING] [startListening] selectserver: socket failed, error: 97

Not sure if any of that helps. :( I am not sure if I have the xml file set correctly either. So it could be that it is not, and that is the cause of the error. I just don't know enough about RGB Commander or Linux to know for sure. It looks like it can be used in Linux WITHOUT retropie but I may not have it set correctly. Sorry I cannot be more help.

J_K_M_A_N
« Last Edit: October 27, 2021, 11:21:19 am by J_K_M_A_N »

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #302 on: October 27, 2021, 11:52:55 am »
I just tested the RGB software to see if it would set the stick into different modes and that part does work (not surprised).

Code: [Select]
27/10/21 11:36:40 [INFO] [startListening] selectserver: new connection from 127.0.0.1, socket 13
27/10/21 11:36:54 [INFO] [startListening] eot detected on socket - clearing socket buffer 13
27/10/21 11:36:54 [INFO] [startListening] processing command  set,stick,10
27/10/21 11:36:54 [INFO] [processCmd] #args is 3
27/10/21 11:36:54 [INFO] [processCmd] set
27/10/21 11:36:54 [INFO] [processCmd] stick
27/10/21 11:36:54 [INFO] [processCmd] 10
27/10/21 11:36:54 [INFO] [setStick] committing state to joystick hardware -> U360_1
27/10/21 11:36:54 [INFO] [setWay] setting U360_1 to 10 (2-Way, Left & Right)  success
27/10/21 11:38:14 [INFO] [startListening] eot detected on socket - clearing socket buffer 13
27/10/21 11:38:14 [INFO] [startListening] processing command  set,stick,13
27/10/21 11:38:14 [INFO] [processCmd] #args is 3
27/10/21 11:38:14 [INFO] [processCmd] set
27/10/21 11:38:14 [INFO] [processCmd] stick
27/10/21 11:38:14 [INFO] [processCmd] 13
27/10/21 11:38:14 [INFO] [setStick] committing state to joystick hardware -> U360_1
27/10/21 11:38:14 [INFO] [setWay] setting U360_1 to 13 (4-Way, No Sticky (UD Bias))  success
27/10/21 11:49:20 [INFO] [startListening] eot detected on socket - clearing socket buffer 13
27/10/21 11:49:20 [INFO] [startListening] processing command  exit
27/10/21 11:49:20 [INFO] [processCmd] #args is 1
27/10/21 11:49:20 [INFO] [processCmd] exit
27/10/21 11:49:26 [INFO] [startListening] eot detected on socket - clearing socket buffer 13
27/10/21 11:49:26 [INFO] [startListening] processing command  disconnect
27/10/21 11:49:26 [INFO] [processCmd] #args is 1
27/10/21 11:49:26 [INFO] [processCmd] disconnect
27/10/21 11:49:26 [INFO] [startListening] selectserver: socket 13 gracefully disconnected

I just don't see how to make it hook into MAME and work.

J_K_M_A_N

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #303 on: October 27, 2021, 12:16:53 pm »
@J_K_M_A_N,

If you want to hook it up to MAME, you need to use the current version MAME binary, wich is located under /home/pi/mame. The configuration file (mame.ini) of this binary MAME is located under /home/pi/.mame/ini.

I read on the RGB Commander website (http://users.telenet.be/rgbcommander/) that MAME up to version 0.199 is working OK with the daemon's communication system, but starting from 0.200, it's broken:

Quote
Linux : ? <-> 0.200 <-> ? - Mame's communication system has been fixed but it functions differently then before rendering the daemon's communication system useless.

So, to recap, the new communication system functions from 0.188 up to maximum 0.192....
Personal project:
How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400
https://gist.github.com/sonicprod/f5a7bb10fb9ed1cc5124766831e120c4

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #304 on: October 27, 2021, 12:58:39 pm »
@J_K_M_A_N,

If you want to hook it up to MAME, you need to use the current version MAME binary, wich is located under /home/pi/mame. The configuration file (mame.ini) of this binary MAME is located under /home/pi/.mame/ini.

I read on the RGB Commander website (http://users.telenet.be/rgbcommander/) that MAME up to version 0.199 is working OK with the daemon's communication system, but starting from 0.200, it's broken:

Quote
Linux : ? <-> 0.200 <-> ? - Mame's communication system has been fixed but it functions differently then before rendering the daemon's communication system useless.

So, to recap, the new communication system functions from 0.188 up to maximum 0.192....

Well, that is a bummer. :( I guess I will have to figure something else out. Thanks again for all your help. I really like the build. I like using the newest version of Mame. The emulation is really nice (and no sound samples for Donkey Kong). I also really like how simple it is. No extra clutter. Oh well.

J_K_M_A_N

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #305 on: October 27, 2021, 03:51:09 pm »
So I was able to make separate INI files for each game and I can use the joystick_map in those INI files. I think this will work.  :applaud:

J_K_M_A_N

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #306 on: October 27, 2021, 05:20:25 pm »
One last question. Can I make the sound come out of the 3.5 jack instead of HDMI? I have a small amp hooked up to some speakers. The monitor doesn't have audio out. Thanks.

EDIT: Never mind. I found it.

In case anyone else needs the info, SSH into the PI and use the following commands:
Code: [Select]
rw
sudo raspi-config
     Then go into the main settings and then audio and change it from HDMI to Audio Jack (whatever that option was)
ro
exit

Then it should be working. You may have to reboot for the setting to be set.

J_K_M_A_N
« Last Edit: October 27, 2021, 05:37:08 pm by J_K_M_A_N »

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:Yesterday at 03:23:20 pm
Re: How to make a dedicated MAME 0.236 Appliance on a Raspberry Pi 4/Pi 400
« Reply #307 on: October 31, 2021, 10:08:57 am »
Awesome - glad to see someone else using this! 

Thanks for the note on how to get audio out of the headphone jack.  I will definitely need to do this for my final build.

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #308 on: October 31, 2021, 01:46:08 pm »
Just to let you know the availability of the NEW disk image file with MAME 0.237 (please see the original post of this thread for the download link).  :cheers:

The Hypseus binary has been updated to v2.6.17-RPi, wich fix the SDL assertion problem I had previously, so no more patching is required prior to build.  :D

Please note that you will need to move your High-Scores files from /data/mame/hi to /data/mame/lua/hiscore, or alternatively make a symlink like this (prior to the first execution of MAME 0.237):

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

Samson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:March 23, 2022, 04:18:46 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #309 on: October 31, 2021, 01:49:31 pm »
Just want to add another big thanks for all the work that went in to this.   I built a bartop using this image with Attract Mode and the Nevato theme and it turned out great!
Thanks again :)

bbegin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 186
  • Last login:February 05, 2024, 07:23:14 pm
  • Arcade games enthusiast, bartop arcade project WIP
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #310 on: November 01, 2021, 02:39:28 pm »
I want to take the time to thank everyone of you who helped me and supported me with this custom Raspberry Pi 4 MAME/arcade image.

Your kind words and appreciation is a great payback for me.

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

DirtBagXon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:July 05, 2023, 09:14:03 am
    • Hypseus Singe
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #311 on: November 01, 2021, 09:04:21 pm »
The Hypseus binary has been updated to v2.6.17-RPi, wich fix the SDL assertion problem I had previously, so no more patching is required prior to build.  :D

Excellent news to know it fixed the assertions on this image too, sorry I didn't catch it first time :)

DBX

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #312 on: November 02, 2021, 09:00:30 pm »
GPIOnext works on this as well. I recommend that for admin buttons (especially if they are attached to the box and not the CP). Here are some quick instructions for installing that.

First, you need to wire at least one button to the GPIO pins. Use a ground and one of the open pins (I start with green but you can usually use the yellow also).



Then SSH into the PI (putty or whatever).

Code: [Select]
rw
cd ~
git clone https://github.com/mholgatem/GPIOnext.git
bash GPIOnext/install.sh

After it gets installed (takes a few minutes), hit 'y' to go into the setup. I set mine up as a keyboard as they are admin buttons. It then gives you a list of pretty much all the keys on the keyboard and you scroll down to each that you want to set up and hit SPACE (it will show an 'X' for that key). Once you select all the keys you want to set up, hit ENTER and it will ask you to hold down the button for each key you selected to set up. Hold it down until it says to release the button (and even a second or two longer), then it should go to the next key. Once you are done, you can go to EXIT. Once you exit, you can reboot or just type 'gpionext start'.

If you need to reconfigure the keys (or add some keys), you can stop the service by typing 'gpionext stop' and then 'gpionext config'. Just be sure to start it again after you are done (or reboot).

One thing I also do. When the service is stopped, I use this command.

Code: [Select]
gpionext set debounce 1
That will lower the debounce value which seems to work better for me. The default is 20 (I think for combo buttons..look it up if you want).

Thanks again for the build. I like it. The newer MAME has the joystick maps that work with the U360 so I don't need to mess with RGBCommander. I just leave my U360 in analog mode and use INI files for the joystick maps.  :applaud:

J_K_M_A_N

Samson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:March 23, 2022, 04:18:46 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #313 on: November 04, 2021, 01:34:50 pm »
GPIOnext works on this as well.

Can confirm,  made a two player bartop with total of 2 joys, 12 player buttons, 2 player start and 2 coin buttons using just GPIO and it worked perfectly. ( no specific admin buttons, just combos for escape and shutdown. )

I really like this image!

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7901
  • Last login:Yesterday at 03:23:20 pm
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #314 on: November 05, 2021, 12:08:10 pm »
GPIOnext works on this as well. I recommend that for admin buttons (especially if they are attached to the box and not the CP).

So no keyboard encoder or joystick encoder is required?  I'm only going to use a 4-way, 2 action buttons and 4 admin buttons (P1 start, P2 start, Pause and P1 Coin with Exit being set up as a P1 start + Pause combo).  10 total inputs although maybe 11 with P2 Coin since I have a 2P coin door.  Is this doable with just the GPIO pins on the pi4?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9393
  • Last login:Today at 02:54:41 am
  • Designated spam hunter
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #315 on: November 05, 2021, 01:24:50 pm »
10 total inputs although maybe 11 with P2 Coin since I have a 2P coin door.  Is this doable with just the GPIO pins on the pi4?
There are 12 "green" pins available so yes, it is easily doable.




Scott

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 10:11:07 pm
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #316 on: November 05, 2021, 01:40:51 pm »
You can also use the yellow if you are not using a PiTFT, I2C, Serial or I2S (you COULD be using the PiTFT for a project like this but probably not the other 3).

There is also a program called Retrogame that works with the GPIO pins. I have used both. I like GPIOnext just because it is easier to set up. Retrogame uses cfg files that look something like this.

Code: [Select]
# Sample configuration file for retrogame.
# Really minimal syntax, typically two elements per line w/space delimiter:
# 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).
# 2) a GPIO pin number; when grounded, will simulate corresponding keypress.
# Uses Broadcom pin numbers for GPIO.
# If first element is GND, the corresponding pin (or pins, multiple can be
# given) is a LOW-level output; an extra ground pin for connecting buttons.
# A '#' character indicates a comment to end-of-line.
# File can be edited "live," no need to restart retrogame!

# Here's a 6-button configuration:

UP         4  # '4 WAY UP' button/direction
DOWN      17  # '4 WAY DOWN' button/direction
LEFT      27  # '4 WAY LEFT' button/direction
RIGHT     22  # '4 WAY RIGHT' button/direction
A         18  # 'A' button
S         23  # 'B' button
C         24  # 'C' button
P         25  # 'PAUSE' button
L          8  # 'SPEED UP' button
W          7  # 'COIN' button
ESC       12  # 'EXIT' button - ESCAPE
X         20  # 'PLAYER 2 START' button - SELECT
Z         21  # 'PLAYER 1 START' button - START
UP         5  # '8 WAY UP' button/direction
DOWN       6  # '8 WAY DOWN' button/direction
LEFT      13  # '8 WAY LEFT' button/direction
RIGHT     19  # '8 WAY RIGHT' button/direction
F4   16  # Load State Button
F2   26  # Save State Button
ENTER  20 21  # Hold Start+Select to hit ENTER

# For configurations with few buttons (e.g. Cupcade), a key can be followed
# by multiple pin numbers.  When those pins are all held for a few seconds,
# this will generate the corresponding keypress (e.g. ESC to exit ROM).
# Only ONE such combo is supported within the file though; later entries
# will override earlier.

And I think it only acts like a joystick. The nice thing about it is the ability to have a kind of hotkey (see "ENTER" above).

J_K_M_A_N

Samson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:March 23, 2022, 04:18:46 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #317 on: November 07, 2021, 11:10:50 am »
For anyone interested, I put together a list of roms for the pi 4 build I recently made. To create the list,  I started with the 'all killer no filler' lists, and cross checked them against the pi4 benchmarks from here : https://www.retrorgb.com/raspberry-pi-mame-benchmarks.html

Anything that ran under about 115% was removed.    The benchmarks were on a slightly older mame, so I manually removed a few games that seemed to be unplayable, like Astroblaster.  Asteroids deluxe, Star Castle and a few other games also ran poorly and were removed.  I didn't have time to extensively play all the games in the list, but I did at least start them all and in general see if they seemed to be working correctly.   I did try to remove obvious clones and dupes, favoring US versions of games.   At the end, there were about 465 games total.  ( Games using two joysticks like Robotron are included, so if you have a single player cab you might want to remove )

Romlists.7z contains several romlists generated for attract mode, broken into a few categories.  Hopefully the categories are self explanatory.  ( Classic arcade is just a personal list and not meant to be comprehensive. )  I did my best to remove clones and dupes from the lists, and place them in alphabetic order.  ( games that start with 'the' are listed under the first letter of the game name, not under 't' for example )

Romnames.txt contain the names of the roms needed to launch all the games in these lists.


Here is a link to the artwork files for Attract Mode for all the roms in these lists.  This should include the marquees, vids, flyer art, and 'wheel' art for all the games in the rom lists.  I had to create a few wheel and marquee images as I couldn't seem to find a complete art set - maybe you had better luck :) 
https://drive.google.com/file/d/1jSObAt-xrPtZE3ekeuQEa3iP5QXCfSRZ/view?usp=sharing

Attract.7z is the zipped attract mode folder from my build, minus the art.  It uses the Nevato theme ( slightly modified to display the text of the game name and the game category ) with a display set up for each rom list category, so you can change lists easily.  The Nevato theme is set up to display the marquee, the game vid snaps, shaded flyer art as a background, and wheel images for the game select 'wheel'.  If you want to try this you will need to re-map the attract mode key/control bindings to whatever you are using.  If you want to use the Attract Mode theme linked above, unzip the artwork directories into the 'MAME' directory that is inside the 'scraper' directory in the attract mode zip.

It was a few versions of mame ago on this image when I put this together, so you may want to verify the roms if running on .237

I'm not claiming this is any kind of definitive game list, but maybe could be a place to start for someone looking to use a pi :)

If anyone looks at this, I'd love to know what I omitted, miss categorized etc!






 

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.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #318 on: November 07, 2021, 06:10:52 pm »
For anyone interested, I put together a list of roms for the pi 4 build I recently made.

I just want to say thanks for this. As a newbie to the Pi and MAME this has been really helpful in filtering the 13,464 ROMs that I have down to a far more sensible 644 (I added a couple of ones that I like but you'd removed, such as Spy Hunter).

mallard

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:December 11, 2022, 11:07:18 pm
  • I want to build my own arcade controls!
Re: How to make a dedicated MAME 0.237 Appliance on a Raspberry Pi 4/Pi 400
« Reply #319 on: November 11, 2021, 08:20:35 pm »
Hello,

I've been trying to use this image, and I'm very appreciative that you've created it, but I do have a couple questions:

Is the BGFX graphics mode not available in this image? I believe I was using it when running Mame on top of raspbian normally, but with this image, any option other than "accel" causes games to straight-up not load.

Is that intentional behaviour?

Also, is there a trick to setting the resolution of the display? I have my pi plugged into a 1440p display, but rendering at that resolution makes these games impossible to play, and very slow. In Raspbian, I used the regular display configure settings, but using raspi-config through SSH here doesn't seem to be doing anything... am I missing something?