Pages: 1
Posted on 08-30-16, 10:51 pm
Death by cuteness

Karma: 6554
Posts: 569/598
Since: 05-01-13
With this ASM Hack, not only can you use Sprite 93 regardless of the Sprite Set, but now you can also use Pipes and Signboards in front of tiles, in other words give them a higher layer priority.

Since this hack need a NSMB ROM with new files, you have to go there to download the hack:
http://nsmbhd.net/post/49237/



If you still want to get this on a already modified ROM, then you will need to patch a NSMB (U) ROM with one of the 2 patches in the archive and then extract the whole folder called yajirusi, the last one in the enemy folder.

After you've done the above, follow this tutorial to add files in your hacked ROM:
http://nsmbhd.net/thread/3253-adding-files-to-the-rom-tutorial/

Then go in the ASMTemplate folder, and open the folder bak (if it exists).
If it exists, then look for the file main.bin, and if it exists open it with an Hex editor and paste this at offset 0x19C0:


and at offset 0x39AB0 change EC 21 13 02 into 1C 20 00 02.

If either of the bak folder or the main.bin file doesn't exist, then in NSMBeditor Decompress arm9, extract it, open it with a Hex editor and do the 2 replacements at the offsets mentioned above, after you're done import back the arm9.


Again in the bak folder (assuming it exists) look for the file 0.bin, and if it exists open it with an Hex editor and at offset 0x2C9EA replace 0F 01 into 00 00.
If either of the bak folder or the 0.bin file doesn't exist, then in NSMBeditor Decompress overlay 9_0, open it with the NSMBe Hex editor and do the replacements at the offset mentioned above.


Now you can insert the 2 following ASM Hacks.


Signboard upgrade:
repl_02001D9C: MOV R1, R0, LSR #0x14 AND R1, R1, #0x1F ANDS R0, R0, #0x10000000 LDR R0, =0x105E @First file in yajirusi folder BNE .Pipes AND R1, R1, #0xF CMP R1, #0xA ADDCC R0, R1, R0 ADDCC R0, R0, #0x21 B .Return .Pipes: ADD R0, R1, R0 ADD R0, R0, #1 .Return: ADD LR, LR, #0x34 BX LR repl_02001F28: LDR R0, =PseudoStack STR R5, [R0] STR LR, [R0, #4] MOV R5, #0 .LoopModels: LDR R0, =0x105E ADD R0, R0, R5 MOV R1, #0 BL 0x2009C64 ADD R5, R5, #1 CMP R5, #0x2B BCC .LoopModels LDR R5, =PseudoStack LDR LR, [R5, #4] LDR R5, [R5] ADD LR, LR, #0x14 BX LR repl_02001D04: MOV R0, #0x800 @Small is 8x8 instead of 9x9 BX LR repl_02001D2C: MOV R0, #0x1000 @Normal is 16x16 instead of 18x18 BX LR .data .balign 4 PseudoStack: .word 0x0 .word 0x0


You will also need this Hack to prevent Actor 77 from dying upon level completion:
http://nsmbhd.net/post/51328/


The editor was optimized specifically to help level designers handle Sprite 93:

Be careful about Shift X and Shift Y, those are the values you want to use:
Normal size:

Nybble9: D => 8 pixels left

Nybble10: E => 8 pixels down



Small size:

Nybble9: 1 => 4 pixels left
Nybble9: 2 => 4 pixels right
Nybble9: 3 => 8 pixels left

Nybble10: 1 => 4 pixels down
Nybble10: 2 => 8 pixels down
Nybble10: 3 => 12 pixels down

All those specific cases will move the sprite in the Level Editor so you know what to expect.



Last but not least know that Sprite 93 has no collision, so if you want to enter the Pipes, you will have to create new objects in the Tileset 1 you're using that match the behavior of the Pipes' directions and place said objects directly behind the Pipes.
Posted on 08-30-16, 11:07 pm


Karma: 19752
Posts: 620/1100
Since: 04-02-13
A pretty smart way of implementing sprite pipes.... but, erm, couldn't you just spawn the Smashed Sprite Pipe with certain settings and use that?
Posted on 08-30-16, 11:12 pm
Death by cuteness

Karma: 6554
Posts: 570/598
Since: 05-01-13
Nope, and that's because if you leave the vicinity of Sprite 270 and go back you'll find that the Pipe will suddenly be on the same layer than tilesets, and overwrite all the tiles that find themselves in the Pipe's way.
At least that's how I remember it.
Posted on 08-30-16, 11:13 pm


Karma: 19752
Posts: 621/1100
Since: 04-02-13
Interesting.
Posted on 08-31-16, 10:58 am
Panser
I AM DERP INCARNATE

Karma: 503
Posts: 54/328
Since: 08-20-16
What's with those signboards at the bottom? I don't remember seeing the ! one and the fireball one in the original game... Did you update some of your ASM hax?
rip signature
Posted on 08-31-16, 11:30 am
Birdo


Karma: 2754
Posts: 1800/2091
Since: 06-26-11
@MeroMero
Could this be used to make "in front of Mario" ground tiles, for secret passageways and such?
Posted on 08-31-16, 12:00 pm
Panser
I AM DERP INCARNATE

Karma: 503
Posts: 56/328
Since: 08-20-16
Posted by Hiccup
@MeroMero
Could this be used to make "in front of Mario" ground tiles, for secret passageways and such?

You mean like in NSMBW and SMW2:YI?
This'd require yet ANOTHER NSMBe mod, so we can place tiles on different layers, and ASM too, because NSMB only allows 1 tile layer, unlike NSMBW which has 3
rip signature
Posted on 08-31-16, 01:00 pm (rev. 3 by Asprok on 08-31-16, 05:14 pm)
I Am Not Inteligent

Karma: 979
Posts: 193/380
Since: 03-04-14
@ MarioKart7z — He means using this ASM hack and, instead of pipes, using ordinary (3D) tiles which would be in front of Mario.

@ HiccupI haven't tried this ASM hack, but I think that scenario is not possible with this particular hack, now that I'm thinking about it. Remember that the pipes and signboards in the retail game are always behind Mario unless you use them as pipes; then when Mario goes into them, he goes behind them. I think a more appropiate hack for that would be using the directional arrows.
NUKED.
Posted on 08-31-16, 01:15 pm


Karma: 19752
Posts: 622/1100
Since: 04-02-13
Posted by Hiccup
@MeroMero
Could this be used to make "in front of Mario" ground tiles, for secret passageways and such?



Technically, you could modify it and use like that, but I think a different implementation would be better for that.
Posted on 08-31-16, 05:08 pm
Panser
I AM DERP INCARNATE

Karma: 503
Posts: 59/328
Since: 08-20-16
Also wait...
You put some signpost tiles in the jyotyu tileset, right?
It looked like it was because the signpost sprite wasn't always available.
But then you did THIS awesome piece of work.
Are the jyotyu signpost tiles utterly useless now? Can i replace them with other custom crap?
rip signature
Posted on 08-31-16, 05:15 pm
I Am Not Inteligent

Karma: 979
Posts: 198/380
Since: 03-04-14
You always could.
Posted on 10-12-19, 09:07 pm
Fire Brother
Eugene

Karma: 3646
Posts: 1028/1120
Since: 11-29-11
Sorry for the bump, but does anyone know what the hex code at the beginning of the thread exactly does?
Pages: 1