Finding the map on ADFS F floppy
Gerald Holdsworth (2084) 79 posts |
Hi all, I’m trying to find the map, given the disc record at 0xC00+0x1C0, on an ADFS F formatted disc. I have a formula, found in a C++ code written by Russell King, but haven’t got a clue how he can up with it. The PRMs mention that the map will be at the beginning of the middle zone – with ADFS F having 4 zones, this would be at the beginning of zone 2. Given the disc size is 0×190000 bytes, this should be 0xC8000, but it is actually at 0xC6800. The formula I have is: I’ve been through the FileCore and ADFS source, but my knowledge of ARM programming isn’t too hot. (see also my query at http://stardot.org.uk/forums/viewtopic.php?f=16&t=14391) Cheers, Gerald. |
Gerald Holdsworth (2084) 79 posts |
It’s amazing how you get a lightbulb moment after you’ve posted. The formula I stated is wrong – got too many zeros. Should be: we need the sector size in bits we need to remove the spare bits between zones to find out the zone size. Each zone in the allocation map is a single sector, and zone_spare is the number of bits between the end of the previous zone and the end of the current zone’s header as per earlier, map is middle of the disc, so middle zone the first zone has the disc record, so we need it in bits and remove it from the total if we then multiply this by the bytes per map bit, we get the address of the map and finally the Root Address OK, this is mostly guessing – anyone care to agree/disagree? |