ARpiCADE_5 - for Pi4 or Pi5

Latest on ARpiCADE new releases, release notes, and history of previous versions.

Moderator: dee2eR

dee2eR
Inventor
Inventor
Posts: 1916
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by dee2eR » Sat Sep 14, 2024 4:50 am

Can confirm. It looks like I forgot to copy /home/pi/.mame/cfg/default.cfg from my testing builld to the release build. Not sure why some games seem fine... I'll upload a quick fix for it and add it to the first post of the thread [EDIT: it's done now].

Occasional not loading I really am not sure about. I'll have to keep an eye out for it to figure that one out.

mappy24
Contributing Member
Contributing Member
Posts: 25
Joined: Sun Jul 18, 2021 9:17 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by mappy24 » Sun Sep 15, 2024 11:07 pm

Slowly going through the game list to make sure everything is working, still on the letter A!

I've got another strange control issue in 0.251.

Normally, the input devices are:
1. RaspberryJAMMA_P1
2. RaspberryJAMMA_P2

When it's like this, everything works fine.

Occasionally, when loading up a ROM I'll have an extra input device:

1. Xbox Gamepad (userspace driver)
2. RaspberryJAMMA_P1
3. RaspberryJAMMA_P2

And the controls are all messed up, Joy1 becomes Joy 2 and Joy2 becomes Joy 3.

I just loaded another game and now I have:
1. Xbox Gamepad (userspace driver)
2. Xbox Gamepad (userspace driver)
3. RaspberryJAMMA_P1
4. RaspberryJAMMA_P2

And, just loaded Andro Dunos and now I have:
1. Xbox Gamepad (userspace driver)
2. RaspberryJAMMA_P1
3. RaspberryJAMMA_P2
4. Xbox Gamepad (userspace driver)

Rebooting fixes this and restored the normal 2 RaspberryJAMMA input devices, any ideas?!

Also, more worryingly, if I restart my cab, the Pi5 seems to frequently not boot, I'm wondering if this is a voltage tweak needed?

dee2eR
Inventor
Inventor
Posts: 1916
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by dee2eR » Mon Sep 16, 2024 3:50 am

Not sure re. the sometimes not restarting (do you mean when restarting from the service menu/command line/software in some way or the cab itself?). I experienced some similar behaviour rebooting when I was playing with overclocking and ended up with a slight underclock in config.txt as it seemed to improve stability in some situations when powered via GPIO (pretty sure Pi5 is pushing how much power can be delivered via ribbon cable). Could be power related, may be something else. What is your 5v reading at the JAMMA edge? Also what model Pi5? I've been swapping between the 3 diff Pi5s I own and Pi4s during testing pretty randomly, it's possible there's some subtle behaviour differences I'm missing in testing. If you haven't been already and do have the Pi5 not restart again try pressing the little reset button on it near the SD card slot - not really a fix but should save you power cycling the whole cab.

The xbox driver thing is the hotkeys... that said, what you're experiencing shouldn't be happening (obviously). Especially the 2 instances at once shouldn't happen because they should be stopped after exiting the emulator, something weird must have happened there. Currently the hotkeys start after a sleep timer so the emulator can start up before them in an attempt to work around this sort of thing. It is probably worth trying a longer timer in /usr/local/bin/hotkeys (it is currently: 'sleep 6').

I will do some more testing. Hopefully I can find some better answers than that.

Thank you for all the feedback.

mappy24
Contributing Member
Contributing Member
Posts: 25
Joined: Sun Jul 18, 2021 9:17 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by mappy24 » Mon Sep 16, 2024 6:13 pm

The voltage was nearly 5.5v so I've dialled it back to 5.1, maybe that was the issue there. Thanks for the reset button tip, I didn't even know that was there :lol:

As for the controls, I altered sleep=6 to sleep=12 in /usr/local/bin/hotkeys and it made the rom loading issue a lot worse. Dialled it back to 8 and I'm still seeing the Xbox Gamepad (userspace driver) taking over position 1 and on one occasion it was the first 3 input devices before RaspberryJAMMA in positions 4 and 5.

This is still all on MAME251 and makes it pretty unusable.

Hoping you can find the cause and fix!

dee2eR
Inventor
Inventor
Posts: 1916
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by dee2eR » Tue Sep 17, 2024 6:28 am

Didn't have any luck replicating the xboxdrv appearing in MAME issue. Possibly didn't load enough games for it to happen, possibly it's just happening when [unknown] occurs. Hopefully whatever it is I can figure it out.

