tokra wrote:[...] I seem to remember the more voices play simultaneously the lower the volume needs to be. [...]
Quite some time ago, I hypothesized the audio output of VIC-I to be a current source controlled by the volume (4 push FETs) and 4 current sinks (i.e., pull FETs) corresponding to each of the voices being low level, and to quote from there:
Mike wrote:The data sheet explicitly states 'Composite Sound (Pin 19)' is a high impedance output with R_out ~= 1 kOhm, and needs to be buffered. It can't really be open-collector as there is no pull-up present on both common PCB revisions.
I would suspect the four bits of the volume register form part of a variable internal current source, the four bits of the sound generators form part of a variable current drain, and both sides playing 'tug of war' during operation. The FETs of the current drain have inverted inputs, so they conduct when the corresponding output of the generator is off.
[...]
The pull FETs themselves also only have a
limited current sinking capability. Otherwise we would only get an AND of all ON voice bits. The arrangement then looks roughly like this, with switches and resistors to replace the FETs (warning, ASCII art!):
Code: Select all
----+---------+---------+---------+ +5 V
| | | |
| | | |
o o o o
\ A \ B \ C \ D
\ \ \ \
o o o o
| | | |
| | | |
+-+ +-+ +-+ +-+
| | 1K | | 2K | | 4K | | 8K
| | | | | | | |
| | | | | | | |
+-+ +-+ +-+ +-+
| | | |
| | | |
| | | |
+---------+---------+---------+---- sound output VIC pin 19
| | | |
| | | |
| | | |
+-+ +-+ +-+ +-+
| | "R" | | "R" | | "R" | | "R"
| | | | | | | |
| | | | | | | |
+-+ +-+ +-+ +-+
| | | |
| | | |
o o o o
\ E \ F \ G \ H
\ \ \ \
o o o o
| | | |
| | | |
----+---------+---------+---------+ 0 V
A: closed, when bit 3 (value 8) of volume = 1
B: closed, when bit 2 (value 4) of volume = 1
C: closed, when bit 1 (value 2) of volume = 1
D: closed, when bit 0 (value 1) of volume = 1
E: closed, when output of sound channel $900A = 0
F: closed, when output of sound channel $900B = 0
G: closed, when output of sound channel $900C = 0
H: closed, when output of sound channel $900D = 0
"R": around 1K, but limited to a maximum current of 1(?) mA
Note, the given resistance values and the maximum current of "R" when in saturation are only rough guesses!
Silent voices let their respective pull FET act as current sink. When three voices are silent, the remaining voice only needs to switch 1/4 the maximum possible current from the (volume controlled!) push stage, and everything's fine. Sometimes however, depending on the state of the noise FET, the sound is a little bit muted as the noise FET can get stuck in the non-conducting state when the noise channel is switched off (bit 7 = 0).
With more voices active, it is more likely to get the pull FETs into saturation (statistically fewer of them momentarily act as current sinks). When this happens, you get the distortions. For this reason, it is best to reduce the volume to 8 (or less) when two voices are active. For three voices, the volume should be set to 5 or 4. With all four voices in use, volume definitely should not be more than 4.
Greetings,
Michael
P.S. see also the schematics I reversed for a User Port DAC here:
https://sleepingelephant.com/ipw-web/bu ... 87&start=5