[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
help decoding address fields
- Subject: help decoding address fields
- From: jonnosan <jonnosan@gmail.com>
- Date: Tue, 15 Jan 2008 01:45:02 -0800 (PST)
- Complaints-to: groups-abuse@google.com
- Injection-info: s27g2000prg.googlegroups.com; posting-host=124.183.102.148; posting-account=XeaUgQoAAACn-Gws0Ssl9mrTmlxSVui3
- Newsgroups: comp.sys.apple2
- Organization: http://groups.google.com
- User-agent: G2/1.0
- Xref: g2news1.google.com comp.sys.apple2:31957
Howdy,
I am looking to extend my dsk parsing code to deal with .nib images.
I'm having some problems trying to understand how the nibble encoding
works.
I've been readin both Beneath Apple DOS and Understanding the Apple ]
[ but still a bit confused.
I kind find the address field in a .nib file, and I can decode the Vol
and track components, but I'm getting bogus values for the sector
fields. As far as I can tell, this is a normal dos 3.3 image, i.e. no
copy-protection to deal with.
This is how I'm interpreting the following address field:
D5 AA 96 FF FE AA AA AA AA FF FE DE AA
D5 AA 96 <- start of address field
FF FE <- vol # in 4-4 encoding = F E (254)
AA AA <- track # in 4-4 encoding=0 0 (00)
AA AA <- sector # in 4-4 encoding=0 0 (00)
FF FE <- checksum (ignoring for now)
DE AA <- end of address field
So that is Track 0, sector 0.
But then I see this :
D5 AA 96 FF FE AA AA AF AF FA FB DE AA
Which I decode as:
D5 AA 96 <- start of address field
FF FE <- vol # in 4-4 encoding = F E (254)
AA AA <- track # in 4-4 encoding=0 0 (00)
AF AF <- sector # in 4-4 encoding=3 3 (51)
FF FE <- checksum (ignoring for now)
DE AA <- end of address field
i.e. this seems to be claiming it is Track 0, sector 51.
Have I got a messed up .nib image, or am I missing something obvious?
Thanks
Jonno