Inaccurate GB sound emulation
Issue #20
resolved
Tried the library on the first soundtrack that came to my mind: Pokemon Red. Compiled the "player" demo, and ran it on this gbs: https://www.zophar.net/music/gameboy-gbs/pokemon-red
In the very first track, noise percussion is clearly out of sync. (You can compare it with streamed audio on Zophar's Domain).
What is even stranger is that deadbeef supposedly uses GME under the hood, but this track plays fine there...
Comments (3)
-
repo owner -
The problem here is that the AF register is inverted. This is noticeable when pushing it on the stack and accessing the stack bytes directly. Grandia is affected too.
A fix is coming
-
repo owner - changed status to resolved
Register A and F are inverted in position so swap them when pushing/pulling from the stack. Fixes issue
#20→ <<cset 414e0d993548>>
- Log in to comment
Thanks for the report. It's possible that the emulation was broken in between the version used by deadbeef and git-master with some of the security fixes applied.
I had started on a test suite to at least document when file outputs change between libgme versions, but it's both slow and still hard to use.