libretro / FBNeo

FBNeo - We are Team FBNeo.
https://neo-source.com
Other
225 stars 135 forks source link

Raspberry Pi 4 / ARM runtime issues #528

Closed kwyxz closed 4 years ago

kwyxz commented 4 years ago

Hello FBNeo devs!

Using the current git revision on a Raspberry Pi 4, some games that work properly on x86_64 have various issues that seem ARM or Pi-specific.

Sega System 16b driver

aceattac causes a Retroarch segmentation fault, while other games with the same driver (altbeast, shinobi) work fine.

Here's the strace that leads to it:

lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/pi", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/pi/roms", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/pi/roms/fbneo", {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0
lstat64("/home/pi/roms/fbneo/aceattac.7z", {st_mode=S_IFREG|0644, st_size=411753, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/lib/libretro", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat64("/usr/local/lib/libretro/fbneo_libretro.so", {st_mode=S_IFREG|0644, st_size=45451216, ...}) = 0
openat(AT_FDCWD, "/home/pi/.config/retroarch/content_history.lpl", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 19
_llseek(19, 0, [0], SEEK_SET)           = 0
fstat64(19, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
_llseek(19, 0, [0], SEEK_SET)           = 0
_llseek(19, 0, [0], SEEK_SET)           = 0
write(19, "{\n  \"version\": \"1.4\",\n  \"default"..., 16384) = 16384
write(19, "     \"crc32\": \"\",\n      \"db_name"..., 16384) = 16384
write(19, "e2003_plus_libretro.so\",\n      \""..., 8369) = 8369
close(19)                               = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1054, tv_nsec=708666761}) = 0
poll([{fd=10, events=POLLIN}], 1, 0)    = 0 (Timeout)
epoll_wait(11, [], 32, 0)               = 0
poll([{fd=12, events=POLLIN}], 1, 0)    = 0 (Timeout)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xa0} ---
+++ killed by SIGSEGV +++
Segmentation fault

Sega X Board driver

Running abcop displays garbled graphics and is basically unplayable. Other games from this driver like lastsurv or thndrbld display a black screen. However aburner2 works fine and is playable. No errors visible in log:

pi@pi4:~ $ retroarch -v -L /usr/local/lib/libretro/fbneo_libretro.so roms/fbneo/lastsurv.7z 
[INFO] RetroArch 1.9.0 (Git 5e551dd92b)
[INFO] [Overrides]: Redirecting save file to "/home/pi/.config/retroarch/saves/lastsurv.srm".
[INFO] [Overrides]: Redirecting save state to "/home/pi/.config/retroarch/saves/state/lastsurv.state".
[INFO] === Build =======================================
[INFO] Capabilities:  NEON VFPv3 VFPv4
[INFO] Built: Aug 30 2020
[INFO] Version: 1.9.0
[INFO] Git: 5e551dd92b
[INFO] =================================================
[INFO] [CORE]: Loading dynamic libretro core from: "/usr/local/lib/libretro/fbneo_libretro.so"
[INFO] [Overrides]: Core-specific overrides found at /home/pi/.config/retroarch/config/FinalBurn Neo/FinalBurn Neo.cfg.
[INFO] [Overrides]: Content dir-specific overrides found at /home/pi/.config/retroarch/config/FinalBurn Neo/lastsurv.cfg.
[INFO] [Overrides]: Content dir-specific overrides stacking on top of previous overrides.
[INFO] [Overrides]: Game-specific overrides found at /home/pi/.config/retroarch/config/FinalBurn Neo/lastsurv.cfg.
[INFO] [Overrides]: game-specific overrides stacking on top of previous overrides
[INFO] Config: appending config "/home/pi/.config/retroarch/config/FinalBurn Neo/FinalBurn Neo.cfg"
[INFO] Config: appending config "/home/pi/.config/retroarch/config/FinalBurn Neo/fbneo.cfg"
[INFO] Config: appending config "/home/pi/.config/retroarch/config/FinalBurn Neo/lastsurv.cfg"

I tried disabling CYCLONE during build but it doesn't change anything. I'm available for extra testing if need be!

Thanks!

dinkc64 commented 4 years ago

note for barbudreadmon: games work fine on my side.

barbudreadmon commented 4 years ago

that's not an arm issue, all those games work properly on my pi3, you have some kind of setup or corruption issue.

kwyxz commented 4 years ago

that's not an arm issue, all those games work properly on my pi3, you have some kind of setup or corruption issue.

Ah... this is going to suck then, I tried using the latest core from the buildbot, and I am experiencing these issues :( thanks for looking though.

barbudreadmon commented 4 years ago

are you sure you disabled cyclone ? i just noticed my pi3 build has cyclone disabled, i'll try again with cyclone enabled

kwyxz commented 4 years ago

I think so yes, I tried git cloning and running make straight from src/burner/libretro and here's what the first compilation line looks like

cc -c -o../../burner/libretro/libretro-common/file/file_path.o ../../burner/libretro/libretro-common/file/file_path.c -std=gnu99 -ffast-math -frounding-math -O3 -DNDEBUG -fomit-frame-pointer -fPIC -DINCLUDE_7Z_SUPPORT -D_7ZIP_PPMD_SUPPPORT -D__LIBRETRO__ -DNO_VIZ -D_LARGEFILE64_SOURCE=0 -D_FILE_OFFSET_BITS=32 -DLSB_FIRST    -DUSE_SPEEDHACKS -ffloat-store -fforce-addr -finline-limit=1200 -fcheck-new -Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused -Wno-sequence-point -Wno-strict-aliasing -Wno-write-strings -Wno-pedantic -I../../burner/win32 -I../../burner/libretro/libretro-common/include -I../../burner/libretro -I../../burn -I../../cpu -I../../burn/snd -I../../burn/devices -I../../intf -I../../intf/input -I../../intf/cd -I../../intf/audio -I../../burner -I../../cpu -I../../cpu/i8039 -I../../cpu/i8051 -I../../cpu/i8x41 -I../../cpu/m6805 -I../../cpu/tlcs900 -I../../cpu/tms32010 -I../../cpu/upd7725 -I../../cpu/upd7810 -I../../cpu/v60 -I../../cpu/z80 -I../../cpu/z180 -I../../dep/libs/zlib -I../../dep/libs/lib7z -I../../burn/drv/capcom -I../../burn/drv/konami -I../../burn/drv/dataeast -I../../burn/drv/cave -I../../burn/drv/neogeo -I../../burn/drv/psikyo -I../../burn/drv/sega -I../../burn/drv/toaplan -I../../burn/drv/taito -I../../burn/drv/irem -I../../dep/generated -I../../dep/libs

No Cyclone and no Neon, maybe I could try disabling Speedhacks though

barbudreadmon commented 4 years ago

ok, then you got exactly the same "cyclone disabled" build i had, it looks like a setup/corruption issue, i won't be able to help.

kwyxz commented 4 years ago

Starting to wonder if it's a Pi4-specific issue. I asked on the Retroarch Discord if someone could reproduce, as it doesn't matter what options I use to build or even if I use the pre-built core from the buildbot... and other games from the same driver work fine. Very specific bug :/

barbudreadmon commented 4 years ago

did you try deleting your nvrams for those games ?

kwyxz commented 4 years ago

No nvrams in sight for aceattac or abcop. It's a pretty recent install with really nothing fancy about it. A rather bare Raspbian, Retroarch 1.9.0, a few cores, and attract-mode as a frontend.

kwyxz commented 4 years ago

Ok, I probably had not fully cleaned the repo before I tried running make with no Cyclone, because with my latest build both abcop and aceattac work. That means no NEON, no CYCLONE. I'll be trying different combinations of options to see what works and what doesn't.

barbudreadmon commented 4 years ago

I can reproduce those issues by enabling cyclone at build, then enabling it in core options. Don't use cyclone if it's not required, it's full of bugs, and there is no way a pi4 would require it since there is already no benefit from using it on pi3. Closing.

kwyxz commented 4 years ago

Understood. Thanks for looking it up.