Romhacking => ROM Hacking Discussion => Topic started by: jonahstrix on July 12, 2018, 02:43:50 pm

Title: BGB Breakpoints
Post by: jonahstrix on July 12, 2018, 02:43:50 pm
I'm starting to experiment in the BGB debugger. I'm just experimenting with a shop in order to find the source of the of the item cost.

Is anyone able to explain the distinction between F3(run line) and F7(trace)? When I step through with F3, suddenly it jumps to my breakpoint and skips the steps where the registers are loaded with the price. Trace on the other hand goes through numerous loops (likely display) and never seems to get back to the store function.
Title: Re: BGB Breakpoints
Post by: dACE on July 13, 2018, 12:50:35 pm
F7 will ’trace into’ sub-routines and F3 will ‘step over’ them. A stepped over routine will still be executed - it’s simply not visualized.

When you hit a break-point, use F7 to continue the trace. If you notice that you are ‘caught in a loop’ it is usually a line with a jump-command that sends you ‘back up’ in the code execution.

Place a new break-point just after/below the jump and activate the game-screen to hit the break-point. With a little luck you have exited the loop and can continue your tracing with F7.

Title: Re: BGB Breakpoints
Post by: jonahstrix on August 09, 2018, 12:55:04 am
That's what I thought. I just really couldn't follow the operations.
Luckily I was able to figured out what I wanted once I realized addresses FF00 were also WRAM.

Now I need to figure out how to find tile sprite pointers..
Title: Re: BGB Breakpoints
Post by: RedComet on August 09, 2018, 09:23:54 pm
You might also consider using Visualboy Advance Tracer ( to get a trace log of the instructions for more context and use BGB to dial into specific pieces of code.