Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Anyone up for disassembling an entire game? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
rg_

Goomba
Level: 8

Posts: 16/26
EXP: 1964
For next: 223

Since: 03-27-05

Since last post: 21 hours
Last activity: 12 hours
Posted on 09-30-05 04:54 PM Link | Quote
I've been toying with the idea of disassembling and annotating an entire NES game for a few weeks already. However I don't want to do it alone, that's why I make this post.

I'm thinking about doing something like this first and after the annotation phase ended it should be possible to turn it into something like this which can be re-assembled.

I'm not thinking about some kind of project that takes up a lot of time and dedication and participants have to be present and report frequently. I'm thinking of some kind of project where you document another function or two when you have a few minutes to waste and don't know what else to do with your time. The entire thing would probably take months to complete. I also don't plan to set up a project site or anything, a thread here on this board where everybody posts his findings should be enough. I do however plan to include all findings into a single IDA Pro file which I then export to HTML to make it available for everyone.

Nevertheless I want the project to end one day. That means huge games should be avoided. My definition of huge is > 128 KB. Faxanadu is 256 KB and documenting it was *a lot* of work.

In fact I've already thought of a game: Battle of Olympus. The game is 128 KB large, yet it should be large enough to find cool unused stuff in the ROM (at least I hope so; I found a ton of unused stuff in the Faxanadu ROM). Alternatives could be Duck Tales 1, Kid Icarus and maybe Castlevania 1 but I'm open for more ideas. I want to avoid games that have already been hacked to death (SMB, Zelda, ...).

Benefits of participating include but are not limited to learning *a lot* of 6502 asm, eventually creating new ROM hacking tools (which would all be open source), learning new programming languages if new tools are created, learning everything about the game you ever need to hack it and most importantly I will think you're awesome.

I appreciate any input.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 7354/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 09-30-05 05:02 PM Link | Quote
I've considered doing this with Pokémon G/S, but those are 2MB. Of course, I'd be using a disassembler which gives re-assembleable output. It's just a matter of making one. What I figure I'd do is add support to the program to mark areas as data (or even better, but harder to do, write an emulator that logs which parts are executed and which are just plain read), then go through it one ROM bank at a time, turning the disassembled code into something readable and re-marking anything that's incorrectly marked as code or data.

Really, the best way to do this is the emulator idea. If you know a lot of the game's RAM and/or ROM addresses, you can tell it what they are, and then it can create the disassembly appropriately, switching addresses with their names. Since it's executing the code, it should be able to tell which areas are code and which aren't, as long as you try to do as much as possible in the game so as to get as much code as you can executed. (Might be good to put a comment near jumps that jump to data areas, so that you can examine them and see if maybe they're really code.) If you managed to execute all the code (not too hard in a simple game), then the only things it would miss is code that gets copied into memory and code that never gets used, which would probably be pretty easy to spot.


(edited by HyperHacker on 09-30-05 08:08 AM)
dan

Snap Dragon
Level: 43

Posts: 748/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 09-30-05 05:22 PM Link | Quote
There already is a disassembly of Castlevania, and I think Duck Tales also.

Edit - Forgot the link - http://www12.brinkster.com/hydesprojects/gamessources.asp


(edited by dan on 09-30-05 08:26 AM)
rg_

Goomba
Level: 8

Posts: 17/26
EXP: 1964
For next: 223

Since: 03-27-05

Since last post: 21 hours
Last activity: 12 hours
Posted on 09-30-05 05:32 PM Link | Quote
Originally posted by HyperHacker
Really, the best way to do this is the emulator idea. If you know a lot of the game's RAM and/or ROM addresses, you can tell it what they are, and then it can create the disassembly appropriately, switching addresses with their names. Since it's executing the code, it should be able to tell which areas are code and which aren't, as long as you try to do as much as possible in the game so as to get as much code as you can executed. (Might be good to put a comment near jumps that jump to data areas, so that you can examine them and see if maybe they're really code.) If you managed to execute all the code (not too hard in a simple game), then the only things it would miss is code that gets copied into memory and code that never gets used, which would probably be pretty easy to spot.

You don't even need to execute all the code. While developing a small tool for someone on #rom-hacking I figured out that you can make "speed disassemblies" using FCEUXD and IDA Pro. You can quickly scroll down in the FCEUXD disassembly window and when you notice valid code (easy, as data interpreted as code doesn't lool like valid code at all) you can tell IDA Pro and IDA Pro can then disassemble the code from there. Using that technique I made an un-annotated (of course) disassembly of Zelda in 25 -30 minutes. I guess I separated more than 90% of all code from data that way. Getting to 100% shouldn't take too long either if you're already at 90% but I never tried that as a near-complete disassembly was nearly as good as a complete disassembly for the tool I made.

Originally posted by dan
There already is a disassembly of Castlevania, and I think Duck Tales also.
Right, thanks for pointing that out. I actually wanted to ask which games were already disassembled and if you guys have links to the disassembled code available.

Edit: Thanks for the link dan.


(edited by rg_ on 09-30-05 08:33 AM)
oman

Micro-Goomba
Level: 4

Posts: 2/11
EXP: 210
For next: 69

Since: 09-30-05
From: Austin

Since last post: 17 days
Last activity: 20 days
Posted on 09-30-05 06:48 PM Link | Quote

A good way to do this is to let IDA do major chunks of the disassembly automatically (starting at the locations provided in the interrupt table) then write IDC scripts that are smart enough to handle the jump tables or any other strange flow control techniques. Spending some time writing scripts for your disassembly now will save you tons of time in the future.

Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 1694/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 09-30-05 06:56 PM Link | Quote
I wouldnt mind helping a little, but not right now, ive been reading some nes docs and am understanding a lot of it, so when I do learn some more of it, I could help a little...not sure when, but ill let you know. it would be really cool, to get more people interested in this, and disassemble alot of roms, so they could be edited that way, and reassembled, this way it would be really easy if you knew alot of asm to make really cool hacks.

I have the latest IDA, so thats not a problem


(edited by Dcahrakos on 09-30-05 09:57 AM)
Bit-Blade
Pixel Artist

Level: 34

Posts: 413/445
EXP: 229264
For next: 24387

Since: 03-16-04

Since last post: 2 days
Last activity: 7 hours
Posted on 09-30-05 08:57 PM Link | Quote
If you could crack Battle of Olympus you'd be the fucking MAN. I've been trying to get around it's graphics compression for a while...
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Anyone up for disassembling an entire game? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.018 seconds.