Tip: If you give a Muncher tile custom graphics, it will still act like a coin when a silver P-switch is active, whether it looks like a coin or not. So make sure to use ExAnimation if there's a silver P-switch in the area.
This patch is pretty useful for those of you who are working with ASM in some way. If your code crashes and triggers a BRK (which happens reasonably often of all the potential crashes), this will display a bunch of debug info. The printed debug info is: registers(PC, D, B, A, X, Y, P, S), layer 1-3 positions, powerup status, and a full stack dump. It can also dump special message based on the BRK number. To add custom exception messages (for example for brk #$02) you would need to add the following line to the exception list:
%exception($02, "Something broke", "FIX IT")
Pretty sure this patch is 100% stable, Enjoy!
v1.1 (Erik and MarioFanGamer)
- Fixed the Free RAM defines as they weren't being used properly.
- Added a !snes9x define which replaces the STP with an infinite loop (as snes9x crashes with STP still to this day and I have no idea how to detect the emulator automatically).
- Fixed an oversight where garbage appears on the debug screen (didn't affect the text).
Fixed an oversight where two labels were swapped which shouldn't be swapped (for this reason, garbage appeared in the original version and the unmoderated remoderated version). No issues otherwise.
Other then that, there are uses in it if you test ASM stuff and things are likely to break (after all, that's what BRK is originally used for debugging when the 6508 was created) but as mentioned by the moderator for the original version, you still should avoid accidental triggers of BRK (at the same time, BRK is much safer to trigger).
Remoderated. Tested with: Asar v1.71; Lunar Magic 3.04; bsnes-plus v073+3a; snes9x 1.60
I didn't add SA-1 compatibility as I feared the patch wouldn't output accurate values for debugging should the game crash while the SA-1 is executing.