Changeset 227 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS


Ignore:
Timestamp:
Jan 29, 2012, 1:33:44 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • EBIOS functions now work in lite mode.
File:
1 edited

Legend:

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

    r221 r227  
    2121;       CF:     0 if succesfull, 1 if error
    2222;--------------------------------------------------------------------
    23 ALIGN JUMP_ALIGN
    2423AH48h_HandlerForGetExtendedDriveParameters:
    25     ; Get our buffer to ES:SI
    26     push    di
    27     call    FindDPT_ForNewDriveToDSDI
    28     lea     si, [di+LARGEST_DPT_SIZE]   ; IdeCommand.asm required fake DPT
    29     pop     di
    30     push    ds
    31     pop     es
     24    call    AccessDPT_GetLbaSectorCountToBXDXAX
    3225
    33     ; Get Drive ID and total sector count from it
    34     call    AH25h_GetDriveInformationToBufferInESSI
    35     jc      SHORT .ReturnWithError
    36 
    37     ; Point DS:DI to Destination buffer
    38     mov     di, [bp+IDEPACK.intpack+INTPACK.si]
     26    ; Point DS:SI to Extended Drive Information Table to fill
    3927    mov     ds, [bp+IDEPACK.intpack+INTPACK.ds]
    40     mov     ax, MINIMUM_EDRIVEINFO_SIZE
    41     cmp     [di+EDRIVE_INFO.wSize], ax
     28    mov     cx, MINIMUM_EDRIVEINFO_SIZE
     29    cmp     [si+EDRIVE_INFO.wSize], cx
    4230    jb      SHORT Prepare_ReturnFromInt13hWithInvalidFunctionError
    4331    je      SHORT .SkipEddConfigurationParameters
    4432
    4533    ; We do not support EDD Configuration Parameters so set to FFFF:FFFFh
    46     mov     ax, -1      ; AX = FFFFh
    47     mov     [di+EDRIVE_INFO.fpEDDparams], ax
    48     mov     [di+EDRIVE_INFO.fpEDDparams+2], ax
    49     mov     ax, EDRIVE_INFO_size
     34    mov     cx, -1      ; FFFFh
     35    mov     [si+EDRIVE_INFO.fpEDDparams], cx
     36    mov     [si+EDRIVE_INFO.fpEDDparams+2], cx
     37    mov     cx, EDRIVE_INFO_size
    5038
    51     ; Fill Extended Drive Information Table in DS:DI
     39    ; Fill Extended Drive Information Table in DS:SI
    5240.SkipEddConfigurationParameters:
    53     mov     [di+EDRIVE_INFO.wSize], ax
    54     mov     WORD [di+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS | FLG_CHS_INFORMATION_IS_VALID
     41    mov     [si+EDRIVE_INFO.wSize], cx
     42    mov     WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
    5543
    56     call    AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI
    57     xor     cx, cx
    58     mov     [di+EDRIVE_INFO.dwCylinders], ax
    59     mov     [di+EDRIVE_INFO.dwCylinders+2], cx
    60     eMOVZX  ax, bl
    61     mov     [di+EDRIVE_INFO.dwHeads], ax
    62     mov     [di+EDRIVE_INFO.dwHeads+2], cx
    63     mov     al, bh
    64     mov     [di+EDRIVE_INFO.dwSectorsPerTrack], ax
    65     mov     [di+EDRIVE_INFO.dwSectorsPerTrack+2], cx
    66 
    67     call    AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
    6844    mov     [di+EDRIVE_INFO.qwTotalSectors], ax
     45    xor     ax, ax                                  ; Return with success
    6946    mov     [di+EDRIVE_INFO.qwTotalSectors+2], dx
    7047    mov     [di+EDRIVE_INFO.qwTotalSectors+4], bx
    71     mov     [di+EDRIVE_INFO.qwTotalSectors+6], cx
    72 
     48    mov     [di+EDRIVE_INFO.qwTotalSectors+6], ax
    7349    mov     WORD [di+EDRIVE_INFO.wSectorSize], 512
    7450
    75     ; Return with success
    76     xor     ah, ah
    7751.ReturnWithError:
    7852    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Note: See TracChangeset for help on using the changeset viewer.