Re: [hatari-devel] New cycle exact YM2149 emulation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] New cycle exact YM2149 emulation
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Fri, 16 Jun 2017 13:08:39 -0600 (MDT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1497640119; bh=NFRQ+Vx5qTgKkF+YYe2UxKVggk7gBMVhJTWW+Ypd6ow=; h=Date:From:To:In-Reply-To:Subject; b=ju932dcQm3HRJ8NQSIYFAYyFG9X+fgeGjGI8GHMTociWp5Mm0rocgWjhc5B0MbPRx 0cuXcBZCnyVejOOc8oUHyUbUaAvSx46x/icQso/wHT8QFZ50fcHSm1JnnrWq5CyDLx Vo+W6UouawXtKlWka0xob50NKHZr64VdOU8Jb2azwbq25LQJ+9t83wTJVMdDyWAHSS VToNrMzsuihByRjG9aj31OI3OQeGjqChIZAQEdOhY1e/Cdn2B08S+s7NIdqmlYolw7 itruli1PbcOZGzmGmis1Fhi4Sx28ewv0bzpjkLDR/gnt2peDY8ki6OH6taExCADmI7 G3c39+J+/Cfvw==
- Thread-index: 2SKoBK4u86DGIn2JDuYMxMF2FdTCAQ==
- Thread-topic: New cycle exact YM2149 emulation
Hi,
I just took a quick look at all of the few code changes (large research)
that make this big improvement. Excellent.
----- Nicolas Pomarède wrote:
> Hi
>
> after extensive tests on my STF to measure as accurately as possible
> some not well documented behaviours of the YM2149, I wrote a new
> rendering for sound emulation.
>
> The YM2149 works at 2 MHz, but all internal counters (tone, noise,
> envelope) are handled using a 250 kHz clock.
>
> By measuring my STF output, I could also confirm that all counters are
> incremented from '0' up to 'period' (and no the opposite as stated in
> Yamaha documentation)
>
> The YM2149 emulation now does the same, all internal counters are
> incremented 250000 per second and the resulting state is used to output
> new audio data at the host frequency (for example 44.1 kHz)
>
> This allows to accurately emulate some very specific tone transitions,
> as well as some random "phase cancelling" effects (as reported by Troed
> in some 7an musics), but overall it's safe to say that 95% or more of
> all musics were already correctly emulated and will sound the same.
>
> For now, the code in sound.c uses a "#define YM_250" to enable this new
> rendering ; it can be commented to use the previous method in case some
> regressions would be reported.
>
> For now, I think this gives Hatari the most accurate YM2149 emulation of
> all emulators :)
>
> Next step will be to improve the filters, as it seems the sound is too
> "attenuated" in many case. I will capture some real music wav recording
> to be able to compare with Hatari output and see where and how it could
> be improved.
>
> Nicolas
>
>