Changeset 618 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h


Ignore:
Timestamp:
Aug 31, 2021, 2:17:47 PM (3 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • Updated the BIOS makefile. Added the NO_ATAID_CORRECTION define back to the Tiny build as I've realized that the correction code should not be needed for builds without MODULE_EBIOS. Also added a new makefile target 'custom' to make it easier for people to make custom builds.
  • Fixed a bug where calling INT 13h/AH=15h for drives not handled by XUB (floppy drives for example) would return an error due to the fact that any non-zero return value in AH from the other BIOS would cause the CF to be set in Int13h_SetErrorCodeToIntpackInSSBPfromAH. The return path is now via Int13h_ReturnFromHandlerWithoutStoringErrorCode which means that no status/error code will be returned in the BDA but that should not be a problem as the other BIOS should do that anyway. This change also fixed another potential problem where return values in DL from the other BIOS were assumed to be drive numbers when MODULE_SERIAL_FLOPPY is included in the build.
  • Minor optimizations and fixes.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
Files:
5 edited

Legend:

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

    r615 r618  
    106106; Enable/disable advanced power management command can be used to scale
    107107; power consumption and performance. Drive supporting Enable APM might not
    108 ; support Disable AMP so we set the drive to max performance if stand by
     108; support Disable APM so we set the drive to max performance if stand by
    109109; timer value is 0 (idle/standby disabled)
    110110;
     
    126126    test    dl, dl
    127127    jnz     SHORT .EnablePowerSave
    128     dec     dx
    129     dec     dx      ; DL = FEh = Maximum performance
    130     jmp     AH23h_SetControllerFeatures
    131    
     128    mov     dl, 0FEh    ; Maximum performance
     129    SKIP2B  f
     130
    132131; TODO: We should add power management level to IDEVARS to be adjustable with xtidecfg
    133132.EnablePowerSave:
    134133    mov     dl, 0BFh    ; For Toshiba 1.8" HDD: 80h...BFh = Mode 1
    135     jmp     AH23h_SetControllerFeatures
    136 %endif ; %ifdef MODULE_POWER_MANAGEMENT
     134    jmp     SHORT AH23h_SetControllerFeatures
     135%endif ; MODULE_POWER_MANAGEMENT
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm

    r617 r618  
    6565;   Parameters:
    6666;       AH:     INT 13h error code
    67 ;       CX:     Number of sectors that was meant to we verified
     67;       CX:     Number of sectors that was meant to be verified
    6868;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    6969;       SS:BP:  Ptr to IDEPACK
     
    7474ALIGN JUMP_ALIGN
    7575AH4h_CalculateNumberOfSuccessfullyVerifiedSectors:
    76     xchg    cx, ax          ; Store error code to CL
     76    xchg    cx, ax                      ; Store error code to CH
    7777    call    Device_ReadLBAlowRegisterToAL
    78     mov     ah, [bp+IDEPACK.bLbaLow]
    79     sub     al, ah          ; AL = sector address with verify failure - starting sector address
     78    sub     al, [bp+IDEPACK.bLbaLow]    ; AL = sector address with verify failure - starting sector address
    8079    xor     ah, ah
    81     xchg    cx, ax          ; Number of successfully verified sectors in CX, error code in AH
     80    xchg    cx, ax                      ; Number of successfully verified sectors in CX, error code in AH
    8281    stc
    8382    ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm

    r616 r618  
    204204    mov     dl, [cs:ROMVARS.bIdleTimeout]
    205205    push    dx
    206     push    dx
    207206    test    dh, FLGH_DPT_APM_SUPPORTED
    208207    jz      SHORT .NoAdvancedPowerManagementSupport
     
    213212    ; COMMAND_STAND_BY seemed to do the trick
    214213    pop     dx
     214    push    dx
    215215    mov     al, COMMAND_STAND_BY
    216216    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY)
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm

    r617 r618  
    4141AH44h_HandlerForExtendedVerifySectors:
    4242    call    Prepare_ByLoadingDapToESSIandVerifyingForTransfer
    43     push    WORD [es:si+DAP.wSectorCount]               ; Store for successfull number of sectors transferred
     43    push    WORD [es:si+DAP.wSectorCount]               ; Store for successful number of sectors transferred
    4444    mov     ah, [cs:bx+g_rgbVerifyCommandLookup]
    4545    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm

    r592 r618  
    3939    mov     bl, 3Fh             ; Load sector number mask
    4040    and     bl, cl              ; Sector number now in BL
     41%ifndef USE_186
    4142    sub     cl, bl              ; Remove from cylinder number high
    42     eROL_IM cl, 2               ; High bits to beginning
     43    rol     cl, 1               ; High bits to beginning
     44    rol     cl, 1
     45%else
     46    shr     cl, 6
     47%endif
    4348    mov     bh, dh              ; Copy Head number
    4449    xchg    cl, ch              ; Cylinder number now in CX
Note: See TracChangeset for help on using the changeset viewer.