Could you try adding:

Code: Select all

hotkeys stop
to the mame251 launcher, put it on the line before the line that starts the hotkeys. In theory it should stop any extra instances of xboxdrv that are already running.

I did find a couple of config.txt settings worth trying if you have the active cooler on your Pi5. I noticed the fan was barely ever running and am trying it running more often (hoping to keep the heat out of the ribbon cable as the resistance in the cable goes up with the temp). My [pi5] section of config.txt currently looks like:

Code: Select all

[pi5]
## use fan at lower temps
dtparam=fan_temp0=30000
dtparam=fan_temp1=45000

## experimental overclocking
#arm_freq=3000
#gpu_freq=1000

## underclock good for stability if powering via GPIO
#arm_freq=2200
gpu_freq=600
On my test bench these settings don't give me any issue with rebooting, however, if I comment out the GPU underclock I get the reboot doesn't reboot issue you are experiencing (at least when using my 4gig Pi5, haven't tested the other 2 yet). The CPU underclock I had in the release config.txt doesn't seem necesary, at least on my test bench and 4gig Pi5. Haven't yet, but I'll try running the fan full speed all the time as it's not like it has to be silent when mounted in a cab (it's probably quieter than my CPS2s fan).

5.5v was definately too high, if it actually ran better this high it suggests your JAMMA loom power wiring is inadequate. What is the 5v and GND wire on your JAMMA loom like? (single aluminium wire (most new JAMMA harness'), 4x copper (most older JAMMA harness')?) Unless the difference is our individual Pi5s I can't think of why else we would have different results on the same settings (unless it's the weather itself, it's pretty cold here - if it's hot where you are maybe it's more borderline due to that... if so I'm sure I'll find out in a couple of months).

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 339
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by cool_factor » Tue Sep 17, 2024 8:47 pm

dee2eR wrote:
Mon Sep 16, 2024 3:50 am
Not sure re. the sometimes not restarting (do you mean when restarting from the service menu/command line/software in some way or the cab itself?). I experienced some similar behaviour rebooting when I was playing with overclocking and ended up with a slight underclock in config.txt as it seemed to improve stability in some situations when powered via GPIO (pretty sure Pi5 is pushing how much power can be delivered via ribbon cable). Could be power related, may be something else. What is your 5v reading at the JAMMA edge? Also what model Pi5? I've been swapping between the 3 diff Pi5s I own and Pi4s during testing pretty randomly, it's possible there's some subtle behaviour differences I'm missing in testing. If you haven't been already and do have the Pi5 not restart again try pressing the little reset button on it near the SD card slot - not really a fix but should save you power cycling the whole cab.

The xbox driver thing is the hotkeys... that said, what you're experiencing shouldn't be happening (obviously). Especially the 2 instances at once shouldn't happen because they should be stopped after exiting the emulator, something weird must have happened there. Currently the hotkeys start after a sleep timer so the emulator can start up before them in an attempt to work around this sort of thing. It is probably worth trying a longer timer in /usr/local/bin/hotkeys (it is currently: 'sleep 6').

I will do some more testing. Hopefully I can find some better answers than that.

Thank you for all the feedback.

Out of curiosity is there a sleep timer for the usb ports? my grs star wars yoke freaks out the settings unless i wait about 10 seconds while booting and then plug it into the usb ports. results are inline with Mappys. this is on the pi4, im sure the pi5 will be the same results.

mappy24
Contributing Member
Contributing Member
Posts: 25
Joined: Sun Jul 18, 2021 9:17 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by mappy24 » Tue Sep 17, 2024 9:17 pm

I do have the active cooler, so I've set my config.txt the same as yours. The cab was probably at 5.5v due to an old JAMMA arcade board that needed the extra volts. It's a 90s JAMMA cab with good, solid 4xcopper wires on the 5v line.

Anyway, my mame251.sh contains this now:

Code: Select all

# launch hotkeys late in background so xboxdrv not picked up by mame
hotkeys stop
hotkeys start &
mame $1 $aconfig $ror
and set the /usr/local/bin/hotkeys back to sleep 6

Games still sometimes take 2-5 attempts to load and when they do load I've been checking the Input settings. Most of the time, the xboxdriver isn't there at all.
Sometimes the xboxdriver is in position 3, so the controls still work OK, but occasionally it's in position 1 which means the controls no longer work correctly.

