Changeset 169 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h


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.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
Files:
7 edited

Legend:

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

    r167 r169  
    1515;       SS:BP:  Ptr to IDEPACK
    1616;   Parameters on INTPACK:
    17 ;       AL:     Number of sectors to read (1...127)
     17;       AL:     Number of sectors to read (1...255, 0=256)
    1818;       CH:     Cylinder number, bits 7...0
    1919;       CL:     Bits 7...6: Cylinder number bits 9 and 8
     
    2828ALIGN JUMP_ALIGN
    2929AH2h_HandlerForReadDiskSectors:
    30     cmp     al, 0
    31     jle     SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
    32 
    3330    call    CommandLookup_GetOldInt13hIndexToBX
    3431    mov     ah, [cs:bx+g_rgbReadCommandLookup]
     
    4239    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    4340%endif
    44 
    45 
    46 ;--------------------------------------------------------------------
    47 ; AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
    48 ;   Parameters:
    49 ;       Nothing
    50 ;   Returns:
    51 ;       Jumps to Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    52 ;--------------------------------------------------------------------
    53 AH2h_ExitInt13hSinceSectorCountInIntpackIsZero:
    54     mov     ah, RET_HD_INVALID
    55     jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm

    r167 r169  
    1515;       SS:BP:  Ptr to IDEREGS_AND_INTPACK
    1616;   Parameters on INTPACK:
    17 ;       AL:     Number of sectors to write (1...127)
     17;       AL:     Number of sectors to write (1...255, 0=256)
    1818;       CH:     Cylinder number, bits 7...0
    1919;       CL:     Bits 7...6: Cylinder number bits 9 and 8
     
    2727ALIGN JUMP_ALIGN
    2828AH3h_HandlerForWriteDiskSectors:
    29     cmp     al, 0
    30     jle     SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
    31 
    3229    call    CommandLookup_GetOldInt13hIndexToBX
    3330    mov     ah, [cs:bx+g_rgbWriteCommandLookup]
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm

    r167 r169  
    1515;       SS:BP:  Ptr to INTPACK
    1616;   Parameters on INTPACK in SS:BP:
    17 ;       AL:     Number of sectors to verify (1...127)
     17;       AL:     Number of sectors to verify (1...255, 0=256)
    1818;       CH:     Cylinder number, bits 7...0
    1919;       CL:     Bits 7...6: Cylinder number bits 9 and 8
     
    2626ALIGN JUMP_ALIGN
    2727AH4h_HandlerForVerifyDiskSectors:
    28     cmp     al, 0
    29     jle     SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
    30 
    3128    mov     ah, COMMAND_VERIFY_SECTORS
    3229    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm

    r167 r169  
    5454    mov     es, [bp+IDEPACK.intpack+INTPACK.ds] ; ES:SI to point Disk Address Packet
    5555    cmp     BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE
    56     jb      SHORT .DapContentsNotValid
     56    jb      SHORT AH42h_ReturnWithInvalidFunctionError
    5757    cmp     WORD [es:si+DAP.wSectorCount], BYTE 0
    58     jle     SHORT .DapContentsNotValid          ; Must be 1...127
     58    je      SHORT AH42h_ReturnWithInvalidFunctionError
    5959    ret
    60 .DapContentsNotValid:
    61     jmp     AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
     60AH42h_ReturnWithInvalidFunctionError:
     61    mov     ah, RET_HD_INVALID
     62    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm

    r165 r169  
    2727AH43h_HandlerForExtendedWriteSectors:
    2828    cmp     BYTE [bp+IDEPACK.intpack+INTPACK.al], 2 ; Verify requested?
    29     jae     SHORT .WriteWithVerifyNotSupported
     29    jae     SHORT AH42h_ReturnWithInvalidFunctionError
    3030
    3131    call    AH42h_LoadDapToESSIandVerifyForTransfer
     
    4040    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    4141%endif
    42 
    43 .WriteWithVerifyNotSupported:
    44     jmp     AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm

    r165 r169  
    2525    mov     es, [bp+IDEPACK.intpack+INTPACK.ds] ; ES:SI to point Disk Address Packet
    2626    cmp     BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE
    27     jb      SHORT .DapContentsNotValid
     27    jb      SHORT AH42h_ReturnWithInvalidFunctionError
    2828
    2929    mov     ah, COMMAND_SEEK
     
    3636    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    3737%endif
    38 
    39 .DapContentsNotValid:
    40     jmp     AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
  • 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.