Ignore:
Timestamp:
Mar 9, 2013, 3:36:37 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Slave drives are again initialized properly
  • Delay for Hotkeybar now works properly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r507 r520  
    122122
    123123    mov     si, ControllerResetForDPTinDSDI
    124     call    .CallSIforEveryDrive                        ; Reset all drives to power on settings
    125     mov     si, AH9h_InitializeDriveForUse
    126     ; Fall to .CallSIforEveryDrive                      ; Initialize all drives
    127 
    128 .CallSIforEveryDrive:                                   ; BH will be garbage on exit if this entry point is used,
     124    call    .CallSIforEveryController                   ; Reset all drives to power on settings
     125    mov     si, ControllerInitForMasterOrSingleDPTinDSDI
     126    ; Fall to .CallSIforEveryController                 ; Initialize all controllers (Master and Slave drives)
     127
     128.CallSIforEveryController:                              ; BH will be garbage on exit if this entry point is used,
    129129                                                        ; but reset of all drives will still happen
    130130
     
    166166;   Returns:
    167167;       AH:     Int 13h return status
    168 ;       CF:     0 if successful, 1 if error
    169168;   Corrupts registers:
    170169;       AL, BX, CX, DX
     
    180179    jmp     Device_ResetMasterAndSlaveController
    181180%endif
     181
     182
     183;--------------------------------------------------------------------
     184; ControllerInitForMasterOrSingleDPTinDSDI
     185;   Parameters:
     186;       DS:DI:  Ptr to DPT for Master or Single Drive (initializes both Master and Slave drive)
     187;       SS:BP:  Ptr to IDEPACK
     188;   Returns:
     189;       AH:     Int 13h return status
     190;   Corrupts registers:
     191;       AL, BX, CX, DX
     192;--------------------------------------------------------------------
     193ControllerInitForMasterOrSingleDPTinDSDI:
     194    call    AH9h_InitializeDriveForUse          ; Init Master or Single drive
     195    push    ax                                  ; Store error code
     196
     197    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]    ; Clear AH
     198    add     di, BYTE LARGEST_DPT_SIZE           ; Slave drive or next controller
     199    cmp     [di+DPT.bIdevarsOffset], al
     200    jne     SHORT .NoSlaveDrivePresent
     201
     202    call    AH9h_InitializeDriveForUse          ; Init Slave drive
     203.NoSlaveDrivePresent:
     204    pop     bx
     205    MAX_U   ah, bh                              ; Return error code from either drive
     206    ret
Note: See TracChangeset for help on using the changeset viewer.