<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 15 Dec 2004 12:37:54 +0100
From   : John Kortink <kortink@...>
Subject: Re: Debugging ADFS and IDE drives

On 15 Dec 2004 00:21:19 +0000, Jonathan Graham Harston wrote:

>> Message-ID: <041213145502@...>
> 
>Yes! YES! *YES!* <fx: pulls clenched fist down, lifting knee slightly>
> 
>It works!
> 
>I've fixed it by doing each sector access twice, by adding the
>following code:
> 
>> .CommandStart                    :\ C=R/W, &B0/1=>block
>> JSR SetGeometry                  :\ Set shape to cylinder*4*64
>> .CommandLoop
> 
>LDX #2:.Twice                      :\ Bypass DRQ bug
> 
>> JSR SetSector:LDY #0             :\ Set sector, count, command
>> JSR WaitForData:AND #&21:BNE TransError
>> .TransferLoop
>> BIT &CD:BVS TransTube:BCC IORead
>> .IOWrite  :LDA (&80),Y:STA &FC40:BRA TransferByte
>> .IORead   :LDA &FC40:STA (&80),Y:BRA TransferByte
>> .TransTube:BCC TubeRead
>> .TubeWrite:LDA &FEE5:STA &FC40:BRA TransferByte
>> .TubeRead :LDA &FC40:STA &FEE5:BRA TransferByte
>> :
>> .TransferByte
>> INY:BNE TransferLoop             :\ Loop for 256 bytes
> 
>DEX:BNE Twice:INC &81              :\ Bypass DRQ bug

I wouldn't be surprised, then, if it 'worked' as well
by simply re-reading the last byte. I.e. :

DEX:BEQ done:DEY:BNE Transferloop:.done

But it's still a nasty coverup, for hardware (either drive
or interface) malfunction.


John Kortink

-- 

Email    : kortink@...         
Homepage : http://www.inter.nl.net/users/J.Kortink
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>