News:

11 March 2016 - Forum Rules

Main Menu

Messing around with BGB's debugger

Started by Pennywise, May 18, 2011, 01:35:36 AM

Previous topic - Next topic

Pennywise

I got the game to break where I wanted it to, but beyond that I don't know what to do. Is there some way I can get the debugger to function as a trace logger and output some code for me to check out? I see there is a tracer option, but it's either not doing what I want it to do or I don't understand it.

Sawakita

I'm not sure what you mean when you say "tracer option", but you can execute an opcode at a time by pressing F7, or you can step out(= run the game until a "ret" is performed) by pressing F8 (this is useful if you want to skip certain "calls", thus not having to go through too many sub-sub-sub...routines). You can also set conditional breakpoints (for instance you can say the program to break at address xxxx if a register contains a certain value).
I don't know what a trace logger actually does, so I might have misunderstood the whole post.
I support GB hacking

KingMike

Outputs the trace to a file.

I wrote a hack of GEST, but I haven't done as much GB hacking, so I've never really gotten all the bugs worked out.
"My watch says 30 chickens" Google, 2018

Pennywise

I contacted the author of BGB and he got back to me surprisingly fast. He said he would look into it including it for the next release.

tomaitheous

Quote from: Pennywise on May 19, 2011, 12:00:13 AM
I contacted the author of BGB and he got back to me surprisingly fast. He said he would look into it including it for the next release.

Another thing that would be nice to add to BGB (used it recently), is a branch PC history window. Something like the last 20 branch addresses (the address of the instruction itself), for any instruction that effects the PC in a direct manner like; a return, jsr/call, a jump, relative branching (conditional), etc. Like what mednafen has for PCE debugger. That way when you break on something specific, you can work your way backwards through the history window easier and faster to see the higher level code that called/initiated that specific event.