Pages: 1
Posted on 06-02-13, 12:15 am (rev. 10 by  Arisotura on 06-02-13, 10:46 pm)
☭ coffee and cream


Karma: 10415
Posts: 959/2768
Since: 06-26-11
Apparently we lack a proper documentation for those. NSMBe's code isn't a great help there. Those were documented in old posts at Jul, but I don't feel like digging into the old threads to find them back. So I'll post my findings here.


Unused level #3 shows an interesting difference from other levels in the game: in its header, blocks 3 and 4 as twice as big as usual. The data in block 1 also exhibits a few oddities. We'll cover them a bit further in this post.

Unused level #3 is the one with the two large overworld areas and that weird little room inbetween them.

The room uses objects from tileset 2. If you copypaste that room into a level that uses a cave tileset, and change the objects to use tileset 1, it should give a perfect room.

The room was likely supposed to be using a cave tileset. And with that, a cave background. Explaining why the header's blocks 3 and 4 are bigger-- they contain data for two backgrounds and two tilesets.

Block 5 however only contains one entry. Supposedly the cave room wasn't supposed to have two backgrounds...


This feature could be interesting in NSMB hacks-- imagine being able to design subrooms with different tilesets all in the same level. No more bothering with restrictions imposed by the number of areas originally present (as long as both rooms can use the same sprite sets).

Except it seems to be broken. That unused level has garbled backgrounds ingame. And I don't know how the cave room's tileset would be handled as tileset 2 is used for the end-of-level castle.

I tried messing around with that feature, but couldn't get much interesting results so far.

First, a look at how the blocks are laid out:


Block 1
AAAA BBBB CCCC DDDD EEEE FFFF GGGG HHHH IIII JJJJ KKKK LLLL MMMM NNNN OOOO PPPP AAAA: ??? BBBB: ??? CCCC: time limit DDDD: bottom BG #1 tileset ID EEEE: presumably bottom BG #2 tileset ID FFFF: presumably bottom BG #3 tileset ID GGGG: FG #1 tileset ID (FG == 'tileset') HHHH: presumably FG #2 tileset ID IIII: presumably FG #3 tileset ID JJJJ: top BG #1 tileset ID KKKK: presumably top BG #2 tileset ID LLLL: presumably top BG #3 tileset ID MMMM: ??? NNNN: ??? OOOO: ??? PPPP: ???


Blocks 3 (bottom BG), 4 (FG), 5 (top BG)
AAAA BBBB CCCC DDDD EEEE FFFF GGGG HHHH IIII JJJJ AAAA: seems to be block ID? doesn't have much effect BBBB: tilemap ID CCCC: palette ID DDDD: ??? 0xFFFF except sometimes for block 4 EEEE: ??? 0xFFFF FFFF: X scroll param (0xFFFF for block 4) GGGG: Y scroll param (0xFFFF for block 4) HHHH: ??? IIII: ??? JJJJ: ???


Block 8 (views -- doc from NSMBe)
AAAA BBBB CCCC DDDD EE FF GG HH II JJ KK LL (AAAA BBBB CCCC DDDD FFEE HHGG JJII LLKK in full 16bit) AAAA: view X BBBB: view Y CCCC: view width DDDD: view height EE: number(?) FF: camera ID GG: music ID HH: unk1 -- presumably bottom BG block ID II: unk2 -- presumably FG block ID JJ: unk3 -- presumably top BG block ID KK: lighting LL: flagpole ID



The multibackground feature is glitched in that it always selects the background's tilemap ID from the last background block. Otherwise it seems to be selecting the other IDs from the right sources... to be confirmed.

Edit- bottom BG doesn't load if the view's bottom BG block ID is set to anything other than zero.
FG seems to always load from block 0 no matter what.
Top BG is broken the same way as bottom BG.

The tilemap ID of the view's top BG block is used to determine the color of the [?] blocks and such. This appears to be the only part of the feature that works correctly.


Edit-
The multiple BG feature is pretty much broken beyond repair. Or rather, only half of it is implemented. When switching between views, the game doesn't reload the graphics, except the jyotyu palette. Furthermore, the code that loads the palettes and tilesets always loads from the first BG/FG block, and the code that loads the tilemaps attempts to load all the blocks' tilemaps at the same place in VRAM.

Getting this beta remain to work would be too much work I guess.

Instead I'll keep this thread as a documentation for the NSMB level stuff that isn't very well documented.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Pages: 1