Questions about ProDOS sapling and tree formats #38
-
In the documentation it states that a sapling's key block holds up to 256 block numbers and a tree's key block holds up to 128 block numbers. But ProDOS is made of 512-byte blocks and the block numbers seem to one byte each. So is the correct interpretation that a sapling's key block should never be more than half-full and a tree's key block should never be more than 1/4 full? Of the disk images I have the only one with a tree entry seems corrupted and crashes Applesauce and the largest sapling is only 25kb so doesn't even use half the key block. I'm not sure whether it might be considered worthwhile to add clarifications to the docs to help out others using them to implement disk image formats. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Block numbers are two bytes each:
When the file is a tree, the key block is a Master Index Block. Each of the index blocks it references represent 128KB, so you can have 16MB/128KB = 128 index block entries, which means the master index block is at most half full. A variety of disk images are checked in to the TestData directory. TestData/prodos/simple-sparse.po has a few tree files on it. |
Beta Was this translation helpful? Give feedback.
Block numbers are two bytes each:
When the file is a tree, the key block is a Master Index Block. Each of the index blocks it references represent 128KB, so you can have 16MB/128KB = 128 index block entries, which means the master index block is at most half full.
A variety of disk images are checked in to the TestData directory. TestData/prodos/simple-sparse.po has a few tree files on it.