Video Games That Have Been Fully Disassembled?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Video Games That Have Been Fully Disassembled?

Post by psycopathicteen »

Drew Sebastino wrote:
nesrocks wrote:http://www.romhacking.net/?page=documen ... csearch=Go

There are many games there. Have fun!
I was most impressed to see a disassembly of Gunstar Heroes; there were actually a fair number of Genesis games on there. I wasn't surprised to see there wasn't a single game from the 5th console generation or beyond that has been dissasembled; I wonder how the assembly of code generated by a compiler looks... Ironically, it might be easier to disassemble a PS2 game than a PS1 game with how the games are divided into files, with all executable code having its own file.
...and it says "This is a disassembly of Gunstar Heroes for Sega Genesis. It can be assembled using ASM68K." Super Mario World's disassembly can't even be reassembled.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Video Games That Have Been Fully Disassembled?

Post by Drew Sebastino »

Wait, really? Isn't half the point of disassembling a game being able modify it and then reassemble it?

And yeah that's true Rainwarrior. With what you're trying to do, I figure you may also end up fighting with the game engine so much that you might as well create your own. From what I've heard about Super Mario World's game engine, you might as well do the latter and use information from the disassembly to model the physics and enemy ai to be the same.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Video Games That Have Been Fully Disassembled?

Post by psycopathicteen »

Bananmos wrote:
Not sure what your concept of "object oriented" is, but it is not at all a synonym for "slow".
Agreed. Said that, excessive use of instancing of objects that have fixed cost can indeed cause slow code. One of the main slow-downs in MM1 is how they instanced the big explosions (used for example in Bombman's bombs) as loads of small ones, when a dedicated "big explosion particle object" would likely have fared better.

Later MM games did rectify those awful slow-downs though, although none have the exact same explosion particle object for an apples-to-apples comparison...
The way you're saying it sounds like Capcom just got better at hiding innefficient programming, and didn't actually fix the problem.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Video Games That Have Been Fully Disassembled?

Post by koitsu »

Here's one for Super Dodge Ball I found last night while looking for something completely unrelated: http://ajworld.net/sdb/

Fully disassembling a game (so that it can be successfully reassembled) is not hard to do. Fully disassembling a game and adding high-quality code comments, plus meticulously taking notes (documenting what all is used and for what) is hard to do. Limiting factors include the REs skill level/familiarity with CPU architecture, skill level/familiarity with the console architecture, matters of available free time or life priorities (this is a huge one), and/or waning interest over time.
LocalH
Posts: 186
Joined: Thu Mar 02, 2006 12:30 pm

Re: Video Games That Have Been Fully Disassembled?

Post by LocalH »

Drew Sebastino wrote:I was most impressed to see a disassembly of Gunstar Heroes; there were actually a fair number of Genesis games on there. I wasn't surprised to see there wasn't a single game from the 5th console generation or beyond that has been dissasembled; I wonder how the assembly of code generated by a compiler looks... Ironically, it might be easier to disassemble a PS2 game than a PS1 game with how the games are divided into files, with all executable code having its own file.
Speaking of PS2, if anyone would want to assist with a disassembly of Guitar Hero II, contact me. I have a decent understanding of how the engine works in general, as well as it's "data-driven" nature (where data can call code functions, define new functions, and contain quite a bit of powerful scripting), I just can't wrap my head around PS2 calling conventions, etc.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Video Games That Have Been Fully Disassembled?

Post by Drew Sebastino »

koitsu wrote:Fully disassembling a game (so that it can be successfully reassembled) is not hard to do. Fully disassembling a game and adding high-quality code comments, plus meticulously taking notes (documenting what all is used and for what) is hard to do.
I thought that was a given in creating a dissasembly; otherwise you basically just opened up the game in IDAPro. Of course, documentation quality will vary.


LocalH wrote:Speaking of PS2, if anyone would want to assist with a disassembly of Guitar Hero II, contact me. I have a decent understanding of how the engine works in general, as well as it's "data-driven" nature (where data can call code functions, define new functions, and contain quite a bit of powerful scripting), I just can't wrap my head around PS2 calling conventions, etc.
I can't help, but sounds awesome! I'm not aware of anyone disassembling any game that relatively modern, so it would be very interesting to finally see it be done.
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Video Games That Have Been Fully Disassembled?

Post by Memblers »

qalle wrote:The Game Genie ROM has been disassembled, too: by Kevin Selwyn (GitHub page) and by me.
That looks great. I'm joining this club, because I've also disassembled the Game Genie. :o But mine is not much to look at, it was only cleaned up enough to assemble, and raw otherwise.

There's an interesting situation with the Game Genie ROM. I can't find the evidence to back this up, but I could swear I remember someone on the NESdev email list contacted the president of Galoob, who agreed to release the ROM as public domain. This would have been the mid-late 90s. It's just kind of annoying that I remember that happening, but can't find a first-hand account of it. After that, I remember some emulators were distributed with the GG ROM. Not that legality really matters much with these old disassemblies, but it would be neat if there was public domain anything for NES.

If you don't mind, sometime I might start my project over with your disassembly. I had some bugfixes and one added feature which wasn't complete.
-fixes bad $0D color
-fixes audio bug
-fixes intro skipping (launch cart when start button is released)
-adds bootloader, based on blargg's code
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Video Games That Have Been Fully Disassembled?

Post by Sumez »

Drew Sebastino wrote: I can't help, but sounds awesome! I'm not aware of anyone disassembling any game that relatively modern, so it would be very interesting to finally see it be done.
This might be a dumb question, but does it even make sense to disassemble a game that's not written in assembly in the first place? I imagine you'd get way too much crap along with the "source" which is useless unless you are trying to crack some security code or whatever.

A decompiler would make more sense, no?
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Video Games That Have Been Fully Disassembled?

Post by Drew Sebastino »

I'll be honest, I've never heard of a decompiler before you brought it up just now. I have no idea how it would work (and I suspect not well) but you're probably right.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Video Games That Have Been Fully Disassembled?

Post by Sumez »

Depends on the source in question. For virtual machine frameworks like Java and .Net, it's very easy to get readable code out of a decompiler. Those even preserve the names of any public members in your classes.

I'm not into C/C++ stuff, I can imagine it's a lot tougher to work out, since you'd have to know the intricacies of the specific compiler you are trying to reverse.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Video Games That Have Been Fully Disassembled?

Post by lidnariq »

https://retdec.com/

The thing about compilers is that they often produce very characteristic code—especially older compilers—which often makes it easier to figure out what the original code looked like, although without variables names.
qalle
Posts: 50
Joined: Wed Aug 16, 2017 12:15 am

Re: Video Games That Have Been Fully Disassembled?

Post by qalle »

Memblers wrote:If you don't mind, sometime I might start my project over with your disassembly. I had some bugfixes and one added feature which wasn't complete.
Sure. I have described some other bugs in the readme file of my disassembly.

Edit: word choice
LocalH
Posts: 186
Joined: Thu Mar 02, 2006 12:30 pm

Re: Video Games That Have Been Fully Disassembled?

Post by LocalH »

lidnariq wrote:https://retdec.com/

The thing about compilers is that they often produce very characteristic code—especially older compilers—which often makes it easier to figure out what the original code looked like, although without variables names.
Hmm. I'll have to look at that. Last night I just saw this post on ASSEMblerGames with various SDK signature files (Metrowerks, libsn, and official Sony SDKs) that may also be useful in reverse engineering PS2 games.

I'd honestly prefer some sort of decompiler over a disassembler anyway, would make it much easier to attempt to add new note types to Guitar Hero II, etc. Mainly, my first goal is to identify which script-callable functions exist and what arguments they take (analyzing existing scripts only gets you so far lol).
pwnskar
Posts: 119
Joined: Tue Oct 16, 2018 5:46 am
Location: Gothenburg, Sweden

Re: Video Games That Have Been Fully Disassembled?

Post by pwnskar »

I started to disassemble the first Batman game a while ago as an exercise. It's quite a mess but compiles to an exact copy of the original rom through asm6. If anyone's interested in continuing where I left off, here's a zip file.

EDIT: removed chr data from zip file. Should still compile everything else to an identical copy.
BATMANDIS.zip
(769.11 KiB) Downloaded 279 times
I got as far as starting to label some variable names, some registers and a few subroutines as well as trying to guess my way around separating code from data.

It should compile fine if you drag+drop batman_header.asm onto asm6.exe.

Cheers!
Last edited by pwnskar on Thu Oct 18, 2018 1:00 am, edited 1 time in total.
qalle
Posts: 50
Joined: Wed Aug 16, 2017 12:15 am

Re: Video Games That Have Been Fully Disassembled?

Post by qalle »

pwnskar wrote:I started to disassemble the first Batman game a while ago as an exercise
I appreciate your effort, but it's probably illegal to distribute a file that contains everything needed to assemble the complete game (Batman (U) [!].nes). For example, doppelganger's SMB disassembly, while still somewhat illegal, omits the CHR-ROM.
Post Reply