From 6f28f9f83e4737733b76053891bd9be121aed186 Mon Sep 17 00:00:00 2001 From: Tolik <85737314+Tolik-Trek@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:20:18 +1000 Subject: [PATCH] ... --- constants/SP2000.inc | 59 ++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/constants/SP2000.inc b/constants/SP2000.inc index 12bc94e..f591b0a 100644 --- a/constants/SP2000.inc +++ b/constants/SP2000.inc @@ -581,8 +581,10 @@ RESET_PAGE EQU #A0 SPRINTER: .FDD EQU #00 .RAM EQU #60 -.HDD EQU #80 -.CDROM EQU #C0 +.ATA EQU #80 +.HDD EQU .HDD +.ATAPI EQU #C0 +.CDROM EQU .CDROM TRDOS: .FDD EQU #00 .RAM EQU #04 @@ -1731,6 +1733,8 @@ Write: .Sector EQU #0153 ; cnf 23 ; HDW_SEC P_S_NUM W173; #1F3 Sector register .CylinderLow EQU #0154 ; cnf 24 ; HDW_CLL P_C_LOW W174; #1F4 Cylinder Low register .CylinderHigh EQU #0155 ; cnf 25 ; HDW_CLH P_C_HIG W175; #1F5 Cylinder High register +.ByteCountLow EQU .CylinderLow ; ATAPI +.ByteCountHigh EQU .CylinderHigh ; ATAPI .DeviceHead EQU #4152 ; cnf 26 ; HDW_DRV P_HD_CS ; #1F6 Device/Head register .Command EQU #4153 ; cnf 27 ; HDW_COM P_CMD ; #1F7 Command register .DeviceControl EQU #4154 ; cnf 28 ; ; #3F6 Device Control register @@ -1739,9 +1743,12 @@ Read: .Data EQU #0050 ; cnf 20 ; HDR_DAT P_DATS R170; #1F0 Data register .Error EQU #0051 ; cnf 21 ; HDR_ERR P_ERR R171; #1F1 Error register .Counter EQU #0052 ; cnf 22 ; HDR_CNT R172; #1F2 Counter register +.InterruptReason EQU .Counter ; ATAPI .Sector EQU #0053 ; cnf 23 ; HDR_SEC R173; #1F3 Sector register .CylinderLow EQU #0054 ; cnf 24 ; HDR_CLL R174; #1F4 Cylinder Low register .CylinderHigh EQU #0055 ; cnf 25 ; HDR_CLH R175; #1F5 Cylinder High register +.ByteCountLow EQU .CylinderLow ; ATAPI +.ByteCountHigh EQU .CylinderHigh ; ATAPI .Control EQU #4052 ; cnf 26 ; HDR_DRV R176; #1F6 Device/Head register .Status EQU #4053 ; cnf 27 ; HDR_CTL P_HDST R177; #1F7 Status (Control) register .AltStatus EQU #4054 ; cnf 28 ; ; #3F6 Alternate Status register @@ -1753,29 +1760,49 @@ ErrorBit: ErrorByte: .Abort EQU #04 -CtrlBit: ; 0000 0000 ; Bits for IDE.Read.Status -.Busy EQU 7;ÄÄÄÄÄÄÄÄÙ³³³ ³³³³ ; BSY -.Ready EQU 6;ÄÄÄÄÄÄÄÄÄÙ³³ ³³³³ ; RDY -.Fault EQU 5;ÄÄÄÄÄÄÄÄÄÄÙ³ ³³³³ ; DMA ready for ATAPI -.SeekComplete EQU 4;ÄÄÄÄÄÄÄÄÄÄÄÙ ³³³³ ; Service for ATAPI -.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). +InterruptReasonBit: ; 0000 0000 +; EQU 7;ÄÄÄÄÙ³³³ ³³³³ ; reserved +; EQU 6;ÄÄÄÄÄÙ³³ ³³³³ ; reserved +; EQU 5;ÄÄÄÄÄÄÙ³ ³³³³ ; reserved +; EQU 4;ÄÄÄÄÄÄÄÙ ³³³³ ; reserved +; EQU 3;ÄÄÄÄÄÄÄÄÄÙ³³³ ; reserved +; EQU 2;ÄÄÄÄÄÄÄÄÄÄÙ³³ ; reserved +.IO EQU 1;ÄÄÄÄÄÄÄÄÄÄÄÙ³ ; Direction for the Information transfer. 1 - to Host +.CoD EQU 0;ÄÄÄÄÄÄÄÄÄÄÄÄÙ ; Command or user Data + +InterruptReasonByte: ; 0000 0000 +; EQU #80;ÄÄÙ³³³ ³³³³ ; reserved +; EQU #40;ÄÄÄÙ³³ ³³³³ ; reserved +; EQU #20;ÄÄÄÄÙ³ ³³³³ ; reserved +; EQU #10;ÄÄÄÄÄÙ ³³³³ ; reserved +; EQU #08;ÄÄÄÄÄÄÄÙ³³³ ; reserved +; EQU #04;ÄÄÄÄÄÄÄÄÙ³³ ; reserved +.IO EQU #02;ÄÄÄÄÄÄÄÄÄÙ³ ; Direction for the Information transfer. 1 - to Host +.CoD EQU #01;ÄÄÄÄÄÄÄÄÄÄÙ ; Command or user Data + +CtrlBit: ; 0000 0000 ; Bits for IDE.Read.Status +.Busy EQU 7;ÄÄÄÄÙ³³³ ³³³³ ; BSY +.Ready EQU 6;ÄÄÄÄÄÙ³³ ³³³³ ; RDY +.Fault EQU 5;ÄÄÄÄÄÄÙ³ ³³³³ ; DMA ready for ATAPI +.SeekComplete EQU 4;ÄÄÄÄÄÄÄÙ ³³³³ ; Service for ATAPI +.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 .ATAPI_DMAReady EQU .Fault .ATAPI_Service EQU .SeekComplete -CtrlByte: ; Bytes for IDE.Read.Status -.Busy EQU #80 ; BSY -.Ready EQU #40 ; RDY +CtrlByte: ; Bytes for IDE.Read.Status +.Busy EQU #80 ; BSY +.Ready EQU #40 ; RDY .Fault EQU #20 .SeekComplete EQU #10 -.DataRequest EQU #08 ; DRQ +.DataRequest EQU #08 ; DRQ .CorrectedData EQU #04 ; obsolete .Index EQU #02 ; obsolete -.Error EQU #01 ; 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 .StreamErrror EQU .Fault .ATAPI_DMAReady EQU .Fault