See this video of me trying to launch the game "Bay Route", it takes two attempts to launch and then starts witht the xboxdriver in position 1:
https://photos.app.goo.gl/ho2e6H6LyEndp9L79

dee2eR
Inventor
Inventor
Posts: 1916
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by dee2eR » Wed Sep 18, 2024 4:55 am

cool_factor wrote:
Tue Sep 17, 2024 8:47 pm
Out of curiosity is there a sleep timer for the usb ports? my grs star wars yoke freaks out the settings unless i wait about 10 seconds while booting and then plug it into the usb ports. results are inline with Mappys. this is on the pi4, im sure the pi5 will be the same results.
No, USB items that follow the standards are handled automatically by the kerrnel. If you had to run a driver for them (eg. a Sinden gun) then you could add a delay, anything using standards won't need a driver though as it's already in the Linux kernel. I can only put the timer on the hotkeys startup because it's all scripted start/stop xboxdrv.

It is possible that there will be things we haven't been able to use before that may help as there is a lot more GUI based OS in the background than on earlier ARpiCADE builds. The random numbering of peripherals has to be one of my least favourite things about Linux... UDEV rules etc. tend to get broken with updates over time.
mappy24 wrote:
Tue Sep 17, 2024 9:17 pm
Games still sometimes take 2-5 attempts to load and when they do load I've been checking the Input settings. Most of the time, the xboxdriver isn't there at all.
Sometimes the xboxdriver is in position 3, so the controls still work OK, but occasionally it's in position 1 which means the controls no longer work correctly.

See this video of me trying to launch the game "Bay Route", it takes two attempts to launch and then starts witht the xboxdriver in position 1:
weird, it's like something is slowing down MAMEs startup or causing it not to start properly. I'll keep testing and see if I can replicate it, haven't been able to yet. Is it only 251 that does it for you?

mappy24
Contributing Member
Contributing Member
Posts: 25
Joined: Sun Jul 18, 2021 9:17 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by mappy24 » Wed Sep 18, 2024 6:57 am

I've only copied over the 251 romset at this point, just going through the list to see what works and what doesn't.

mappy24
Contributing Member
Contributing Member
Posts: 25
Joined: Sun Jul 18, 2021 9:17 pm

Re: ARpiCADE_5 - for Pi4 or Pi5

Post by mappy24 » Wed Sep 18, 2024 8:33 pm

OK, I'm not sure if this helps, but I've discovered that I can exit attract mode which gives me a terminal, then if I enter 'attract' the terminal stays open and shows me a log. In this log below, I launched Cabal, which ran fine, then quit the game. This is what's logged when a game runs OK:

Code: Select all

*** Running: /boot/firmware/launchers/mame251.sh cabal
/boot/firmware/launchers/mame251.sh: line 55: [: ==: unary operator expected
xboxdrv: no process found
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:39:34: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:40:29: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:41:29: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:42:29: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:43:29: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:44:27: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:45:27: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:46:27: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:47:27: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:48:29: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:49:29: string literal is not a valid UTF-8 string
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:49:29: too many errors
xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:49:29: failed to parse file
warning: queue 0xfe142f0 destroyed while proxies still attached:
  wl_callback@44 still attached
  wl_surface@31 still attached
 - Loaded layout: /usr/local/share/attract/layouts/Basic/ (layout.nut)
 ! Unexpectedly lost focus to: Unknown
 - Working directory: /boot/firmware/launchers
 
Then I ran the game below it in the menu, Dino something-or-other (can't remember the exact title) this game failed to load and this is what was logged:

Code: Select all

*** Running: /boot/firmware/launchers/mame251.sh dino
/boot/firmware/launchers/mame251.sh: line 55: [: ==: unary operator expected
/boot/firmware/launchers/mame251.sh: line 70: 10007 Segmentation fault      mame $1 $aconfig $ror
xboxdrv: no process found
 - Loaded layout: /usr/local/share/attract/layouts/Basic/ (layout.nut)
Failed to get vendor ID of joystick /dev/input/js2
Failed to get product ID of joystick /dev/input/js2
 ! Unexpectedly lost focus to: Unknown
Failed to get vendor ID of joystick /dev/input/js3
Failed to get product ID of joystick /dev/input/js3
Does this help at all?! Is it something to do with the segmentation fault at line 70 which causes the game not to load, but then the mame251 script isn't completing and causes the controls to be messed up when loading the next game? Just guessing.

Post Reply