News:

11 March 2016 - Forum Rules

Main Menu

MOTHER 3 debug symbols?

Started by MOTHERrocks, May 27, 2023, 07:37:54 PM

Previous topic - Next topic

MOTHERrocks

I was looking at the Seventh circle of ASCII hell, and I think that these are debugging symbols that Nintendo never bothered to remove.  It might even be possible to automatically recover source code with this that's very similar to Nintendo's with not much effort.  Are there any other games with something similar to use as a comparison?

Jorpho

Quote from: MOTHERrocks on May 27, 2023, 07:37:54 PMI think that these are debugging symbols that Nintendo never bothered to remove.
If you don't already know of other games with something similar, then what exactly leads you to that conclusion..?

QuoteIt might even be possible to automatically recover source code with this that's very similar to Nintendo's with not much effort.
Considering the translation patch was an absolutely enormous effort, I very much doubt something of considerably greater complexity could be accomplished with "not much effort". There may very well be developments in the scene that I haven't been following, but I don't think anyone's ever established what language the game was written in to begin with.
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

MOTHERrocks

Quote from: Jorpho on May 28, 2023, 12:34:04 PMIf you don't already know of other games with something similar, then what exactly leads you to that conclusion..?

Well when I look at it, it definitely seems like function names starting at F1840.  If these aren't debugging symbols, then why would they be here?  After all, if you're debugging, it's helpful to know the name of the function that the game crashed on, but there's no other reason to include them.

Quote from: Jorpho on May 28, 2023, 12:34:04 PMConsidering the translation patch was an absolutely enormous effort, I very much doubt something of considerably greater complexity could be accomplished with "not much effort". There may very well be developments in the scene that I haven't been following, but I don't think anyone's ever established what language the game was written in to begin with.

The fan translation was definitely a lot of effort, but most of it was the actual translation, and also the game was never designed for English so they had to spend more time then Nintendo would have.

When I say that it could be used to recreate the source code, there's a port in active development (as of May 2023) of EarthBound to the PC, and one of the hardest things is figuring out all of the variable names, which requires reverse engineering each function and figuring out what they do.  What I'm saying is that if these are in fact debugging symbols, it could be used to automatically figure out the variable names with little effort, but to actually decompile them, it would be somewhat harder.  All in all, it would be a challenge, but not as much as EarthBound, and people are doing exactly that.

Jorpho

#3
Quote from: MOTHERrocks on May 28, 2023, 02:32:23 PMIf these aren't debugging symbols, then why would they be here?
You already linked to https://datacrystal.romhacking.net/wiki/MOTHER_3:Seventh_circle_of_ASCII_hell which suggests there's a lot of stuff that's there for no reason. It wouldn't be the first time a ROM was released with random unrelated data.  See for instance https://www.pagetable.com/?p=28 .

QuoteAfter all, if you're debugging, it's helpful to know the name of the function that the game crashed on, but there's no other reason to include them.
Even if they are function names, they're not especially useful if there's no way to correlate them with actual code.

Quotebut most of it was the actual translation
There was a considerable amount of additional coding that would have been unnecessary if the source code could have been magically recovered.

If you want to know more about this, it's probably been discussed to death somewhere else already. There's not much talk of it here in particular, but the Mother 3 ROM has been the subject of intense scrutiny over the years, which is why you should be highly skeptical that anything remains to be accomplished with "little effort".

QuoteWhen I say that it could be used to recreate the source code, there's a port in active development (as of May 2023) of EarthBound to the PC
At the risk of stating the obvious, EarthBound is not Mother 3, and a port is not original source code.  I expect you are looking at something akin to https://www.neowin.net/news/zelda-a-link-to-the-past-can-now-be-compiled-on-windows-and-nintendo-switch/ , which is more of a reimplementation. That is very different from things like the re-creation of the Mario 64 source code, which is largely possible because people have access to the same development tools (i.e. the compiler) that Nintendo used.
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!