11 Commits

Author SHA1 Message Date
Stefan Reinauer
1a1fc3b5d4 Support two filesystem slots
This change brings support for a second filesystem stored in the ROM
(if there's enough space)

The romfile code is fairly local so there was no point in keeping the
files around in a4091_save_t. Now the file state is kept locally in
init_romfiles() instead.

Since not all filesystem drivers contain a resident init structure, it
is now also possible to specify a DosType that is used to register the
filesystem in filesystem.resource.
2023-12-03 11:35:17 -08:00
Stefan Reinauer
74d5d1720d Add conforming CDFS ID string
If we are not loading CDFS through the resident rt_Init code, we need to
provide our own creator name. Make it follow the conventions of the other
filesystem drivers.
2023-11-11 11:04:17 -08:00
Stefan Reinauer
58de877be8 Improve CDFileSystem support
- Adds support for loading a filesystem without the need for a
  resident struct.
- Factor out debugging functions from the mounter code finding CDFS:
  scan_filesystems --> list_filesystems & find_cdfs
- Properly Forbid/Permit when operating on FileSystemEntries
2023-11-11 08:52:37 -08:00
Stefan Reinauer
f489deeb7c Use uncompressed file size in romfile.c
The file size is used to determine how far to walk memory looking for a
resident structure. While that is still an approximation, using the
uncompressed file size fill make AmigaOS 3.2.2 CDFileSystem work in ROM.
2023-11-05 21:32:02 -08:00
Stefan Reinauer
e499131390 Support RNC PRO-PACK compressed filesystem
This way we can transparently decompress both the driver
and filesystem.

File             | Orig. | Comp. | Saved
-----------------+-------+-------+----------------
BootCDFileSystem | 19248 | 12274 |  6974 (36.23%)
a4091.device     | 36652 | 23504 | 13148 (35.87%)
-----------------+-------+-------+----------------
Total            | 55900 | 35778 | 20122 (36.00%)

This brings down the ROM usage for both components from
85.3% to 54.6%, leaving plenty of room for debug builds,
other versions of CDFileSystem, etc.
2023-11-04 14:57:06 -07:00
Stefan Reinauer
f36d77c635 romfile: Keep track of file length
Don't try to relocate the CDFilesystem if it is not in the ROM.
The code happened to bail out early, however it is better to
explicitly prevent this.
2023-11-04 13:35:23 -07:00
Stefan Reinauer
956deb03c4 Whitespace fixes
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-07-23 14:55:17 -07:00
Stefan Reinauer
d139fda1ce Don't define asave in every file 2022-10-02 14:48:18 -07:00
Stefan Reinauer
aafd5d2b1c Move ROM file initialization out of the mounter
... and out of attach.c. It only makes sense when booting from ROM.
Add autodetect for 32K/64K ROMs
2022-10-02 00:30:51 -07:00
Stefan Reinauer
aff7e8d0c9 Add debug flag to disable CDROM booting 2022-09-25 23:20:23 +08:00
Stefan Reinauer
8cb47fb44a Parse ROM to find FS driver 2022-09-24 16:33:19 +08:00