VOGONS


Reply 40 of 111, by shamino

User metadata
Rank l33t
Rank
l33t
James-F wrote:

You don't have to assume the meaning of the term "single-cycle DMA" it is clearly documented in the official Sound Blaster Programming Guide.

That's the definition you posted earlier (9/24), and I still say Creative's definition is misleading due to them going off on a side tangent about interrupts and page boundaries. At least it was to me. But I get it now, and looking at the whole document does add more context. 😀

Reply 41 of 111, by jesolo

User metadata
Rank l33t
Rank
l33t

I posted earlier in a related thread (Need help deciding between two SB16 cards for my 386...) that, when I originally got my AWE32 PnP (CT3980), I tested this on a Gigabyte GA-6VXC7-4X Socket 370 motherboard with an Intel Celeron 900 MHz CPU (100 FSB) CPU and an ATI Radeon 8500 64 MB AGP Graphics Card. On this PC, I could clearly hear "pops and clicks" when playing back any digital sounds (not just in specific games). By disabling the high DMA channel, the problem disappeared (this phenomenon did not occur on my AWE64 on the same PC).

So, I decided to test both my Sound Blaster 16 PnP (CT2950) & the above mentioned AWE32 PnP (CT3980) on a Gigabyte GA-5AA Super Socket 7 motherboard with an AMD K6-2 450 MHz CPU and an ATI Radeon 8500 64 MB AGP Graphics Card.
I tested it with Day of the Tentacle (CD-ROM talkie version), since I then had a reference to the sound samples on the Nerdly Pleasures blog.

However, I had some trouble to get this game running:

  • The first issue was related to sound card settings. The game wouldn't go past the credits screen if I set up my sound card at IRQ5, but it sometimes did go on if I selected IRQ7 - in the end, I had to use Setmul to disable the L1 cache on the CPU to slow it down to roughly 486DX-40 speeds.
  • The second issue related to the sound patches that I had to apply (that was released and that addressed speed related issues on faster systems). If not, then the game would freeze as soon as the two Tentacles jumps out and Purple Tentacle starts talking (this is regardless of whether you disable the L1 cache).

This game definitely does not run well on fast systems and was meant for 486 or slower systems.

My findings as follows:
Although not as apparent to me, I must agree that the "pops and clicks", related to the "single-cycle DMA bug", is definitely present on both cards in this game.
However, when you launch the game using DOTT.EXE, you can change the configuration and there is a setting where you can increase or decrease the buffer size.
When I selected a lower buffer size (8), then it sounded to me that there were more "pops and clicks" as to when I selected the maximum buffer size (64). However, I didn't play the intro over and over to draw a foregone conclusion on this.

Also, since this game doesn't run well on fast systems, it might also be a good idea to test this in a much slower system (say a 486DX-33 or even a 386DX-40) to confirm that there aren't perhaps any speed related issues that could be a contributing factor in the game's sound playback.

PS: The "pops and clicks" phenomenon, that I referred to in my first paragraph, did not seem to present itself on my CT3980 when I tested this on the AMD K6-2 configuration. So, this is most likely motherboard (or chipsets) related.

Reply 42 of 111, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

So the clicks and pops you fixed with disabling high dma are not the same clicks and pops of the single-cycle dma bug, good to know.

DMA allows maximum 64KB of data transfer per single block.
The SB16 click after each transfer, hence smaller chunks = more clicks.
I think on slower systems the chunk size made a big difference on the cpu load, so 64kb could have cut-offs between transfers.
http://www.crossfire-designs.de/index.php?lan … ndcards/&page=8
Search for: DMA

Indeed DOTT is very speed sensitive game, SBP or SB16.


my important / useful posts are here

Reply 43 of 111, by Scali

User metadata
Rank l33t
Rank
l33t
James-F wrote:
* Single-Cycle DMA Clicking (Non Vibra). A click will be heard after a sample is done playing with games that use Single-Cycle D […]
Show full quote

* Single-Cycle DMA Clicking (Non Vibra).
A click will be heard after a sample is done playing with games that use Single-Cycle DMA mode for audio.
All DSP 4.0x to 4.13 are affected including the AWE32.
DSP 4.16 of the AWE64 is not affected, and is free of this bug.
The Vibra cards are not affected by this bug, but have the ringing bug instead.

Great Hierophant from Nerdly Pleasures has some examples of these "clicks and pops" as he calls them too:
http://nerdlypleasures.blogspot.co.il/2015/05 … t-playback.html

