don't click here

disassembling a rom once its been assembled

Discussion in 'Engineering & Reverse Engineering' started by Nitsuj99, Jun 14, 2010.

Thread Status:
Not open for further replies.
  1. I've lost my asm files and was wondering how I can disassemble my Rom again to edit it. Thanks a lot
     
  2. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    2
    0
    Writing my own MD/Genesis sound driver :D
    Unless you have IDA and are willing to go through the entire ROM over again, renaming and recommenting everything (yes your identifier names and comments are lost forever), you're out of luck, sorry.
     
  3. So, all the code is still there, just not the identifier names and comments?
     
  4. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    2
    0
    Writing my own MD/Genesis sound driver :D
    Yeah, except that you'd have to go through the trouble of manually disassembling it all again. Exactly what edits did you do?
     
  5. Ravenfreak

    Ravenfreak

    Meredith is best girl. Tech Member
    3,199
    261
    63
    O'Fallon Mo
    Hacking Sonic Drift
    The easiest thing to do in a situation like this would be to download the disassembly from the wiki (or SVN if you used the newest disassembly depending on which game...). But if you really feel the need to disassemble the ROM from scratch, and have the technical knowledge then like andlabs said, you'd have to label, and add comments.
     
  6. snkenjoi

    snkenjoi

    Tech Member
    89
    7
    8
    You can just merge the changes with a clean disassembly. Depending on the changes, this can be done rather quickly.
     
  7. All that disassembly does is leave you with a giant pile of code. Unless you know what you're looking at, your brain is going to melt.
     
  8. Selbi

    Selbi

    The Euphonic Mess Tech Member
    1,541
    155
    43
    Northern Germany
    Sonic ERaZor
    Basically this. Most disassemblies are having the excact same coding as the disassembled ROM. However, there's nothing labeled or commented, meaning instead of "Obj01_Main" you have something like "loc_12345" throughout the disassembled ROM.

    Can anybody tell me how to disassemble ROMs properly though? I tried it with IDA Pro a couple of times now, but all I get is a damn huge list of "dc.b"s. I can produce it as .asm and assemble it and it works properly, but you can't really do anything with it, because it's not more than a hex editor you can open in Notepad.
     
  9. IDA Pro uses really basic commands, use C to disassemble areas you identify as code, O to set an offset, D defines data
    So, in the header, at address 0, press D until it changes to a dc.l, then with the next field (entry point) do the same, press O to define it as an offset, then double click to follow the address.
    This will put you at the start of the code, so just press C to begin the analysis, and follow it from there.

    Of course this only follows function calls, and doesn't follow jump tables etc, so you would have to read through the code, and identify and links IDA Pro fails to find, and press C to begin disassembly of areas you can identify as code.
     
Thread Status:
Not open for further replies.