Pages: 1
Posted on 07-14-16, 08:16 pm (rev. 2 by  MeroMero on 07-16-16, 04:42 pm)
Death by cuteness

Karma: 6414
Posts: 466/598
Since: 05-01-13
Are you always fearing that you might be short of slots for tilesets, or backgrounds?
Have you ever wanted to be able to have quicksand no matter the tileset?
Then you knocked at the right door! Here comes my NSMB masterpiece!

Download on this post to centralize all the updates in one post should the link be updated again!

Apply the NSMB (U) Tileset.xdelta to get all the latest improvements made to the game!


You probably won't need it anyways, but for good measure here is the ASM Hack that allows me to do this:

Dedicated Tilesets and Backgrounds per Area, NSMB U Style:
repl_020AF9C4_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder LDMFD SP!, {PC} repl_020BD088_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #1 LDMFD SP!, {PC} repl_020B84EC_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder2 ADD R2, R0, #2 LDR R0, =0x7A5 LDMFD SP!, {PC} repl_020B8518_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder2 ADD R0, R0, #2 LDMFD SP!, {PC} repl_020BCFF4_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #3 LDMFD SP!, {PC} repl_020BCC78_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #4 LDMFD SP!, {PC} repl_020BCD4C_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #5 LDMFD SP!, {PC} repl_020BCCE8_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #6 LDMFD SP!, {PC} repl_020BC904_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder2 ADD R8, R0, #7 LDMFD SP!, {PC} repl_020BCA50_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder2 ADD R8, R0, #8 LDMFD SP!, {PC} repl_020BB9B0_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #9 LDMFD SP!, {PC} repl_020B3A60_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder2 ADD R0, R0, #0xA LDMFD SP!, {PC} repl_020B3A3C_ov_00: STMFD SP!, {LR} BL .VisualCourseFolder ADD R0, R0, #0xB LDMFD SP!, {PC} .VisualCourseFolder: STMFD SP!, {LR} LDR R1, =0x2085A94 LDRH R1, [R1] MOV R0, #0xC MUL R1, R0, R1 LDR R0, =0x7A6 ADD R0, R0, R1 LDR R1, =0x7A5 LDMFD SP!, {PC} .VisualCourseFolder2: STMFD SP!, {R1, LR} LDR R1, =0x2085A94 LDRH R1, [R1] MOV R0, #0xC MUL R1, R0, R1 LDR R0, =0x7A6 ADD R0, R0, R1 LDMFD SP!, {R1, PC}


What does this do concretely?
Basically you'll be able to have 1 tileset, foreground and background per Area.
There are 12 files per Area, times 185 for a total of 2220 files!
Those are the 12 files for each Area:
  • xxx_chk
  • xxx_BG_ncg
  • xxx_TEN_ncg
  • xxx_tikei_ncg
  • xxx_back_ncl
  • xxx_free_ncl
  • xxx_tikei_ncl
  • xxx_back_nsc
  • xxx_free_nsc
  • xxx_pnl
  • xxx_unt
  • xxx_unt_hd

xxx being the Area Number beginning with 001.



This is not much but I made the extra effort to port all the original Tileset/BGs used in each of the 185 Areas so that you can still play the base game.
Also this Hack uses and abuses the Tile-Share method, in fact the BG .ncg is the same for both FG and BG!
All in all this means you can let your creativity explode, since you're not confined anymore by restrictions.



Does this means that those 3 parameters are now useless?

NO! All 3 of them are still useful:
The Tileset allows you to load the textures (or Conveyor Belts) for Tileset Numbers who allows them.
The Foreground allows you to load the extra animations (TEN).
The Background allows you to choose the Jyotyu palette, as well as whether or not you want to load the Boss music on Level Start.
FG/BG animations are still tied to the FG/BG Slot Number!


On a side note:
This will finally allow me to properly answer this:
Posted by skawo
That's interesting, but it doesn't seem to happen in the US version? I didn't leave my first added file empty and it's quite happily loading.

LDR R1, =0x7A5

See this thing right there, which is present several times in the original code, is the reason file ID 2088 must be a dummy.
Posted on 07-14-16, 08:18 pm


Karma: 19277
Posts: 438/1090
Since: 04-02-13
See this thing right there, which is present several times in the original code, is the reason file ID 2088 must be a dummy.



Even in the US version? Huh. It seems to work, though.
moves files in Newer DS
Posted on 07-14-16, 08:21 pm
Death by cuteness

Karma: 6414
Posts: 467/598
Since: 05-01-13
The check might be done only for things like BG or the likes, I don't think that check is for every file in NSMB.
Posted on 07-14-16, 08:22 pm (rev. 2 by  skawo on 07-14-16, 08:26 pm)


Karma: 19277
Posts: 439/1090
Since: 04-02-13
I can't say I really understand that "check" though. All that line does is put the file ID in R1, what does it do with it, though?

EDIT: Either way, this is immensely cool stuff.
Posted on 07-14-16, 08:27 pm (rev. 1 by  MeroMero on 07-14-16, 08:28 pm)
Death by cuteness

Karma: 6414
Posts: 468/598
Since: 05-01-13
It's not seen there in my mod but afterwards the game compares the file ID you want to load with 0x7A5.
And if both numbers match, you'll get greeted with a black screen instead of having your level load.
But for whatever reason instead of doing a BGE or BCS, Nintendo instead choose to do a BEQ, which mean you can bypass the check easily.

