# HG changeset patch # User afra # Date 1136756357 0 # Node ID 136a4e706aa65f08fbb96e74d5f4fea8bef645aa # Parent 19b2c99a0b80b5457dbdd000db2ef24cd4f95fb7 Fixed step rate issues on recalibrate on original Dragon 5.25" drives diff -r 19b2c99a0b80 -r 136a4e706aa6 level1/modules/ddisk.asm --- a/level1/modules/ddisk.asm Sun Jan 08 02:39:25 2006 +0000 +++ b/level1/modules/ddisk.asm Sun Jan 08 21:39:17 2006 +0000 @@ -78,13 +78,19 @@ * Seperated NMI disable/drive select code on alpha, as above patches * worked fine on Mess, but not on real hardware (timing problems). * -* 2006-01-08 +* 2006-01-08, P.Harvey-Smith. * Added support for Dragon 32, that has had a memory upgraded to 64K, * this is treated like the Dragon 64 EXCEPT that the code to manipulate * the ACIA is not included. This is required due to the incomplete * address decoding, writes to the non-existant ACIA would hit the PIA * at FF00, and cause a crash. -* +* +* 2006-01-08, P.Harvey-Smith. +* Since I now have a genuine Dragon 5.25" drive, found that nitros format +* fell over accessing it, this was due to the step rate not being set +* correctly in the drive recalibrate routine, I ahve corrected this to +* use the value in the descriptor. +* nam DDisk ttl Dragon Floppy driver @@ -212,6 +218,10 @@ fcb 10 ; Priority byte + nop + nop + nop + lbsr ResetTrack0 * Init * * Entry: @@ -222,11 +232,12 @@ * CC = carry set on error * B = error code * -DragonDebug EQU 1 +DragonDebug EQU 0 Init IFNE DragonDebug pshs y ; This is here so I can find disk driver in mess ldy #$AA55 ; by setting register breakpoint to y=$AA55 ! + sty $8000 puls y ENDC @@ -669,9 +680,7 @@ SeekT5 STA DataReg ; Write track no to controler - ldb PD.Stp,Y ; Set Step Rate according to Parameter block - andb #%00000011 ; mask in only step rate bits - eorb #%00000011 ; flip bits to make correct encoding + bsr GetStepInB ; get step rate ORB #SeekCmnd ; add seek command LBSR FDCCommand PSHS X @@ -683,6 +692,15 @@ SeekT6 CLRB ; return no error to caller RTS +; +; Get step rate in bottom 2 bits of B +; +GetStepInB + ldb PD.Stp,Y ; Set Step Rate according to Parameter block + andb #%00000011 ; mask in only step rate bits + eorb #%00000011 ; flip bits to make correct encoding + rts + ; Set Side2 Mask ; A contains the track number on entry SetSide LSRA ; Get bit 0 into carry & devide track no by 2 @@ -891,9 +909,6 @@ ; DoWriteTrack - pshs y - ldy #$5567 - puls y lbsr SelectDrive ; Select drive lda R$Y+1,x @@ -919,14 +934,18 @@ ldx >CDrvTab,u clr