972
edits
[unchecked revision] | [unchecked revision] |
(Add the "QEMU support" section) |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 89:
# Send low bits of position to port 0x02(addr. port of channel 1) For example(see above) is 0x50.
# Send high bits of position to port 0x02(addr. port of channel 1) For example(see above) is 0x04.
# Send low bits of
# Send high bits of
# Enable channel by writing channel number to port 0x0A
Line 100:
# 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
# Send high bits of
# Enable channel by writing channel number to port 0xD4
Line 143:
# Turn speaker on
# Program ISA DMA to transfer
# Set time constant. Notice that the Sound Blaster 16 is able to use sample rates instead of time constants using command 0x41 instead of 0x40. <br> You can calculate the time constant like this: Time constant = 65536 - (256000000 / (channels * sampling rate))
# Set output sample rate
# Write transfer mode to DSP
# Write type of sound data
# Write data
==Code==
<
%macro OUTB 2
mov dx, %1
Line 192:
OUTB 0x22C, 0xC0 ;8 bit sound
OUTB 0x22C, 0x00 ;mono and unsigned sound data
OUTB 0x22C, 0xFE ;COUNT LOW BIT - COUNT
OUTB 0x22C, 0x0F ;COUNT HIGH BIT - COUNT
;now transfer start -
</syntaxhighlight>
==QEMU support==
Line 214:
## Add any sound card to the VM
## In virt-manager's Edit -> Preferences menu check the "Enable XML editing" box.
## Open VM's hardware and after selecting the sound card, click on the XML tab and replace its contents with:<
# Run the OS using QEMU's <code>-curses</code> option or use QEMU's <code>-kernel</code> and <code>-nographic</code> (serial console): in this case, there will be no "freeze", but there still be some flickering in the audio.
|