Changeset 544 in xtideuniversalbios


Ignore:
Timestamp:
Apr 17, 2013, 5:16:00 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Comparing BX:DX:AX against 15,482,880 sectors now works correctly.
  • P-Cylinders are now stored to Compatible DPTs if EBIOS functions are disabled by CHS adressing mode.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
2 edited

Legend:

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

    r542 r544  
    136136    ; Store P-CHS. Based on phoenix specification this is returned only if
    137137    ; total sector count is 15,482,880 or less.
    138     sub     ax, MAX_SECTOR_COUNT_TO_RETURN_PCHS & 0FFFFh
    139     sbb     dx, MAX_SECTOR_COUNT_TO_RETURN_PCHS >> 16
     138    sub     ax, (MAX_SECTOR_COUNT_TO_RETURN_PCHS+1) & 0FFFFh
     139    sbb     dx, (MAX_SECTOR_COUNT_TO_RETURN_PCHS+1) >> 16
    140140    sbb     bx, cx      ; Zero
    141     ja      SHORT .ReturnWithSuccess
     141    jnc     SHORT .ReturnWithSuccess
    142142    or      BYTE [di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID
    143143
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r543 r544  
    122122
    123123%ifdef MODULE_EBIOS
     124%ifdef CREATE_COMPATIBLE_DPT
     125    ; Store P-Cylinders here for Compatible DPTs when FLGL_DPT_LBA is not set
     126    ; or when drive has over 15,482,880 sectors
     127    mov     [di+DPT.wPchsCylinders], ax
     128%endif
    124129    test    cl, FLGL_DPT_LBA
    125130    jz      SHORT .NoLbaSoNoEBIOS
     
    128133    ; we only need P-Cylinders so we can return it from AH=48h
    129134    call    AtaGeometry_GetLbaSectorCountToBXDXAXfromAtaInfoInESSI
    130     sub     ax, MAX_SECTOR_COUNT_TO_RETURN_PCHS & 0FFFFh
    131     sbb     dx, MAX_SECTOR_COUNT_TO_RETURN_PCHS >> 16
     135    sub     ax, (MAX_SECTOR_COUNT_TO_RETURN_PCHS+1) & 0FFFFh
     136    sbb     dx, (MAX_SECTOR_COUNT_TO_RETURN_PCHS+1) >> 16
    132137    sbb     bx, BYTE 0
    133     ja      SHORT .StoreNumberOfLbaSectors
     138    jnc     SHORT .StoreNumberOfLbaSectors
    134139
    135140    ; Since we might have altered the default P-CHS parameters to be
     
    146151
    147152    ; We could remove wPchsCylinders from DPT if we calculate it on AH=48h
    148     ; but that would require extra code so we save ROM space instead.
     153    ; (and for compatible DPTs) but that would require extra code so we save ROM space instead.
    149154    mov     [di+DPT.wPchsCylinders], ax
    150155
Note: See TracChangeset for help on using the changeset viewer.