• Robert Sprowson's avatar
    Teach FileCore_LayoutStructure and Service_IdentifyDisc how to do 1 zone fixed discs. · d52791ba
    Robert Sprowson authored
    From the change logs it was last fixed sometime around FileCore 2.50 era, but has been long broken.
    The boot block was in the right place, but was overwritten by the root directory, and the wrong size entry was claimed in the map, amongst other errors.
    Free'd up R6 in LayoutFreeSpaceMap to avoid having to keep reevaluating the number of zones - makes it a bit more readable. Corrected inaccurate comments. Checked the code paths for new map with and without boot block, with and without long filenames.
    Test app 'Make1Zone' generates a small disc image which can be inspected in a hex editor for correctness.
    In the identify code, be more strict about looking for a boot block only on fixed discs since they cannot occur on floppies (saves time, wasn't necessarily wrong).
    The concept of a boot block at &C00 only works when 2 copies of the map can be fitted underneath that address, for future 2k and 4k sector sizes these do not fit and it is likely that 1 zone fixed discs are forbidden (a drive with 4k sectors would typically be > 512GB and 1 zone would be ~32MB so spilling into a second zone would waste < 0.01%).
    Other minor changes:
    * Free command now groups the 'K' with 'bytes' to match OS_ConvertFileSize.
    * FileCore20 debug didn't assemble.
    * FileCore33 beefed up comments.
    * GenSWIs debug didn't assemble.
    Tested with a special cut of RAMFS manually loading various 1 zone images into its dynamic area and checking they mount, have a sensible *MAP and *FREE result, can be written to, and don't have broken directories.
    Version 3.46. Tagged as 'FileCore-3_46'
VersionNum 811 Bytes