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
https://Vegz78.github.io/McAirpos
MIT License
80 stars 10 forks source link

[Recalbox 9] Unable to launch game on GPI 2w #51

Open Overboard-code opened 10 months ago

Overboard-code commented 10 months ago

It looks like /usr/bin/launCharc does not like Emulation Stations parameters. -rotation 0 -resolution 640x480 -nodefaultkeymap

When I try to launch sample Jumpy.elf from MakeCode Just fails and returns to screen. es-log has:

[2023/08/15 16:53:57.353] (INFO ) : [Run] Command: /usr/bin/launCharc /recalbox/share/roms/makecode/arcade-jumpy-platformer.elf -rotation 0 -resolution 640x480 -nodefau
ltkeymap
[2023/08/15 16:53:57.354] (INFO ) : [Hardware] Start in-game Hardware processes
[2023/08/15 16:53:57.436] (INFO ) : [Hardware] Stop in-game Hardware processes
[2023/08/15 16:53:57.445] (INFO ) : [MQTT] Publishing to tcp://127.0.0.1:1883 from recalbox-emulationstation OK!
[2023/08/15 16:53:57.446] (WARN!) : [Run] Non-Zero exit code 1 !
[2023/08/15 16:53:57.522] (INFO ) : [Renderer] Initial resolution: 640x480
[2023/08/15 16:53:57.523] (INFO ) : [Renderer] Creating surface...
[2023/08/15 16:53:57.523] (INFO ) : [Renderer] Trying Resolution: 640,480
[2023/08/15 16:53:57.545] (INFO ) : [Renderer] Created window successfully.
[2023/08/15 16:53:57.564] (INFO ) : [Renderer] Activating vertical sync'
[2023/08/15 16:53:57.564] (INFO ) : [Renderer] Normal VSync' activated.
[2023/08/15 16:54:00.493] (INFO ) : [AudioManager] SDL AUDIO Initialized

And: cat es_launch_stdout.log usage: launCharc [nomap / keybswap / verbose] [/path/to/arcadegame.elf]

So it looks like the code wants parameters that are wrong.

If I launch it from the command line the launch starts enough to greate a log: # /usr/bin/launCharc /recalbox/share/roms/makecode/arcade-jumpy-platformer.elf``

Then the music stops and the start screen for Jumpy starts. and hangs for a few seconds. Then ends.

If I try to launch the Launcher using the command from the log, I get the same output as the emulation station logs:

# /usr/bin/launCharc /recalbox/share/roms/makecode/arcade-jumpy-platformer.elf -rotation 0 -resolution 640x480 -nodefaultkeymap
usage: launCharc [nomap / keybswap / verbose] [/path/to/arcadegame.elf]

If I launch a different game it also gets the same parms but works:

[Run] Command: python /usr/bin/emulatorlauncher.pyc  -p1index 0 -p1guid 030000005e0400008e02000014010000 -p1name "Xbox 360 Controller" -p1nbaxes 6 -p1nbhats 1 -p1nbbuttons 11 -p1devicepath /dev/input/event0 -system gamegear -rom /recalbox/share/roms/gamegear/Adventures\ of\ Batman\ \&\ Robin,\ The\ \(USA,\ Europe\).zip -emulator libretro -core genesisplusgx -ratio auto   -rotation 0 -resolution 640x480
Overboard-code commented 9 months ago

I gave up. I switched to RetroPie and was able to get the Launch code to work out of the box. I recommend not using the latest RecallBox with LaunCharc.

Vegz78 commented 1 month ago

Hi @Overboard-code,

Thanks for trying McAirpos and your feedback here from trying to get MakeCode Arcade games to launch om Recalbox(v9 Pulstar, I presume?)! Glad that you still got it to work on the newest RetroPie!

I have reopened this issue, since it is relevant for my ongoing efforts to try to get MakeCode Arcade games to launch with McAirpos on Recalbox v9 Pulstar, which is an ongoing challenge...

What I have found so far, using an .elf file of the Jumpy Platformer game that is known to work on other RPi hardware and Linux distributions; https://drive.google.com/file/d/1xl-M6DyHflIE1A9BNS8yNUPrOyNzCGPr/view?usp=sharing

In my case, I am attempting this on a RPi Zero 2W on the original GPi Case 1, not your GPi Case 2W, so I cannot reproduce your conditions exactly.

Error message when running the game directly, without launCharc: Bus Error

Dmesg shows:

[   59.510961] Alignment trap: not handling instruction f4420a1f at [<76cd0284>]
[   59.510985] 8<--- cut here ---
[   59.511000] Unhandled fault: alignment exception (0x801) at 0x7ed9793c
[   59.511014] pgd = fdb2be65
[   59.511029] [7ed9793c] *pgd=04b61835, *pte=0427e75f, *ppte=0427ec7f

So, differently from all other hardware and systems, also earlier Recalbox versions, for me it doesn't even execute. Alsa seems to be installed and positioned on 0:0. Not sure if this is a screen issue, binary compatibility issue, missing libraries, or what.

Any tips on how to proceed would be greatly appreciated, and we could update support for McAirpos on Recalbox v9+.

PS: I have also consulted the Recalbox forum, hoping some help will come there. https://forum.recalbox.com/topic/34282/bus-error-aligment-trap-for-elf-on-recalbox-9-1-pulstar