How DAC works ?
Moderator: BigEvilCorporation
How DAC works ?
I have some questions about channel 6 DAC mode :
1) do you confirm there's a 9th bit of value at bit 3 of register 2C ? I don't see this register mentioned in most documentations, nor in VGM specs, in particular data blocks are byte based, does it mean that all YM2612 vgm dumps are wrong ?
2) if I want to translate those values in raw signal, how do I proceed ? Are they stored in a reverse-log form, like TL or SL values ?
1) do you confirm there's a 9th bit of value at bit 3 of register 2C ? I don't see this register mentioned in most documentations, nor in VGM specs, in particular data blocks are byte based, does it mean that all YM2612 vgm dumps are wrong ?
2) if I want to translate those values in raw signal, how do I proceed ? Are they stored in a reverse-log form, like TL or SL values ?
Re: How DAC works ?
$2C is a test register (hence why it's "undocumented") and from what I gather the exact behavior differs between the two YM2612 variants used on the Mega Drive. No proper game will use it to attempt to boost the DAC either (especially as it prevents the remaining channels from being used for FM).
The value written to the DAC register is actually linear (although I forgot the exact maximum amplitude >.>). Well, as linear as the YM2612's actual DAC is, anyway.
The value written to the DAC register is actually linear (although I forgot the exact maximum amplitude >.>). Well, as linear as the YM2612's actual DAC is, anyway.
Sik is pronounced as "seek", not as "sick".
Re: How DAC works ?
Thank you !
Re: How DAC works ?
Well, both test registers are same across YM2612 and discrete YM3438. so i assume they're same on ASIC YM3438 too(it's different on YMF276 though, but it's not used on any official sega hardware afaik).
LSB bit of DAC register does not interfere with DAC test register(aka stereo/loud DAC mode)
Re: How DAC works ?
I recall from tests that the amount of amplification seems to differ between discrete and integrated YM2612 tho (which can ruin attempts at using it, though I suppose you could try detecting which version it is by checking the behavior of reading back the status…), i.e. the register bits are fundamentally the same but the actual result seems to differ.
Then again we probably need to test this again if it's not written down somewhere…
Then again we probably need to test this again if it's not written down somewhere…
Sik is pronounced as "seek", not as "sick".
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: How DAC works ?
Is not amplification always just 6x base DAC volume as all YM channels output DAC instead of just channel 5 ?
That could also be used to do stereo DAC by setting ch0-2 to LEFT and ch3-5 to RIGHT.. but then you need to be perfect sync for DAC update which is almost impossible to do (and it requires update at 106 Khz, i don't even know if DAC register can be updated that fast).
That could also be used to do stereo DAC by setting ch0-2 to LEFT and ch3-5 to RIGHT.. but then you need to be perfect sync for DAC update which is almost impossible to do (and it requires update at 106 Khz, i don't even know if DAC register can be updated that fast).
Re: How DAC works ?
For YM2612 amplification is ~24x, for YM3438 it's ~6x. IIRC, DAC register is updated within 4 internal cycles(24 master clocks), so In theory it's possible to output up to 319kHz audio in DAC test mode.Stef wrote: ↑Tue Jun 18, 2019 7:48 amIs not amplification always just 6x base DAC volume as all YM channels output DAC instead of just channel 5 ?
That could also be used to do stereo DAC by setting ch0-2 to LEFT and ch3-5 to RIGHT.. but then you need to be perfect sync for DAC update which is almost impossible to do (and it requires update at 106 Khz, i don't even know if DAC register can be updated that fast).
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: How DAC works ?
24x, that is *really* loud !
Ok i can understand the difference, YM2612 has gap in sound multiplexing.. maybe the YM3438 process the multiplexing differently (without any gap).
It's interesting to learn than DAC register can be updated that quickly, even if at that rate the Z80 can't follow ^^
Ok i can understand the difference, YM2612 has gap in sound multiplexing.. maybe the YM3438 process the multiplexing differently (without any gap).
It's interesting to learn than DAC register can be updated that quickly, even if at that rate the Z80 can't follow ^^
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Re: How DAC works ?
YM2612 outputs for one cycle every 6 cycles (one channel time), while YM3438 output at 5 (at least I recall gaps between each channel) of these 6 cycles IIRC. This gives 3438 much better SNR and also makes it need much less amplification and easier filter to get good output level compared to 2612. The loud bit makes DAC output happen on every cycle.
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen