Name: | BRK exception handler |
Author: | p4plus2 |
Added: | |
Version History: | View |
Tool: | Asar |
Requires Free Space: | Yes |
Bug Fix: | No |
Featured: | No |
Description: | 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! |
Tags: | brk crash debug lorom needs remoderation |
Comments: | 2 (jump to comments) |
Download
5.77 KiB | 150 downloads
Comments (2)
Of course it won't work on all cases, some crashes will soft-lock the CPU (though infinite loop or STP) and other will crash so hard that the BRK handler won't work at all, but it should work with like, 97% of the crashes at average.
I don't really recommend sticking with the patch on a ROM; this is just for testing/debugging purposes and putting the screen won't stop your hack from being rejected or something in case of a obvious game crash.