Fwd: [hatari-devel] Improved YM2149 cycle accuracy |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Fwd: [hatari-devel] Improved YM2149 cycle accuracy
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Tue, 27 Jul 2021 22:03:08 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=3ILbCXmVUMW906QCx86gFbRTNq8vhMBMwc6p8lfqnts=; b=HxXr9oBuZ0wvsL9jU5JRpuTlLv7NXklz2/F4V7sm0YtO+4LMVdu9YcwbewqLuc7ggr yDt9JiCKtV/ZM+Fw2YQ2br/Mfo0rkW+Y2QoRwH6iSIWcAwXBZkHO7McHZb6iM6ZCTbBH 76VlIw4ptrlfvlQ4i5Q1JtXUpkDURTC/KUwG0xiPbYun9YkJy1fNSXgZjwxUlm54oJK/ XzONOmnZhaVl9WOzbQ3sDVjt7oLZ/ehYnQNPvZGA636v2Zoo5FCU8R0z9s41EGpb8KoD u0U9sbUbOUm6r4uNY0NOb3eKr0FcKVSpa05UWusXLDNEcMO0B/Y1ZoAG7TzjOPFuBLgy 5xrA==
---------- Forwarded message ---------
From: David Savinkoff
Date: Tue, Jul 27, 2021 at 4:57 PM
Subject: Re: [hatari-devel] Improved YM2149 cycle accuracy
To: Nicolas Pomarède <npomarede@xxxxxxxxxxxx>
On Tue, Jul 27, 2021 at 6:01 AM Nicolas Pomarède wrote:
>
> Hi
>
> As for YM2149_Next_Resample_Nearest(), I don't think it will give the
> best result...
>
see EDIT (below)
I was thinking about antialiasing filters, and came up with two:
1) Running average filter (very cpu efficient)
The filter length must always be an odd number of samples.
The middle sample is added in twice. Best to get a running sum
then add the middle sample, then divide by the number of samples,
then use the sample. The running sum is always updated at 250 KHz
by adding in a new sample, and subtracting the oldest sample.
I would make the running sum length = 250000*3/44100
Adding in the middle sample and averaging is done every 250000/44100
samples so that the output is decimated to 44100 Hz.
EDIT: Maybe this one will take experimentation to find what sounds best.
2) Fourth order IIR Chebyshev, Low pass filter at 16KHz with
1.5dB passband ripple. This filter uses two biquads and runs at 250KHz.
Regular 32 bit float math so that the compiler can take advantage of SSE
instructions.
Output samples are taken every 250000/44100 samples so that the output
is decimated to 44100 Hz.
EDIT: 0.5% passband ripple, not 1.5dB.
See www.dspguide.com
David