Changeset 486 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Nov 3, 2012, 9:05:48 PM (12 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.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
3 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
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r473 r486  
    120120g_szDeviceTypeValues_16bit:     db      " 16",NULL
    121121g_szDeviceTypeValues_32bit:     db      " 32",NULL
     122g_szDeviceTypeValues_8bit:      db      "  8",NULL
    122123g_szDeviceTypeValues_XTIDEr1:   db      "D8 ",NULL  ; Dual 8-bit
    123124g_szDeviceTypeValues_XTIDEr2:   db      "X8 ",NULL  ; A0<->A3 swapped 8-bit
     
    136137        %error "g_szDeviceTypeValues Displacement Incorrect 1"
    137138    %endif
    138     %if g_szDeviceTypeValues_32bit <> g_szDeviceTypeValues + g_szDeviceTypeValues_Displacement
     139    %if g_szDeviceTypeValues_32bit <> g_szDeviceTypeValues_16bit + g_szDeviceTypeValues_Displacement
    139140        %error "g_szDeviceTypeValues Displacement Incorrect 2"
    140141    %endif
    141     %if g_szDeviceTypeValues_XTIDEr1 <> g_szDeviceTypeValues_32bit + g_szDeviceTypeValues_Displacement
     142    %if g_szDeviceTypeValues_8bit <> g_szDeviceTypeValues_32bit + g_szDeviceTypeValues_Displacement
     143        %error "g_szDeviceTypeValues Displacement Incorrect 2"
     144    %endif
     145    %if g_szDeviceTypeValues_XTIDEr1 <> g_szDeviceTypeValues_8bit + g_szDeviceTypeValues_Displacement
    142146        %error "g_szDeviceTypeValues Displacement Incorrect 3"
    143147    %endif
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r473 r486  
    226226                                  db         20h,  2dh,  0ch          ; compressed
    227227
     228g_szDeviceTypeValues_8bit:      ; db        "  8",NULL
     229                                ; db         20h,  20h,  38h,  00h    ; uncompressed
     230                                  db         20h,  20h,  11h          ; compressed
     231
    228232g_szDeviceTypeValues_XTIDEr1:   ; db        "D8 ",NULL  ; Dual 8-bit
    229233                                ; db         44h,  38h,  20h,  00h    ; uncompressed
     
    263267%error "g_szDeviceTypeValues Displacement Incorrect 1"
    264268%endif
    265 %if g_szDeviceTypeValues_32bit <> g_szDeviceTypeValues + g_szDeviceTypeValues_Displacement
     269%if g_szDeviceTypeValues_32bit <> g_szDeviceTypeValues_16bit + g_szDeviceTypeValues_Displacement
    266270%error "g_szDeviceTypeValues Displacement Incorrect 2"
    267271%endif
    268 %if g_szDeviceTypeValues_XTIDEr1 <> g_szDeviceTypeValues_32bit + g_szDeviceTypeValues_Displacement
     272%if g_szDeviceTypeValues_8bit <> g_szDeviceTypeValues_32bit + g_szDeviceTypeValues_Displacement
     273%error "g_szDeviceTypeValues Displacement Incorrect 2"
     274%endif
     275%if g_szDeviceTypeValues_XTIDEr1 <> g_szDeviceTypeValues_8bit + g_szDeviceTypeValues_Displacement
    269276%error "g_szDeviceTypeValues Displacement Incorrect 3"
    270277%endif
     
    489496;; translated usage stats
    490497;; 33:1
    491 ;; 32:27
     498;; 32:29
    492499;; 181:1
    493500;; 53:2
     
    504511;; 34:3
    505512;; 49:1
    506 ;; 56:6
     513;; 56:7
    507514;; 45:1
    508515;; 175:1
Note: See TracChangeset for help on using the changeset viewer.