Block Chain

There was a technique on the Commodore 64 where disk blocks were chained 
together with a block pointer at the end of each block.  This is far inferior to 
having a file allocation table, as in FAT32.

The RedSea file system does not allow files to grow because it only has an 
allocation bitmap and not a FAT table.  This "flaw" is by design.  I am 
intentionally crippling this operating system, making it a toy with the wisdom 
that this will prevent commercialization and corruption.  The toy spirit of the 
operating system will be preserved going into the future.  The vision for this 
operating system was a modern Commodore 64, which was a fun toy.

Doing whole file operations is the TempleOS way of doing thinks.  It is the 
simplest and, ironically, the fastest.  It is obnoxious in the characteristic 
way that TempleOS is obnoxious, flaunting massive modern resources in a way that 
makes old programmers protest.

Doing whole file operations will sabotage efforts to change the 640x480 
resolution and violate the ban on multimedia.  When doing large, whole-file 
operations, immediately memory fragmentation is a serious problem, but not so 
for allocations in the range under a Meg (with occasional larger ones).

The file compression scheme in TempleOS only works on whole file operations and 
the DolDoc format cannot have text tacked onto the end, since binary data is at 
the end.

I don't want to spoil fun, so of course I offer a way to get awesome performance 
that is, ironically, superior.  FBlkRead() and FBlkWrite() allow you to read a 
block offset from the start of a file.  Since files are all contiguous, this is 
incredibly efficient.  You just have to declare the desired file size when you 
create it with FOpen() and cannot change it.  See ::/Demo/Dsk/DataBase.HC.

If you like, you are encouraged to to do raw BlkRead() and BlkWrite() directly 
on a drive.  Just get a pointer to a CDrv with Let2Drv() and you are on your 
way!  Your computer is supposed to be a fun toy!  You can make an entire 
partition used for a database, or invent a file system.

On the whole, the RedSea file system with its whole-file-only limitation bring 
beautiful harmony.  It beautifully captures the spirit of TempleOS with 
simplicity and, ironic speed, since contiguous is fastest.


* "Commodore 64" is a trademark owned by Polabe Holding NV.