Post subject: Bizhawk Debugging
Joined: 3/8/2016
Posts: 2
While trying to get information out of a SEGA Genesis game, how do I find what is writing to an address? That is if I can, Since the Debugger doesn't support SEGA yet I guess? I'm trying to get the X coordinates of all sprites in Vectorman, but determing each and every address individually would be an extremely time-consuming task. If I could find what is writing to the X values, I could then see if it writes to others and if so it'd probably be safe to assume it writes to every X value, which would make finding all the X values really easy.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
If the debugger doesnt work, and I wouldnt be surprised if it doesn't because it's never finished, A. use lua, add memory write handler, get registers, print PC, bear in mind that it may be off by a few (consistently, one would hope) B. use trace logger, grep for address of interest and my personal favorite C. run bizhawk in visualstudio, add breakpoints to the emulator itself
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11469
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Since the latest release, bizhawk supports genesis debugging and breakpoints. The way I do it though, is figuring out a single address I need, then tracing instructions for the frame it changes on to see the system. And tracing is also now supported for genesis. As for debugger, you can't use it to scroll up yet, you'll only see the actual PC where it breaks and the lower lines. You also can set breakpoints in lua, register a funciton that writes to your address and print the PC register value (or disasm right away).
zeromus wrote:
print PC, bear in mind that it may be off by a few (consistently, one would hope)
I think I fixed it being off.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 3/8/2016
Posts: 2
Could you explain a bit more about the option A, zeromus? That sounds like my best bet since I'm not too familiar with B and while C might work it sounds like I really need to know what I'm looking at to be able to get anything out of it.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11469
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Are you saying debugger isn't working for you?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.