libgme / game-music-emu

Blargg's video game music emulation library, which allows audio applications to easily add playback support for the music of many classic video game consoles.
GNU Lesser General Public License v2.1
68 stars 12 forks source link

[GBS] Segmentation fault when playing "Nettou Garou Densetsu 2 - Aratanaru Tatakai" #41

Closed Wohlstand closed 3 years ago

Wohlstand commented 4 years ago

Original report by brianpow (Bitbucket: brianpow, GitHub: brianpow).


Segmentation Fault when playing "Nettou Garou Densetsu 2 - Aratanaru Tatakai" with gme_player

Gb_Cpu.cpp:130:53: runtime error: index 9 out of bounds for type 'uint8_t *[9]'
Segmentation fault

Other GBS player such as NEZPlug and MiniGBS work fine

Wohlstand commented 3 years ago

Original comment by Leandro Nini (Bitbucket: [Leandro Nini](https://bitbucket.org/Leandro Nini), ).


Same issue with Grandia - Parallel Trippers (https://www.zophar.net/music/gameboy-gbs/grandia-parallel-trippers)

From a quick look at the code it seems that the program counter goes well beyond the 0xFFFF limit, maybe it is expected to wrap around?

I’m not familiar with the code nor with the original machine so I can’t suggest a proper fix.

Wohlstand commented 3 years ago

Original comment by Leandro Nini (Bitbucket: [Leandro Nini](https://bitbucket.org/Leandro Nini), ).


Submitted PR #24 which fixes the original report.

Wohlstand commented 3 years ago

Original comment by Michael Pyne (Bitbucket: mpyne, GitHub: mpyne).


Rework bank switching, fixes #39