SB 16 programming
Posted: Sun Nov 26, 2006 11:20 am
According to sb16 specs the dma channel can be 8 bit or 16 bit. bochs 2.2.6 wont let me set the 16 bit dma channel. It produces error and resets to default. It lets me set the 8 bit DMA channels. what are the known issues with bochs 2.2.6?
I can't make floppy reads. Dma seems to not work. I tried the same on VMware (with floppy) and it works.
[edit] Error in bochs because the kernel works in bochs 2.3 newly downloaded[/edit].
However it doesn't trigger sb16 interrupt. Here is a quick review of what i have done
1. IRQ is set to 10
2. DMA set to 1 (autoinitialized mode)
3. command to perform 8 bit autoinitialized transfer
I am trying to write to DSP but it is showing error as reading. DMA transfered 5 samples and it should have made an interrupt now, but not
SB16 log might help somebody to figure out my mistake.
I can't make floppy reads. Dma seems to not work. I tried the same on VMware (with floppy) and it works.
[edit] Error in bochs because the kernel works in bochs 2.3 newly downloaded[/edit].
However it doesn't trigger sb16 interrupt. Here is a quick review of what i have done
1. IRQ is set to 10
2. DMA set to 1 (autoinitialized mode)
3. command to perform 8 bit autoinitialized transfer
Code: Select all
if(output)
out(0x220 + 0xC, 0x41);
else
out(0x220 + 0xC, 0x42);
out(0x220 + 0xC, 0xAC);
out(0x220 + 0xC, 0x44);
if(output)
out(0x220 + 0xC, 0xC0);
else
out(0x220 + 0xC, 0xC8);
out(0x220 + 0xC, 0x20);
out(0x220 + 0xC, 0xFF);
out(0x220 + 0xC, 0x01);
SB16 log might help somebody to figure out my mistake.
00017135282 (4) DSP Data port write, value 41
00017135285 (4) DSP Data port write, value ac
00017135287 (4) DSP Data port write, value 44
00017135287 (4) DSP command 41 with 2 arg bytes
00017135291 (4) DSP Data port write, value c0
00017135294 (4) DSP Data port write, value 20
00017135296 (4) DSP Data port write, value ff
00017135298 (4) DSP Data port write, value 1
00017135298 (4) DSP command c0 with 3 arg bytes
00017135298 (4) DMA initialized. Cmd c0, mode 20, length 511, comp 0
00017135298 (5) DMA is 8b, 44100Hz, stereo, output, mode 1, unsigned, normal speed, 88200 bps, 6 usec/DMA
00017135310 (3) DMA reads not supported. Returning silence.
00017135574 (5) Sent 8-bit DMA 80, 1000 remaining
00017136774 (5) Sent 8-bit DMA 80, 900 remaining
00017137974 (5) Sent 8-bit DMA 80, 800 remaining
00017139174 (5) Sent 8-bit DMA 80, 700 remaining
00017140374 (5) Sent 8-bit DMA 80, 600 remaining