Re: [hatari-devel] STe DMA sound

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


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.

Exactly.

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.

--
Vincent Rivière



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/