Decompiling Sonic 1,Sonic 2,Sonic & Knuckles,Gunstar Heroes

luke11685

Member
Joined
Mar 6, 2025
Messages
128
Reaction score
9
Credits
1,148
Can you tell me of how to decompile for instance Sonic 1,Sonic 2,Sonic & Knuckles and Gunstar Heroes on Linux Mint,please?
 
Last edited:


Can you tell me of how to decompile for instance Sonic 1,Sonic 2,Sonic & Knuckles and Gunstar Heroes on Linux Mint,please?
And what will you do with decompiled code? it will look nowhere near close to original code but much harder to interpret.
If you can't understand regular code there is no way you'll be able to understand decompiled one, especially if you don't know C.

Also decompilation (or disassembly) is most likely against games' EULA.
 
Firstly. it's better to show for anyone helping you with this to share what you have tried and done so far, the forums aren't your personal support desk. Secondly it sounds more in the direction of pirating if those aren't free and opensource games, plus those are quite old games so not likely possible.
 
Last edited:
Can you tell me of how to decompile for instance Sonic 1,Sonic 2,Sonic & Knuckles and Gunstar Heroes on Linux Mint,please?
Take a look at https://www.linux.org/help/terms/.

I'm not the site owner, but don't think it's a stretch to say that you could possibly be banned from this site for asking this.

I'm assuming that those are commercial games that are copyrighted.
 
LOL Sonic would have been written in 68k assembly. Good luck with that!

The other two would probably have been written with something else, meaning a whole other process and language.
 
LOL Sonic would have been written in 68k assembly. Good luck with that!

The other two would probably have been written with something else, meaning a whole other process and language.

Hah! Just how old are these games, and is the company still in business?
 
you could be banned from this site for asking this.

I'd not ban 'em for just asking. I'd probably say something if they figured it out and then wrote how to do it.

I assume they're just a kid looking to learn. If they want to pirate the game, there are roms easily found via a search engine.

They likely want to mod the games which is understandable but not something we'll help with - regardless of my own thoughts on the subject. There are people who believe that 'by any means necessary' these games need to be preserved and made available. They're technically sharing copyrighted material. The game companies know this and it's usually only Nintendo that gets lawsuit happy.

This doesn't enter ban territory.

Now if they keep asking over and over again... Well, we'll cross that bridge when we get to it.

Also, I wonder if they know what Linux is? Some folks seem to be under the impression that it's a magical system used by geeks to do whatever they want with just a few terminal incantations.
 
Hah! Just how old are these games, and is the company still in business?

The first one would have been in 1989 or soon after. The company is still in business.

Copyright doesn't care if the company is out of business and there's always a rightsholder somewhere as it's an asset.

