|Re: [hatari-devel] New cycle exact YM2149 emulation|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: hatari-devel <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] New cycle exact YM2149 emulation
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Sat, 2 Dec 2017 14:11:19 -0700 (MST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1512249080; bh=cdBVNlARMsLL71gt098j/TqWLOWX3KxremiRjmYAEik=; h=Date:From:To:In-Reply-To:Subject; b=LvN6KkrVkOfGeZ0ndwTiL6UdmX9jOwoFOduxz2rAHd5WOLhnZaJ4Xkn5uKd9Ta4nB RklyP+VBaGBf6mVVHqGtqqcqKS26gGgLgNQIpvr4WIta9JnuTPxwL3Fjvh0Mad1WfW 1/1fC9srFmk+BKVhV7/0RmE0R3sjlzLMFzXO0d8UMCAUMvQyOzP3F8St1luIZdLhMe 2Q3EFYUL0J4MHshX2H8Tqyw0ElbDCF9gp5SjNbG1VIU1Akyd1bVyJImCq9sshvcxx+ VoUm0z/CNQsc84cqdeSbbuSYoqJOx/GRLp9M74eiQPvEWEXXD0076J7npV6ITi8WsT 1GoQKBriltrHA==
- Thread-index: odM2p4ieDf2pQJnYaq10jPtT64PfFA==
- Thread-topic: New cycle exact YM2149 emulation
----- On Dec 2, 2017, at 9:19 AM, Nicolas Pomarède wrote:
> Le 19/11/2017 à 20:31, Nicolas Pomarède a écrit :
>> Le 19/11/2017 à 11:55, Eero Tamminen a écrit :
>>> On 06/18/2017 07:01 AM, David Savinkoff wrote:
>>>> ----- Nicolas Pomarède wrote:
>>>>> From a few comparisons with my STF, I would say that Hatari result
>>>>> is a
>>>>> little bit too attenuated and should be a little more "sharp", but not
>>>>> as much as when turning filter off completely.
>>>> This patch changes filter coefficients for a sharper sound.
>>>> I can make more patches until the timbre is right.
>>> Nicolas, David, was there any follow up for this?
>> I have a new ym2149 emulation ready, need to push it to main repo soon.
> I just pushed the new YM2149 emulation code.
> So far, no change in the coefficients were necessary (but maybe it will
> need adjustements later if someone reports diffrerences with real HW).
> As for this new emulation, it now generates all the samples the YM2149
> would output when running at 250 KHz ; the previous improved version
> only updated the YM2149 counters with a simulated 250 KHz freq, but the
> output samples were converted on the fly to the output freq (44.1 KHz by
> This resulted in too much filtering and loss of high frequencies.
> With the new method, all frequency in the input signal are kept (because
> we generate a signal at 250 KHz like the YM2149 would do).
> The critic part is then do downsample this 250 KHz signal to the chosen
> output freq of 44.1 KHz. This can be much harder than it sounds,
> there're tons of very technical paper/thesis on how to do this
> accurately when the Nyquist criteria is not respected.
> Also, there's no miracle, if input signal is 250 KHz and output freq is
> 44.1 KHz, then some harmonics will be lost.
> Still, I added 2 downsampling methods (more to come later) :
> - a very simple one taking the nearest sample ; it's fast, but not
> very accurate for high frequency.
> - a more efficient one using a weighted average of the 2 input samples
> The latest is the default method in Hatari for now (this is not user
> configurable at the moment, will see later, not sure it's useful)
> CPU load should be a little higher with this new 250 KHz quality, but
> compared to the time to emulate CPU and video, I don't think the
> increase should be noticeable.
> If you want to compare the improvements, you can run 2 versions of
> Hatari side by side playing the same music / demo (run Hatari 2.0 and
> compare with the latest devel version) ; pause the 1st, listen to the
> 2nd for a few seconds, then pause the 2nd and listen to the 1st one.
> The difference should be hearable, especially with musics using volume
> modulation with MFP (so called SID sound effect). The result is a little
> less louder, high freq can be heard more distinctively.
> Let me know what you think and if you find some musics that sound worse
> (hopefully not :) )
I will start looking at the new code and listening too.
I'll also test on a 1GHz pentium3.
Using 44.1 KHz and 48 KHz was uncompromised.
I hope it can still be done.