Ignore:
Timestamp:
Jan 26, 2013, 4:58:50 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • XTIDE rev 2 and modded XTIDE rev 1 work again (fixed A0<->A3 swap when accessing Control Block Registers).
  • System INT 13h handler is no longer copied to INT 40h (testing if something uses INT 40h).
  • Removed controller hardware reset: now AH=0h and AH=Dh will only re-initialize drives (SB16 Tertiary and Quaternary IDE should now be safe to use when using Secondary IDE).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r493 r501  
    2020; Section containing code
    2121SECTION .text
    22 
    23 ;--------------------------------------------------------------------
    24 ; IdeCommand_ResetMasterAndSlaveController
    25 ;   Parameters:
    26 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    27 ;   Returns:
    28 ;       AH:     INT 13h Error Code
    29 ;       CF:     Cleared if success, Set if error
    30 ;   Corrupts registers:
    31 ;       AL, BX, CX, DX
    32 ;--------------------------------------------------------------------
    33 IdeCommand_ResetMasterAndSlaveController:
    34     ; HSR0: Set_SRST
    35     call    AccessDPT_GetDeviceControlByteToAL
    36     or      al, FLG_DEVCONTROL_SRST | FLG_DEVCONTROL_nIEN   ; Set Reset bit
    37     OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER     DEVICE_CONTROL_REGISTER_out
    38     mov     ax, HSR0_RESET_WAIT_US
    39     call    Timer_DelayMicrosecondsFromAX
    40 
    41     ; HSR1: Clear_wait
    42     call    AccessDPT_GetDeviceControlByteToAL
    43     or      al, FLG_DEVCONTROL_nIEN
    44     and     al, ~FLG_DEVCONTROL_SRST                        ; Clear reset bit
    45     OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER     DEVICE_CONTROL_REGISTER_out
    46     mov     ax, HSR1_RESET_WAIT_US
    47     call    Timer_DelayMicrosecondsFromAX
    48 
    49     ; HSR2: Check_status
    50     mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MAXIMUM, FLG_STATUS_BSY)
    51     jmp     IdeWait_PollStatusFlagInBLwithTimeoutInBH
    52 
    5322
    5423;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.