Vegz78 / McAirpos

MakeCode Arcade games in RetroPie, Recalbox 7/8 and Batocera, running natively as ELF executables on Raspberry Pi OS/Linux ARM with 1-2 gamepads

Home Page:https://Vegz78.github.io/McAirpos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[GPi Case + Zero + Recalbox v8.1.1] Unable to launch game on recalBox 8.1.1 and GPi Case

GabrielSoranzoUPEC opened this issue · comments

I installed McAirpos without any problem on recalBox 8.1.1-Electron (RPi zero 32 bits) on a GPi Case. The folder Makecode appears and I put in it a game in .elf file type get from your internet link. the game appears well in recalBox but it doesn't launch. The following error message appears:
DSC_0284

When I launch the game from ssh I get the following log:
launCharc starting /recalbox/share/bootvideos/makecode/arcade-jumpy-platformer.elf with automatic gamepad mappings...

Highest found input event number: 1
Gamepad search hits:
/home/pi/McAirpos/McAirpos/uinput-mapper/input-read -vp /dev/input/event0 2>&1 | grep -e BTN_START -e BTN_SOUTH -e BTN_PINKIE, Output: BTN_START → ([0, EV_KEY], BTN_START)

Found 1 gamepad to configure on:
/dev/input/event0

Starting UInput-Mapper with command:
(/home/pi/McAirpos/McAirpos/uinput-mapper/input-read -C -D /dev/input/event0 /dev/input/event0 | /home/pi/McAirpos/McAirpos/uinput-mapper/input-create -C -S /home/pi/McAirpos/McAirpos/uinput-mapper/configs/arcade1.py &)
Setting up UInputMapper in MakeCode Arcade game's /sd/arcade.cfg with:
SCAN_CODES=/dev/input/event1

Warn: ioctl KBGKBMODE failed...
Unable to get your keyboard mode.
Warn: ioctl KDSETMODE failed...
Are you on a terminal emulator(X-Windows) instead of the Linux console?
/recalbox/share/bootvideos/makecode/arcade-jumpy-platformer.elf: /usr/lib/libasound.so.2: no version information available (required by /recalbox/share/bootvideos/makecode/arcade-jumpy-platformer.elf)
[995790040] GC block 16376b @ 0x20000000
[ 0] runtime starting, pid=1590...
[ 6] FB: BCM2708 FB at 320x240 320x240 bpp=32
[ 24] FB: BCM2708 FB at 320x240 320x480 bpp=32 1280
[ 28] init keys
[ 38] read config: /sd/arcade.cfg
[ 46] SCAN_CODES=/dev/input/event1
[ 50] BTN_LEFT=30
[ 54] BTN_RIGHT=32
[ 57] BTN_UP=17
[ 64] BTN_DOWN=31
[ 67] BTN_A=29
[ 67] BTN_B=42
[ 69] BTN_LEFT2=105
[ 69] BTN_RIGHT2=106
[ 77] BTN_UP2=103
[ 81] BTN_DOWN2=108
[ 84] BTN_A2=100
[ 85] BTN_B2=57
[ 91] BTN_RESET=59
[ 94] BTN_EXIT=1
[ 95] BTN_MENU=60
[ 103] config done
[ 106] sx=2 sy=2 ox=0 oy=0 32=1
[ 108] fbuf=0xb6362000 sz:307200
[ 112] loop
[ 370] GC block 16376b @ 0x20004000

launCharc: Found running game process "arcade-jumpy-pl" on PID=1590

ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card
[ 1271] alsa fail! pos=0 err=-2: No such file or directory
[ 1287] PANIC 950
[ 1289] errno=2 No such file or directory

/recalbox/share/bootvideos/makecode/arcade-jumpy-platformer.elf was executed successfully and the parent process was exited by the user or reset in-game. The game might still be running in a child process...

PID not found for "arcade-jumpy-pl", trying again...
PID still not found for "arcade-jumpy-pl", game exited?
Terminating launCharc...
killall: arcade-jumpy-pl: no process killed
Warn: ioctl KDSETMODE failed...
Are you on a terminal emulator(X-Windows) instead of the Linux console?
Warn: ioctl KBSKBMODE failed...
Unable to set your keyboard mode.
Warn: ioctl VT_UNLOCKSWITCH failed...
Are you not a super-user? (This should normally not affect game launch...)

It is clear here that here the problem comes from the terminal emulator, but I don't know
how to launch the game from a distant terminal. I also can't get the /tmp/McAirpos.log which doesn't appears after launching the game.
One possible problem is that I can't make the game.elf executable:
for the folder:
drwxr-xr-x 1 root root 32768 Dec 22 20:34 makecode
but inside the folder:
-rw-r--r-- 1 root root 373514 Dec 22 20:34 arcade-jumpy-platformer.elf
-rw-r--r-- 1 root root 256 Dec 22 20:56 gamelist.xml

chmod 755 *.elf doesn't change that (no sudo in recalbox).

Thanks for your help!

Hi @GabrielSoranzoUPEC,

Thanks for trying McAirpos!

I regret that it is not working for you right out of the box. There is a small chance of code rot, as I can see that Recalbox has evolved with a couple of new releases since the Recalbox support for Electron(v8.0.0) was implemented and tested; https://gitlab.com/recalbox/recalbox/-/blob/master/RELEASE-NOTES.md

Now, during Christmas time, I have little trouble finding time to install and check everything myself, and maybe patch for later updates of Recalbox Electron, if needed. Sorry about that.

