List of Header BlocksViewing revision 14 (by Thierry on 09-08-25, 09:37 am) (revisions: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 )
32 bytes | 01 02 03 ?? 05/06 07/08 FF FF FF FF 13/14 ?? ?? FF FF 19/20 FF FF FF FF ?? ?? 27/28 29/30 ?? ?? |
|
Byte 1 | Start entrance ID | |
Byte 2 | Midway entrance ID | |
Byte 3 | Misc parameters:
- Nybble 1:
0: None
2: Level wrap
- Nybble 2:
0: None
1: Start level as Mini Mario
2: Floaty Physics
3: Both of the above
| |
Bytes 5-6 |
Time limit:
(reverse the bytes before converting to decimal)
- Expected range: 0 to 999 (E7 03)
- Glitchy values: 1000 (E8 03) to 65535 (FF FF)
- Values of 1000 and above will work in-game, however the timer can only display up to 999, (thereby making the timer look frozen until 998 is reached). Beware, using these will prevent NSMBe from opening the level
- High values can be functionally infinite (65535*0.75{tick length} = over 13 hours), and thereby work as a way to "freeze" the timer
- However, setting the timer too high will result in a long wait for it to tick down upon clearing a level via the flag pole
(unless you break the goal flag as Mega Mario, which skips the timer delay)
| |
Bytes 7-8 | Bottom BG ID
(The BG slot "255 - None" in NSMBe sets both bytes to FF)
| |
Byte 9 | Unknown, 0xFF
(Set to 0x03 in Unused level 3)
| |
Bytes 13-14 | Tileset ID
(Set both to FF to make tileset 1 Disappear. Not compatible with NSMBe level editor)
| |
Bytes 19-20 | Top BG ID
(The BG slot "255 - None" in NSMBe sets both to FF)
| |
Bytes 27-28 | Sound Set | |
Bytes 29-30 | Sprite draw settings:
Offset in RAM: 0235FE74 (US), 02357A64 (EU) - This variable can be changed at runtime with immediate effect
Applies various different experimental effects onto the 2D sprites on the OBJ layer. Can move said layer back and forth relative to other layers. Is likely a leftover debug feature.
Some sprites ignore effects (e.g. Event Trigger block) and so does the UI.
- Speculation:
Together, the two bytes form an index into small lookup tables. The first byte picks the table family; the second byte picks a variant inside that family. Some indices are valid, some point to junk.
Effects aren't orthogonal. For example, "Transparent or "NoTransform" may only exist as certain family/variant combinations, not as toggles you can freely combine.
Note: The first nybble of each byte repeats in a predictable pattern, the second byte is haphazard
Note2: Setting the second byte to 07 significantly stabilizes the results
Sprite list: (items, goomba, koopa, paragoomba, paratroopa, event trigger block, arrows, etc //TODO: complete)
- Layers:
- Front (default): displays in front of everything else
- Behind3D (-1 layer): displays behind 3D objects
- BehindTiles (-2 layer): displays behind tiles
- BehindTopBG (-3 layer): displays behind top background
- BehindBottomBG (-4 layer): {setting does not appear to exist}
Effects:
- None: No effect, default
- FlipY: Sprites are flipped on the Y axis according to the point of origin/anchor point, which is typically either at the bottom or center of the sprite
- NoFlipX: Sprites cannot flip on the X axis. Affected enemies will "moonwalk" to the right
- NoTransform: Disables non-reflective transforms. Sprites cannot squish/stretch or rotate. Items will hover weirdly and enemies cannot spin while in "defeated" animation
- Transparent: Sprites are semi-opaque (~70% transparency)
- Invisible/Corrupt (WhileNoAffine): Sprites display as invisible or corrupted, but only when no affine transform is active
- Invisible/Corrupt (constant): (Might be the missing BehindBottomBG parameter)
Some values:
Effects | | Front | Behind3D | BehindTiles | BehindTopBG
| No effect | | 00 00 | 11 07 | 3F 07 | 15 07
| Transparent | | 01 07 | 07 07 | 4D 07 | 29 07
| NoTransform | | 14 07 | 12 07 | 40 07 | 16 07
| Transparent, NoTransform | | 02 07 | 06 07 | 4E 07 | 2A 07
|
NoFlipX | 05 30 | | | FlipY | 20 30 | | | FlipY, NoFlipX | B0 30
| NoFlipX, Transparent | E0 00 | | | FlipY, Transparent | 02 30 | | | FlipY, NoFlipX, Transparent | 0A 01
| NoFlipX, NoTransform | 70 00 | | | FlipY, NoTransform | 04 00 | | | FlipY, NoFlipX, NoTransform | A0 00
| NoFlipX, Transparent, NoTransform | 03 01 | | | | | |
|
Invisible/Corrupt (WhileNoAffine) | 1B 07
| Invisible/Corrupt (constant) | 1C 07
|
| |
24 bytes (per view) | 01/02/03/04 05/06/07/08 09/10/11/12 13/14/15/16 ?? ?? 19 20 ?? ?? ?? ?? |
|
Bytes 1-4 | Camera top offset | |
Bytes 5-8 | Camera bottom offset | |
Bytes 9-12 | Camera top offset "special" | |
Bytes 13-16 | Camera bottom offset "special" | |
Byte 19 | Vertical scroll (toggle) - 0x00 disabled, 0x0F enabled | |
Byte 20 | Unknown. Lower byte of B19?
Camera shenanigans can turn the level invisible if paired with Byte19 0x0F
| |
Note on 4-bytes settings |
The maximum range is split in two in order to accommodate positive and negative numbers
Max: 2147483647 (FF FF FF 7F)
Min: -2147483648 (00 00 00 80)
| |
20 bytes | |
|
Bytes 3-4 |
Tilemap ID (NSC)
-carries with it the jyotyu palette type, e.g. 3 -> underground palette
-carries with it the presence/absence of parallax scrolling
| |
Bytes 5-6 | Palette ID (NCL) | |
Bytes 11 and 13 (BG) | Horizontal and Vertical scrolling settings
Nybble 1 determines the background's start position (AKA the initial offset), as well as which parts of the background do loop
Beware, any value above 0x5 freezes the game
0x0, 0x2,
0x3: Starts from bottom of view offset by 32px
0x1: Starts from top of view offset by 32px
0x4: Starts from bottom of view offset by 32px
0x5: Starts from top of view offset by 32px
0x0-0x3: Loops the entire background
0x4: Loops the top half
0x5: Loops the bottom half
Nybble 2 sets the speed at which the BG scrolls relative to the tile layer when the camera moves
Can be used to sync up background and foreground
0x6: 6.25% FG speed
0x7: 9.375% FG speed
0x3: 12.5% FG speed
0x8: 20.3125% FG speed
0x2: 25% FG speed
0x1: 50% FG speed
0x5: 75% FG speed
0x0, 0x9-0xC: Synced with FG speed
0x4: 120% FG speed (Unused)
0xD: 200% FG speed (Unused)
0xE: 400% FG speed (Unused)
0xF: 800% FG speed (Unused)
| |
Byte 12 |
Unknown. Does not seem to pair with or interfere with byte 11
| |
Byte 14 |
Unknown. Some values make the background disappear (0x02), some freeze the game (0x01), and some cause a crash (0xFF)
| |
Byte 16 |
Unknown
Set to 0x10 to override the parallax scrolling of backgrounds (that have parallax scrolling applied to only a select few rows) to instead scroll the entire background
Set byte 13 to 0x40 and byte 16 to 0x10 simultaneously in order to disable vertical scrolling instead
| |
20 bytes (per entrance) | 01/02 03/04 05/06 07/08 09 10 11 12 13 ?? 15 16 ?? ?? 19 20 |
|
Bytes 1-2 | X position | |
Bytes 3-4 | Y position | |
Bytes 5-6 | Camera X | |
Bytes 7-8 | Camera Y | |
Byte 9 | Entrance ID | |
Byte 10 | Destination Area | |
Byte 11 | Connected Pipe ID / Destination Level | |
Byte 12 | Destination World | |
Byte 13 | Destination Entrance | |
Byte 15 | Entrance type | |
Byte 16 | Misc settings:
- Bit 0: Bottom screen
- Bit 3: Connected pipe
- Bit 4: Fading screen transition
- Bit 7: Exit only
| |
Byte 19 | View ID (exit)
Note this parameter applies to the origin entrance, rather than the destination one
| |
Byte 20 |
Go to World Map (toggle)
| |
12 bytes (per sprite)
+ 4 bytes (end bytes)
| 01/02 03/04 05/06 07 08 09 10 11 12 FF FF FF FF |
|
Byte 1-2 | Sprite/Stage Actor ID | |
Bytes 3-4 | X position | |
Bytes 5-6 | Y position | |
Bytes 07-12 | Sprite data (ordered BB AA FF EE DD CC) | |
End bytes | "FF FF FF FF" is auto-generated at the end of the list by NSMBe (even in the absence of entries), without which the level crashes
None / FF: Crashes
FF FF / FF FF FF FF: Works as intended
FF FF FF: Glitchy camera behavior
| |
16 bytes (per view) | 01/02 03/04 05/06 07/08 09 10 11 12 13 14 15 16
| |
Bytes 1-2 | X position | |
Bytes 3-4 | Y position | |
Bytes 5-6 | Width | |
Bytes 7-8 | Height | |
Byte 9 | View ID | |
Byte 10 | Camera ID | |
Byte 11 | Music ID | |
Bytes 12, 13, 14 | Unknown
Presumably background/tileset IDs for a defunct 'per-view' asset switching feature (source)
| |
Byte 15 | 3D lighting | |
Byte 16 | Progress Path ID | |
12 bytes (per zone) | 01 02 03 04 05 06 07 08 09 ?? ?? ?? |
|
Bytes 1-2 | X position | |
Bytes 3-4 | Y position | |
Bytes 5-6 | Width | |
Bytes 7-8 | Height | |
Byte 9 | Zone ID | |
8 bytes (per path) | 01/02 03/04 05/06 ?? ?? |
|
Bytes 1-2 | Path ID | |
Bytes 3-4 | Nth path in level (starts from 0) | |
Bytes 5-6 | Total number of nodes | |
16 bytes (per node) | 01/02 03/04 05/06 07/08 09/10 11/12 13/14 15/16 |
|
Bytes 1-2 | X position | |
Bytes 3-4 | Y position | |
Bytes 5-6 | Node setting 1 | |
Bytes 7-8 | Node setting 2 | |
Bytes 9-10 | Node setting 3 | |
Bytes 11-12 | Node setting 4 | |
Bytes 13-14 | Node setting 5 | |
Bytes 15-16 | Node setting 6 | |
16 bytes | 01 02 03 04 05 06 07 08 09 10 ?? ?? ?? ?? ?? 16 | |
|