Pages: 1
Posted on 05-15-20, 12:47 pm (rev. 8 by Overblade on 01-16-21, 12:37 am)
Newcomer


Karma: 235
Posts: 2/8
Since: 04-18-20
Hello everyone!

Today I want to announce the Public NSMB C++ reference on Github. I've created it to aid anybody making code hacks in C++/ASM. The repository contains C++ header files with many functions and variables you can include in your project.

Every part of the game gets its own header file, and each header file is associated with one or multiple memory regions. This is because original files were compiled together, although rare exceptions exist. Every header-assigned memory region is fully decoded and documented so that no unknown fields/variables/functions/classes are left. Also, everything is documented as precise and short as possible to give the user the necessary understanding of what a particular object/function/variable does.

As of now, some parts of the game are fully documented and defined in their respective header file. This includes:

- Fonts + Textbox
- Heap (Memory)
- Math
- Sound
- Vector / Util
- ARM7

Additionally, the following parts are in progress:

- Models (needs just reorganization)
- Actors (ActorBase/Actor/Base2?)
- Camera

In conjunction with headers, symbols for every function/variable in these headers are defined in symbols.x.
In case you find an error in the repo, please feel free to post it so we'll fix it as soon as possible.

If you want to contribute to the project, make a post and select a memory section from sections.txt you want to document. Note that the regions aren't fixed so it may be the case a certain engine is split in half (such as sounds) or using a smaller section (in which case we split the current known sections).
Please make sure to follow the guidelines from guidelines.md to keep everything consistent. You can also look at existing header files to see a documentation in practice. For general classes look especially at Font.h, for namespaces at Sounds.h and utility stuff with helper functions at Vector.h/Util.h.

Also, big thanks to  TheGameratorT and Ed_IT since without them this wouldn't have been possible in that amount of time.
We're thankful for every contributor, every creator is credited in sections.txt (and here too).

If you have any questions, feel free to ask them.
Link: https://github.com/TheGameratorT/NSMB-ASMReference
Posted on 05-15-20, 10:28 pm
Shyguy
DMA problems.

Karma: 819
Posts: 50/89
Since: 07-19-18
Nice work.

And yeah, I really hope more people in the future will be able to ASM hack this game by using a better template with a more universal support like this one when it's finished.

With universal support I mean being able to just import an ASM patch and compile without any problems or requiring any adaptation.
_________________________
NSMB Hacking Discord
Posted on 07-17-20, 11:13 am
Newcomer


Karma: 235
Posts: 5/8
Since: 04-18-20
Small update: Together with Ed_IT we were able to get all ARM7 symbols. This has never been done before on any official NDS game.

That's why from now on symbols.x is split into symbols9.x and symbols7.x to prevent compilation issues between the ARM7 and ARM9. The workspace will be migrated soon to accomodate the requirements of the new patcher.
Posted on 08-10-20, 10:11 am


Karma: 2
Posts: 2/3
Since: 07-28-20
is there a link?
Posted on 08-11-20, 04:01 am
Giant Red Paratroopa
Not Edible

Karma: 3366
Posts: 1090/1447
Since: 02-12-16
I have no clue why this isn't in the first post https://github.com/Overblade/NSMB-ASMReference
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 08-11-20, 10:10 pm
Shyguy
DMA problems.

Karma: 819
Posts: 77/89
Since: 07-19-18
Because it's not finished. And the patcher tool is still being developed.
_________________________
NSMB Hacking Discord
Posted on 08-11-20, 10:17 pm
Newcomer


Karma: 235
Posts: 6/8
Since: 04-18-20
I've been removing the repo link temporarily since it has been private for a short amount of time. In general, some issues need to be fixed and a license should be added (preferably GPL but idk yet).
I put the link back into the original post.

Also, the repo is by far not 100% complete because most actors are really annoying to document. I'm glad we have certain parts fully finished and actors are being developed on (experimental branch). And at the same time we discovered some new things never mentioned before including hidden camera states for both the world map and the stage itself.
Posted on 08-23-20, 11:24 pm
Newcomer


Karma: 235
Posts: 7/8
Since: 04-18-20
Textboxes are almost out, you will be able to find them in Font.h.
May contain some useful functions but note that a lot of stuff is hardcoded.
Posted on 05-05-22, 10:59 pm (rev. 3 by Ed_IT on 06-10-23, 11:08 pm)
Red Goomba
MammaMia Team Okarick

