View Single Post
  #978    
Old September 3rd, 2011 (01:49 AM).
Sawakita's Avatar
Sawakita Sawakita is offline
Not Invented Here
 
Join Date: May 2010
Gender: Male
Posts: 180
Quote originally posted by Darthatron:
Well there really aren't that many commands in the ARM7/thumb codeset, so simply writing it from scratch isn't super difficult anyway. And through past experience, reading through some code (that does something similar to what you want) to find a tiny part and then editing it, is a lot more difficult than just doing something yourself. And as you said, it wouldn't even end up disassembling all the code anyway.
Actually I was referring to SHARP z80 (even though that's not a big difference, for the topic itself).
Quote originally posted by Darthatron:
And through past experience, reading through some code (that does something similar to what you want) to find a tiny part and then editing it, is a lot more difficult than just doing something yourself. And as you said, it wouldn't even end up disassembling all the code anyway.
I have to disagree: if the code is well written, it's pretty easy to find where is the part one's interested in (I gave a look at Gambatte's source, and finding the part I need to edit was pretty fast). Adding a tracing/logging funtion shouldn't take too much time.

Anyway what I really meant was not a program that simply dumps the code in "mnemonics" (BGB and a Pokeanalysis ".c/.h" module do it as well). I was thinking of a program that can actually label every address the code refers to (routines' beginnings, jumps' offsets, and so on), and can format data as "Define Byte", "Define Word" (or in structured macros, but that would be too much, probably), if you get what I mean.

Because, the problem with disassembling code "by hand" is not the difficulty of finding where the stuff is located or figuring out how it works (by the way, I find it the most entertaining part); the problem is instead arranging it in the format that the assembler needs in order to assemble it correctly.
__________________



| 1st Gen Hacking: Useful Links | A good example of REAL ROM Hacking |