From d464c878bb8a8e68daa94f9e37afbd8aec15afd8 Mon Sep 17 00:00:00 2001 From: Tolik <85737314+Tolik-Trek@users.noreply.github.com> Date: Wed, 28 May 2025 04:10:01 +1000 Subject: [PATCH] ... --- constants/SP2000.inc | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/constants/SP2000.inc b/constants/SP2000.inc index 65819c8..4305f49 100644 --- a/constants/SP2000.inc +++ b/constants/SP2000.inc @@ -1825,17 +1825,37 @@ CtrlByte: ; Bytes for IDE.Read.Status .StreamErrror EQU .Fault .ATAPI_DMAReady EQU .Fault .ATAPI_Service EQU .SeekComplete -/* -Bit Abbreviation Function -0 ERR Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset). -1 IDX Index. Always set to zero. -2 CORR Corrected data. Always set to zero. -3 DRQ Set when the drive has PIO data to transfer, or is ready to accept PIO data. -4 SRV Overlapped Mode Service Request. -5 DF Drive Fault Error (does not set ERR). -6 RDY Bit is clear when drive is spun down, or after an error. Set otherwise. -7 BSY Indicates the drive is preparing to send/receive data (wait for it to clear). In case of 'hang' (it never clears), do a software reset. -*/ +; Bit Abbreviation Function +; 7 BSY Indicates the drive is preparing to send/receive data (wait for it to clear). In case of 'hang' (it never clears), do a software reset. +; 6 RDY Bit is clear when drive is spun down, or after an error. Set otherwise. +; 5 DF Drive Fault Error (does not set ERR). +; 4 SRV Overlapped Mode Service Request. +; 3 DRQ Set when the drive has PIO data to transfer, or is ready to accept PIO data. +; 2 CORR Corrected data. Always set to zero. +; 1 IDX Index. Always set to zero. +; 0 ERR Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset). + +; device/head register bits +DeviceHeadByte: +.LBA EQU #40 +.Slave EQU #10 +; +DeviceHeadBit: +.LBA EQU 6 ; LBA = 1 +.Slave EQU 4 ; Slave = 1 + +DeviceControlBit: +.Always_Set EQU 3 +.Reset EQU 2 ;SRST +.Int EQU 1 ;nIEN +.AlwaysClear EQU 0 + +DeviceControlByte: +.setReset EQU #0C ;SRST +.setInt EQU #0A ;nIEN +.resReset EQU #08 +.resInt EQU #08 + Chanel: .Set_0: EQU #20BC ; для использования с полной адресацией (рег BC), заслать '1' .Set_1: EQU #00BC ; для использования с полной адресацией (рег BC), заслать '1'