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


Ignore:
Timestamp:
Mar 1, 2013, 5:12:33 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Reduced minimum time to display hotkeys. Now it is 2 seconds.
  • Brought back IDE controller reset.
  • Space savings by merging AH=Dh to AH=0h. AH=Dh is now redirected to AH=9h.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers
Files:
1 deleted
2 edited

Legend:

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

    r493 r507  
    378378    dw  UnsupportedFunction                         ; 0Bh, Write Disk Sectors with ECC (XT, AT, EISA)
    379379    dw  AHCh_HandlerForSeek                         ; 0Ch, Seek (All)
    380     dw  AHDh_HandlerForResetHardDisk                ; 0Dh, Alternate Disk Reset (All)
     380    dw  AH9h_HandlerForInitializeDriveParameters    ; 0Dh, Alternate Disk Reset (All)
    381381    dw  UnsupportedFunction                         ; 0Eh, Read Sector Buffer (XT, PS/1), ESDI Undocumented Diagnostic (PS/2)
    382382    dw  UnsupportedFunction                         ; 0Fh, Write Sector Buffer (XT, PS/1), ESDI Undocumented Diagnostic (PS/2)
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r505 r507  
    119119    jz      SHORT .ErrorCodeNotUsed
    120120    mov     bl, [di+DPT.bIdevarsOffset]                 ; replace drive number with Idevars pointer for cmp with dl
     121.ErrorCodeNotUsed:
    121122
    122 .ErrorCodeNotUsed:                                      ; BH will be garbage on exit if this entry point is used,
     123    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,
    123129                                                        ; but reset of all drives will still happen
    124130
     
    130136    ; will point to them.  Performance isn't an issue, as this is a reset operation.
    131137    ;
    132     mov     cx, (ROMVARS.ideVarsEnd - ROMVARS.ideVarsBegin) / IDEVARS_size
     138    mov     cx, NUMBER_OF_IDEVARS
    133139
    134140.loop:
     141    push    si
    135142    call    FindDPT_ForIdevarsOffsetInDL                ; look for the first drive on this controller, if any
     143    pop     si
    136144    jc      SHORT .notFound
    137145
    138     call    AHDh_ResetDrive                             ; reset master and slave on that controller
     146    push    bx
     147    push    cx
     148    push    dx
     149    call    si                                          ; Reset Master AND Slave or initialize Master OR Slave drive
     150    pop     dx
     151    pop     cx
     152    pop     bx
    139153    call    BackupErrorCodeFromTheRequestedDriveToBH    ; save error code if same controller as drive from entry
    140154
     
    142156    add     dl, IDEVARS_size                            ; move Idevars pointer forward
    143157    loop    .loop
     158    ret
    144159
    145 .done:
    146     ret
     160
     161;--------------------------------------------------------------------
     162; ControllerResetForDPTinDSDI
     163;   Parameters:
     164;       DS:DI:  Ptr to DPT for drive to reset (resets both Master and Slave drive)
     165;       SS:BP:  Ptr to IDEPACK
     166;   Returns:
     167;       AH:     Int 13h return status
     168;       CF:     0 if successful, 1 if error
     169;   Corrupts registers:
     170;       AL, BX, CX, DX
     171;--------------------------------------------------------------------
     172ControllerResetForDPTinDSDI:
     173%ifdef MODULE_IRQ
     174    call    Interrupts_UnmaskInterruptControllerForDriveInDSDI
     175%endif
     176%ifdef MODULE_ADVANCED_ATA
     177    call    Device_ResetMasterAndSlaveController
     178    jmp     AdvAtaInit_InitializeControllerForDPTinDSDI
     179%else
     180    jmp     Device_ResetMasterAndSlaveController
     181%endif
Note: See TracChangeset for help on using the changeset viewer.