
Apple II Computer Info
It's a bit more complicated than that.
There are, in effect, four buffers. They get filled something like this:
1st byte --> 6 bits to byte 1 of buffer 1, 2 bits to byte 1 of buffer 4
2nd byte --> 6 bits to byte 1 of buffer 2, 2 bits to byte 1 of buffer 4
3rd byte --> 6 bits to byte 1 of buffer 3, 2 bits to byte 1 of buffer 4
4th byte --> 6 bits to byte 2 of buffer 1, 2 bits to byte 2 of buffer 4
5th byte --> 6 bits to byte 2 of buffer 2, 2 bits to byte 2 of buffer 4
and so forth.
All the while a three-byte checksum is being computed, in a very
hard-to-understand way. Watch out! The checksum computation modifies the
data, just like it does on the 5.25-inch drive.
Once the buffers are filled, they're written:
1st byte of buffer 1
1st byte of buffer 2
1st byte of buffer 3
1st byte of buffer 4
2nd byte of buffer 1
2nd byte of buffer 2
etc.
So the byte containing the extra two bits from three other bytes is written
immediately following those three bytes. The three-byte checksum expands
to four bytes in exactly the same fashion.
The data field looks like this:
$D5, $AA, $AD, track, 699 data bytes, 4 checksum bytes, $DE, $AA
The "track" number is identical to the "track" number from the address
field.
Remember that the original data is 524 bytes, not 512.
>- is the book "Beneath Apple ProDOS" still available? :-))))
I think Byteworks still sells it. But it was written before the 3.5-inch
drive was available for the Apple II, so its contents are only relevent in
a very general sort of way.
- Neil Parker
P.S. I recommend having a look at the 3.5-inch drive I/O routines in the
IIGS ROM. You can find them by looking in the SetHook/GetHook table, which
is at $E10F6F in ROM 1 (note that there are two identical JMP instructions
for each vector). It's best to do this without booting GS/OS, because
GS/OS patches the vectors. See the file on undocumented Smartport info on
my home page, http://cie-2.uoregon.edu/~nparker.
P.P.S. Are you aware that something keeps adding control-P's to the subject
lines of your postings? I've seen it in at least three unrelated posts from
you.
--
Neil Parker | No cute quote, no cute ASCII art, no cute
Apple II Computer Technical Information : Apple II Family Hardware Info
ftp://ground.ecn.uiowa.edu/2/apple2/miscinfo/hardware : May 2001 : 147 of 572
Comentarios a estos manuales