[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what sector mapping is this?
Hi Jonno,
My bad! Here's how I found it...
I just did a hex dump of the file http://bitbucket.org/martin.haye/super-mon/downloads/Super-Mon%201.1.dsk
and compared that with an in-memory image generated by reading track
zero this way:
0280-G 20 40 03 JSR NAKEDOS
0283-H 6D 41 DC ADC $DC41
0286-I A9 00 LDA #00
0288-J A9 00 LDA #00
028A-K 2C 00 20 BIT $2000
028D-L A9 10 LDA #10
028F-M D8 CLD
0290-N 60 RTS
For each sector from $2000.2FFF I looked at the first few bytes and
scanned the hex dump for those bytes. Here's the mapping I obtained:
(Physical sector -> Sector in file)
0->0
1->7
2->E
3->6
4->D
5->5
6->C
7->4
8->B
9->3
A->A
B->2
C->9
D->1
E->8
F->F
This mapping looks to be DOS 3.3 sector interleaving according to
http://mirrors.apple2.org.za/apple.cabi.net/GS.Emulators/A2.Emulator.Image.TIL.txt
It didn't however match the offsets you found. However, if I
subtracted one sector number from yours, it suddenly matched up (i.e.
sector $09 at offset $300, sector $0A at offset $A00, and sector $0B
at offset $200). So then I asked myself why you thought sector A is
the first catalog sector and a little investigation turned up the
answer: the docs are wrong! The online help states that the catalog
occupies sectors $A through $C, when in reality it occupies 9 through
$0B.
My apologies for leading you astray, and I'll fix the documentation
shortly.
--Martin