libretro / mame

MAME - Multiple Arcade Machine Emulator
Other
63 stars 74 forks source link

[.257] [RPi] endless loop issue with `kaneko/kaneko16.cpp` driver #423

Closed nemo93 closed 1 year ago

nemo93 commented 1 year ago

Hi,

similar to #422.

Disclaimer: please note that I'm using only parent from a non-merged set. I've triple-checked the roms by hands to be sure nothing is missing from the archive as well as CRC.


B.Rap Boys (including Special clones) do run yet they will be stuck in an endless loop on the ROM self-test screen. Following games do rely on the (kaneko16) driver. Note that only these do present an issue as the other games using same driver are running no problem.

Games tested:

Screen grab below shows B.Rap Boys Special (Japan), after that screen game will reset automatically:

brapboyspj-230731-093000


Tested on Raspberry Pi4 on a vanilla Retropie (4.8.4). Kernel 5.10.103-v7l+, 32-bit Raspberry OS in fKMS mode. Retroarch is 1.15.0 and the MAME core is .257.

URL: https://github.com/libretro/mame.git
Branch: master
Commit: b8b6d0c8e2b99102fd28b908517c06fed6078bef
grant2258 commented 1 year ago

is retropie only 32bit thats not ideal for a pi3 or 4

nemo93 commented 1 year ago

Still 32bit indeed. I'm convinced it won't stay this way for too long :)

Anyhow I can only test the games on my RPi4 and on MAMEUI/Windows. Do you mind me asking if you can reproduce the issue on another platform than RPi please? If it's Pi/ARM related then I'll update the OP and I can even close it off should you ask me to.

grant2258 commented 1 year ago

It happens on android arm64 with whatever is on the buildbot atm. I do have a pi 4 sitting doing nothing atm just too lazy to set it up. If I ever get round to setting up a cross compiler pi ill compile a 64it retroarch and the core here as 64bit core.

grant2258 commented 1 year ago

Well I got round to compiling Retroarch on Raspberry pi OS 64 bit. First it configured my screen to 1080i so the fps is all over the place. Then I changed my sound driver to alsa, but that is broke I don't know if its a 64bit issues or it doesn't work with the pi4. Ill just use pulse for now. Ill get round to setting a cross compiler up or just get one that is readily available and ill let you know how I get on with tn#he 64 bit os. I quite like this little game myself is worth looking into on a pi. Hopefully its segfaults in gdb or trips asan to hint where the issue might be if it trips. Unfortunately RA has zero cores compiled for the pi4 not sure why there is none.

nemo93 commented 1 year ago

@grant2258 thanks for looking into this. Cross compiler is the way to go indeed given it could take several hours (~8 or 9) to compile that core on RPi4 🥲 Let me know how it goes!

grant2258 commented 1 year ago

Yes I wouldnt want to wait on a pi building it. Ive managed to compile tiny standalone build so should be good for me to build both and test later on. I can see me steering towards using standalone though but can still test this core. I haven't seen anyone mention testing these games on standalone on retropie to see if its an lr issue or system wide.

grant2258 commented 1 year ago

I got latest libretro as of 257 core compiled and standalone arm64 (both compiled 64 bit running on raspberry pi 64bit OS). The bug it present on arm in both libretro and standalone. This should bug probably should be posted on mame testers as well as its not libretro specific.

sonninnos commented 1 year ago

Tried with -fsigned-char yet?

grant2258 commented 1 year ago

can try with that if you like I know arm32 needs that flag. I know arm can play horribly with float and signed int conversions as well compared to x86.

grant2258 commented 1 year ago

yea the -fsigned-char fixes brapboys some good news :). It also fixes finalapr, possibly the others as well. Will check when I have more time with the other games reported.

nemo93 commented 1 year ago

I do confirm the reported issue is gone after adding the -fsigned-char flag for my device/RPi4. Thread on the Retropie's forum for reference which also contains the updated binary for that device.

Thanks a lot @sonninnos @grant2258!

grant2258 commented 1 year ago

Glad this fixed up a few issues for the people on arm. Im pretty happy with my 64 bit setup. Initially mame had tearing(not the normal type) even with vsync on. I just enabled wayland and xwayland works like a charm no need to run in a terminal in 2023 and the 64 bit only has full kms anyway. Its a lot of work to make use of the 64bit os since you have to compile or cross compile but its certainly worth it with the gains it brings. All I have is mame at the moment the pi was collecting dust doing nothing.