Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use mgba for code/data separation???????????
#1
What I need is the following: log all the states of the program counter and the rombank number, so that I can use the addresses to differ between what are variables/instructions/tilemaps/graphics, etc.
I was going to use some very crazy hack (ptrace in linux) to do such a thing. But if I use the source code of mgba this could be much easier and less time consuming.
Where in the source code I can find the routines that modify/read the pc(program counter) and rombank number?

There is some documentation about the data structures used in the source code?

Just to clarify, my final objective is to create a tool for code/data separation, for reverse engineering gbc roms. A feature similar to code/data separation that exists in Emulicious emulator, this tool will be enhanced for automated data structures extraction and recompilation.
Reply

#2
Take a look at the debugger interface. You can use it to trace individual instructions, although I think it might be a bit buggy for GB/C games right now.
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.