-
Notifications
You must be signed in to change notification settings - Fork 8
Reverse Engineering Getting Started
So you want to help reverse engineer SMA4? Awesome! Here are some tips on how to start
The smaghetti discord has the #sma4-reverse-engineering
channel where we chat about things we are figuring out.
All reverse engineering learnings eventually get documented here. Take a look around, it will help you avoid doing stuff that has already been figured out.
Discussions also have some info in them. Not as much going on here, but sometimes when someone finds something in Discord, it gets copied into a discussion as an easy way to stash it in a permanent spot. Ultimately discussion info ends up in Smaghetti itself and the wiki.
If you load the editor with this url: https://smaghetti.com/editor/?hextreecat
Then the item chooser will have an additional "hex tree" category. With this added category, all entities that Smaghetti knows about are shown.
Smaghetti has several tools here. Most notable is hex-tree. It lets you really play with the binary data of a level and see the results.
These tools are all very raw. They have bugs and are not always intuitive. Most likely that's just the way these tools will be, making them super polished just isn't a very good use of development resources
Hex-Tree will let you load a level via:
-
localStorage: this pulls in a smaghetti level. To use this, head to the editor and load or create a level. Once the level is where you want it to be, refresh the page, then in the menu that pops up, choose "last session", this will ensure this level is stored in your browser's localStorage. Then head to hex-tree and choose "load from localStorage". You should see your smaghetti level now loaded into hex-tree
-
load an e-reader level: if you have a .level e-reader file, you can load it into hex-tree. I can not help you locate these files, they are copyrighted and belong to Nintendo. asking here on Github or in Discord for these files is a violation of the Smaghetti guidelines
-
use the dropdown to load an in-game level: the big dropdown up in the header lets you choose a level that is built into the game, ie 1-1, 1-2, etc. But this feature is extremely raw, unfinished and just not very good. Recommend avoiding it until it gets more love.
-
start empty: this starts you out with an empty level, but this is also raw and not great. Also recommend avoid this.
Once you have a level loaded, I recommend just start playing with things. For example, find a Goomba
And try moving it by changing x or y. Once you change the value, click on the up arrow to apply it. Keep in mind these values are in hexadecimal.
Or try changing it to a koopa, which has id 6c
When you play the level, you will see the goomba is now a koopa.
That's basically how you mess with a level.