News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Messing around with BGB's debugger  (Read 3692 times)

Pennywise

  • Hero Member
  • *****
  • Posts: 2271
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Messing around with BGB's debugger
« on: May 18, 2011, 01:35:36 am »
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

  • Jr. Member
  • **
  • Posts: 36
  • VBlank
    • View Profile
Re: Messing around with BGB's debugger
« Reply #1 on: May 18, 2011, 07:04:29 am »
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

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6940
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Messing around with BGB's debugger
« Reply #2 on: May 18, 2011, 09:18:18 am »
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

  • Hero Member
  • *****
  • Posts: 2271
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Messing around with BGB's debugger
« Reply #3 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.

tomaitheous

  • Hero Member
  • *****
  • Posts: 543
    • View Profile
    • PC Engine Dev
Re: Messing around with BGB's debugger
« Reply #4 on: May 25, 2011, 06:53:42 pm »
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.