Fixed SELECT_DRIVE for slow drives. Fixed AUTOIDE too.

This commit is contained in:
Tolik 2025-02-28 01:39:06 +10:00
parent b4fca7ecb4
commit 90bb74daac
3 changed files with 17 additions and 7 deletions

View File

@ -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

View File

@ -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
;

View File

@ -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