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


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/Device
Files:
2 edited

Legend:

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

    r501 r507  
    5555%else                   ; IDE
    5656    Device_FinalizeDPT      EQU     IdeDPT_Finalize
     57%endif
     58
     59
     60;--------------------------------------------------------------------
     61; Device_ResetMasterAndSlaveController
     62;   Parameters:
     63;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     64;   Returns:
     65;       AH:     INT 13h Error Code
     66;       CF:     Cleared if success, Set if error
     67;   Corrupts registers:
     68;       AL, BX, CX, DX
     69;--------------------------------------------------------------------
     70%ifdef MODULE_SERIAL    ; IDE + Serial
     71Device_ResetMasterAndSlaveController:
     72    TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE    ReturnSuccessForSerialPort
     73    jmp     IdeCommand_ResetMasterAndSlaveController
     74
     75%else                   ; IDE
     76    Device_ResetMasterAndSlaveController    EQU     IdeCommand_ResetMasterAndSlaveController
    5777%endif
    5878
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r501 r507  
    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;--------------------------------------------------------------------
     33IdeCommand_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
    2253
    2354;--------------------------------------------------------------------
     
    4980    test    bh, FLG_DRVNHEAD_DRV        ; Wait already done for Master
    5081    jnz     SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster
    51     call    AHDh_WaitUntilDriveMotorHasReachedFullSpeed
     82    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MOTOR_STARTUP, FLG_STATUS_DRDY)
     83    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
    5284.SkipLongWaitSinceDriveIsNotPrimaryMaster:
    5385
Note: See TracChangeset for help on using the changeset viewer.