Closed interfect closed 8 years ago
One potential problem is that the lengths of files are only represented to the nearest sector. People reading files would have to deal with trailing garbage, or at least trailing null bytes.
As this relates to the bootloader and not BBOS, I'm going to move the example bootloader to it's own repository and we can continue the conversation there.
I'm still working on filesystems. I scrapped my old design (based around tables of "extents" for each file) and came up with this instead:
Basically it's the on-disk layout used by the filesystem libraries for DCPU B (a small C-like language which I'm not sure if anyone ever used), but shifted down by one sector to make room for the bootloader.
The bootloader on a disk formatted in this way would have to be a little cleverer than the default BBOS bootloader. It couldn't just start loading at sector 1. I think if the disk were set up right, with the boot image being the first file allocated, it would probably be able to start loading at sector 6, and use the FAT to pick which other sectors to load. If it wanted to be really clever, it could understand filenames and load "BOOT.BIN" or something.
Does this sould like a system worthy of the "BBFS" name? I'm working on a library implementing it on top of BBOS disk calls at the moment.