libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 77 forks source link

Reicast core dumps on loading any NAOMI rom #527

Closed Shoegzer closed 5 years ago

Shoegzer commented 5 years ago

Tested against build f59c772f00e5e706a06eb5ec9d041c97aa221f15, compiled on linux 4.18 x64. Older builds tested at least a few months ago worked, not sure exactly when but could bisect if necessary.

Loading any NAOMI rom returns the following:

$ ./retroarch -L cores/reicast_libretro.so "pstone.zip"
[reicast]: Got size: 640 x 480.
Creating dir: /home/shoegazer/Emulation/Emulators/RetroArch/system/dc/data
Linux paging: 00001000 00001000 00000FFF
MAP 00800000 w/ 50331648
MAP 20000000 w/ 50331648
MAP 04000000 w/ 33554432
MAP 06000000 w/ 33554432
MAP 0C000000 w/ 0
A8
vmem reserve: base: 0x7f8c26d70000, aram: 0x7f8c46d70000, vram: 0x7f8c2ad70000, ram: 0x7f8c32d70000
Resetting mem
Sh4 Reset
recSh4 Init
Freeing fpcb
nullDC-Naomi rom loader v1.2
File: (null)
SIGSEGV @ 0x7f8c5ecdd5a1 ... (nil) -> was not in vram (dyna code 0)
DEBUGBREAK!
SIGSEGV @ 0x7f8c48685b47 ... 0x7f8c48685b47 -> was not in vram (dyna code 0)
DEBUGBREAK!
Illegal instruction (core dumped)
barbudreadmon commented 5 years ago
...
File: (null)
...

reicast doesn't see your rom, try with full path or without ""

Shoegzer commented 5 years ago

Thanks @barbudreadmon. Tried with full path and without "" and got the same results. I can do an "ls" of the rom and I can see results too, so the file is definitely there. I've tried with various other roms too and getting the same results. I used to use this command all the time and it worked fine not too long ago. Can you replicate?

barbudreadmon commented 5 years ago

Can you replicate?

Nope, reicast see my roms, what's your full path ? Are there spaces or other special characters ? Could you post the full log by adding -v to the command line ?

Shoegzer commented 5 years ago

@barbudreadmon Sure thing - check here. To be sure it wasn't a path issue, I moved "pstone.zip" to the retroarch folder itself as you can see from the output. This same file boots just fine in MAME 0.208.

Also, in case it makes a difference - I'm using GNU/Linux, not sure if you are?

barbudreadmon commented 5 years ago

[INFO] Environ GET_VARIABLE reicast_boot_to_bios: [INFO] enabled

You are booting to bios, it won't work with naomi (i guess we could add some safety mecanism), change that and it should be ok.

Shoegzer commented 5 years ago

Ah, naturally! Good catch - and yes, it works now so I will close this out. As a side note, I wonder how hard it would be to enable the core to trap such a condition (since DC BIOS is meaningless in NAOMI context) and optionally throw an exception to the UI rather than terminal.

Thanks so much for your help.