In this "SB16 programming" link the author states "This causes a click between each block," when talking about single-cycle DMA.
http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html

This is interesting, I was looking at the problem from the other side:
Early SB cards don't have the 'auto-init' mode, so they require a new DSP output command after every DMA transfer. Because of the reports of pop-and-click, I initially assumed that slow CPUs and/or early DSPs may not be fast enough to process a new DSP command, causing pops and clicks in the output, because the new buffer doesn't start immediately on the next sample, but has some delay.

Imagine my surprise when I saw Great Hierophant's blog, with examples of an SB1.5 and SB Pro 1.0 that do NOT click, yet an SB16 that DOES.
I think this may be another myth, also perpetuated by eg Osdev: http://wiki.osdev.org/ISA_DMA
"Some expansion cards do not support auto-init DMA such as Sound Blaster 1.x. These devices will crash if used with auto-init DMA. Sound Blaster 2.0 and later do support auto-init DMA."

I think that claim is wrong, and I don't see why the DSP would crash.
This is probably for another thread, but I am going to investigate this. I want to find the best possible way to play continuous audio on an SB1.x on 8088 machines.
Somehow I suspect that the SB1.x cards actually work fine, and all the hacks invented are not required. The real problem may be the SB16 with its crappy incompatible DSP.
In which case I would just have to make two codepaths:
1) Single-transfer DMA for legacy SB
2) Auto-initialize DMA for DSP v2.01+.

I would like to put all these SB-related myths to bed, especially the ones that stem from the SB16 or clones, and do not apply to actual SB cards.

I don't think the DMA controller has to be in single transfer non-auto mode on an SB1.x. I've done a proof-of-concept on my SB Pro 2.0, which works fine when the DMA controller is in the auto-init mode, and I set the DSP to transfer a block smaller than what the DMA controller is set up for. Effectively the same as what you do in auto-init mode for the DSP. Only difference is that you have to re-send the output command and length to the DSP on every interrupt. But since early SBs are not capable of more than 22 kHz, there should be enough time to do that without pops and clicks. If the interrupt occurs at the moment the last sample is fetched, you have about 200 CPU cycles to set up the DSP again, at 4.77 MHz. Should be plenty.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 44 of 111, by Eep386

User metadata
Rank Member
Rank
Member

As for the CT28xx vibra distortion, I wonder if that's possibly due to Creative using much too low impedance resistors on the mixer inputs and outputs?

I had a CT2900 that had very loud, crackly PCM output, but after replacing the original resistors in question (discovered by probing with a multimeter) with 47K resistances the crackling and distortion was greatly reduced, though not completely eliminated. I did have to adjust the low-pass filter caps to compensate for the higher resistances however (and I had to reduce the low-pass cut-offs, since Creative had them set to ridiculously high values of > 66 KHz with the original setup).

I no longer have that card unfortunately, so I can't say off the bat which resistors to replace.

Life isn't long enough to re-enable every hidden option in every BIOS on every board... 🙁

Reply 45 of 111, by walterg74

User metadata
Rank Member
Rank
Member

Regarding this bug, I have a big doubt...

I read everywhere that it's rleated to MIDI music, on some places that it is when used with a daughterboard on the waveblaster connector, on others that it doesn't matter if it's on that connector or elsewhere, however, all places I read reference another separate source for MIDI.

Bottom line: If I use the sound card by itself, with no other sound cards/modules on the computer, does the bug happen just the same, or is it only if you add a separate midi card...?

Reply 46 of 111, by Scali

User metadata
Rank l33t
Rank
l33t
walterg74 wrote:

Regarding this bug, I have a big doubt...

I read everywhere that it's rleated to MIDI music, on some places that it is when used with a daughterboard on the waveblaster connector, on others that it doesn't matter if it's on that connector or elsewhere, however, all places I read reference another separate source for MIDI.

Bottom line: If I use the sound card by itself, with no other sound cards/modules on the computer, does the bug happen just the same, or is it only if you add a separate midi card...?

