Ignore:
Timestamp:
Nov 3, 2012, 9:05:48 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Faster DMA support (with less error tolerance).
  • Fixed boot menu device type strings.
File:
1 edited

Legend:

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

    r482 r486  
    7575TransferBlockToOrFromXTCF:
    7676    ; 8-bit DMA transfers must be done withing 64k physical page.
    77     ; We support maximum of 128 sectors (65536 bytes) per one INT 13h call
    78     ; so we might need to separate transfer to 2 separate DMA operations.
     77    ; XT-CF support maximum of 64 sector (32768 bytes) blocks in DMA mode
     78    ; so we never need to separate transfer to more than 2 separate DMA operations.
    7979
    8080    ; Load XT-CF Control Register port to DX
     
    110110;   Parameters:
    111111;       BL:     Byte for DMA Mode Register
    112 ;       CX:     Number of BYTEs to transfer
     112;       CX:     Number of BYTEs to transfer (1...32768 since max block size is limited to 64)
    113113;       DX:     XTCF Control Register
    114114;   Returns:
     
    151151
    152152
     153%if 0 ; Slow DMA code
    153154    ; XT-CF transfers 16 bytes at a time. We need to manually
    154155    ; start transfer for every block.
     
    163164    test    al, FLG_CH3_HAS_REACHED_TERMINAL_COUNT
    164165    jz      SHORT .TransferNextBlock    ; All bytes transferred?
     166%endif ; Slow DMA code
     167
     168
     169%if 1 ; Fast DMA code
     170    push    cx
     171    add     cx, BYTE 15                 ; Include any partial DMA block (since we had to divide transfer to 64k physical pages)
     172    eSHR_IM cx, 4                       ; Drive Block size to 16 Byte DMA Block Size
     173
     174.JustOneMoreDmaBlock:
     175    mov     al, RAISE_DRQ_AND_CLEAR_XTCF_XFER_COUNTER
     176ALIGN JUMP_ALIGN
     177.TransferNextDmaBlock:
     178    out     dx, al                      ; Transfer 16 bytes to/from XT-CF card
     179    loop    .TransferNextDmaBlock
     180
     181    inc     cx                          ; set up CX, in case we need to do an extra iteration
     182    in      al, STATUS_REGISTER_DMA8_in
     183    test    al, FLG_CH3_HAS_REACHED_TERMINAL_COUNT
     184    jz      SHORT .JustOneMoreDmaBlock          ; it wasn't set so get more bytes
     185    pop     cx
     186%endif ; Fast DMA code
     187
    165188
    166189    ; Restore XT-CF to normal operation
Note: See TracChangeset for help on using the changeset viewer.