flycast
flycast copied to clipboard
[RPi4] CHD loading broke.
On the previous public release of lakka it worked, and in the new public build chd files will not load. Retroarch just reboots when trying. This is not the same as the Naomi CHD "issue" #731 I tested several games that were definitely loading and playing properly, but does not in the build that is in the new lakka release (2.3.2). I will see if I can manage to get some helpful log later, and possibly pinpoint an earlier build where it stopped working.
Last known working commit for me is fb7d27704bfef725638dd55bc8481456b47aa671 (built on Feb 08). I have that version running now and it loads chd's ok
same issue here after updating from the 2/08 build to current. Lost CHD support.
Emulationstation runcommand log from failing launch:
Parameters: Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-flycast/flycast_libretro.so </dev/null --config /opt/retropie/configs/dreamcast/retroarch.cfg "/home/pi/RetroPie/roms/dreamcast/Illbleed (USA).chd" --appendconfig /dev/shm/retroarch.cfg /opt/retropie/supplementary/runcommand/runcommand.sh: line 1247: 7408 Bus error /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-flycast/flycast_libretro.so --config /opt/retropie/configs/dreamcast/retroarch.cfg "/home/pi/RetroPie/roms/dreamcast/Illbleed (USA).chd" --appendconfig /dev/shm/retroarch.cfg < /dev/null
There's an issue with RetroPie version and some changes I made (passing our CFLAGS to linker stage as lr-flycast uses link time optimisation and was generating deprecated code). However they could be introducing some issues despite fixing the linker warnings. I'm currently working on this.
Just to clarify. The issue caused by retropie was just a correction to add the CFLAGS to LDFLAGS to stop armv6 code being generated due to Link Time Optimization being enabled. However this caused an issue with crashes when loading CHD files. A fix is to reduce optimisation level to -O2 which I notice in the Makefile is done for another arm target. Not sure the cause if it's just the fault of GCC or something in the code causing undefined behaviour with O3. However O3 is often a poor choice for arm and can actually produce slower code in some cases.
I'll submit a PR when I have a chance.
It could be somewhat related to #712. The workaround there (Odroid N2) is to use -O2 instead of -O3. It's still unclear what's the root cause of the crash is. I haven't been unable to reproduce it on any platform I have access to.
Note that I disabled LTO on Intel platforms since it's not playing well with JIT code. You might want to try to disable it.
Hello. New to Flycast. I don't appear to be able to read v5 CHD's. v4 ones appear to work fine though. I was under the impression Flycast should be able to read v5 CHD's now. I've tested this with both Retroatch on Windows PC and also a Odroid Advice Go running Batocera. Could it be related to this issue? Otherwise I'll create a new issue.
This issue is specific to RPi4 and arm. If you have problems on Windows, please open a new issue.
@flyinghead I never got around to the PR regarding compilation flags. Are you ok if I force O2 for all arm targets in the Makefile?
No problem. Hopefully we'll find a better solution at some point.
If it crashes on arm with -O3, imho it would be worth investigating ubsan, here are some ubsan logs, they are huge :
https://pastebin.com/raw/2Cid8w3P
Hello my good people from the past, was this ever fixed, or is there a workaround I can use? I just tried loading up a v5 CHD and got the DC system screen with a message to "Insert CD" to play.
Actually, it looks like this might be working now? I saw a comment somewhere else online that the chdman version had to be at least 0.227 and it turned out I was on 0.226. I just tried with 0.237 and it worked fine