Sound Hardware Questions

discuss bbc micro and electron emulators (including mame) here!
Post Reply
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Sound Hardware Questions

Post by Coeus »

A few questions about BBC Micro sound hardware. Firstly the sound output. Looking at this part of the circuit diagram:
final.png
There is 8 KHz marked on the left hand op-amp - am I right in thinking this is a low-pass filter, not band-pass so the lack of low frequencies from the speaker are due to the small size of the speaker and the lack of a baffle for it?

Then, the stage before, we have a virtual earth mixer with one input from the 1Mhz analogue in pin and one from the speech chip but two from the SN76489, one reasonably direct and one via an op-amp circuit:
mixer.png
What is the op-amp (part of IC17) with D2 and R2 doing and why are we mixing the output of this into the final sound output as well as the direct output from the SN76489?

B-Em also emulates various other other hardware that produce sound. The Music 5000 is separate in that, when the original hardware is used, it has its own output and would normally be connected to a separate, stereo amplifier. But there is also SID, a DAC connected to the printer port and Paula. Would the real hardware versions of these feed into the mixer above, for example via the 1Mhz bus, and therefore share both the filter and the limited frequency response of the speaker, or do any of them have independent outputs?
User avatar
tricky
Posts: 7709
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Sound Hardware Questions

Post by tricky »

I have seen a picture of the beeb printer port DAC, but can't remember what other connections it has. The ones I make go to the 1mhz input.
User avatar
SarahWalker
Posts: 1598
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Sound Hardware Questions

Post by SarahWalker »

SID has an external audio output but I think can feed back into the computer via 1 MHz bus (I haven't used mine in a while!).

Printer port DAC doesn't feed back into the computer. Diagram is below for reference.
BeebDAC.png
User avatar
1024MAK
Posts: 12794
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Sound Hardware Questions

Post by 1024MAK »

The first circuit is actually a second-order active low pass filter circuit.

R27 (10kΩ) and C11 (2.2nF) form the first low pass filter stage.
R17 (10kΩ) and C7 (2.2nF) form the second low pass filter.
R15 (22kΩ) and R24 (39kΩ) configure the op-amp to amplify the input signal at pin 10.

The main cause of the poor low frequency response in this circuit is C16 (47µF) and the small cheap loud speaker. In most LM386 circuits, the equivalent of C16 would be 220µF to 470µF.

The second circuit, formed of the op-amp, D2 (1N4148), C2 (4.7µF) is a peak and hold detector. R8 (10kΩ) will discharge C2.

I'm not sure why this was included. The output going through R12 (220kΩ) will vary the DC level.

Mark
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Sound Hardware Questions

Post by Coeus »

1024MAK wrote: Sun Jan 21, 2024 1:59 pm I'm not sure why this was included. The output going through R12 (220kΩ) will vary the DC level.
That's interesting. The output of the SN76489 is DC-coupled to the mixer. Assuming the SN76489 has a single power rail that means the output can only vary above 0V, not below it, so there will be a DC offset. It would make sense for this circuit to invert the signal, hold the maximum negative transition and then add half of that into the mix, on the basis that duty cycle is 50% as that would remove the DC offset. But for that, surely D2 and C2 are the wrong way round, i.e. wrong polarity. Is this, perhaps, an error in the circuit diagram or am I misunderstanding it?

I note the output of the speech chip is AC-coupled so no similar circuit there.
User avatar
arg
Posts: 1291
Joined: Tue Feb 16, 2021 2:07 pm
Location: Cambridge
Contact:

Re: Sound Hardware Questions

Post by arg »

My reading of this is:

Opamp with output on pin 7 is a unity-gain inverting amplifier. So if the output of the sound chip is a waveform above the 0V axis, this will give a mirror-image of it below the axis.

D2 then picks off the peaks (ie. most-positive) of that waveform and holds it on C2 (which will otherwise drift off towards -5V).

If you added that directly to the sound chip output, it would remove any positive offset of the sound chip output and give you a waveform not centred around zero but rather sitting directly on the zero line. However, it's not added equally - it's added at about half relative amplitude. There's then also a fixed negative offset due to the forward voltage drop of D2 - so about 0.6V, or 0.3V after you've halved it.

It does seem a rather odd circuit, but it seems to assume that the output of the sound chip is not just always-positive but has a further DC offset to it, and that offset isn't constant enough to just correct it with fixed components. Maybe the output of the sound chip is in fact centred around 2.5V or thereabouts. But this doesn't just remove the DC offset (which could have been done by AC-coupling it), it removes part of it and will behave differently for 'loud' vs 'quiet' passages - it seems like the latter must be the reason for doing it this way, but I'm not sure why that is desirable.

Is there some issue with the sound chip where, if you stop a channel when it happens to be high, a fixed DC offset appears on the output until you use that channel again? Or something like that?
User avatar
1024MAK
Posts: 12794
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Sound Hardware Questions

Post by 1024MAK »

The Master 128 uses a different arrangement to the Beeb.

But the Master Compact and the Memotech MTX use far simpler circuits:
Master Compact audio circuit
Master Compact audio circuit
Memotech MTX audio circuit
Memotech MTX audio circuit
Mark
Post Reply

Return to “8-bit acorn emulators”