I always thought the Famicom's audio path was rather odd, at least how it related to special chips. But today, after looking at the Famicom's schematics I finally figured it out. After the 2A03's internal five channel audio is outputted and mixed (any input from the second controller's built-in microphone is added at this point), it goes to the cartridge connector pin #45. If there is extra sound hardware in the cartridge the sound will be mixed with the NES's internal sound, then be outputted from pin #46 to the audio output and thence to the speakers. If there is no sound hardware on the cartridge, then the cartridge will connect pins #45 and #46 together, making a loop that goes straight to the audio output without further ado.

On the NES, the addition of the unused expansion port complicates matters somewhat. The NES's audio is routed straight to an RCA jack and the RF circuitry. Pin #3 is audio input. This allows sound produced on a cartridge to be mixed with the NES's sound. In contrast to the Famicom, which mixed expansion sounds in the cartridge, the NES must mix the sounds inside the console itself. All you have to do is get pin the Famicom cartridge's pin #46 to pin #3 of the expansion connector.

I solved this problem a different way.
Inside the NES there is junction point where audio from the input of the 2A03 is mixed with the input of the bottom connect, its easy to spot because there are 3 22K resistors lined up.
I used an unused pin (typically) of the NES edge connector (pin 18), passed it from pin 46 of the famicom (audio out), through a 4.7uF non-polar cap and a 100K resistor to raise the impedance, into one of the 22k resistors (audio junction).
It works great, Akumajo Densetsu sounds great, as does the FDS (another story).

Looking at schematics, 'Audio In' (pin 3 on the Expansion Port) feeds into R9 (20K resistor) before the 'amplifier' circuit... so definitely seems like putting 5V into a circuit that expects something much smaller, needing amplification, is a bad idea.

Would adding in a 47K resistor for a total of 67K resistance (as seems to be the standard for audio coming from a PowerPak) be enough to safely input the 5V signal?

It's hard to give you a straight answer without directly measuring the voltages on CPU pins 1/2.

You can be confident, however, that if you choose the same voltage range as CPU pin 1, due to the 20kΩ resistor from the expansion port, it'll be the same voltage (loudness) after all three signals are mixed together.

If you want to use a 5Vpp source, and CPU pin 1 is less than 5 Vpp, then you should be able to effectively match the volume by setting the currents to match—e.g. if Vpp(one pulse wave at maximum volume) is 1V, and you want your output to be the same volume, then adding 80k in series should make the volumes match. (80k+20k=100k ; 100k/20k = 5 = 5V/1V)

So I should be aiming to attenuate that 5V signal down to around 0.3V then?

Depends on how many different audio signals your microcontroller is generating.

If you're just generating a single pulse wave, and you want that pulse wave to be the same volume at maximum as the NES's pulse waves, which are 0.3V, then yes; this attenuation could be achieved by putting an extra ≈313kΩ in series with R9. On the other hand, if you're mixing 4 waves, and you want all of them to be the same volume, you'd want to add ≈63kΩ.

But ... I have to admit I'm a little surprised it's only 0.3V. I'm also really surprised the voltage went negative: that's supposed to be a unipolar pull-up DAC inside the CPU (with an external 100Ω pulldown resistor)—nothing should be creating negative voltages here.

But ... I have to admit I'm a little surprised it's only 0.3V. I'm also really surprised the voltage went negative: that's supposed to be a unipolar pull-up DAC inside the CPU (with an external 100Ω pulldown resistor)—nothing should be creating negative voltages here.

+-----------+| 4-bit DAC |+-----------+"This is just a standard 4-bit DAC with 16 steps of output voltage resolution, and is used by all 4 sound channels. On the 2A03, rectangle wave 1 & 2 are mixed together, and are available via pin 1. Triangle & noise are available on pin 2.

These analog outputs require a negative current source, to attain linear symmetry on the various output voltage levels generated by the channel(s) (moreover, to get the sound to be audible). Instead of current sources, the NES uses external 100 ohm pull-down resistors."

Was reading another thread earlier that may help indirectly explain too, that this negative DC offset out of the CPU pins is corrected in the mixing / amplification circuit:

There's two separate measurements to be made. Pin 1, for the pulse waves, is simpler. There doesn't seem to be any realistic bandwidth constraints, so just picking the maximum frequency, a 3/4 duty cycle, and letting me adjust the volume for each of the two channels independently, would be good enough.

Pin 2 is a little hairier because the triangle wave can't be set to a fixed value — at least not without trying tying CPU pin 30 to CPU A3. It doesn't seem wrong to just ignore it and just set the pulse wave volume and DPCM DAC. Although maybe some cleverness can ease measurements of the triangle wave as well?

You can advance its position by a fixed amount, though. If you're willing to take 32 measurements you could put it into every phase? (Or with live/interactive measurement you really could just set the phase how you want this way.)

Who is online

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum