Fixed SELECT_DRIVE for slow drives. Fixed AUTOIDE too.
This commit is contained in:
parent
b4fca7ecb4
commit
90bb74daac
@ -38,7 +38,7 @@ ATAPI_5x_RESET: LD C,IDE.Device.ATAPI
|
||||
CP BIOS.Error.ATAPI.UnitAttention
|
||||
SCF
|
||||
RET Z
|
||||
;
|
||||
;!FIXIT ¥ âண âì ¯à¥àë¢ ¨ï
|
||||
EI
|
||||
HALT
|
||||
DJNZ .loop
|
||||
|
||||
@ -50,7 +50,15 @@ SELECT_DRIVE: AND #0F
|
||||
AND #F0
|
||||
LD BC,IDE.Write.DeviceHead
|
||||
OUT (C),A
|
||||
LD A,H
|
||||
;
|
||||
LD A,high IDE.Read.Status
|
||||
IN A,(low IDE.Read.Status)
|
||||
AND IDE.CtrlByte.Busy
|
||||
JR Z,.notBusy
|
||||
LD B,32
|
||||
DJNZ $
|
||||
;
|
||||
.notBusy: LD A,H
|
||||
EXX
|
||||
RET
|
||||
;
|
||||
|
||||
@ -823,9 +823,10 @@ DETECTORS:
|
||||
.IdentPDevChk: LD E,IDE.ATAPI.IdentifyPacketDevice
|
||||
LD BC,IDE.Write.Command
|
||||
OUT (C),E
|
||||
LD HL,PAUSES.WAIT.IDE
|
||||
;
|
||||
LD HL,PAUSES.HALT.Time_2s
|
||||
LD DE,IDE.CtrlByte.Busy*256 + 0
|
||||
CALL BITS_WAITS.WAIT_PRT
|
||||
CALL BITS_WAITS.Clear_BUSY
|
||||
RET C
|
||||
;
|
||||
; BC = IDE.Read.Status
|
||||
@ -868,9 +869,10 @@ SetUP_CHANELS:
|
||||
CALL .CMD
|
||||
LD A,2
|
||||
.CMD: CALL SELECT_IDE
|
||||
LD BC,IDE.Write.Command
|
||||
LD H,IDE.ATA.Nop
|
||||
OUT (C),H
|
||||
PAUSE_DJNZ 32
|
||||
LD BC,IDE.Write.Command
|
||||
LD H,IDE.ATA.Nop
|
||||
OUT (C),H
|
||||
PAUSE_DJNZ 32
|
||||
; Disable INTRQ
|
||||
; LD BC,IDE.Write.DeviceControl
|
||||
|
||||
Loading…
Reference in New Issue
Block a user