help needed for megadrive audio modding.

For hardware talk only (please avoid ROM dumper stuff)
humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

help needed for megadrive audio modding.

Post by humbug » Tue Apr 20, 2010 11:34 pm

Hi

First post... so I will just roughly introduce myself.

My name is Brendan, and I am a Mechanical Engineer by nature... but lately I have had a growing interest in electronics. I have now recently modded my Sega Saturn, and now I'm hooked!

However, I have very very little experience... and to be honest, I don't really know what the hell I am doing... but I am trying to use common logic with my ideas.

Now this one problem has me stuck now quite nicly. I am in the process of eliminating all ground loops in my A/V theatre set up. I tried transformers, isolating cables, devices and other do-dads... and to no satisfactory results... until I tried Toslink SPDIF. It just sounds amazing... crisp and clean as one would expect.

Now I am now trying to get the best audio out of my Sega Megadrive. I currently have a model 2 but i would like a model 1 with a megacd1 and (somehow) inbuilt 32x.

Now the problem this presents are many. As you guys know, the system as a whole will output 3 sets of audio sources, one for each system... And that getting a digital signal out of YM2612 is impossible.

I then did a little bit of research and stumbled on some information on this forum and others... http://nfggames.com/forum2/index.php?topic=3719.0


This lead me to make a post on Racketboy.com as follows:
has anyone used this chip: "Yamaha YM2608" as apposed to the "Yamaha YM2612" to be coupled with another sound processing chip to output spdif?

since it doesn't have an internal DAC, it might be possible... however, I am not sure...

I plan to use the sega megadrive version 1. I will isolate the sound processing chip: YM2612

http://en.wikipedia.org/wiki/Yamaha_YM2612

And then using a multipole double throw switch to connect up YM2608 through the 6 normal FM channels and leave the remaining 10 channels open (not connected to anything)

http://nemesis.hacking-cult.org/MegaDri ... slated.PDF

And then using the digital OPO sound output from YM2608 to input into CS8406

http://pdf1.alldatasheet.com/datasheet- ... S8406.html

And then using the spdif output to send the signal to a toslink transmitter.

If the output from YM2608 fits the serial input into CS8406, then i cant see any reason why it cant work??? I am not sure about the output of the serial audio bit clock and word clock.

I am also looking into the possibility of CS8416 and other chips from cirrus logic though im doubting that they will be compatible :S

Please tell me what you think.
I made contact with a member named Tiido Priimägi... asking for his advice.

He replied:
This will not work because the YM2608 is not fully software compatiblewith YM2612, all games using the DAC channel will not have PCM samplesounds. I don't think the output is something other DACs can handlebesides Yamaha's own. I do think its far easier to use an ADC+morechips to get SPDIF out of MD.....also you cannot leave the input pins on the 2608 unused, they mustbe tied to either ground or VCC.
And what he says is very true.

So I have then been looking into ADC directly from YM2612, however, I then stumbled upon another issue... Perhaps you guys can see it.

Image

Image

So I am now wondering which circuit I should be using if I am coupling cs5361 and cs8406 from Cirrus Logic.

Another issue I am getting worried about is lag being introduced if I now have 2 more sound processing chips and a complex audio filtering circuit.

So I am posting here... if anyone can help me or give me a little more guidance... as this stuff is such on a crazy advanced level that I am not used to.

Thanks very much for your time in reading my essay.

Cheers

TheMVRules
Newbie
Posts: 9
Joined: Wed Apr 07, 2010 6:00 pm
Location: Linköping, Sweden

Post by TheMVRules » Wed Apr 21, 2010 5:36 pm

Maybe you should look more. This mod is for MD version 2. You said you were going to use Version 1.
Sega Genesis Mr. Knows All

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Thu Apr 22, 2010 3:03 am

It does clearly say that on the drafted version of that schematic that Tiido made, but I know from looking at his origional sketch, that it was designed for YM2612 which is the sound chip found on the model 1 right?

http://arcade.ym2149.com/megadrive/md1_pcb_partside.jpg photo of MD1 PCB

Image

(note the file is called CCAM1)

yet in his thread he said it was for the MD2???

confusion...

freezedream
Interested
Posts: 13
Joined: Tue Sep 29, 2009 6:08 am
Location: Adelaide, Australia
Contact:

Post by freezedream » Thu Apr 22, 2010 7:00 am

That CCAM circuit is indeed for MD2 only and not MD1.

HardWareMan
Very interested
Posts: 732
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Apr 22, 2010 7:14 am

freezedream wrote:That CCAM circuit is indeed for MD2 only and not MD1.
Why so? I think this analog part applicable for any version of MD. Just switch on your brain and all will be allright.

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Thu Apr 22, 2010 7:19 am

so where is ym2612 on the md2?

if the chip ym2612 is both on the model 1 and 2, can this design be made to fit the md1? if not why?

So the circuit used for the cirrius cs5361 be connected directly to the outputs to ym2612 on the md1?

what do you guys think would be a good way to mix the 32x and mcd signal in there.

since there isn't a ground as far as I can see on the cirrius cs5361 circuit, does that mean I wont need psg? and the fancy transistors? or is that there for making the volume sort of equal?

Thanks for the replies so far... I'm really learning alot :)

TmEE co.(TM)
Very interested
Posts: 2395
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Apr 22, 2010 7:28 am