In the US, which is where we're located officially, copyright is 'until the author dies PLUS 70 years'. Yeah, it's absurd. (I'm reasonably fluent in our copyright laws here in the US.)

I will say that OP should just ask their favorite search engine this question. There are answers out there - and they probably don't even need to use Linux. They're a bit complicated and there's almost no way that OP speaks 68k assembly, but it's possible and they'd hopefully learn a bunch of cool stuff along the way.

I can not officially encourage them, at least not here. We have a no-piracy rule, even if it's probably not written down somewhere.
 
The first one would have been in 1989 or soon after. The company is still in business.

Copyright doesn't care if the company is out of business and there's always a rightsholder somewhere as it's an asset.

In the US, which is where we're located officially, copyright is 'until the author dies PLUS 70 years'. Yeah, it's absurd. (I'm reasonably fluent in our copyright laws here in the US.)

I will say that OP should just ask their favorite search engine this question. There are answers out there - and they probably don't even need to use Linux. They're a bit complicated and there's almost no way that OP speaks 68k assembly, but it's possible and they'd hopefully learn a bunch of cool stuff along the way.

I can not officially encourage them, at least not here. We have a no-piracy rule, even if it's probably not written down somewhere.
Isn’t it more like 100 years?
 
For instance such as Yuji Naka?

Yes.

Though, I did forget to mention a clause. If it was a work for hire (he was paid to do the work, not that he did the work and then sold/licensed it) then I think it's 95 years or what they estimate to be the end of their life plus seventy years. They make it that way in case the author leaves the company and stuff like that. But, work for hire (which this might be, now that I think about it) is a set 95 years.

I don't know if he developed the game himself on his own time, or if he did so while working for somebody else. That can change the copyright length. Back then, lots of games were done by individuals who then sold their games to the people who made consoles or other software houses that would publish the games.

The 'for hire' means they were hired and paid by a company to create the work at the time the work was created.

That's after 1978. Works prior to 1978 are covered under other rules. That's why Mickey Mouse recently became a public domain property.

Also, you do not have to declare copyright. Copyright is automatic upon inception. The minute you write it down, it is copyrighted.

You only need to register your copyright if you want to be able to sue violators for money. If you don't register your copyright you can still sue them but it's only to make them stop violating the copyright. If you've registered the copyright, you can sue them for financial harm.

And, in the case of the game, you'll have trademark licenses to worry about. They're names and likeness are protected by trademark (I'm sure - I didn't go verify it but that's normal business behavior). So, you have copyright and trademark issues.

If the OP was able to get the software decompiled and didn't share any of it, they'd not violate trademark laws. They'd have to use it in some distributed way to violate trademark.

There's a big misconception in copyright law. People think you have to defend your copyright. That's not accurate. You have to defend your trademark, lest it enter the public domain (like Xerox, Kleenex, and the like). By that, it means that if someone uses your trademark you have to make them stop doing so, including taking them to court if necessary. If you fail to defend your trademark, you can lose it.
 
Yes.

Though, I did forget to mention a clause. If it was a work for hire (he was paid to do the work, not that he did the work and then sold/licensed it) then I think it's 95 years or what they estimate to be the end of their life plus seventy years. They make it that way in case the author leaves the company and stuff like that. But, work for hire (which this might be, now that I think about it) is a set 95 years.

I don't know if he developed the game himself on his own time, or if he did so while working for somebody else. That can change the copyright length. Back then, lots of games were done by individuals who then sold their games to the people who made consoles or other software houses that would publish the games.

The 'for hire' means they were hired and paid by a company to create the work at the time the work was created.

That's after 1978. Works prior to 1978 are covered under other rules. That's why Mickey Mouse recently became a public domain property.

Also, you do not have to declare copyright. Copyright is automatic upon inception. The minute you write it down, it is copyrighted.

You only need to register your copyright if you want to be able to sue violators for money. If you don't register your copyright you can still sue them but it's only to make them stop violating the copyright. If you've registered the copyright, you can sue them for financial harm.

And, in the case of the game, you'll have trademark licenses to worry about. They're names and likeness are protected by trademark (I'm sure - I didn't go verify it but that's normal business behavior). So, you have copyright and trademark issues.

If the OP was able to get the software decompiled and didn't share any of it, they'd not violate trademark laws. They'd have to use it in some distributed way to violate trademark.

There's a big misconception in copyright law. People think you have to defend your copyright. That's not accurate. You have to defend your trademark, lest it enter the public domain (like Xerox, Kleenex, and the like). By that, it means that if someone uses your trademark you have to make them stop doing so, including taking them to court if necessary. If you fail to defend your trademark, you can lose it.
Or even for instance Takashi Iizuka?
 
Or even for instance Takashi Iizuka?

I had to look him up. It looks like the stuff he's famous for (according to Wikipedia) would be work 'for hire'. So, they (probably) don't own any of the rights, including copyright. In that case, the copyright would be 95 years (in the United States).

Many countries follow the US' lead where copyright is concerned - albeit not exactly. Most countries have signed the Berne Convention, which you can look up to learn more. If you want the cheat sheet, I'll find the Wikipedia article...


I skimmed that (I've read about it before, and didn't remember exactly how many countries had signed it. I knew it was a bunch, but it's almost all of them. Anyhow...

That article does touch on what I mentioned earlier, specific to the US:

Author's rights under the Berne Convention must be automatic; it is prohibited to require formal registration. However, when the United States joined the convention on 1 March 1989,[6] it continued to make statutory damages and attorney's fees only available for registered works.

Copyright (in the US, and elsewhere) is automatic. However, in the US, you need to register your copyright if you want to be able to sue for any settlements involving money. (Those could be legal fees or punitive fees.) As far as I know, that's unique to the US.

The US has some unusual laws which make it a bit fuzzy.
 
Hmm...

Does linking to this promote copyright infringement?

 
OP, I'm going to suggest you do not try to decompile. As pointed out, "decompiling" will result in a mess of assembly, which is literally CPU instructions, specific to that class of CPU, in the closest human language to machine code before it becomes a binary.
Add to that some cartridges, depending on the game and system, had unique systems, for example chips dedicated to handling vectors or flipping images.
I think you get the point....

If you want to write mods, that is 100% legal if:
1) You own the game and dump it yourself.
2) You do not distribute any copyrighted material. You are free to distribute patches though. Most commonly IPS ones.

Now I suggest you ask on the forums on romhacking.net or look for Youtube videos on "ROM Hacking" for the software you'll need and a starting point. Nowadays there are lots of "easy" methods with graphical UIs and level editors, but I'd be wary because they can cause corruption. You're better off learning to use a hex editor and doing it proper.
This forum is a place to discuss Linux which has nothing to do with that. So you'll get little help here.

Please know that "ROM Hacking" is a massive undertaking. It's actually easier just to learn something simple like PyGame or a BASIC variant and code a clone yourself (with your levels, etc.) Note: I am not advocating patent, copyright, or trademark infringement. If you write clones, use nothing from the original, especially if you intend to distribute the game. People have gotten away with things like Super Tux because of technicalities, but mainly Nintendo (world's most evil company -- that's not libel, it's free speech) don't see it as a threat to their ever-dwindling company.

Good luck, whichever direction you go and may the "retro gaming" force be with you.
- J
 
There is misunderstanding in this thread regarding decompiling and disassembly.

Disassembling an executable or shared object results in assembly.
Decompiling however does not, it results in C code.

There are very few decompilers that decompile to other languages, C decompilers are the best and most popular.
In both cases disassembly and decompiled C are poor reconstructions (or very low level) hard to read but certainly not useless even if one does not know the language well because in the end one does not bother with reading the output like normal code.

Once an executable is decompiled what you would do is compile decompiled code back to a brand new executable, then what follows is running a debugger on that new executable by stepping into decompiled source code, putting a bunch of breakpoints etc. in order to find a line in code that you're interested in.
For instance you run a game until an event of interest, and then and step into.
Then modifying a line to return different result from original is only a matter of few minutes work.

The end result is modified executable separate from original, although that's not the only purpose of decompilation.
Dissasembly is same thing except you would use assembler to assemble disassembled assembly code (rather than C code) back to an executable.

---

But the point is that that decompilers do not decompile to assembly, but to C code or rarely some other language,
while disassembly never produces any high level language output like C.
 
Last edited:


Follow Linux.org

Members online


Top