Repository navigation
Support loading Dreamcast games from 7z archives - #2527
richstokes wants to merge 1 commit into
Conversation
|
As this is a new feature, this should go to the |
this would actually be nice for a pretty simple reason, if all archive containers that multi-file MAME style roms also support single file formats, a lot of "is this archive a container for a rom folder or just a single file compression convenience" type logic can be removed. If you can just mount the compressed arcvhice as a VFS then it really doesn't matter, just scan the contents as if a folder. At least that's my impression. In iFly I had to resort to this, since iOS users are so used to local file management and lack knowledge on uncompressing archives on-device, I pre-process files before handing off to the default flycast importer to handle various container formats that confuse the core importer logic, so I decompress in place and then hand off the path, but I can see the core logic also benefitting from an agnostic approach to compressed containers. Additionally, you could support a single archive for all BIOS files and just read with on-the-fly decompression if the archives are treated as VFS's. Perhaps that's beyond the scope of this ticket, but on the topic of archive support in general, I could see full support agnostic of use (rom, bios, virtual folder, rom pack), extending and simplifying other file parsing code paths. |
|
If y'all want to take this and move it on to the dev branch/expand with regular .zip files, feel free! I would personally suggest land-and-expand here; get these 7z changes in as its a quick win (and a real quality of life improvement) and then look at adding zip/revisiting the compressed archive logic holistically. FWIW, I mainly added this as my GDEMU drive can already read .7z files, but I had to extract them every time I wanted to load them on Flycast :-) I tested these changes on latest macOS, and seems to work as expected for me. |
Dreamcast
.7zfiles are currently hidden from the game list or routed to the arcade loader. This adds loading for archives containing one GDI, CUE, CDI, or CHD image and its referenced tracks, while preserving named arcade ROM sets.The existing disc readers now accept a storage provider. The archive provider caches required members in exclusively created temporary files, keeps independent reader positions, and removes the files when their last reader closes. Archive paths stay inside the archive; multiple disc images are rejected with a clear error. Game scanning inspects archive metadata without extracting disc data, and Libretro uses the same platform detection.
This also fixes sequential reads, UTF-8/long filenames, failed-open cleanup, undefined CRC lookup, and concurrent CRC initialization in the existing 7z reader. No new runtime dependency is required. README documents archive layout, temporary disk space, and the memory cost of solid archives.
Validation on Ubuntu 24.04 / Linux ARM64:
AicaArmTest.LogicOpsTest,TimerTest.smallTCOR(abort), and all fiveSDLControllerMappingTestcases reproduce on unchanged upstream59ed35a7ein this environment. Filter:-AicaArmTest.LogicOpsTest:TimerTest.smallTCOR:SDLControllerMappingTest.*.