Re: [hatari-devel] Audio/video sync regression in dev-builds |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 19/05/2022 à 17:12, Ben G. a écrit :
Hi all,
About Nicolas 2nd point on DMA/YM sync.
According to my own test the DMA sound and the YM seems to be exactly in sync, at leat on my STe. For 1 50khz DMA sample I have exactly 5 250khz sample.
Hi
yes they're the same, this is confirmed by the schematic of the STE :
- CPU uses CLK8
- DMA AUDIO uses SCLK, YM uses CLK2 (=SCLK/4) (and FDC uses SCLK too)
CLK8 is usually 8021247 Hz, SCLK is 8010613 Hz
To verify that I have made a little program playing 2 sounds that cancel-out. If the clock are not in sync the sound would change over time. May be the clock rates are so close that It takes ages but it really seems to be perfectly in sync.
Notice that this program can also be used to measure the volume between the YM and the DMA sound (see Troed post).
This is more or less what I plan to measure on my STe, not doing a
cancel-out sound, but playing YM and DMA square wave sample at the same
time, adjusting DMA samples value until the DMA square wave match the
level of the YM output (by recording the STE audio output on a PC and
loading the wav file after that to check/adjust the value)
In the end, this is similar to doing a cancel-out between YM and DMA.
What byte value do you find when building your DMA square wave to get a
result that cancel the YM wave ?
Nicolas