This commit is contained in:
Anatoliy Belyanskiy 2023-08-22 18:12:59 +10:00
parent 05e89d7636
commit efb679dd65

View File

@ -1577,16 +1577,16 @@ INIT_TBL_IDE3 HDD_INIT_TABLE = SYS_PAGE.IDE_3 ; !HARDC
; <EFBFBD>¥£¨áâà  ¤à¥á  ­ ª®¯¨â¥«ï (3F7 ç⥭¨¥) ᮤ¥à¦¨â ­®¬¥à £®«®¢ª¨ ¨ <EFBFBD>†Œ„, ¢ë¡à ­­ë¥ ¢ ¯à¥¤ë¤ã饩 ®¯¥à æ¨¨. ; <EFBFBD>¥£¨áâà  ¤à¥á  ­ ª®¯¨â¥«ï (#3F7 ç⥭¨¥) ᮤ¥à¦¨â ­®¬¥à £®«®¢ª¨ ¨ HDD, ¢ë¡à ­­ë¥ ¢ ¯à¥¤ë¤ã饩 ®¯¥à æ¨¨.
; <EFBFBD>¨âë 0, 1 - /DSO, /DS1 - ¡¨âë ¢ë¡®à  á®®â¢¥âáâ¢ãî饣® ­ ª®¯¨â¥«ï 0 ¨«¨ 1. ; <EFBFBD>¨âë 0, 1 - /DSO, /DS1 - ¡¨âë ¢ë¡®à  á®®â¢¥âáâ¢ãî饣® ­ ª®¯¨â¥«ï 0 ¨«¨ 1.
; <EFBFBD>¨âë 2...5 - /HSO../HS3 - ᮤ¥à¦ â ¤¢®¨ç­ë© ª®¤ ¢ë¡à ­­®© £®«®¢ª¨. ; <EFBFBD>¨âë 2...5 - /HSO../HS3 - ᮤ¥à¦ â ¤¢®¨ç­ë© ª®¤ ¢ë¡à ­­®© £®«®¢ª¨.
; <EFBFBD>¨â 6 - Write Gate - ¡¨â ¢ë¯®«­¥­¨ï § ¯¨á¨,  ªâ¨¢¥­ ¢® ¢à¥¬ï ®¯¥à æ¨¨ § ¯¨á¨ ; <EFBFBD>¨â 6 - Write Gate - ¡¨â ¢ë¯®«­¥­¨ï § ¯¨á¨,  ªâ¨¢¥­ ¢® ¢à¥¬ï ®¯¥à æ¨¨ § ¯¨á¨
Write: Write:
.DeviceControl EQU #4154 ; ; #3F6 Device Control register .DeviceControl EQU #4154 ; ; #3F6 Device Control register
.DriveCtrl EQU #4152 ; HDW_DRV P_HD_CS ; #1F6 Drive Control register
.Command EQU #4153 ; HDW_COM P_CMD ; #1F7 Command register .Command EQU #4153 ; HDW_COM P_CMD ; #1F7 Command register
;.DriveCtrl EQU #4152 ; HDW_DRV P_HD_CS ; #1F6 Device/Head register
.DeviceHead EQU #4152 ; HDW_DRV P_HD_CS ; #1F6 Device/Head register
.Data EQU #0150 ; HDW_DAT W170 ; #1F0 Data register .Data EQU #0150 ; HDW_DAT W170 ; #1F0 Data register
.Features EQU #0151 ; HDW_ERR W171 ; #1F1 Features register .Features EQU #0151 ; HDW_ERR W171 ; #1F1 Features register
.Counter EQU #0152 ; HDW_CNT P_S_CNT W172 ; #1F2 Counter register .Counter EQU #0152 ; HDW_CNT P_S_CNT W172 ; #1F2 Counter register
@ -1595,10 +1595,10 @@ Write:
.CylinderHigh EQU #0155 ; HDW_CLH P_C_HIG W175 ; #1F5 Cylinder High register .CylinderHigh EQU #0155 ; HDW_CLH P_C_HIG W175 ; #1F5 Cylinder High register
Read: Read:
.DrvAddress EQU #4055 ; #3F7 .DrvAddress EQU #4055 ; ; #3F7
.AltControl EQU #4054 ; ; #3F6 Alternate Status register .AltControl EQU #4054 ; ; #3F6 Alternate Status register
.Control EQU #4052 ; HDR_DRV R176 ; #1F6 Drive Control register
.Status EQU #4053 ; HDR_CTL P_HDST R177 ; #1F7 Status (Control) register .Status EQU #4053 ; HDR_CTL P_HDST R177 ; #1F7 Status (Control) register
.Control EQU #4052 ; HDR_DRV R176 ; #1F6 Device/Head register
.Data EQU #0050 ; HDR_DAT P_DATS R170 ; #1F0 Data register .Data EQU #0050 ; HDR_DAT P_DATS R170 ; #1F0 Data register
.Error EQU #0051 ; HDR_ERR P_ERR R171 ; #1F1 Error register .Error EQU #0051 ; HDR_ERR P_ERR R171 ; #1F1 Error register
.Counter EQU #0052 ; HDR_CNT R172 ; #1F2 Counter register .Counter EQU #0052 ; HDR_CNT R172 ; #1F2 Counter register
@ -1606,16 +1606,28 @@ Read:
.CylinderLow EQU #0054 ; HDR_CLL R174 ; #1F4 Cylinder Low register .CylinderLow EQU #0054 ; HDR_CLL R174 ; #1F4 Cylinder Low register
.CylinderHigh EQU #0055 ; HDR_CLH R175 ; #1F5 Cylinder High register .CylinderHigh EQU #0055 ; HDR_CLH R175 ; #1F5 Cylinder High register
ControlBit: ; Bits for HardDrive.Read.Status ControlBit: ; 0000 0000 ; Bits for HardDrive.Read.Status
.Busy EQU 7 ; BSY .Busy EQU 7;ÄÄÄÄÄÄÄÄÙ³³³ ³³³³ ; BSY
.Ready EQU 6 ; RDY .Ready EQU 6;ÄÄÄÄÄÄÄÄÄÙ³³ ³³³³ ; RDY
.Fault EQU 5 .Fault EQU 5;ÄÄÄÄÄÄÄÄÄÄÙ³ ³³³³
.SeekComplete EQU 4;ÄÄÄÄÄÄÄÄÄÄÄÙ ³³³³ .DeferredWriteError
.DataRequest EQU 3;ÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³³³ ; DRQ
.CorrectedData EQU 2;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³³ obsolete
.Index EQU 1;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ obsolete .SenseDataAvailable
.Error EQU 0;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ; Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset).
.CheckCondition EQU .Error
.StreamError EQU .Fault
ControlByte: ; Bits for HardDrive.Read.Status
.Busy EQU #80 ; BSY
.Ready EQU #40 ; RDY
.Fault EQU #20
.StreamErrror EQU .Fault .StreamErrror EQU .Fault
.DeferredWriteError EQU 4 .DeferredWriteError EQU #10
.DataRequest EQU 3 ; DRQ .DataRequest EQU #08 ; DRQ
.AlignmentError EQU 2 ; obsolete .AlignmentError EQU #04 ; obsolete
.SenseDataAvailable EQU 1 ; obsolete .SenseDataAvailable EQU #02 ; obsolete
.Error EQU 0 ; Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset). .Error EQU #01 ; Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset).
.CheckCondition EQU .Error .CheckCondition EQU .Error
/* /*
Bit Abbreviation Function Bit Abbreviation Function
@ -1638,6 +1650,67 @@ Device:
.HDD EQU 1 .HDD EQU 1
.CDROM EQU 2 .CDROM EQU 2
.NONE EQU #FF .NONE EQU #FF
Drive:
.Master EQU #A0
.Slave EQU #B0
ATA:
; ATA-2 commands ************************
.ExecuteDeviceDiagnostic EQU #90
.IdentifyDevice EQU #EC
.InitializeDeviceParameters EQU #91
.ReadSectorsWithRetry EQU #20
.ReadSectors EQU #21
.ReadVerifySectorsWithRetry EQU #40
.ReadVerifySectors EQU #41
.Seek EQU #70
.WriteSectorsWithRetry EQU #30
.WriteSectors EQU #31
; ****** additional commands ************
.AcknowledgeMediaChange EQU #db
.PostBoot EQU #dc
.PreBoot EQU #dd
.CheckPowerMode EQU #98
.CheckPowerMode2 EQU #e5
.DoorLock EQU #de
.DoorUnlock EQU #df
.DownloadMicrocode EQU #92
.Idle EQU #97
.Idle2 EQU #e3
.IdleImmediate EQU #95
.IdleImmediate2 EQU #e1
.MediaEject EQU #ed
.Nop EQU #00
.ReadBuffer EQU #e4
.ReadDMA EQU #c8
.ReadLong EQU #22
.ReadMultiple EQU #c4
.Recalibrate EQU #10
.SetFeatures EQU #ef
.SetMultipleMode EQU #c6
.Sleep EQU #99
.Sleep2 EQU #e6
.Standby EQU #96
.Standby2 EQU #e2
.StandbyImmediate EQU #94
.Standby2Immediate EQU #e0
.WriteBuffer EQU #e8
.WriteDMA EQU #ca
.WriteLong EQU #32
.WriteMultiple EQU #c5
.WriteSame EQU #e9
.WriteVerify EQU #3c
; **** device specific commands *************
.FormatTrack EQU #50
; command modificators:
; for ReadSectors, WriteSectors, ReadVerifySectors,
; ReadDMA, WriteDMA, ReadLong, WriteLong
.WithoutRetry EQU #01
; ATA
; .Master EQU #A0
; .Slave EQU #B0
;
ENDMODULE ENDMODULE
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------