And Thanks!
Posted on 07-14-16, 08:32 pm (rev. 2 by  skawo on 07-14-16, 08:39 pm)


Karma: 19277
Posts: 440/1090
Since: 04-02-13
...Well. Considering I load 2088 using my own custom code, I suppose I see why that check doesn't affect me now.

And yeah. Quite a fail, that. Not that it would be too hard to patch out, all you have to do is search for that ID in IDA and change in each instance.
Posted on 07-15-16, 02:10 pm
☭ coffee and cream


Karma: 10332
Posts: 1961/2763
Since: 06-26-11
an idea to avoid file bloat would be:

a) try loading the level/area specific graphics files
b) if they don't exist, load the regular ones


I also wonder how you handle switching graphics when switching areas. IIRC NSMBDS has that sort of feature but it's broken and doesn't reload graphics.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 07-15-16, 02:19 pm (rev. 3 by  skawo on 07-15-16, 02:21 pm)


Karma: 19277
Posts: 441/1090
Since: 04-02-13
Posted by StapleButter
an idea to avoid file bloat would be:

a) try loading the level/area specific graphics files
b) if they don't exist, load the regular ones


I also wonder how you handle switching graphics when switching areas. IIRC NSMBDS has that sort of feature but it's broken and doesn't reload graphics.


You're thinking of Zones, there. The ability to switch graphics between areas has always been there; this doesn't give you the ability to have more graphics in individual stages, it just gives you the ability to have more tilesets/bgs/anims overall.
Posted on 07-15-16, 02:50 pm (rev. 1 by  Hiccup on 07-15-16, 04:48 pm)
Birdo


Karma: 2612
Posts: 1650/2070
Since: 06-26-11
Ah, so this gives you more tilesets/bgs/fgs, but it is determined via filenames rather than level header params.

Going a bit off topic, but I could swear that the a/the "different tileset in different zone" feature is used in 3-A's mini mario room. I can't check right now though. EDIT: Nope, it was just a memory of an assumption I made a long time ago because the editor didn't display the graphics right in an old version.
Posted on 07-15-16, 04:22 pm
☭ coffee and cream


Karma: 10332
Posts: 1962/2763
Since: 06-26-11
oh right, I was mixed up. blarg
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 08-02-16, 02:49 pm
Hammer Brother


Karma: 3494
Posts: 928/1066
Since: 11-29-11
Can you use this in combination with the Different-Graphics-Per-View hack, actually?
Posted on 08-02-16, 02:58 pm
Death by cuteness

Karma: 6414
Posts: 513/598
Since: 05-01-13
Posted by MeroMero
Q: Can you run this ASM Hack alongside the Dedicated graphics per Area Hack?
A: Yes you can, but keep in mind that only Sound Sets and Actor Sets will truly have an effect since the Tileset, FG and BG will get superseded anyways by the Dedicated graphics code!


Search function you said  KingYoshi, search function
Posted on 08-02-16, 03:13 pm (rev. 6 by  KingYoshi on 08-02-16, 05:52 pm)
Hammer Brother


Karma: 3494
Posts: 929/1066
Since: 11-29-11
Sorry, sorry



EDIT:
Posted by MeroMero
Q: Can you run this ASM Hack alongside the Dedicated graphics per Area Hack?


You mean View, not Area, right?



EDIT2:
I actually don't get your answer in that quote either.

What will happen when using both ASM Hacks? This thread's ASM Hack makes that every area has its own background and tileset. Can I when using both ASM Hacks still use different backgrounds and tilesets in different Views in from different Areas in the same Area?
Posted on 08-02-16, 06:03 pm
Death by cuteness

Karma: 6414
Posts: 516/598
Since: 05-01-13
Posted by KingYoshi
You mean View, not Area, right?

Dedicated graphics per Area => this thread
Custom graphics per View => the other one

Posted by KingYoshi
I actually don't get your answer in that quote either.

What will happen when using both ASM Hacks? This thread's ASM Hack makes that every area has its own background and tileset. Can I when using both ASM Hacks still use different backgrounds and tilesets in different Views in from different Areas in the same Area?

You can't, that's the current limitation.

The only additional thing you gain by combining both hacks would be the ability to customize Sound Set and Actor Set per View.
But even then with 185 graphics, if you still need to use 2 Views with different graphics within a same Area, you're doing it wrong.
Posted on 08-02-16, 06:33 pm (rev. 1 by  KingYoshi on 08-02-16, 06:36 pm)
Hammer Brother


Karma: 3494
Posts: 930/1066
Since: 11-29-11
Posted by MeroMero
But even then with 185 graphics, if you still need to use 2 Views with different graphics within a same Area, you're doing it wrong.


Well, the thing is, many levels only use one Area.
Posted on 08-02-16, 07:18 pm (rev. 2 by  MeroMero on 08-02-16, 07:20 pm)
Death by cuteness

Karma: 6414
Posts: 517/598
Since: 05-01-13
The 2 codes could theoretically be combined into 1, from then some function could be coded to read the modified Level Header Blocks to use 1 of the original 76 graphics groups as fallbacks for whichever View you want to use them.

That thought is now going to be locked into the "forbidden knowledge" corner of my brain and won't be touched upon for a while; in other words I don't even want to start.
Posted on 08-02-16, 09:29 pm
Hammer Brother


Karma: 3494
Posts: 931/1066
Since: 11-29-11
Ah okay.

Well, an alternative for this could be the Area Overflow thingie that probably still works with this hack.
Pages: 1