Register - Login
Views: 99864961
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-04-22 05:46:43 PM
Jul - NSMB Hacking (Archive) - Editing world maps (crucial) New poll - New thread - New reply
Pages: 1 2 3Next newer thread | Next older thread
Ninji

Birdo
Why did my user title say I'm a toaster anyway
Level: 88


Posts: 1375/2014
EXP: 6639464
For next: 11200

Since: 07-26-07

Pronouns: he/him or they/them
From: Glasgow, Scotland

Since last post: 114 days
Last activity: 7 days

Posted on 01-22-10 01:04:02 AM (last edited by Treeki at 01-21-10 10:07 PM) Link | Quote
Originally posted by Mikael
"The DS can't read the C/C++ code directly - they have a special program that translates this code into data the DS can use, which is what's included in the game ROM (and where the data we need to change is contained)."

Thank you Treeki, first time I heard that aswell! There seems to pop up crucial causes for unfeasible projects the whole time when you put this into context. If you told me this initially I would of understood as for why editing certain code files, such as the ones concerning the map world, are not feasible. Of course, if they don't "give" you the compiler within the game ROM there's no chance for you to being with.
The issue is that it's extremely hard to translate the game's compiled code back into the source code. You could code a game without using a compiler, but you'd have to use the DS's assembly language - which is quite hard to understand and to code in. In addition, the source code is Nintendo's IP and therefore would be illegal to distribute.

Originally posted by Mikael
Source codes for DS will most likely become properly examined and documented just as the formats that are already well-knowned to hackers. That is, if I've understood you correctly, hackers didn't have access to the source codes for other Nintendo products (like Brawl) yet they are understandable today.
Not exactly. Unlike the different file formats (which can be shared between different games) - your knowledge of how one game works internally is totally useless for another.

Here's an example from the NSMB editor itself. This relatively simple three-line code block:

public override string ToString() {

return string.Format("{0}: {1} ({2},{3})",
this.Number, LanguageManager.GetList("EntranceTypes")[this.Type], this.X, this.Y)
}

... is turned into this by the compiler: http://pastebin.com/f7cedadaf - While it uses a completely different type of code than NSMB and the DS, the principle is the same. The compiled code is so different that it takes a lot of work to translate it to the original source code.

Few games have been fully disassembled. For example, there's a commented disassembly of the original SMB1 which describes everything the code does in-depth and has all the "links" turned into names so that a new version can be safely built - but this would be unfeasible for a DS game. SMB1 is 40kb including all its level/graphics/sound data. NSMB has over 1.2mb of code alone.

This issue applies for hardcoded data in all games - for example, NSMB's levels and graphics are only easy to hack because they're located in individual files within the DS ROM. If they were also embedded into the code, we'd be running into similar issues for editing them.

Stuff in other games like Brawl is hackable because the stuff they've edited (new character models, etc) can be done solely by editing the graphics data files, or with minor modifications to the code. Technically, you could hack the world maps in NSMB using a similar method, but you'd be extremely limited to what you could do.

As an example of this, NSMBWii hardcodes several level features to specific level numbers (like the endless paths in 2-Castle). We can modify the code to change the level number it checks for (just a matter of changing an instruction like check if value X is Y) and we can disable the check altogether (by changing it to an instruction that means do nothing) - but we can't make it work in several different levels, because that would involve adding extra instructions which we don't have space for.

Also, in case you didn't know, you can click the Edit button at the top right of a post to edit it without posting another one.

____________________
|02:48:23| Kyargu: what
|02:48:27| @Ikachan: Kyargu: What is breakfast baby don't hurt me so.
Hacking Tools: NSMB Editor 5 ยท Nitro / NARC Explorer
Current Project: Reggie! - NSMBWii Level Editor
Mikael
User
Level: 12


Posts: 23/24
EXP: 7875
For next: 46

Since: 01-20-10


Since last post: 12.3 years
Last activity: 12.3 years

Posted on 01-22-10 03:21:23 AM Link | Quote
Okay as though I'm catching on fast and I've learned alot by reading your writings, this last one gets a bit too far beyond my comprehension. It becomes too incoherent if there's no beginning and ending in your statements. Enough of this sophistication.

It sounds like I should check out editor for SMB1 anyhow. There's not possibly any recommendations of which version?

"NSMB's levels and graphics are only easy to hack because they're located in individual files within the DS ROM"

You see, you see! What did I say about constructiveness and efficiency??
Taryn

Passed away.

Thanks for being a part of us, even if it wasn't always on the best of terms.

1987-2014


Level: 204


Posts: 5476/14742
EXP: 121764897
For next: 1584921

Since: 09-01-09

From: Seattle

Since last post: 10.1 years
Last activity: 9.8 years

Posted on 01-22-10 03:30:00 AM Link | Quote
If you want to hack SMB1 for NES, I would recommend Insectduel's SMB Utility. In fact, I'm considering making another hack with it myself

____________________
TKB Super Mario Bros.
Mikael
User
Level: 12


Posts: 24/24
EXP: 7875
For next: 46

Since: 01-20-10


Since last post: 12.3 years
Last activity: 12.3 years

Posted on 01-22-10 03:35:50 AM Link | Quote
Originally posted by Terra
If you want to hack SMB1 for NES, I would recommend Insectduel's SMB Utility. In fact, I'm considering making another hack with it myself


Ah thank you so much! Better get dealing with that, both of us.

And many thanks to the explanations I've recieved here! Greatly appreciated! Keep up the brilliant work dirbaio!
Pages: 1 2 3Next newer thread | Next older thread
Jul - NSMB Hacking (Archive) - Editing world maps (crucial) New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

29 database queries, 1 query cache hits.
Query execution time: 0.093890 seconds
Script execution time: 0.010580 seconds
Total render time: 0.104470 seconds