punesemu / puNES

Qt-based Nintendo Entertaiment System emulator and NSF/NSF2/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)
GNU General Public License v2.0
597 stars 40 forks source link

Implement HLT/KIL Opcodes #399

Closed ChessMan14 closed 1 month ago

ChessMan14 commented 2 months ago

There is a speedrun category in Super Mario Bros. 3 where you do a glitch involving memory corruption. This memory corruption sometimes causes illegal opcodes to be executed and HLT/KIL opcodes will crash the game on original hardware. The mods therefore decided to ban puNES and Mesen for the category. This PR implements the opcodes so that the cpu will freeze like it should if HLT/KIL opcodes are encountered.

punesemu commented 2 months ago

Thanks for your support, when I get home (I'm away from home these days for personal reasons) I'll take a better look at your patch,

punesemu commented 2 months ago

I think we should add the nes[nidx].c.cpu.jammed in the savestate.

punesemu commented 1 month ago

@ChessMan14 Thank you for your contribution.