I have forgotten to put a 2 on my MD2 mod schematic... CCAM is only for MD2, VA0, VA1, VA3, with some modification also to VA4 too, aswell as Genny3's. Nomads, Xeyes, Wondermegas, Laseractives and other MD2 based setups with YM integrated into the SEGA ASIC can be CCAMed too.

The reason why CCAM does not work for real YM2612 is that their output is much more quiet and requires different kind of buffering to work...

The PSG, 32X and MCD are also all analog singals and need to be mixed in with the FM signals. That is what CCAM does, mixes in those all and amps stuff up to near line levels.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Thu Apr 22, 2010 2:09 pm

apologies to be a drag on your/forums time, but what is VA0~4?

also could you hit me a link with info on buffering and how one would go about designing one?

what sort of output strengths are comming out of the real ym2612, the 32x and megacd1?

thanks again and sorry for being a noob... but I really should learn this somehow... and its really hard as I have no idea where to look for good tutorials/example workthroughs etc etc... :(

Thanks so much

TmEE co.(TM)
Very interested
Posts: 2395
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Apr 22, 2010 5:38 pm

VAx shows the board model, different boards have different VA marking.

I did this stuff mostly by trial and error long ago, and recently started liking opamps which can make things quite easy to work out...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Fri Apr 23, 2010 12:50 am

Could someone please mark this up?

I havn't much clue what I am doing... but I was following summing junction logic: http://www.eecs.tufts.edu/~dsculley/tut ... amps7.html

The stuff in red is what I am unsure about.

Image

TmEE co.(TM)
Very interested
Posts: 2395
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Apr 24, 2010 2:36 pm

I'm afraid that what you got there will end up in distorted sound, the output of YM is very weak and easy to overload.
If you plan on doing things in a MD2, then just use the input side of my schematic, with opamp stuff replaced with what you have in your schematic. Things should work fine then.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Sun Apr 25, 2010 1:28 am

I wish I had the luxury to use the MD2 mobo, but I already have the origional SegaCD and MD1... Unless I should find a MD2 mobo and put it in the MD1 case... but I have never heard of that being done.

is there a way to measure exactly the strength of the signal comming from the MD1 circuit plus mCD and 32x and design a buffer based on that?

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Sun Apr 25, 2010 5:26 am

Could someone please help me find the output impedance values for ym2612, Ricoh RF5C164 and the sound processing chip found on the 32x (name unknown to me)

Perhaps it would be a better idea to use a new amp to boost the 12dB output from YM2612 to something equal to the 32x and megaCD outputs.

I would like to stray away from using existing parts from the origional circuit, ie the small (and noisy) amp on the headphone jack.

What amp would you suggest to boost the level up to what would be acceptable to use with your crystal clear mod in order to sum the signals, then have that go in through the cirrus logic buffer and then into the cirrus logic ADC.

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Mon Apr 26, 2010 7:16 am

Thanks to Jorge Nuno from Sega-16 forums

Link:
http://www.sega-16.com/forum/showthread ... post245973
The output impedance of the YM2612 is 1kOhm or more IIRC, you really should use a voltage follower/or a non-inverting amplifier configuration.
I don't remember it's output level, I could try to measure that if you want, but I need some program to set it's channels to the maximum level, or write the full scale to the DAC (I don't know much about the YM, software side, so don't count on me).

The PSG, on the other hand, is around 6dB (you wanted dBs, you get dBs ), and has like 1kOhm too.
Looking at the MD schematics, you'll see that the audio is mixed together with relations of 0.0431 for the PSG, 1 for the YM and 0.0468 for the external audio sources (both 32x and CD)

Assuming these figures are correct, (I hope they are ) you get that the output of the YM is around -27dB below PSG.

What I did with my audio amp was tapping all signals before going through the electrolithic capacitors (and removing those caps, and everything after them, resistors, the sony amp, everything), Amp'ed the YM outputs by 28, and mixed them with the straight PSG and Ext audio, "without" amplification (actually there's a trimmer to adjust the PSG level ), then added an output stage with a voltage follower, then removed the DC offset with 1500µF capacitors to the headphone jack.

Also you either need a polarization voltage of Vcc/2 as a gnd reference or use symetrical supplies for the opamps.


About the ADC filtering, a first-order low pass filter at 61kHz should be enough. It will give you 40dB attenuation for the 6.1Mhz replica. This means that the spectral components around 6.1Mhz (+/- 61kHz) will have a maximum of 7mV (ignoring noises and crap)
Anyways...

I just drew up a quick schematic... but I need someone to check over it.

here is what I came up with. Note: the total output voltage is not allowed to exceed 6.7v otherwise the signal will dump to the ADC overflow to gnd.


please post a markup

Kind regards

Brendan

Image

humbug
Newbie
Posts: 9
Joined: Tue Apr 20, 2010 10:47 pm

Post by humbug » Wed Apr 28, 2010 12:11 am

So how did you obtain 3v for your virtual ground? just a 6v reg with a resistor? how many buffers and virtual grounds could I power with 1x 6v reg?

Also, how would wone work out the final voltage output with all these op amps and resistors in the way? I added a resistor and a virtual ground to the "cirrus" circuit to allow for amplifying the signal up to 6volts max... would that work do you think?

So, here is the latest markup. please let me know if i should change anything.
Also is VQ voltage quadrupler?

Image

Post Reply