libretro / ludo

A libretro frontend written in golang
https://ludo.libretro.com/
GNU General Public License v3.0
596 stars 68 forks source link

[Genesis Plus GX] Ludo crashes while trying to load Sega SC-3000 computer games #438

Open fmaida opened 3 years ago

fmaida commented 3 years ago

If you try to scan some Sega SC-3000 games/apps in .sc format, Ludo will wrongly recognize them as Sega SG-1000 games. Whenever you will try to launch one of those games, Ludo will try to open it with the default emulator set for SG-1000 games (Genesis Plus GX). But since Genesis Plus GX cannot handle Sega SC-3000 files, Ludo will crash (BlueMSX can handle these files, and maybe Kega Fusion too).

Since Ludo at the moment won't work really well with keyboard input for SC-3000 games and apps, may I suggest to ignore .sc files while scanning for new games?

I'm attaching a log file: sc-3000-Chuugaku-Hisshuu-Eibunpou.log.txt

This is an example of SC-3000 file that will crash Ludo: Chuugaku Hisshuu Eibunpou (Chuugaku 1-Nen) (Japan) (SC-3000).zip

kivutar commented 3 years ago

OK, were you using scanning? Maybe our database is wrong.

fmaida commented 3 years ago

Yes, I used the scanner function. Both the SG-1000 and the SC-3000 roms share the same file extension (.sc). IMHO my guess is that Ludo doesn't find any info about the rom in the database and wrongly assumes that every unknown file that has a .sc extension must be a SG-1000 rom and can be handled by Genesis Plus GX; for this reason it is currently allowing Genesis Plus GX to try loading a SC-3000 cartridge, but then Genesis Plus GX not knowing how to handle that file will crash.

RetroArch in this case will correctly scan the rom and try to bind it to BlueMSX if installed (because it can handle SC-3000 emulation); if I try to manually load the SC-3000 rom, RetroArch will also prevent me from choosing Genesis Plus GX since the emulator cannot handle SC-3000 files.

kivutar commented 3 years ago

For now Ludo doesn't do any extension based scanning. It relies only on the database, checksums, and long filenames.

fmaida commented 3 years ago

Then probably someone have probably mixed SG-1000 and SC-3000 entries in the same database. I suppose that the easiest way to resolve this issue would be to switch the default core to BlueMSX that can load both, even though you would not have access to the keyboard in this case.

kivutar commented 3 years ago

Can you check here? They are xml files https://github.com/kivutar/ludo-database/tree/kivutar/xml

kivutar commented 3 years ago

OK, SC-3000 games are indeed listed in the SG-1000 db https://github.com/kivutar/ludo-database/blob/aad97888edaccdb9a37491ccd84453436b9e2e46/Sega%20-%20SG-1000.dat#L277

fmaida commented 3 years ago

Would be okay if I make you a PR that moves the SC-3000 entries to a new xml file?