Sound Blaster 16: Difference between revisions

→‎Programming DMA: 8 bit and 16 bit transfers
[unchecked revision][unchecked revision]
(→‎Programming DMA: 8 bit and 16 bit transfers)
Line 76:
 
===Programming DMA===
ThisYou portscan areget formore channelinfo 1about (8programming bitDMA transfers),on if you want use another channel, checkpage [http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html] .
 
# Disable channel by writing to port 0x0A value (channel number + 0x04)
Programming 8 bit transfers throught channel 1 (channel number is 1):
# Disable channel by writing to port 0x0A value 0x05 (channel number + 0x04)
# Write value to flip-flop port 0x0C (any value e.g. 1)
# Send transfer mode to 0x0B (0x48 for single mode/0x58 for auto mode + channel number)
# Send page number to 0x83(page port of channel 1) For example if you have sound data at 0x100450, page is 0x10.
# Send low bits of position to port 0x02(posaddr. port of channel 1) For example(see above) is 0x50.
# Send high bits of position to port 0x02(posaddr. port of channel 1) For example(see above) is 0x04.
# Send low bits of lenght of data to port 0x03(count port of channel 1) For example if is lenght 0x0FFF, send 0xFF
# Send high bits of lenght of data to port 0x03(count port of channel 1) For example if is lenght 0x0FFF, send 0x0F
# Enable channel by writing channel number to port 0x0A
 
Programming 16 bit transfers throught channel 5 (channel number is 1 too):
# Disable channel by writing to port 0xD4 value 0x05 (channel number + 0x04)
# Write value to flip-flop port 0xD8 (any value e.g. 1)
# Send transfer mode to 0xD6 (0x48 for single mode/0x58 for auto mode + channel number)
# Send page number to 0x8B(page port of channel 5) For example if you have sound data at 0x100450, page is 0x10.
# Send low bits of position to port 0xC4(addr. port of channel 5) For example(see above) is 0x50.
# Send high bits of position to port 0xC4(pos. port of channel 5) For example(see above) is 0x04.
# Send low bits of lenght of data to port 0xC6(count port of channel 5) For example if is lenght 0x0FFF, send 0xFF
# Send high bits of lenght of data to port 0xC6(count port of channel 5) For example if is lenght 0x0FFF, send 0x0F
# Enable channel by writing channel number to port 0xD4
 
===Writing transfer mode to DSP===
Anonymous user