|Re: [hatari-devel] STe DMA sound|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] STe DMA sound
- From: Vincent Rivière <vincent.riviere@xxxxxxxxxxx>
- Date: Sat, 14 Apr 2018 22:11:22 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QoFjEWxK+W+9rnaID5Es85HrIfkT8ahqLQh6/6Nzfpo=; b=tS7QauMz51SRq4RVDUSM/ARhKiKqcydbfoOx6XNlK1lrxGyNnv70FCx3/qbFiyUBAq 9ojOB4OvpJUMNObxTUToHTIjUDu9uiiEpoKgb6zWb5pCI8vcBGN3JQhCkks10d3NZmn5 Wh9SFtIsu1Mp2aiAdIbgDIExT89Fo266FuSAdelMYCQSh0+EEGGwmLcHVDQM1Q1n43r0 nh/1jo1fmR+soOawml1kl1Rh4dxyWkLJOiUDweE400jtmXZcT8fpYajPFIQ9C98LYnTC yHx0ESGGnobR1HK20PRQwSrrJJkhNA6hwYfsaCuDWuRpqhjWHfgm9h38t1DjXa/UQhCJ PU+g==
On 14/04/2018 at 20:55, Christian Zietz wrote:
One thing that changes for sure: When you stop reading, the FIFO isn't
refilled anymore, either. (Because it remains full.) This then means
that a program will never see the DMA sound output finish, i.e. no
interrupt occurs and the DMA sound control register never goes back to zero.
I have made further tests.
1) Whatever I do, the 7 KHz artifact is only present when DMA FIFO stuff is
active. When I hack the code to avoid FIFO refilling, problem disappears. I
didn't manage to understand how this can happen.
I suspected generated interrupts in DmaSnd_EndOfFrameReached(), but after
testing it does not seem to be related.
2) The 7 KHz artifact appears on YM voice C, not others (and not DMA!)
I checked that by hacking sound.c, keeping only the following code, and
commenting out other voices.
bt = ToneC_val | ToneC_force;
bt = (bt | mixerTC) & (Noise_val | mixerNC);
Tone3Voices |= ( bt & YM_MASK_1VOICE ) << 10;
I have no idea how such different parts of the code can interfere with each
other... But definitely, it affects all Lethal Xcess musics (at least menu,
level 1, level 2) on voice C. It does not happen with Hatari 2.0.
As Nicolas rewrote the YM code for 2.1, maybe he has an idea...
Sorry, I'm currently busy. I must give up debugging for now.