Page 27 of 58

Posted: Mon Feb 02, 2009 12:39 am
by Snake
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.

Posted: Mon Feb 02, 2009 12:47 am
by Shiru
You must learn how those built-in PSG works (AY-3-8910/YM2149), it's much harder to mix than use as-is.

Posted: Mon Feb 02, 2009 12:52 am
by Snake
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...

Posted: Mon Feb 02, 2009 1:15 am
by Shiru
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.

Posted: Mon Feb 02, 2009 2:53 am
by Snake
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.

Posted: Mon Feb 02, 2009 1:56 pm
by Shiru
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.

Posted: Mon Feb 02, 2009 3:48 pm
by TmEE co.(TM)
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......

Posted: Mon Feb 02, 2009 6:57 pm
by Snake
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.

Posted: Mon Feb 02, 2009 10:12 pm
by Stef
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.

Posted: Mon Feb 02, 2009 10:34 pm
by TmEE co.(TM)
it looks weird because of the low TL value... higher values show good sine...

Posted: Tue Feb 03, 2009 2:05 am
by HardWareMan
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.

Posted: Tue Feb 03, 2009 2:25 am
by Jorge Nuno
A FFT would show the harmonic distortion better 8)

Posted: Tue Feb 03, 2009 2:28 am
by Snake
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.

Posted: Tue Feb 03, 2009 6:38 am
by Richter X
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?

Posted: Tue Feb 03, 2009 1:53 pm
by TmEE co.(TM)
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...