Recently, following some 3D misadventures (game's 2D now, that's how well that went,) I've been delving into the Zelda OOT source code and TCRF page and remembered that neat crash handling screen it has. It's also included in Animal Forest (N64 Animal Crossing).
Now, although I've barely just started on my little homebrew projects, I've already experienced my fair share of weird crashes, which, though NO$PSX valiantly attempts to help me solve them, mostly end up costing me a few hours to solve
This left me thinking: is there some way to implement a crash debugger ala OOT/AF on the PSX? The way I think it works on the N64 is that an interrupt is triggered whenever the game encounters a fatal exception, which the game then catches, figures out what was wrong1, and then shows a screen with some snapshots of the game's memory, error message2 and so on.
My question is not how to implement this whole system; I would try to figure that out on my own. My question is, is there any way to catch/intercept/detect a crash before the main loop is interrupted? A callback of some sorts, a function, heck; a memory adress to poke and peek at would be great!
Thanks in advance for any answers, and sorry in advance if the question is stupid...
1 This is the part I'm most interested in. The crash screen seems to know some basic info about how the crash came to happen. There are some screenshots that, for example, show that the game crashed due to a "floating point exception", which would be some mighty useful information to have while debugging...
2
HungUp on Thread 4 RCP is HUNG UP!! Oh! MY GOD!!