Changeset 486 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device
- Timestamp:
- Nov 3, 2012, 9:05:48 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm
r482 r486 75 75 TransferBlockToOrFromXTCF: 76 76 ; 8-bit DMA transfers must be done withing 64k physical page. 77 ; We support maximum of 128 sectors (65536 bytes) per one INT 13h call78 ; so we might need to separate transfer to2 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. 79 79 80 80 ; Load XT-CF Control Register port to DX … … 110 110 ; Parameters: 111 111 ; 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) 113 113 ; DX: XTCF Control Register 114 114 ; Returns: … … 151 151 152 152 153 %if 0 ; Slow DMA code 153 154 ; XT-CF transfers 16 bytes at a time. We need to manually 154 155 ; start transfer for every block. … … 163 164 test al, FLG_CH3_HAS_REACHED_TERMINAL_COUNT 164 165 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 176 ALIGN 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 165 188 166 189 ; Restore XT-CF to normal operation
Note:
See TracChangeset
for help on using the changeset viewer.