Karma: 249
Posts: 45/45
Since: 07-13-18

A new code patching template has been released!


Say goodbye to the ancient, disorganized, misleading and now obsolete "ASM" Patch Template.

With this new code template, you'll be able to quickly create a NSMB code patching workspace, compile using the modern NCPatcher and interact with the game's code using the constantly updated NSMB Code Reference.

Instructions for how to setup the patching environment, either using standalone NCPatcher or NSMBe + NCPatcher, alongside some example patches, can be found in the github repository linked below.

NSMB Code Template

NSMB Code Reference update


The NSMB Code Reference is constantly being updated with new decompiled Actors, classes and functions.

With contributions from various reverse engineers every week, it is, as of now, the only reliable and up to date code reference for New Super Mario Bros.

To provide a pleasant coding experience, the reference follows a strict set of guidelines, such as unified casing and indentation, and is fully compatible with C++20.

The reference is organized in folders split by functionality, and all code is carefully reviewed and aims to be as complete as possible.

NSMB Code Reference

As of May 2022, the following classes and functionalities have been documented and added to the Reference:

Category Element Progress
Entity Process Manager and lists 100%
Base 100%
Object 100%
Scene 100%
Actor 100%
Filesystem File 100%
Archive 100%
Cache 100%
Overlay 100%
Graphics - Common Fader 80%
Effect 100%
Particle 100%
Blend Color 100%
Frame Controller 100%
View, OrthoView and PerspView 100%
Graphics - 2D Font 100%
OAM 100%
Graphics - 3D Common utilities 100%
Texture 100%
Model 100%
Model Animation 100%
Blend Model Animation 100%
Animation 100%
Animation Controller 100%
Math Common math WIP
Matrix 100%
Vector 100%
Arc Function 100%
Spring Function 100%
Physics Active Collider 90%, stable
Collider 90%, stable
Collision Manager 70%, WIP
Platform Manager 85%, stable
Platform 98%, stable
Deforming Platform 100%
Rotating Platform 100%
Round Platform 98%, stable
Segment Platform 100%
Player rendering Cap 100%
Model 100%
Shell 100%
Scenes Boot 100%, pending
Ending WIP
MvsLMenu 100%
TitleScreen 100%, pending
World 100%, pending
Worldmap WIP
Sound Sound frontend 100%
Sound backend 100%
Sequence archive definitions 100%
Stage Camera 100%
StageController 100%
StageActor 100%
StageEntity 80%, stable
StageEntity3D (Animation) 100%
Fireball WIP
ViewShaker 100%
System Cache 100%
Input 100%
Memory 100%
Save 80%, stable
Task 100%

Including the following actors:

Actor Progress
Player WIP
Coin 100%
Item 100%
StageFX 100%
Thwomp 100%
Fence Koopa 100%
Whomp 100%
Bullet/Banzai Bill 100%
Bullet/Banzai Bill Blaster 100%
Wobble Rock 100%
Checkpoint 100%
Coin Spawner 100%
Trampoline 100%
Chain Chomp 100%
Chain Chomp Log 100%
Amp 100%
Boo 100%
Phantom Hand 100%
Splunkin 100%
Manhole 100%
Broozer 100%
Toadsworth 100%
Posted on 05-05-22, 11:23 pm (rev. 1 by  KingYoshi on 05-05-22, 11:23 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 1100/1120
Since: 11-29-11
Seems like the NSMB Hacking community is making big steps once again. Great effort!
Posted on 05-06-22, 11:46 am
The boy who always has something up his sleeve

Karma: 895
Posts: 733/748
Since: 02-01-21
Ed_IT, I CAN'T BELIEVE WHAT I'M SEEING, IT'S A JOKE, THIS IS INCREDIBLY USEFUL NOW NSMB CODING COULD BE MUCH EASIER, one question, ASM's like boss music and those codes Skawo and meromero posted in a thread work with this?
_________________________
The star project that shows my brilliant mind

Posted on 05-06-22, 04:41 pm
Red Cheep-cheep
MammaMia Team Member

Karma: 571
Posts: 188/213
Since: 04-26-19
The Fireflower patcher does not have compatibility with NSMBe's hooking system
In short, all the code you've seen in the forum has to be rewritten to get it to work with the new template
such process that can take from a few minutes to a bunch of time, mostly because a lot of these old patches are partially broken since there were no proper reverse engineering attempts
_________________________
Youtube - GitHub - NSMB Central
Pages: 1