Ignore:
Timestamp:
Aug 21, 2011, 4:39:58 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Old Int 13h functions can now transfer 256 sectors per call.
  • eINT 13h functions can now transfer 65535 sectors per call.
File:
1 edited

Legend:

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

    r167 r169  
    3434    call    AH25h_GetDriveInformationToBufferInESSI
    3535    jc      SHORT .ReturnWithError
    36     call    AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
    37     xchg    cx, ax      ; Sector count now in BX:DX:CX
    3836
    39     ; Point ES:DI to Destination buffer
     37    ; Point DS:DI to Destination buffer
    4038    mov     di, [bp+IDEPACK.intpack+INTPACK.si]
    41     mov     es, [bp+IDEPACK.intpack+INTPACK.ds]
     39    mov     ds, [bp+IDEPACK.intpack+INTPACK.ds]
    4240    mov     ax, MINIMUM_EDRIVEINFO_SIZE
    43     cmp     WORD [es:di+EDRIVE_INFO.wSize], ax
    44     jb      SHORT .BufferTooSmall
     41    cmp     WORD [di+EDRIVE_INFO.wSize], ax
     42    jb      SHORT AH42h_ReturnWithInvalidFunctionError
    4543    je      SHORT .SkipEddConfigurationParameters
    4644
     
    4846    xor     ax, ax
    4947    dec     ax          ; AX = FFFFh
    50     mov     [es:di+EDRIVE_INFO.fpEDDparams], ax
    51     mov     [es:di+EDRIVE_INFO.fpEDDparams+2], ax
     48    mov     [di+EDRIVE_INFO.fpEDDparams], ax
     49    mov     [di+EDRIVE_INFO.fpEDDparams+2], ax
    5250    mov     ax, EDRIVE_INFO_size
    5351
    54     ; Fill Extended Drive Information Table in ES:DI
     52    ; Fill Extended Drive Information Table in DS:DI
    5553.SkipEddConfigurationParameters:
    56     stosw               ; Store Extended Drive Information Table size
    57     mov     al, FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
    58     stosw
    59     add     di, BYTE 12 ; Skip CHS parameters
    60     xchg    ax, cx
    61     stosw               ; LBA WORD 0
    62     xchg    ax, dx
    63     stosw               ; LBA WORD 1
    64     xchg    ax, bx
    65     stosw               ; LBA WORD 2
    66     xor     ax, ax
    67     stosw               ; LBA WORD 3 always zero since 48-bit address
    68     mov     ah, 512>>8
    69     stosw               ; Always 512-byte sectors
     54    mov     [di+EDRIVE_INFO.wSize], ax
     55    mov     WORD [di+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS | FLG_CHS_INFORMATION_IS_VALID
     56
     57    call    AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI
     58    xor     cx, cx
     59    mov     [di+EDRIVE_INFO.dwCylinders], ax
     60    mov     [di+EDRIVE_INFO.dwCylinders+2], cx
     61    eMOVZX  ax, bl
     62    mov     [di+EDRIVE_INFO.dwHeads], ax
     63    mov     [di+EDRIVE_INFO.dwHeads+2], cx
     64    mov     al, bh
     65    mov     [di+EDRIVE_INFO.dwSectorsPerTrack], ax
     66    mov     [di+EDRIVE_INFO.dwSectorsPerTrack+2], cx
     67
     68    call    AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
     69    mov     [di+EDRIVE_INFO.qwTotalSectors], ax
     70    mov     [di+EDRIVE_INFO.qwTotalSectors+2], dx
     71    mov     [di+EDRIVE_INFO.qwTotalSectors+4], bx
     72    mov     [di+EDRIVE_INFO.qwTotalSectors+6], cx
     73
     74    mov     WORD [di+EDRIVE_INFO.wSectorSize], 512
    7075
    7176    ; Return with success
    7277    xor     ah, ah
    73     jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    74 
    75 .BufferTooSmall:
    76     mov     ah, RET_HD_INVALID
    7778.ReturnWithError:
    7879    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Note: See TracChangeset for help on using the changeset viewer.