View Page Source

Revision (current)
Last Updated by Suuper on 2/2/2023 3:25 AM
Back to Page

The purpose of this page is to document all of the known tricks
of NDS New Super Mario Bros so far.

Because of the nature of this site, we concentrate here on tricks
that are extremely difficult to execute in real play, but are useful
in the making of tool-assisted speedruns. For most of the tricks,
a [Glossary|frame advance] feature in an emulator is a definite must-have.

''[TODO]: Make clips of these segments and cut the useless screen out.''
%%%
%%%
%%TAB Table of contents%%
%%TOC%%
%%TAB Movie%%
[module:displaymovie|id=4647]

%%TAB RAM Addresses List%%

RAM values relevant to tricks/optimization. For the US version.

* 021B6A90 - X speed (20.12 Fixed Point)
* 021B6A3C - X position (20.12 Fixed Point)
* 021B6AB0 - Y speed (20.12 Fixed Point)
* 021B6A40 - Y position (20.12 Fixed Point)
* 021B6A94 - Current max speed (20.12 Fixed Point)
* 02088A68 - RNG (4 byte)
* 020CC0EE - Rail position; where mario/luigi are on the progress bar (4 bytes)
* 021B759B - Wall jump timer (1 byte)
* 021B7597 - Wall action timer, wall to left of Mario (1 byte)
* 021B7598 - Wall action timer, wall to right of Mario (1 byte)
* 021B71D8 - Mario's height in pixels, for wall jumps (4 bytes)
* 021B71BC - Mario's height in pixels, for bumping blocks(4 bytes)
* 021B757F - Jump combo timer (for double/triple jumps) (1 byte)
* 0208B350 - Starman timer (4 bytes)
* 021B75A1 - Pipe timer left; must be 10 to enter left pipe (1 byte)
* 021B75A2 - Pipe timer right; must be 10 to enter right pipe (1 byte)
* 02088BD8 - Frame counter that pauses during stage transitions (e.g. doors) (4 bytes)
* 020CA8B4 - In-game timer as seen in top-right (20.12 fixed point)

Speed and location units are in pixels. Blocks are 16x16 pixels, so displaying location values mod 16 is helpful.

%%TAB Lua Scripts%%

Here are some Lua scripts for BizHawk that may be helpful.

View information about currently spawned objects, such as location and speed of Mario, enemies, and star coins.
https://pastebin.com/h23Yhsym

See when and how many times RNG is used.
https://pastebin.com/ARAMDreP

%%TAB_END%%
----
!! Corner Boosting
[module:youtube|v=kpUbnr3pSZ4|start=54|loop=84|align=right|w=192|h=300|hidelink]
%%%%
----
!! Turning right on the flagpole
[module:youtube|v=kpUbnr3pSZ4|start=76|loop=80|align=right|w=192|h=300|hidelink]
%%%%
----
!! Speed Mechanics
* Running Speed/Triple Jumping speed = 3.0 Pixels per frame
* Shell Spinning speed = 2.75 Px/frame
''[TODO]: finish this and turn into a table, and explain, and add RAM addresses''
----
!! Wall slides and wall jumps
These are generally straight-forward, but there are some details that make it difficult in certain situations. Mario's ability to do these is affected by a variety of factors, including a "wall jump timer" and two "wall action timers", one for left walls and one for right walls. See RAM addresses at the top of this page for the address of the timer values.

%%TAB Requirements for wall actions and wall action timers%%
The wall action timers and the actions themselves all depend on various factors. Here is a list of requirements that apply to one or more of them.
# Wall jump timer: This requirement is satisfied when the wall jump timer is 0 after the frame in question (e.g., the frame on which A is pressed for a wall jump).
# Wall action timer: This requirement is satisfied when the wall action timer is non-zero both before and after the frame in question.
# Floor: This requirement is satisfied when there is not a floor <= 16 pixels below Mario's Y location.
# Wall collision: This requirement is satisfied when Mario is within the wall's collision space.
# Height:
## This requirement is satisfied if both (A) Mario is >= 19 pixels below the top of the wall (11 pixels if crouching) after the frame in question, and (B) Mario is < 4 pixels below the bottom of the wall after the frame in question.
## Same as 5.1, except part (B) is BEFORE the frame in question.
# Crouch: This requirement is satisfied if Mario is not crouching.
# Moved down:
## This requirement is satisfied if Mario moved down during the frame in question.
## Opposite 7.1, this requirement is satisfied if Mario did not move down during the frame in question.
# Facing wall: This requirement is satisfied if Mario was facing the wall before the frame in question, or if he would be at the end of current animations.
# Horizontal movement: This requirement only ever applies if the wall is to the left of Mario.
## This requirement is satisfied if Mario moved horizontally during the frame in question (movement counts even if the wall immediately pushed Mario back; thus holding left against a wall works).
## Same as 9.1, but movement happened on the previous frame.

%%TAB Wall jump timer%%
This value must be zero before a wall jump or slide can be executed. The timer is set to 16 on the frame Mario begins a wall jump. It decreases by 1 each frame until 0.

%%TAB Wall action timers%%
This value must be non-zero before a wall jump or slide can be executed.

The timer is set to 16 when left/right (towards wall) is pressed and the following conditions are met:
* #3 (Floor)
* #4 (Wall collision)
* #5.1 (Height)
* #7.1 (Moved down)
* #9.1 (Horizontal movement)

The timer decreases by 1 each frame until 0. The timer is automatically set to 0 if condition #3 (Floor) is no longer met. This means that both wall slides and jumps implicitly require condition #3 (Floor) as well. If Mario is currently doing a wall slide when this value reaches 0, the wall slide ends.

%%TAB Wall slides%%
A wall slide can be started by pressing left/right (towards wall) when the following conditions are met:
* #1 (Wall jump timer)
* #2 (Wall action timer)
* #4 (Wall collision)
* #5.2 (Height)
* #6 (Crouch)
* #8 (Facing wall)
* #9.2 (Horizontal movement)

%%TAB Wall jumps%%
A wall jump can be done in either of two situations. Both require #1 (Wall jump timer) and #6 (Crouch).

The first situation requires pressing A on the frame in question, and #2 (Wall action timer).

The second situation requires pressing A and left/right (towards wall) on the frame in question, and:
* #4 (Wall collision)
* #7.2 (Not moved down)
* #8 (Facing wall)
* #9.2 (Horizontal movement)
Notes:
* If a wall slide and a wall jump are activated on the same frame, the wall slide is activated first.
* If a wall slide is active, vertical speed is set to 0 and the actual jump is delayed by one frame.
%%TAB_END%%
----
!! RNG

* The starting RNG depends on the date and time you start the movie.
* The RNG changes whenever certain sound effects are played, whether by Mario or the background music itself (though this depends on the level). Luck can always be manipulated __very frequently__ - (though not always) by either double jumping, throwing something, wall jumping, and by breaking a block.

The RNG is currently known to affect:

* The Red ? Block and Hammer Bros. movements on the world map
* The movement of the Scuttlebugs
* The movement of the bosses in Worlds 2-Castle, 3-Castle, and 5-Castle
* The volcano rocks in World 8-8
* When the final cutscene in World 8-Castle 2 (Bowser Jr. throwing Dry Bowser into the pot) activates.

[TODO], explain these:
Ground pounding as mini-mario
Super corner boosting
Maintaining speed as a turtle shell
Mini-mario corner boosting