It is currently Tue Dec 11, 2018 5:12 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Sat Sep 29, 2018 7:23 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2777
Drew Sebastino wrote:

nesrocks wrote:
http://www.romhacking.net/?page=documents&category=13&platform=&game=&author=&perpage=20&level=&title=&desc=&docsearch=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.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 1:30 am 
Offline
Formerly Espozo
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3399
Location: Richmond, Virginia
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.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 2:29 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2777
Bananmos wrote:
Quote:
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.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 12:35 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3718
Location: Mountain View, CA
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.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 6:41 pm 
Offline

Joined: Thu Mar 02, 2006 12:30 pm
Posts: 171
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.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 9:40 pm 
Offline
Formerly Espozo
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3399
Location: Richmond, Virginia
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.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 10:12 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3596
Location: Indianapolis
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


Top
 Profile  
 
PostPosted: Mon Oct 01, 2018 3:26 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 823
Location: Denmark (PAL)
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?


Top
 Profile  
 
PostPosted: Mon Oct 01, 2018 6:07 am 
Offline
Formerly Espozo
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3399
Location: Richmond, Virginia
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.


Top
 Profile  
 
PostPosted: Mon Oct 01, 2018 6:38 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 823
Location: Denmark (PAL)
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.


Top
 Profile  
 
PostPosted: Mon Oct 01, 2018 9:56 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7807
Location: Seattle
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.


Top
 Profile  
 
PostPosted: Mon Oct 01, 2018 2:40 pm 
Offline

Joined: Wed Aug 16, 2017 12:15 am
Posts: 42
Location: Finland
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

_________________
My NES utilities and programs on GitHub


Top
 Profile  
 
PostPosted: Thu Oct 04, 2018 5:32 pm 
Offline

Joined: Thu Mar 02, 2006 12:30 pm
Posts: 171
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).


Top
 Profile  
 
PostPosted: Wed Oct 17, 2018 6:15 am 
Offline

Joined: Tue Oct 16, 2018 5:46 am
Posts: 23
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.
Attachment:
BATMANDIS.zip [769.11 KiB]
Downloaded 43 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.

Top
 Profile  
 
PostPosted: Wed Oct 17, 2018 2:14 pm 
Offline

Joined: Wed Aug 16, 2017 12:15 am
Posts: 42
Location: Finland
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.

_________________
My NES utilities and programs on GitHub


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group