I'm tired of evildragon posting these things off topic-ally in random threads. I'm making a dedicated thread. The idea is to get a ym3438 chip working in a model 1 genesis.....why? I dunno supposedly it fixes some issues. So far evildragon has dropped the 3438 in to replace the 2612 that's in the genesis and it works, but the audio mixing circuit needs to be re-tweaked. Here's what I came up with after a few minutes of google searching. The 3438 audio output application circuit:
The mol and mor lines are left and right audio outputs "moL(left)" "moR(right)". I assume that thing connected to the mor line says "same f#cking thing as the mol line" in japanese. The audio outputs seem to be just going through some opamps in this application circuit before hitting the speaker....or something like that.
What the 2612 audio circuit in the model 1 is roughly like:
Not much too it, just a bunch of resistors and some caps mixing all the audio lines together before the mixed audio goodness goes through the cxa1034 and out the headphone jack. When I built the rgb av famicom with stereo sound with a jamma adapter I noticed when combining the audio lines together (jamma is only mono) that would cause issues like what evildragon is getting right now. All I did was add a 10k ohm resistor on the left and right audio lines before wiring them together and this solved all. Maybe all that's needed to get the ym3438 working in a genesis is some resistors? I ordered a ym3438 I'll mess around with it when it shows up.
Takes audio, pre-amps, drives it. My guess is that all that needs to be done is get the audio level of the ym3438 to what the 2612 outputs....resistors...caps...voltage dividers...whatever it takes.
How the chip sounds when straight dropped in:
It may possibly just be too loud...add some resistors on the mol and mor lines and see what happens. Also some caps maybe to clean up any voltage...220 uf is a fairly standard cap. This's all guess-work until I actually get one in the mail and mess around with it.
12-19-2012, 10:59 AM
TrekkiesUnite118
Doesn't the VA7 Model 1 Genesis have a YM3438 in it already?
12-19-2012, 11:01 AM
villahed94
You need a preamp to make it work. This is a staple with all Yamaha DACs (even chips like the YM3016, which is the DAC the YM2151 uses). The preamp in this case is the CXA1034 or an external preamp, but if you want to keep everything internal, use the CXA1034.
Quote:
Originally Posted by TrekkiesUnite118
Doesn't the VA7 Model 1 Genesis have a YM3438 in it already?
Yes, in an ASIC'd form, but this project is intended for all Genesis with a discrete YM2612 (Model 1 MD/GEN VA0-6.8 & Model 2 Gen VA2-2.3).
12-19-2012, 11:02 AM
Drakon
Beats me I've never had a va7. You're saying any model that comes with it would have an audio circuit tweaked for it and we could use that?
Quote:
Originally Posted by TrekkiesUnite118
Doesn't the VA7 Model 1 Genesis have a YM3438 in it already?
12-19-2012, 11:06 AM
TrekkiesUnite118
Not sure about the circuit being tweaked for it, but the VA7 Model 1 is basically a Model 2 in a Model 1 shell. So it uses the same hardware and everything so it has a YM3438 built into the ASIC and that's what it uses. Same with all Model 2's except the VA2 revisions that use a discrete YM2612.
12-19-2012, 11:14 AM
Drakon
Really? Is there a schematic out there of the model 2 audio circuit?
*edit*
Okay I pulled out a model 2 pcb that I think died from too much modding experimentation (haha). Looking at the pcb there's two lines going from the asic each go through a 103 (10k ohm) surface mount resistor, a random cap, then another 10k ohm resistor on each, then into the ba1032af crud chip. So there you go, 20k ohms worth of resistance before it goes into the amping stuff.
The mol and mor lines go through a 2.2k resistor, then a 10k resistor. They also have pull down resistors but smeh whatever. So on the model 1 circuit it looks like you're getting roughly 12k resistance, on my model 2 there's 20k resistance. As I thought the 3438 seems to just have more resistance which is what the setup evildragon is using sounds like it needs. I dunno....try adding 8k ohm resistors on the mol and mor lines of the 3438 before they get fed into the model 1 circuit which is tweaked for the 2612 and see if that fixes it.
Quote:
Originally Posted by TrekkiesUnite118
Not sure about the circuit being tweaked for it, but the VA7 Model 1 is basically a Model 2 in a Model 1 shell. So it uses the same hardware and everything so it has a YM3438 built into the ASIC and that's what it uses. Same with all Model 2's except the VA2 revisions that use a discrete YM2612.
12-19-2012, 12:23 PM
evildragon
It was my CCAM thread, not exactly off topic for YM3438 talk. ;)
Anyways, adding the resistors was my original idea but it was getting shot down saying it needed the inverting op amp.
12-19-2012, 02:51 PM
Drakon
Well adding resistors is worth a shot you only need to wire in two of them and it only takes a few seconds. I desoldered the ym2612 from my japanese va5 and soldered a precision socket into where it is (I use this one for testing). I followed the audio traces and the circuit is so braindead easy. ym2612 audio outputs -> 10uf caps -> 2.2 k ohm -> audio amp. That's it really. Everything else connecting to it is just the other audio signals getting mixed in using resistors to make them all mix nicely (just like what I did with the av famicom jamma rig). The pcb design is different from the above schematic but it's tweaked for the an7108 amp it's using so all you need to do is adjust the levels of the 3438 to what the 2612 outputs and all should work fine. From the sound of it the 3438 levels are too high so using some resistors should do the trick the audio lines would just need weakening. If my idea works I'll just wire my 3438 into a socket with the mol amd mor pins bent upward connecting to whatever strength resistors are necessary with the other ends of the resistors going into the socket. Then it'll be truly drop in compatible. I wonder if you could wire in both the 2612 and the 3438 at the same time and wire up a switch that switches which chip outputs connect to the audio circuit....real time switching between the 2612 / 3438 would be a pretty awesome feature.
As for starting a new thread I think this mod is certainly cool enough that it deserves its own thread :cool:
Quote:
Originally Posted by evildragon
It was my CCAM thread, not exactly off topic for YM3438 talk. ;)
Anyways, adding the resistors was my original idea but it was getting shot down saying it needed the inverting op amp.
12-19-2012, 02:59 PM
evildragon
Well I tried, I can hear the PSG louder now, so I know the levels on the YM3438 are lower, but it still has this distortion.
On an oscilloscope, it's distorted seemingly coming out of the YM3438 this way. It actually looks like it's running in 4-bit resolution or something on a scope, much more stair stepped than the 2612.
But me and Ace get the SAME artifacting sound. We can't both possibly have damaged 3438's in the SAME way.
EDIT: And just tried, I connected headphones directly to the YM3438's pins, not even touching the Genesis audio circuitry, and the headphones hear the distortion too. When I do this to the YM2612, I actually get "cleaner" sound by doing that same test.
12-19-2012, 03:01 PM
Drakon
It's probably not damaged....maybe the signals being fed into it need to be changed somehow?
Quote:
Originally Posted by evildragon
Well I tried, I can hear the PSG louder now, so I know the levels on the YM3438 are lower, but it still has this distortion.
On an oscilloscope, it's distorted seemingly coming out of the YM3438 this way. It actually looks like it's running in 4-bit resolution or something on a scope, much more stair stepped than the 2612.
But me and Ace get the SAME artifacting sound. We can't both possibly have damaged 3438's in the SAME way.
EDIT: And just tried, I connected headphones directly to the YM3438's pins, not even touching the Genesis audio circuitry, and the headphones hear the distortion too. When I do this to the YM2612, I actually get "cleaner" sound by doing that same test.
Only difference I see is that the 3438 has an additional "TEST" pin. But without being able to read Japanese, I have no idea what it does. But perhaps this is one possibility.
hmm....have you tried wiring the output pins of the 3438 straight into your sound system? If you're lucky it'll be powerful enough to faintly drive your hardware but if you crank your amp up enough you'll be able to tell if the distortion is caused by the amp circuit or coming right from the chip itself. Just slap some 10 uf caps in between (most audio circuit I find on the internet use 10 uf so it seems to be a good idea).
12-19-2012, 03:15 PM
evildragon
No haven't tried wiring it to an audio amplifier directly. I will try tonight. I have a few 10uf caps I can slap on a breadboard.
12-19-2012, 03:21 PM
evildragon
I've done some thinking, I think it's all about the caps right now (and the mentioned resistors that leveled out the volume). I have a feeling slapping on some good sized caps will help. Maybe a low-pass filter.
12-19-2012, 03:39 PM
Drakon
I've got an idea....find a model genesis that comes with a built in 3438. Wire up your 3438 from your model 1 into the amp circuit of the other genesis. Power on both consoles (no cart in the genesis with the 3438 amp) and run the audio out from the cartless genesis. This system should already have a circuit tweaked for your 3438 so this way you'll know for certain if there's something wrong with your 3438 or if you just need to change the circuit a bit.
Heck...if you have a built crystal clear audio circuit you could wire it into that as well. The ym3438 outputs will go into "fm l" and "fm r"
Here's the sound coming right from the ym2612 with only 10 uf caps in between haha
Guess that's no good for testing audio quality. But the above idea in this post should do the trick.
12-19-2012, 03:59 PM
evildragon
I will give it a shot tonight. I do indeed have a Genesis 2 with built in YM3438.
12-19-2012, 04:03 PM
evildragon
You know what, i just heard your demo of the 2612 with the 10uF caps, and to me, it sounds like the opposite of the 3438 playing raw.
This could very well be whats going on.
For the caps, your wiring it inline with MOR and MOL, correct? Not tied to ground?
12-19-2012, 04:04 PM
sega16
Quote:
Originally Posted by Drakon
Here's the sound coming right from the ym2612 with only 10 uf caps in between haha
Guess that's no good for testing audio quality. But the above idea in this post should do the trick.
You need to add a 2.2k pulldown resistor to GND then it will sound normal.
12-19-2012, 04:27 PM
Drakon
Good news your 3438 is working fine. I forgot the genesis 2 has a built in 3438. I wired the 3438 from my genesis 2 straight into the mol and mor pins of my genesis 1 and I get the exact same sound that you got. The genesis 2 I tested it with already is ccam'd so the fm lines were already isolated from the genesis 2 pcb. The other good news is now I can sit here and fart around with trying to make it sound right.
12-19-2012, 04:43 PM
evildragon
Awesome. I actually forgot to do a pull down resistor as mentioned above. I was just putting the resistors in line. A pull down might help. I'm leaving for work in a few so I'll have to try this when I get home.
12-19-2012, 04:46 PM
evildragon
This is going to be quite exciting. :D
And the whole reason for this is because the 3438 has a slightly better DAC. This would be the coolest thing since sex. Well, almost, but quite close!
12-19-2012, 07:32 PM
Drakon
Before you start messing around you should probably know that I already got it working. I'm just tweaking it a bit then I'll make a video and post a schematic. It's much more complicated than using just resistors but it's not too bad.
12-19-2012, 07:40 PM
evildragon
Ok I'll wait. Schematics good.
12-19-2012, 09:22 PM
Drakon
Okay too busy to make schematics or a video. So here's what you do. You get yourself a tda2822 opamp (I'm using a tda2822m). You wire both channels into the opamp like this:
You'll also need resistors on the audio lines (right now I think 5k ish is good). Without resistors it'll still sound a little messed when plugged into the genesis audio circuit. However you can wire the buffered signals from the opamp straight into a stereo with no resistors and it sounds perfect. It's probably best wiring the resistors into the inputs of the opamp otherwise they would mess with any lpf of the console circuit. Then the buffered output goes into where the 2612 analog pins connect. I can't get the volume levels correct until I actually get a ym3438 in my posession. I'm using the ym3438 of my genesis 2 wired into the audio circuit of my va5 genesis 1 where the ym2612 connects its analog outputs. So I have no clue if the volume levels are good since I'm working with just fm and nothing else at the moment. Also I tried a bunch of other opamps and they didn't work, this was the one that actually got the job done. So if you're thinking about trying a different opamp I recommend against it.
*edit*
I should also mention I wired up atleast 3 other types of opamps before finding this one. Two of them sounded pretty bad and one sounded very bad.
Quote:
Originally Posted by evildragon
Ok I'll wait. Schematics good.
12-19-2012, 10:41 PM
evildragon
Is V+ 5v? How about V-? How do I even get that from the power I have to deal with in the console?
12-20-2012, 12:34 AM
Drakon
Haha. V- would be ground. I don't have time to draw a schemat of the physical wiring, just wait for me to finish tweaking then I'll draw a schematic (but the resistor values won't be right until I get a stand alone 3438 to drop in).
Quote:
Originally Posted by evildragon
Is V+ 5v? How about V-? How do I even get that from the power I have to deal with in the console?
12-20-2012, 12:45 AM
evildragon
That's fine. Usually V- isn't ground in the schematics I draw, but literally a negative voltage.
I'd be wiring mine up with POTs for experimentation.
12-20-2012, 12:51 AM
Drakon
I've seen datasheets label ground as "vss" and stranger things. You just sort of get used to it after seeing a few hundred. If it's negative voltage it would say something like -5v. Pretty much nothing uses negative voltage I've never used a part that takes it. Wiring up pots....do you have the tda2822 or have you ordered one? According to tiido / ace the reason why this opamp works and the others don't is something about a mhz range...and it not having enough "sway" for the ym3438....yeah.
Anyway all opamps work the same (thanks to tiido for mentioning this), they're like transistors in this sense. They all do the same thing they just come with different limitations. This's why opamp circuits in a schematic is just a symbol instead of the physical part being shown. I purchased a bunch of opamps I found people recommending from google searches. This's actually the first project where I managed to get an opamp to even work. It seems certain opamps are better suited for some things than others. Like any other part opamps come in a whole range of quality.
Quote:
Originally Posted by evildragon
That's fine. Usually V- isn't ground in the schematics I draw, but literally a negative voltage.
I'd be wiring mine up with POTs for experimentation.
I'm going to be looking at all the op amps I have. I might have this one, if not I'll order it.
12-20-2012, 01:27 AM
villahed94
You're missing pin 19, (AGND), and pin 22, (AVCC)
12-20-2012, 01:30 AM
evildragon
The diagram wasn't for the 3438 itself so the 3438's own wiring is just a rough quickie.
I'm more interested in the op amp wiring itself.
12-20-2012, 02:12 AM
evildragon
Drakon, you're going to hate me. I had a spare cap just sitting around, and BAM!
Solved with ONE freaking capacitor. It's not as clear as it could be, but it worked pretty damn well...
Video coming soon.
12-20-2012, 02:24 AM
evildragon
EDIT: With a single resistor from after the cap to ground, the sound is now perfect. :D
I might still play with the cap values though, the resistor to ground made the volume not as loud, and less distorted on Batman and Robin.
The DAC sounds funny though. Actually, the DAC sounds just like my Genesis 2, but the FM sounds quite nice.
12-20-2012, 02:47 AM
villahed94
That's exactly why capacitors are used in audio opamp circuits! Nice job there! Now just solve the DAC and we'll be ready to YM3438-ise our Model 1s :P
I've done a little more experimenting before I'm going to sleep. I think I just need to find the right pull down resistors and a capacitor, and I'm all set. Op amps? Pfft!
Right now, the "rings" on Sonic are VERY loud, but are very sharp, much more crisp than the YM2612. But it's so loud it clips a little. A change of the cap should fix this.
Also, due to the pull down resistors, the PSG is actually louder than the YM3438 right now, when it comes to the FM on mids and lows. Highs though, once again, gotta tame that beast, then I can change what pull down resistor I am using, and get the right volume balance.
12-20-2012, 08:41 AM
Solkia
Why does the SEGA shout at the beginning not work?
And why would I hate you? You just made life easier. Do you need that resistor? What strength is the resistor?
If you want to get rid of highs that should involve adding a lpf. 10 - 1000 pf cap to ground after a series resistor lpfs video, never tried it with audio. Once I actually get a ym3438 chip in my posession (and I can stop borrowing the ym3438 sound from my genesis 2) then I'll be able to see how it sounds mixed with everything else and tweak that.
Today I'm going to try adding the resistor before the opamp since this opamp is just buffering the signal it's not amping it at all. Therefore the audio is just as strong going into the opamp as it is coming out. When using just the opamp with no resistor I can wire the opamp output straight into my stereo and it sounds fine, but it needs a resistor for it to mix in with the genesis 1 audio circuit (otherwise it turns into a staticy clipping mess). This demonstrates that when tieing clean audio signals together all the signals need resistors.
I'm only just starting to work on my own audio circuits, all my previous work involved s-video circuits and serious tweaking of them. This's actually the first time I even managed to get my opamps working (and they all worked yay). I'm learning a great deal just from messing around with this. The av famicom audio circuit I'm using just came with a kit that's not my engineering. Replacing the dac in the snes is my other audio project but it would have taken me way longer (and a lot more money) if tiido hadn't pointed out that the digital signals in the snes are i2s format and that you can just buy a straight i2s to analog dac. I'm very thankful tiido can kindly point me in the right direction so long as I do the sourcing, building, and necessary studying.
Probably the greatest thing I've learned from this is that the tda2822m seems to be a pretty awesome opamp. What's amusing is I actually had all the necessary parts and gear laying around to build and test this mod.
12-20-2012, 12:03 PM
evildragon
I had to add the pull down resistor, because otherwise, like in Contra Hard Corps, when all the explosions are happening, the audio literally cuts out from being so loud. Add the pull downs, and it stops cutting out.
As for their value, I'm not sure, I just unsoldered some resistors off an old ethernet card and threw it on. I'll see if I can get the value soon.
Right now PCM for some reason is not sounding quite right. Sounds exactly like a unmodified Genesis 2 actually when you hear "SEEEGGGAAAA!".
Solkia: Sound was just down at the time. Since it was after midnight, I didn't want it blasting by accident.
Here's a rough schematic on what my circuit is. Prepared for a protoboard.