[sebhc] H17 ROM and disk info

Dave Dunfield dave04a at dunfield.com
Fri May 21 22:00:05 CDT 2004


Hi Steven,

>No, not a call, but a JZ instruction just above what you listed.  What's 
>happening there is that a 16-bit count of bytes is being read, one sector at 
>a time.  On the last sector, the value left in c (because of the jump around 
>the mvi c,0) controls calling the read routine additional times past the 
>byte count to get to the end of the sector so the check byte can be tested.

I guess it was something like that - looked like variable read code to me.


>>Some of the code does crafty things...
>
>That's a common tactic in firmware where space is a premium.  Another common 
>programming practice that will confuse a disassembler is function calls with 
>inline parameters.

Yeah - I've done a lot worse that that in my years (been writing embedded firmware
for a long time), however I've seen several places in the code where a few bytes
could have been saved in a less tricky manner.

>>If anyone can provide details on the complete disk sector format (including
>>SYNC bytes and BCC would be nice), that would help a lot.
>
>Immediately after a hole detect:
>
>Bytes  Contents
>   10   leader bytes (zero)
>    1   sync (375Q)
>    1   volume number *
>    1   track number
>    1   sector number
>    1   check byte
>
>   10   leader bytes (zero)
>    1   sync (375Q)
>  256   data bytes
>    1   check byte
>
>The volume number can be found in the disk image file at byte 2304 
>(beginning of the label sector).

Wow - you are just a wealth of information - have you ever thought about writing
some of this down?

A few questions/clairifications:

#1 - Just to make sure I understand this.
     The first "short" label sector is just after the index hole, ie: the first
     sector on a track - so in effect, there are 11 sectors/track, but the first
     one is this short "hidden" sector, which the driver does not present to the
     upper levels, so when software thinks of sectors 0-9 (or 1-10) of a 10 sector
     track, it is really seeing 1-10  (or 2-11) of an 11 sector track, given that
     the very first sector is this "special" short sector. Right?

#2 - What is the purpose of the "sector number" entry in this short sector? Would
     it not alwys be zero (or 1)? - There is only one special sector/track right?

#3 - Are the sectors numbred from 1 or 0? And does this include ths short sector?

#4 - If I understood the documents correctly, the sectors on track-0 always report
     volume=0 (so they can be read before mounting) - right?

#5 - The check byte is calculated as:
       - Begin with zero
       - For each data byte:
         Check = Check XOR Data
         Check = Check RRC (Rotate Left) 1
       = Right?
       = Is check performed on ALL bytes from 1st after SYNC to end of data?

Regards,
Dave
-- 
dave04a (at)    Dave Dunfield
dunfield (dot)  Firmware development services & tools: www.dunfield.com
com             Vintage computing equipment collector.
                http://www.parse.com/~ddunfield/museum/index.html

--
Delivered by the SEBHC Mailing List



More information about the Sebhc mailing list