linuxserver / emulatorjs

Self hosted web based retro emulation front end with rom and art management.
409 stars 31 forks source link

Remove code that prevents cue from loading #21

Closed rrgeorge closed 2 years ago

rrgeorge commented 2 years ago

This block seems to prevent the cue file from loading with the logic at line 185

thelamer commented 2 years ago

Bin/Cue in general is not great code. It will only work with single Bin/Cue files. What happens is that the rom scanner on the backend actually ignores the cue file when loading in games: https://github.com/linuxserver/emulatorjs/blob/master/has_files.sh#L149

Then when loading the rom in libretro.js because it is a bin file that is being passed it renames the rom to launch that is executed here on the Main emscripten call: https://github.com/linuxserver/emulatorjs/blob/master/frontend/js/libretro.js#L63 All the emulators that I tried load the cue file not the bin file to actually launch a game.

In general optimally you would actually parse the cue files from the js and download everything listed in it. But standards for cue files are not super reliable and would be hacky regexp stuff.

What is your setup that you are testing (the json config and platform)?

Edit: Also in general I try to emphasize this in the docs, but due to size limitations (ram usage in browser) and just to make stuff easier you should always use CHD files, much better support.

rrgeorge commented 2 years ago

With that section in place, it only downloads the bin file, and the emulator says the ROM exceeds the maximum size. I removed that section, and it downloaded both bin/cue files and loaded in the emulator successfully.

rrgeorge commented 2 years ago

What is your setup that you are testing (the json config and platform)?

I'm playing on an iPad Pro with a gamepad. The bin/cue files I'm testing are SegaCD roms.

thelamer commented 2 years ago

I see what you are saying, old logic mixed with new, it was writing the bin file as a cue. I know stuff like PSX wants the cue file to load so the renaming of what to load is still needed. This works I just tested it with chdman extracted stuff(single bin/cue) Again though I would recommend compressing down to chd for CD based retroarch stuff.

rrgeorge commented 2 years ago

Again though I would recommend compressing down to chd for CD based retroarch stuff.

Oh yeah this is much better. Thanks for the tip.