You mean the hanging-note bug?
This is a bug in the implementation of the MPU-401 UART interface on the SB16.
As I understand it, the problem is because MIDI and sample playback are both handled by the same microcontroller (the 'DSP'). On Sound Blasters before the SB16, it simply was not possible to use MIDI and sample playback at the same time, because the DSP could only be one mode at a time, either sample mode or MIDI mode. They are both controlled by the same command register on the DSP.
The SB16 added an MPU-401 UART-compatible port. Now, the real MPU-401 has its own registers, so this functionality now gives the SB16 separate MIDI and DSP registers as well (it doesn't matter whether you use the MIDI out port or the WaveTable header, they're the same thing).
This means that you can now play MIDI and samples at the same time.
All fine and good, but it appears that there are race conditions where sometimes a byte of MIDI data gets lost, when the DSP is also playing samples. Other times, it seems that a byte of sample data is accidentally sent through the MIDI interface. So sometimes you lose a 'note off' MIDI message, so the note gets stuck. Other times, you get a random byte of data that is interpreted as a 'note on' message, so a random note is played, and never shut down with a 'note off' command.

So yes, even if the SB16 is the only card in your system, it still happens. But only with games that use both MIDI and sample playback at the same time. If you only use OPL3 and samples, there is no issue. If you only use OPL3 and MIDI there is also no issue.
Of course, MIDI + samples is the most interesting use-case, since you get high-quality music and realistic sound effects/speech.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 47 of 111, by Tiido

User metadata
Rank l33t
Rank
l33t

On my AWE64 the hanging note originates from FM side. Every once in a while during a game a constant tone gets triggered and it stays there until restart or when you mute FM. It seems doing full init on OPL3 doesn't silence it and doing note offs on all notes on all channels on MPU-401 doesn't have any effect either.

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 49 of 111, by walterg74

User metadata
Rank Member
Rank
Member
Scali wrote:
You mean the hanging-note bug? This is a bug in the implementation of the MPU-401 UART interface on the SB16. As I understand it […]
Show full quote
walterg74 wrote:

Regarding this bug, I have a big doubt...

I read everywhere that it's rleated to MIDI music, on some places that it is when used with a daughterboard on the waveblaster connector, on others that it doesn't matter if it's on that connector or elsewhere, however, all places I read reference another separate source for MIDI.

Bottom line: If I use the sound card by itself, with no other sound cards/modules on the computer, does the bug happen just the same, or is it only if you add a separate midi card...?

You mean the hanging-note bug?
This is a bug in the implementation of the MPU-401 UART interface on the SB16.
As I understand it, the problem is because MIDI and sample playback are both handled by the same microcontroller (the 'DSP'). On Sound Blasters before the SB16, it simply was not possible to use MIDI and sample playback at the same time, because the DSP could only be one mode at a time, either sample mode or MIDI mode. They are both controlled by the same command register on the DSP.
The SB16 added an MPU-401 UART-compatible port. Now, the real MPU-401 has its own registers, so this functionality now gives the SB16 separate MIDI and DSP registers as well (it doesn't matter whether you use the MIDI out port or the WaveTable header, they're the same thing).
This means that you can now play MIDI and samples at the same time.
All fine and good, but it appears that there are race conditions where sometimes a byte of MIDI data gets lost, when the DSP is also playing samples. Other times, it seems that a byte of sample data is accidentally sent through the MIDI interface. So sometimes you lose a 'note off' MIDI message, so the note gets stuck. Other times, you get a random byte of data that is interpreted as a 'note on' message, so a random note is played, and never shut down with a 'note off' command.

So yes, even if the SB16 is the only card in your system, it still happens. But only with games that use both MIDI and sample playback at the same time. If you only use OPL3 and samples, there is no issue. If you only use OPL3 and MIDI there is also no issue.
Of course, MIDI + samples is the most interesting use-case, since you get high-quality music and realistic sound effects/speech.

Thanks for the detailed explanation!

At the moment I can only get a 2910, which has the FM I want but that has the bug... In the games that have the option can you just select a non-bug combo at least? Or are there cases that only have a bug combo as an option?

Reply 50 of 111, by walterg74

User metadata
Rank Member
Rank
Member
appiah4 wrote:

Bottom line is if you want midi dont go Sound Blaster 16.

Ok help me out here because I’m a bit rusty remembering the old days...

MIDI is the best type of music you will get then? If so, was just choosing MIDI enough (if the game supports it of course) and it will play out the SB card without need for extra hardware? (Even the 16 with it’s bugs?)

If all is yes, which would you recommend? I wanted to put the card ina Pentium 100 machine which I am getting, that will be used purely as a DOS machine.

