libretro / FBNeo

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

NeoGeo CD subsystem selection through file name #1051

Closed wn2000 closed 1 year ago

wn2000 commented 1 year ago

NeoGeo CD subsystem detection is somewhat treated differently than other subsystems. It only considers the neocd parent rom folder, but not neocd_ prefix in file name.

This can be fixed with 1-line change: https://github.com/libretro/FBNeo/blob/2888e40014b508eb384cbdc6cf77a6387787dd3c/src/burner/libretro/libretro.cpp#L2020 to

if(strcmp(g_rom_parent_dir, "neocd")==0 || strncmp(g_driver_name, "neocd_", 6)==0) {
barbudreadmon commented 1 year ago

This is working as intended, the only reason this prefix stuff exists is because the driver names for those consoles/computers are prefixed like this internally, see https://github.com/libretro/FBNeo/blob/f89b652bc59a807cc39db401c582ec54c42e46a6/src/burn/drv/spectrum/d_spectrum.cpp#L38016

However neocd is totally different, the driver name is always neocdz

wn2000 commented 1 year ago

This is working as intended, the only reason this prefix stuff exists is because the driver names for those consoles/computers are prefixed like this internally, see https://github.com/libretro/FBNeo/blob/f89b652bc59a807cc39db401c582ec54c42e46a6/src/burn/drv/spectrum/d_spectrum.cpp#L38016

However neocd is totally different, the driver name is always neocdz

Yes I understand. The issue is an inconsistency from a user’s point of view: All other consoles you could use the parent folder approach or prefix the rom name, but for neocd only parent folder works.

With this one line change, one can name the .cue file as neocd_foo.cue, with all other files still named foo.bin, foo.img etc.

I have a special use case for this one. The atgames legends line of arcade products allow us to pack a libretro core and rom in an UCE archive as a way to “bring your own game”. But the interface they provide only expects something like roms/foo.zip, no sub folder, no —subsystem argument, so the only way left is the file name prefix.

A pretty niche use case I know, but at least it makes the prefix feature consistent across all supported subsystems.

barbudreadmon commented 1 year ago

Oh ok, feel free to send a PR for this if there is a niche use case. I wasn't expecting anyone to use that prefix method since the 2 other methods were implemented precisely to avoid that method.

barbudreadmon commented 1 year ago

I made the change in https://github.com/libretro/FBNeo/commit/99f06cf43ae61b77527765a42454ab05f0a733a0 Closing.