Closed YouMakeTech closed 1 year ago
Which version/git commit of peanut_gb.h are you using? Did these games work before? Do the other games fail with the same error?
Thanks
The latest version of peanut_gb.h. These games did not work before unless I commented out the call to "abort()" in function gb_error. However, since the latest peanut_gb.h update, these games no longer start because of the "PGP_UNREACHABLE()" statements in peanut_gb.h right after each invocation of gb_error. In order to start the game now, I need to comment out all 'PGP_UNREACHABLE() statements in peanut_gb.h and comment out the call to "abort()" in function gb_error()
The PGP_UNREACHABLE() macro was added because some errors, like invalid opcode, aren't recoverable. However, some games to make invalid reads and writes that do not cause any issue on the real system. So I've removed the INVALID_WRITE error in commit 1278774cdcbc4384700480de6f35d93ab8b2f354 and Metroid II now works.
Some games (e.g. Metroid II - Return of Samus (World)) trigger an error:
./peanut-sdl Audio driver: HDA NVidia Digital Stereo (HDMI) Unable to assign joystick mappings: Invalid RWops ROM: METROID2 MBC: 1 No palette found for 0x46. Error 3 occurred: INVALID WRITE at FF7F . Exiting. Cart RAM saved to recovery.sav