-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lindbergh: squashfs support #13714
base: master
Are you sure you want to change the base?
lindbergh: squashfs support #13714
Conversation
I don't think an overlay is the right solution. However, Sega Lindbergh ROMs really need some level of compression to avoid long gamelist loading and overall management. |
Ah yes really an excellent idea :) |
ok fair enough, it is why I filed a request lindbergh loader execute outside the rom directory - perhaps by specifying a path to the rom on the command line as other emulators do. However we need to consider the primary goal of the Lindbergh project is to keep existing Lindbergh Arcade cabinets running so we can't expect this to be implemented short-term. It was a relatively simple change to conditionally create an overlay in Are there other issues you see I am not aware of? |
...ocera/core/batocera-configgen/configgen/configgen/generators/lindbergh/lindberghGenerator.py
Outdated
Show resolved
Hide resolved
@@ -44,7 +44,8 @@ | |||
def main(args: argparse.Namespace, maxnbplayers: int) -> int: | |||
# squashfs roms if squashed | |||
if args.rom.suffix == ".squashfs": | |||
with squashfs_rom(args.rom) as rom: | |||
writable_rom = (args.system == "lindbergh") | |||
with squashfs_rom(args.rom, overlay=writable_rom) as rom: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may need to be refactored as part of Generator
(and a refactor of when the generator is created) because it's rare for decisions to be made on the system/emulator/core outside of Generator
and its subclasses.
Before talking about this, we need to figure out if an overlay is even the right option.
package/batocera/core/batocera-configgen/configgen/configgen/utils/squashfs.py
Outdated
Show resolved
Hide resolved
64c241d
to
80a1a80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use overlay?
using the /var/run/squashfs/ as rw is not an ideal location for preservation of any rom updates. why here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to other ideas & saw this was the most straightforward to implement and get working.
The bottleneck is lindbergh
doesn't run outside (eg. /usr/bin/lindbergh
and it's shared .so
libraries) and the config file in system/configs/lindbergh
is only a template so it requires the rom directory to be writeable so the generator can copy all these files into it at runtime.
The solution squashfs already provides is the use of an overlay - this is what it was designed for as far as I can tell.
The changes are only temporary to allow the rom to boot. All changes can be safely discarded after the game exits because the config file is generated every time.
I also noticed the code can be reused as other squashfs mounts like daphne
and singe
want to write a .dat file into the directory if you don't remember to generate it before mksquashfs
. Use of the overlay logic allows the title to boot instead of crapping out because it doesn't have write access as the .dat file can be regenerated (until the rom is upgraded to include it). This is a separate discussion but thought I'd add additional rationale.
80a1a80
to
382b631
Compare
382b631
to
7126b27
Compare
great work on Lindbergh Loader! 🤯
got
.squashfs
support working for lindbergh by implementing an overlay with write access.hummerxt
goes from 20GB+ to 754MB - over 96%!)roms/lindbergh/*/*/
Tested on:
.squashfs
:3ds
,scummvm
,daphne
,ps3
,singe
,snes-msu1
,xbox