Last edited by walterg74 on 2020-07-27, 19:25. Edited 1 time in total.

Reply 51 of 111, by Scali

User metadata
Rank l33t
Rank
l33t
walterg74 wrote:

At the moment I can only get a 2910, which has the FM I want but that has the bug... In the games that have the option can you just select a non-bug combo at least? Or are there cases that only have a bug combo as an option?

Sure, the standard mode for an SB16 is to use OPL3 and samples.
You can only use the MPU-401 if you add a waveblaster board, or connect some kind of MIDI synth/module to the MIDI out. It has no MIDI synth on-board. So if you want to go down that road, there are better cards to connect the waveblaster or synth/module to.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 52 of 111, by walterg74

User metadata
Rank Member
Rank
Member
Scali wrote:
walterg74 wrote:

At the moment I can only get a 2910, which has the FM I want but that has the bug... In the games that have the option can you just select a non-bug combo at least? Or are there cases that only have a bug combo as an option?

Sure, the standard mode for an SB16 is to use OPL3 and samples.
You can only use the MPU-401 if you add a waveblaster board, or connect some kind of MIDI synth/module to the MIDI out. It has no MIDI synth on-board. So if you want to go down that road, there are better cards to connect the waveblaster or synth/module to.

OK, that is perfectly clear. But that doesn’t that contradict what you told me before here:

“So yes, even if the SB16 is the only card in your system, it still happens”

Or was that meant to say that even if this is the only card in my system *but I use an external MIDI device* then it can still happen?

Bottom line: this only happens with MIDI+samples, but if the sb16 is the only card on my system I cannot even use MIDI (again, considering using just this card and no other internal or external sound devices), only OPL3 and samples so the bug won’t happen.

Is that more or less correct?

Reply 53 of 111, by Scali

User metadata
Rank l33t
Rank
l33t
walterg74 wrote:

Or was that meant to say that even if this is the only card in my system *but I use an external MIDI device* then it can still happen?

Yes... although, technically the notes still hang when there's nothing connected to the SB16's MIDI output, you just don't hear it 😀

walterg74 wrote:

Bottom line: this only happens with MIDI+samples, but if the sb16 is the only card on my system I cannot even use MIDI (again, considering using just this card and no other internal or external sound devices), only OPL3 and samples so the bug won’t happen.

Is that more or less correct?

Yes.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 54 of 111, by noop

User metadata
Rank Member
Rank
Member

I heard something about left and right channels being swapped on some SB models..
Also about some SB16 actually being 12 bits..(Vibras definitely hiss like they are 12, with extra precision possibly simulated by dithering)

Last edited by noop on 2018-03-21, 19:24. Edited 1 time in total.

Reply 55 of 111, by Scali

User metadata
Rank l33t
Rank
l33t
noop wrote:

I heard something about left and right channels being swapped on some SB models..

There was a big topic on this forum, where various cards were tested, and the conclusion was that nobody could find any real Sound Blaster Pro cards that had reverse stereo. Various clones had reverse stereo though.
So our theory is that the 'reverse stereo' option in some games is actually meant for these flawed clones, not the real thing.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 56 of 111, by walterg74

User metadata
Rank Member
Rank
Member

Ok, thanks it’s clear now!

However, now I have more questions than before 😁

Considering the goal of this machine is a retro-dos-machine, that I want compatibility for that and its games, and that I think it just jas ISA slots...

- Is there any reason why I would buy a SB16 other than that I read on some retro gaming blog thatit”/ the most compatible etc?

- Are the SB cards that do have real MIDI or any other “all in one” añternatives? Or is the best option an FM/samples card + anothe MIDI card..?

- Which card(s) would you use for your system (considering my requirements) and why?

Reply 58 of 111, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Performance looks good, but if you're using a mixer chip from Creative, that will probably pace your sound quality.

All hail the Great Capacitor Brand Finder

Reply 59 of 111, by GL1zdA

User metadata
Rank Oldbie
Rank
Oldbie

Are there any schematics of the post-CT1746 SB16/32s? I've found the schematics for the early SB16s in the "Sound Blaster Series Hardware Programming Guide", but I want to check, how everything is routed on the other ones. For example: is OPL audio routed through the CT1701 on the CT2760? On the early SB16s the OPL3 audio would go through the Yamaha DAC to the mixer. But I can't see such DAC one on the CT1747 cards.

getquake.gif | InfoWorld/PC Magazine Indices