Ignore:
Timestamp:
Apr 15, 2013, 4:03:33 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Fixed a bug that allowed EBIOS functions for user defined CHS.
  • Simplified user defined CHS and LBA setup a little.
File:
1 edited

Legend:

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

    r541 r542  
    5252;    AH=48h Total Sector Count: 11873* 16*63 = 11,967,984
    5353;
    54 ; Notice how AH=48h returns lesser total sector count than AH=8h! The only
     54; Notice how AH=48h returns lesser total sector count than AH=08h! The only
    5555; way I could think of to get 11873 cylinders is to divide AH=08h sector
    5656; count with P-CHS heads and sectors: (745*255*63) / (16*63) = 11873
    5757;
    58 ; I have no idea what is the reasoning behind it but at least there is one
    59 ; BIOS that does just that.
    60 ;
    61 ; I decided that we multiply P-CHS values and do not waste space like the
    62 ; Award BIOS does.
     58; The only reason I can think of is that the Award BIOS has a bug and
     59; uses L-CHS when it should use P-CHS values in the calculation.
    6360;
    6461;
     
    139136    ; Store P-CHS. Based on phoenix specification this is returned only if
    140137    ; total sector count is 15,482,880 or less.
    141     sub     ax, 4001h
    142     sbb     dx, 0ECh
     138    sub     ax, MAX_SECTOR_COUNT_TO_RETURN_PCHS & 0FFFFh
     139    sbb     dx, MAX_SECTOR_COUNT_TO_RETURN_PCHS >> 16
    143140    sbb     bx, cx      ; Zero
    144     jnc     SHORT .ReturnWithSuccess    ; More than EC4000h
    145     or      WORD [di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID
     141    ja      SHORT .ReturnWithSuccess
     142    or      BYTE [di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID
    146143
    147144    eMOVZX  dx, BYTE [es:si+DPT.bPchsHeads]
Note: See TracChangeset for help on using the changeset viewer.