Main Menu





Search Wiki


 Page | Discussion | View source | History

From Glitch City Laboratories

Revision as of 10:07, 10 September 2019 by Torchickens (talk | contribs)
Jump to: navigation, search

A breakpoint is a state in the flow of program code at which a specific address is read, written to, or run. For a Game Boy system, it is an allocation of anywhere within the Game Boy memory areas ($0000-FFFF) referred to as a two byte pointer. Sometimes, these pointers are banked and referred to as a three byte pointer (meaning that the same pointer can represent a different location in memory); so the breakpoint may be represented in form (Bank):(Pointer).

When debugging, it can be useful to set a breakpoint to analyse a specific part of the programming code (known as a subroutine); like the hardware registers at that point, what the code reads, and to find out what the code does in terms of the memory.

Setting breakpoints on BGB


In the context of arbitrary code execution, this method may allow new instances of arbitrary code execution to be discovered if the address range is specified within RAM (e.g. 8000-FEFF).

In the below image, the debugger has automatically highlighted WRA1:D163 following the use of glitch item 8F (0x5D). This means (because "on execute" was checked), the game is running D163, which classes as arbitrary code execution as D163 is a RAM address; specifically [the values here are the party Pokémon data, but in this case they are interpreted as GBZ80 programming language instructions. Which each value (00-FF) corresponds with can be found on The Big HEX List.