h6. [[FileCore]] h6(. » [[FileCore Technical Details|Technical Details]] h6((. » Disc Map Old h2(#maps). Disc Map Old h3(#mapoverview). Overview of Old Disc Map A disc has a section of information defined as a Map. It controls the allocation of the disc to the files and directories. Old Maps have the following format: table(bordered). |_<^{width:12em}. Name |_<^{width:8em}. Bytes |_<^. Meaning | |<^. _FreeStart_ |<^. 82 × 3 |<^. Table of space start sectors | |<^. _Reserved_ |<^. 1 |<^. Reserved (must be zero) | |<^. _OldName0_ |<^. 5 |<^. Half disc name (interleaved with _OldName1_) | |<^. _OldSize_ |<^. 3 |<^. Disc size in 256 byte sectors | |<^. _Check0_ |<^. 1 |<^. Checksum on first 256 bytes | |<^. _FreeLen_ |<^. 82 × 3 |<^. Table of free space lengths | |<^. _OldName1_ |<^. 5 |<^. Half disc name (interleaved with _OldName0_) | |<^. _OldId_ |<^. 2 |<^. Disc id | |<^. _OldBoot_ |<^. 1 |<^. Boot option (as in [[*Opt 4]],__n__) | |<^. _FreeEnd_ |<^. 1 |<^. Pointer to end of free space list | |<^. _Check1_ |<^. 1 |<^. Checksum on second 256 bytes | h4. Notes The 82 three byte entries in the _FreeStart_ and _FreeLen_ tables are in units of 256 bytes. The entries are sorted low addressed free areas first. Contiguous free areas will have been merged together. The full disc name is the joining together of the bytes in _OldName0_ and _OldName1_. The name is interleaved, with _OldName0_ providing the first character, _OldName1_ the second, and so on. _OldId_ is the disc’s Id to identify when the disc has been modified. If an old map does not end at a sector boundary, then it is padded with null bytes to the end of the sector. The sector immediately following the old map always holds the start of the root directory. h4. Calculating Check0 and Check1 These are checksums for the previous bytes in the map. They are calculated using repeated 8-bit ADC's on bytes of the relevant _map block_, starting with a value of 0: If R0 is the accumulated checksum, then it starts at 0, and each byte is added as follows: <pre> ADC r0, r0, r1 ;r1 is the byte picked up MOVS r0, r0, LSL #24 ;Shifts bit 8 into the carry bit MOV r0, r0, LSR #24 ;Not MOVS here to preserve the carry bit </pre> Note that the check byte itself isn’t included in the checksum; its value equals the checksum of the previous bytes.