I learned how to set and handle hardware breakpoints while developing the video mode patcher some years ago. I just integrated it into Artemis recently.
Last night I had the idea to use the same code to set a write breakpoint on an arbitrary address. For this, I modified the exception handler a bit to do nothing more than saving all general purpose registers and EPC to a known area in RAM. I also made sure that the breakpoint is set again after it hit, so I always got a copy of the registers of the very last exception. While being in-game, I knew when the write breakpoint hit, and simply dumped the area with the EPC value...
At the moment, it is nothing more than a quick hack. It needs to be implemented into the communication protocol to allow for live breakpointing. Unfortunately, the current protocol needs to be revised before we can do anything like that.
Anyway, I consider this a major breakthrough. Without breakpoints, Artemis doesn't deserve being called "game debugger".


Reply With Quote

