ISA DMA: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
m (→‎Registers: Fixed hexadecimal formatting)
No edit summary
Line 527:
ret
</pre>
 
'''Comment: Due to problems with autoinit on real hardware and MS Virtual PC, you should better avoid autoinit and use this code:'''
 
<pre>
prepare_for_floppy_DMA_write:
out 0x0a, 0x06 ; mask DMA channel 2
out 0x0b, 0x4A ; 01001010
; single transfer, address increment, autoinit, write, channel2)
out 0x0a, 0x02 ; unmask DMA channel 2
ret
 
prepare_for_floppy_DMA_read:
out 0x0a, 0x06 ; mask DMA channel 2
out 0x0b, 0x46 ; 01000110
; single transfer, address increment, autoinit, read, channel2)
out 0x0a, 0x02 ; unmask DMA channel 2
ret
</pre>
 
Use initialize_floppy_DMA just before prepare_for_floppy_DMA_read/write and the actual floppy_disk_read/write process.
 
 
The above uses single transfer only for compatibility, but during the initialization of your floppy driver if you detect a different floppy controller (using the init command), demand transfer should be used to reduce overhead. In this case for a read the:
Anonymous user