Re: [hatari-devel] Suggested patch to fix problem handling STOP when DSP is active

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


Hi Nicholas,
Thanks for responding so quickly!

On 29 Oct 2020 at 22:41, Nicolas Pomarède wrote:

> Le 29/10/2020 à 03:03, Roger Burrows a écrit :
>
> [...]
>
> > So I made the attached small patch to Hatari 2.2.1, to call DSP_Run() on a
> > regular basis within the 'STOP is active' loop.  With this patch, the
> sound
> > quality from EmuTOS is now better than that from Atari TOS (identical
> > configurations), although it's still not perfect - that underpowered Linux
> box
> > again.
> >
>
> good point, I did something to update MFP while in stop state, but DSP
> should also be updated as it's similar to MFP running in parallel of the
> CPU.
>
> But doing it on a 100 cycles basis is not really fully accurate, so I
> did the attached patch where DSP_Run is called on each loop during the
> STOP state (at the interval where MFP is updated too).
>
> Please check if it improves sound in your case (maybe it will require
> more CPU than your patch on every 100 cycles)
>
> Patch is for current dev version, but it's easy to apply it to Hatari 2.2
>
You're right, the # cycles was arbitrary (it was really a proof of concept
rather than a final patch).  I tried various values and it didn't seem to make
much difference (but I think it used more host CPU).  As I said, the sound
wasn't perfect anyway because my Linux box is not very powerful, so I might not
be able to tell if it would improve things on a more powerful system.

I'll apply your patch and report back.

Roger




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