Decompiling a SNES game to its source code

Deleted member 42501

Well-Known Member
Member
Joined
Jun 16, 2006
Messages
1,724
Reaction score
1,131
Trophies
2
XP
4,259
Considering the size of these titles it should be a much easier endeavor than the larger stuff we've seen right? This recent mouse patch for Shadowrun on SNES got me thinking:

https://gbatemp.net/threads/shadowrun-mouse-patch.614185/

As it needs a special fork of SNES9x to work with the scripting meaning either that gets ported to 3DS/Vita (where stylus/touchscreen would work so well) or the game is decompiled, new controls added in and its ported as native.

Given the originality of this game I'm certain people would be happy to contribute as its generally forgotten in terms of modernization and the new games don't have the same charisma as the original pixel art (but clunky controls) version.

@FAST6191 @godreborn Any insight on this process/feasibility?
 
8 & 16 bit games were more likely to have been written in assembler in the first place, rather than a higher level language like C. So to get close to the original source you'd be disassembling rather than decompiling, and that's always been possible, it's just a much more tedious task to go through a raw assembler listing to figure out and document what each routine does. It's been done completely for some smaller games like Game Boy Tetris and old arcade games from the 8 bit era, it's equally possible but just a lot more work for bigger and more complex SNES games etc.
 
As above most things prior to the PS1 were likely written in their respective console's assembly, or maybe a form BASIC if that was a thing for the given system* (and even then assembly was way faster so only the simplest of games are likely to be that). While some think 3d was the big jump for the PS1 then I would probably put the bigger aspect at the feet of C compilation beyond proof of concept being a possibility.

*pretty much going to be the "minicomputers" a la BBC micro, C64, vic20, amstrad, atari... some of the later stage ones of those (Amiga and whatever was happening in Japan might just have a C compiler be something worth using in anger but I would be surprised if much really used them)

There are occasional oddities https://www.pagetable.com/?p=28 but for the most part it is going to be the same manual effort as any other disassembly unless you get a leak (see also the gigaleak stuff) but those are just as likely to be wanted by the original devs as lost source is pretty much assumed these days.
 
Thanks for the info, I gave you a shout as I had a feeling you'd share some insight. Thought there must've been a bit more that I thought otherwise we'd have decomps of everything.

This game in particular always seemed much more suited to mouse and keys than a limited dpad and the above tweak is awesome. Just prefer my gaming on a portable. If you haven't played it give it a try, its really quite special and stands on its own two.

 
This makes me wonder if it's possible to decompile ROM's of the SNES Donkey Kong Country Trilogy and translate a bit of code into C++ or C#.
 

Site & Scene News

Popular threads in this forum