Changeset 120 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Feb 28, 2011, 4:41:41 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Display library now gets initialized.
  • Small optimizations.
  • Something is still broken.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
Files:
2 edited

Legend:

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

    r116 r120  
    8080    out     dx, al                      ; Select Master or Slave drive
    8181    sub     dx, BYTE REG_IDE_DRVHD      ; Back to IDE Base port
    82     call    AH25h_GetDriveDetectionTimeoutValue
     82
     83    ; Wait until ready to accept commands
     84    xor     bh, bh                      ; BX now contains bus type
     85    mov     cl, B_TIMEOUT_DRVINFO       ; Load short timeout
     86    cmp     [RAMVARS.bDrvCnt], bh       ; Detecting first drive?
     87    eCMOVE  cl, B_TIMEOUT_RESET         ;  If so, load long timeout
    8388    call    HStatus_WaitRdy             ; Wait until ready to accept commands
    8489    jc      SHORT .Return               ; Return if error
     
    9297    ; Transfer data
    9398    sub     dx, BYTE REGR_IDE_ST        ; DX to IDE Data Reg
    94     xor     bh, bh                      ; BX now contains bus type
    9599    mov     cx, 256                     ; Transfer 256 words (single sector)
    96100    cld                                 ; INSW to increment DI
     
    98102    call    HStatus_WaitRdyDefTime      ; Wait until drive ready
    99103
    100     ; Return
    101104.Return:
    102105    pop     bx
     
    104107    pop     di
    105108    ret
    106 
    107 
    108 ;--------------------------------------------------------------------
    109 ; Returns timeout value for drive detection.
    110 ; Long timeout is required for detecting first drive to make sure it is
    111 ; ready after power-on (ATA specification says up to 31 seconds).
    112 ; Short timeout is used for additional drives to prevent long boot time
    113 ; when drive has failed or it is not present.
    114 ;
    115 ; AH25h_GetDriveDetectionTimeoutValue
    116 ;   Parameters:
    117 ;       DS:     Segment to RAMVARS
    118 ;   Returns:
    119 ;       CL:     Timeout value
    120 ;   Corrupts registers:
    121 ;       Nothing
    122 ;--------------------------------------------------------------------
    123 ALIGN JUMP_ALIGN
    124 AH25h_GetDriveDetectionTimeoutValue:
    125     mov     cl, B_TIMEOUT_RESET         ; Load long timeout (assume first drive)
    126     cmp     BYTE [RAMVARS.bDrvCnt], 0   ; Detecting first drive?
    127     je      SHORT .Return
    128     mov     cl, B_TIMEOUT_DRVINFO       ; Load short timeout
    129 ALIGN JUMP_ALIGN, ret   ; This speed optimization may be unnecessary
    130 .Return:
    131     ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HStatus.asm

    r88 r120  
    249249;       DS:     Segment to RAMVARS
    250250;   Returns:
    251 ;       Nothing
     251;       CF:     Set if timeout
     252;               Cleared if time left
    252253;   Corrupts registers:
    253254;       CX
Note: See TracChangeset for help on using the changeset viewer.