New Documentation: An authoritative reference on the YM2612

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Mon Feb 02, 2009 12:39 am

Shiru wrote:One interesting thing about YM2413: it has not single mono output, but two separate outputs for melodic and drum channels.
Indeed. There's no logical reason for that, though, the 'drum' channels, if enabled, take over some of the other channels. I think they just did this so you can choose to mix them at different volumes.

What I find even stranger is that some chips have an internal DAC for their PSG-type waves, but not for the FM stuff. You'd think it would have been easier to just mix the PSG stuff with the FM stuff.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Feb 02, 2009 12:47 am

You must learn how those built-in PSG works (AY-3-8910/YM2149), it's much harder to mix than use as-is.

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Mon Feb 02, 2009 12:52 am

Shiru wrote:You must learn how those built-in PSG works (AY-3-8910/YM2149), it's much harder to mix than use as-is.
Well, what I meant was, digital signal comes out of PSG, goes through DAC, and to output pin. Why not send that digital signal out the same way as the other output? Or why not use a DAC that can handle both outputs?

Of course the answer is probably 'its cheaper', but then if you've got to use an external DAC anyway...

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Feb 02, 2009 1:15 am

PSG uses three separate 4-bit DAC's (5-bit in Yamaha's version), one per channel. They are apply volume or envelope to the output. To get digital output which can be mixed with FM output you'll need adders instead of those DAC's.

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Mon Feb 02, 2009 2:53 am

Well, yes, but an adder that could handle exactly that is already there. Then again, volume levelling would be an issue again. I guess it was just easier to basically throw a full YM2149 in there.
Shiru wrote:4-bit DAC's (5-bit in Yamaha's version)
Going way off topic here, but do you have info to back that up? As far as I remember, they're both 4 bit, except the Yamaha version is actually accurate, and the AY version very much isn't :) In either case I've emulated both of these and compared the outputs with original chips.
HardWareMan wrote:Mmm... Square waveform consist from many harmonic frequences. To infinite high frequences. So, result output can be more complex, specially at high frequences. But saw waveform consist much less of high frequences, than square frequences. So, result output can be much clearer from harmonic frequences.
Well, the filtering effectively downsamples the whole thing to around 40KHz, so it *shouldn't* sound any different (the MD2 may sound a bit louder, though). The filters are far from perfect, though.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Feb 02, 2009 1:56 pm

Snake wrote:Going way off topic here, but do you have info to back that up? As far as I remember, they're both 4 bit, except the Yamaha version is actually accurate, and the AY version very much isn't :) In either case I've emulated both of these and compared the outputs with original chips.
Well, try to read at least first page of the YM2149F datasheet. This is officially documented fact, and is confirmed long ago by few independent enthusiasts who did measurements of the real chips, and implemented in many emulators.

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

Post by TmEE co.(TM) » Mon Feb 02, 2009 3:48 pm

http://www.epicgaming.us/tiido/MD_Sine.rar

Can this be any help ? There's recordings of the sine of single operator of MD2 and MD1, going from TL0 to higher values.

MD1 has a shift in each half period......
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

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Mon Feb 02, 2009 6:57 pm

Shiru wrote:Well, try to read at least first page of the YM2149F datasheet.
Ah, ok, I'm probably just misremembering, then.
[edit] - doh - yeah - without even looking I remember now it IS twice the resolution. I'm probably thinking of some other chips. Done way too much of this stuff ;)
TmEE co.(TM) wrote:MD1 has a shift in each half period......
That's probably relevant, yeah. What's odd is that I have some recordings from an MD1 - they were taken at final output (I was trying to measure the filter effects at the time) and they don't show this at all. Which is both odd and annoying.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Feb 02, 2009 10:12 pm

TmEE co.(TM) wrote:http://www.epicgaming.us/tiido/MD_Sine.rar

Can this be any help ? There's recordings of the sine of single operator of MD2 and MD1, going from TL0 to higher values.

MD1 has a shift in each half period......
The MD2 sin curve is really... weird ! Looks like a bad approximation of real one, the MD1 does a lot better here.

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

Post by TmEE co.(TM) » Mon Feb 02, 2009 10:34 pm

it looks weird because of the low TL value... higher values show good sine...
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

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

Post by HardWareMan » Tue Feb 03, 2009 2:05 am

TmEE co.(TM) wrote:it looks weird because of the low TL value... higher values show good sine...
I don't see a good sine there.

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Tue Feb 03, 2009 2:25 am

A FFT would show the harmonic distortion better 8)

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Tue Feb 03, 2009 2:28 am

One thing I did notice about the MD2 many years ago, is that when it goes from playing silence, to playing a loud tone, it seems to be overdriven for a brief period. But that may have more to do with the mixer, or may even have just been my console. But yes, I always thought the sinewave was a bit off too.

Richter X
Newbie
Posts: 8
Joined: Thu Sep 11, 2008 9:06 pm
Location: Hagan, Georgia, USA

Post by Richter X » Tue Feb 03, 2009 6:38 am

There's something that's still bothering me. I keep playing "Good Job, Headdy" from Dynamite Headdy using TmEE's recording of it, The OST's recording of it, and foo_gep with the newest 2612 core. In foo_gep the pitch of the orchestra hit at the end has a higher pitch than it should sound. Anyone care to look into it?

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

Post by TmEE co.(TM) » Tue Feb 03, 2009 1:53 pm

Fusion had a small bug which caused PCM to be played faster, and this affects all VGMs... the VGM recording I did of that tune SHOULD sound like Fusion does... I should do another recording using real game...
Last edited by TmEE co.(TM) on Tue Feb 03, 2009 9:03 pm, edited 1 time in total.
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

Post Reply