But what I know from the top of my head is:

  1. Recalbox from v8/Electron does(at least did) some new things regarding HDMI audio, which does not put the alsa audio interface on the first position(0), which is needed for MakeCode Arcade(MCA) games to launch(crashes otherwise). This might be indicated from your /tmp/McAirpos.log:

ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card
[ 1271] alsa fail! pos=0 err=-2: No such file or directory
[ 1287] PANIC 950
[ 1289] errno=2 No such file or directory

To remedy this, there is a HDMI-fix script or installer script for Electron/v8.0.x for HDMI-audio.(NB! But please DO NOT run this script unless you are certain that the GPi Case uses HDMI for audio!; https://github.com/Vegz78/McAirpos#quick-automatic-installation-for-recalbox).

But it might be worth looking at these scripts and play around with audio settings yourself in the console, and see if the working ALSA audio interface, in fact, is in postition 0, and the reason for the games crashing.

  1. There have been other issues, so far unresolved, with the screen buffer on GPi cases, but @rdmueller tested on a GPi case with Recalbox with no problems, and this error seemed to appear later with the game running in only half of the screen, or something.

Anyways, the best thing would be if you could try launch the game from within the Recalbox menu, and copy out the error log via ssh. (However you say that it does not even write out a log when attempting this?)

Is it possible for you to connect a keyboard directly to the RPi inside the GPi case somehow, and exit from the Recalbox menu and run the games with launCharc from the local console, and not remotely via ssh? And then provide a copy here of the /tmp/McAirpos.log?

Thanks for your so quick answer!

1a. Sadly I have already made the script, and I do not know how to remove McAirPos to reinstall it without the script.
1b. For the audio interface: "cat /proc/asound/modules" answers "1 snd_bcm2835". Does it help?
2. I can't use the local console (can't connect a keyboard on my GPi) so I can't start launCharc locally, so I can't see the errors. Impossible to see where is the McAirpos.log (the find command don't find it).

The only log message that I can get is in es_launch_stdout.log which says:

usage: launCharc [nomap / keybswap / verbose] [/path/to/arcadegame.elf]

as if launchCharc was badly used by recalbox.

An other strang thing is that the recalbox manager doesn't show any rom:

Capture d'écran Deepin_zone de sélection _20221223112805

but the game appears well in the gamelist.xml and in the GPi.

Thanks for your so quick answer!

No worries, I try to help the best that I can, but it is hard both during Christmas with lots of family gatherings and because I do not have the same setup as you with the GPi case and all. But, let's try!

1a. Sadly I have already made the script, and I do not know how to remove McAirPos to reinstall it without the script.

Which script have your run and what is the physical audio output of the RPi to the GPi case?
(The first script for jack/usb is less invasive, the HDMI changes the location of the ALSA interface, putting HDMI as 0:0)
I believe to remember that the HDMI script makes backups of the old setting, so you could try to reverse the operations inside the HDMI-fix-script, depending on whether you want HDMI or not.

1b. For the audio interface: "cat /proc/asound/modules" answers "1 snd_bcm2835". Does it help?

It should show something on 0, like 0 snd_bcm2935.

  1. I can't use the local console (can't connect a keyboard on my GPi) so I can't start launCharc locally, so I can't see the errors.

Depending whether the framebuffer is free and the system's setup of the default console, it is sometimes possible to launch MCA games locally through ssh. I don't remember in my head for Recalbox, or maybe it has changed in newer version, but is it possible for you to exit to the console locally somehow without keyboard before running via ssh?

Impossible to see where is the McAirpos.log (the find command don't find it).

If there is no log when launching from within Recalbox, it does not seem to execute at all. But from the ssh logs, there are strong indications that ALSO audio device not found on position 0:0 might be the issue.

The only log message that I can get is in es_launch_stdout.log which says:
usage: launCharc [nomap / keybswap / verbose] [/path/to/arcadegame.elf]
as if launchCharc was badly used by recalbox.

It might seem like launCharc is run without a game file from the Recalbox menu, yes...

An other strange thing is that the recalbox manager doesn't show any rom:
but the game appears well in the gamelist.xml and in the GPi.

Yes, MakeCode Arcade games are not really integrated fully into Recalbox, but rather "slipstreamed" underneath, with the MCA system and game roms showing up in the menu.

The best thing, if you can not figure this out or get help from anyone else in the community or from the issues here, is that I install the same image as your on one of my RPi3s and see if I can reproduce and/or fix the problems.

However, I will sadly not be able to do this until ultimo next week, and maybe the issue is with the GPi case, which I can not reproduce here. Is it possible to take your RPi out of the GPi case and in the meantime tinker with keyboard regular screen connected, maybe, without too much hassle?

I understand how frustrating this is, when you have put in a lot of effort and want to be finished before Christmas yourself. I am sorry about that, but my hands are tied until next week.

Wish you a merry Christmas in the meantime!

Br,
Vegard

Happy new year! Just bought a used GPi case with a RPi Zero, so maybe now I can reproduce your problem and help a bit more.

Happy new year! That sounds great!

commented

Any progress with this, @GabrielSoranzoUPEC?

So far I have only had trouble with my 2nd hand GPi case, which turned out to be a worn out SD-card. With a fresh SD-card I tried first with the newest RetroPie image, but I got stuck with audio issues before I had to take a break.

I will try with the same recalbox version as you the next time I get an opportunity to look at this, unless you have already solved the problem?

No progress in my side.