Hi,
I'm attaching a hard drive to my 8080 computer and there seems to be
something about the way the sector translation works that's caught my
attention. Before I go wasting my time trying to figure it out myself
I'll ask here because there's going to be someone who knows (it's 1:30am
and I'm feeling a little lazy).
Observe the following code:
sectran:
;translate the sector given by BC using the
;translate table given by DE
xchg ;HL=.trans
dad b ;HL=.trans(sector)
mov l,m ;L = trans(sector)
mvi h,0 ;HL= trans(sector)
ret ;with value in HL
From a standard CP/M BIOS.
My question is does the BDOS use this as a 16-bit value, or does it cut
it to an 8-bit value, like sectran does. H is loaded with 0 and L is
loaded with the translated sector.
I'm thinking that if this is the case, then a total of 256 tracks *
65536 sectors * 128 bytes = 2048MB. This could be done without a massive
translation table by transferring the desired sector, BC, into HL.
I've only just started writing the CBIOS for the hard drive interface
and I don't really want to waste my time on pointless endeavours.
It wouldn't make sense to use 16-bits for a sector register and 8-bits
for a track register if you're only going to use 8-bits of the sector
register, but perhaps the upper 8-bits are used for internal flags or
error conditions?
Another thing is that the total sectors per track in the Disk Parameter
Block is a 16-bits, not 8-bits.
Apologies if this has been discussed and I've missed it. (Perhaps
someone can provide a link if it has been)
Alexis.