+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  ASM and 6502 debugging
Pages: [1]
Author Topic: ASM and 6502 debugging  (Read 2 times)
DanteRules
Guest
« on: November 01, 2008, 04:56:22 pm »

I'm trying to break free from relying too much on utilities and I want to add my own stuff to my SMB3 hack, but I don't know where to start.  Before you say it, I have read the "Getting Started" segment.  I know that I need a hex editor (currently using Windhex), and something for ASM and 6502 debugging (currently using DCC6502).  It's just that I've been reading so many documents already and I don't seem to be getting any closer.

Would you suggest better programs?
What documents would you say are the best for newcomers that already have a basic knowledge of ASM?
Disch
Guest
« Reply #1 on: November 01, 2008, 05:14:26 pm »

Knowing how to "asm hack" is really all about understanding programming concepts -- and you likely won't find that kind of thing in a ROM hacking doc (at least not any doc I've read).  In fact even if you read all about things, you won't really get it until you start messing around and getting your hands dirty.

ANYway.  I usually approach things like so:

1)  Think about what I want to change

2)  Find the variables in RAM that control how that thing works

3)  Find the code that interacts with those variables by setting read/write breakpoints on them in a debugger

4)  Read and comment the code so I can understand what the game is doing

5)  Replace game's code with my own code that does my desired changes


Step 4 is a whole lot easier if you keep a full disassembly of the ROM around so you can dump your comments and stuff to it without having to go in and out of a debugger.

Apart from a hex editor (whichever you prefer) a debugger (FCEUXD family of emulators), and a disassembler (take your pick -- they're all the same), I can't think of anything else you'd need.  When you start doing really really big changes you might want to consider using xkas to insert code rather than inserting code by hand (which is very time consuming and tedious) -- but that's another tool to learn.

If you already have basic knowledge of asm, I'd say stop looking for docs and just dive in.  Hands-on experience is the best way to learn this kind of thing in my experience.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC