Sound Blaster 16: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
Line 74: Line 74:
# Send value of your IRQ to Mixer data port
# Send value of your IRQ to Mixer data port
0x01=IRQ 2 0x02=IRQ 5 0x04=IRQ 7 0x08=IRQ 10 Usually is used IRQ 5. You can read this port too for get actual IRQ.
0x01=IRQ 2 0x02=IRQ 5 0x04=IRQ 7 0x08=IRQ 10 Usually is used IRQ 5. You can read this port too for get actual IRQ.

===Programming DMA===
This ports are for channel 1 (8 bit transfers), if you want use another channel, check [http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html]
# Disable channel by writing to port 0x0A value (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(pos. port of channel 1) For example(see above) is 0x50.
# Send high bits of position to port 0x02(pos. 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


==Playing sound==
==Playing sound==