jsgroth / jgenesis

Sega Genesis / Sega CD / SNES / Master System / Game Gear emulator
MIT License
40 stars 3 forks source link

Add support for launching ZIP-compressed files #91

Open leonstyhre opened 1 month ago

leonstyhre commented 1 month ago

Hi!

Would it be possible to add support for launching ZIP archives, and perhaps 7Z archives as well? Unless I've missed something I need to manually unzip each game before I can run it in jgenesis?

I have only tested on Linux using the CLI AppImage.

Many thanks in advance!

jsgroth commented 1 month ago

You haven't missed anything - the emulator doesn't currently support loading compressed files aside from CHD images of Sega CD discs, regardless of platform or which frontend you're using.

It should be simple to support the most basic case of .zip files that contain a single ROM image, and .7z should be doable as well. Supporting archives that contain multiple images is slightly trickier but still doable - the backend piece of the emulator just needs to receive the path to the image within the .zip file in addition to the path to the .zip file.

The one thing I probably won't support is loading Sega CD CUE/BIN disc images out of compressed archives, which is not really practical because of how that disc format works.

leonstyhre commented 1 month ago

Thanks for the clarification, and yes it would be great if you could add ZIP and 7Z support! As for .bin/.cue this is mostly obsolete now anyway when there are CHD files, and even more so to put such files inside a ZIP archive. Thanks! :)