Changeset 612 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
May 26, 2021, 1:42:14 PM (3 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • BIOSDRVS builds again (broken since r609). Also removed the last remnants of RESERVE_DIAGNOSTIC_CYLINDER from BIOSDRVS that I missed in r606.
  • Put in a limit on the P-CHS cylinder count in an attempt to improve compatibility with some CF cards that violates the ATA specification. The limit applies only to the BIOS. BIOSDRVS will continue to show the true cylinder count since we might want to add code later to warn the user when encountering incompatible drives like these.
  • Optimized the bug fix in r611.
  • Updated the copyright notices in XTIDECFG and BIOSDRVS.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
4 edited

Legend:

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

    r611 r612  
    173173    ; Output Sector Address High (only used by LBA48)
    174174%ifdef MODULE_EBIOS
    175     eMOVZX  ax, [bp+IDEPACK.bLbaLowExt]     ; Zero sector count
    176     xchg    al, ah      ; LBA low ext to AH, zero sectors to AL
     175    mov     ah, [bp+IDEPACK.bLbaLowExt]
     176    xor     al, al                          ; Zero sector count
    177177    mov     cx, [bp+IDEPACK.wLbaMiddleAndHighExt]
    178178    call    OutputSectorCountAndAddress
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm

    r606 r612  
    102102AH8h_GetDriveParameters:
    103103    call    AccessDPT_GetLCHStoAXBLBH
    104     call    AH8h_LimitAXtoMaximumLCylinders
     104    call    AtaGeometry_LimitAXtoMaximumLCylinders
    105105    ; Fall to .PackReturnValues
    106106
     
    136136    eSHR_IM bl, FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION
    137137%endif
    138     ret
    139 
    140 
    141 ;--------------------------------------------------------------------
    142 ; AH8h_LimitAXtoMaximumLCylinders
    143 ;   Parameters:
    144 ;       AX:     Number of total L-CHS cylinders (1...1027)
    145 ;   Returns:
    146 ;       AX:     Number of usable L-CHS cylinders (1...1024)
    147 ;   Corrupts registers:
    148 ;       Nothing
    149 ;--------------------------------------------------------------------
    150 AH8h_LimitAXtoMaximumLCylinders:
    151     MIN_U   ax, MAX_LCHS_CYLINDERS
    152138    ret
    153139
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm

    r609 r612  
    8484    dec     dx                      ; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL
    8585    jns     SHORT .CheckIfLargeTranslationWanted
    86     call    AH8h_LimitAXtoMaximumLCylinders ; TRANSLATEMODE_NORMAL maximum cylinders
     86    call    AtaGeometry_LimitAXtoMaximumLCylinders  ; TRANSLATEMODE_NORMAL maximum cylinders
    8787    inc     dx
    8888.CheckIfLargeTranslationWanted:
     
    239239    mov     bl, [es:si+ATA1.wHeadCnt]   ; Heads (1...16)
    240240    mov     bh, [es:si+ATA1.wSPT]       ; Sectors per Track (1...63)
     241%ifndef EXCLUDE_FROM_BIOSDRVS   ; We want the true value in BIOSDRVS
     242    ; Some CF cards (for example Sandisk Ultra 16/32 GB) violates
     243    ; the ATA specification by reporting more than 16383 cylinders.
     244    MIN_U   ax, MAX_PCHS_CYLINDERS      ; Limit the count to avoid problems.
     245%endif
    241246    ret
    242247
     
    360365    ret
    361366
     367
     368;--------------------------------------------------------------------
     369; AtaGeometry_LimitAXtoMaximumLCylinders
     370;   Parameters:
     371;       AX:     Number of total L-CHS cylinders (1...1027)
     372;   Returns:
     373;       AX:     Number of usable L-CHS cylinders (1...1024)
     374;   Corrupts registers:
     375;       Nothing
     376;--------------------------------------------------------------------
     377AtaGeometry_LimitAXtoMaximumLCylinders:
     378    MIN_U   ax, MAX_LCHS_CYLINDERS
     379    ret
     380
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm

    r589 r612  
    9696FillToESDIusingDPTfromDSSI:
    9797    mov     ax, [si+DPT.wLchsCylinders]
    98     call    AH8h_LimitAXtoMaximumLCylinders
     98    call    AtaGeometry_LimitAXtoMaximumLCylinders
    9999    test    BYTE [si+DPT.bFlagsLow], MASKL_DPT_TRANSLATEMODE
    100100    jz      SHORT FillStandardDPTtoESDIfromDPTinDSSI
Note: See TracChangeset for help on using the changeset viewer.