Posted on 10-07-17, 02:47 pm (rev. 1 by  skawo on 10-07-17, 02:47 pm)


Karma: 19807
Posts: 1030/1100
Since: 04-02-13
Fine Firebar Speed Control
repl_0213ED20_ov_18:
        CMP     R0, #0
        MOVEQ   R2, #0xC0
        MOVNE   R2, #0x100
        LDR     R0, [R4, #8]
        LSR     R0, R0, #20
        CMP     R0, #0
        MOVNE   R2, R0
        ADD     R0, R4, #0x1C00
        LDRH    R1, [R0,#0xC0]
        B       0x213ED34


If Nybbles 5-7 are free, firebars behave like original game. Otherwise, the firebar uses speed defined in those nybbles. Original game uses "0x100" for fast and "0xC0" for slow. You can, with this, use 0x1 (practically stationary) - 0xFFF (hell on land)
Posted on 10-08-17, 02:49 pm (rev. 6 by  skawo on 10-08-17, 03:09 pm)


Karma: 19807
Posts: 1031/1100
Since: 04-02-13
Mess with animations hardcoded to tileset ID
repl_020BCE4C_ov_00:                    @ R1 = Tileset ID
        LDR     R2, =0x208B168          @ Pointer to block 1
        LDR     R2, [R2]
        LDRH    R0, [R2,#6]             @ Get Top BG ID
        LDRH    R2, [R2,#18]            @ Get Bottom BG ID
        CMP     R0, #7                         
        BNE     .TryForSlot31
        CMP     R2, #7
        BNE     .TryForSlot31
        MOV     R2, #1
        BEQ     .TurnOn                 @ If both BG IDs = 7, turn on lava waterfall animations.
       
.TryForSlot31:
        CMP     R0, #31        
        BNE     .NotLava
        CMP     R2, #31        
        BNE     .NotLava
        MOV     R2, #1
        BEQ     .TurnOn                 @ If both BG IDs = 31, turn on lava waterfall animations.
       
.NotLava:                               @ Well, the BG IDs don't match, but let's check if we can enable snow animations.
        CMP     R1, #3                  @ For tileset ID 3...
        MOVEQ   R2, #2
        BEQ     .TurnOn
        BNE     .Exit

        CMP     R1, #17                 @ And for tileset ID 17.
        MOVEQ   R2, #2
        BEQ     .TurnOn
        B       .Exit
       
.TurnOn:
        LDR     R0, =0x20CAC7C         
        STRB    R2, [R0]

.Exit:
        B       0x20BCE84               @ Exit.


Sometimes I wish Nintendo fucking dead.

The above code restores the functionality of the original game, except that it turns on the lava waterfall animations based on the BG slot ID, and not the tileset ID.

Adjust/remove code to suit your animation needs.
Posted on 10-21-17, 04:20 am
Nipper Plant


Karma: 2416
Posts: 288/417
Since: 08-17-15
Infinite Lives

#include "nsmb.h"

void hook_020CF108_ov_08()
{
        u32 *lives = (u32*) (0x0208B364); //Pointer to lives
        *lives = 99; //Variable 'lives' is always set to 99
}


This hack sets the life counter to 99 all the time, making 1-UPs pointless. (Something that's in Odyssey)
Posted on 11-04-17, 01:33 am (rev. 2 by  skawo on 11-04-17, 01:35 am)


Karma: 19807
Posts: 1032/1100
Since: 04-02-13
Load Boot Screen From Filesystem
nsub_020CCC44_ov_01:
        LDR     R0, =TopNCGFilename
        LDR     R2, =5792                                               @ Size of uncompressed NCG
        BL      loadFileByName_Dest_WithMax
        LDR     R0, =512                                                @ Size of uncompressed NCL
        BL      allocFromGameHeap      
        LDR     R1, =NCLPointer
        STR     R0, [R1]
        MOV     R1, R0
        LDR     R0, =TopNCLFilename
        LDR     R2, =512                                                @ Size of uncompressed NCL
        BL      loadFileByName_Dest_WithMax    
        LDR     R4, =NCLPointer
        LDR     R0, [R4]
        BL      freeToGameHeap
        LDR     R0, [R4]
        B       0x20CCC50
       
nsub_020CCC64_ov_01:
        LDR     R0, =TopNSCFilename
        LDR     R2, =2048                                               @ Size of uncompressed NSC
        BL      loadFileByName_Dest_WithMax
        B       0x20CCC6C
       
.data
.balign 4
TopNCGFilename:
        .asciz "/obj/A_text_mariostart_ncg.bin"                         @ Example file names; don't use these.
.balign 4
TopNCLFilename:
        .asciz "/obj/I_enemy_ncl.bin"
.balign 4
TopNSCFilename:
        .asciz "/obj/I_enemy_R_ncl.bin"
.balign 4
NCLPointer:
        .word 0x0


The necessary files for this are in Overlay 1.
NCG is at 0xE64, 0x5EF long,
NCL is at 0x1454, 0x200 long, uncompressed,
NSC is at 0x1654, 0x1F0 long.

Decompress the NCG and NCL once you import them into the filesystem. The file path cannot contain spaces.
Posted on 12-18-17, 05:54 pm (rev. 1 by  dreamydude on 12-18-17, 06:03 pm)
Goomba
permanently banned: reregistering while banned

Karma: -52
Posts: 19/24
Since: 10-18-17
editor version r356? i can only find b356
and i dont seem to be able to decompress the overlay in this editor

_________________________
anyways, keep doin' what youre doing
Posted on 12-18-17, 10:47 pm
Giant Red Paratroopa
Not Edible

Karma: 3386
Posts: 480/1447
Since: 02-12-16
Use the (unoficial) b380 version instead. It's by far the best version of the editor yet and can decompress overlays. Link: http://nsmbhd.net/file/d86fa4d5bfb663c65bde/nsmb-editor-380b.zip
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 01-14-18, 06:36 am
Nipper Plant


Karma: 2416
Posts: 327/417
Since: 08-17-15
Disable Item Spawning in MvsL
repl_020203B0:
BX      LR


This small hack disables spawning items in MvsL, when 8 coins are collected.
Posted on 01-14-18, 06:38 am
Red Paratroopa
Someone who speaks Portuguese

Karma: 536
Posts: 126/168
Since: 11-02-16
thanks that will be very usefull
Posted on 01-14-18, 06:16 pm (rev. 1 by RicBent on 01-14-18, 11:07 pm)
Mariomaster

Karma: 8573
Posts: 1087/1681
Since: 06-09-12

Always play as Luigi (Patch Template version):

nsub_020D299C_ov_09:
    MOVNE   R1, #1
    STRNEB  R1, [R0]
    B       0x020D29A8

nsub_020D2A78_ov_09:
    MOVNE   R1, #1
    STRNEB  R1, [R0]
    B       0x020D2A84

_________________________
GitHub - Kuribo64 - YouTube
Posted on 01-27-18, 09:02 am (rev. 1 by newluigidev on 01-27-18, 09:17 am)
Nipper Plant


Karma: 2416
Posts: 330/417
Since: 08-17-15
Change Starman Duration
Download: https://nsmbhd.net/get.php?id=9vqA1VdapNF1N38F

Code:

#include "ndstypes.h"

bool longerStar = false;

u32 hook_020FD1D4()
{
        u32* StarTimer = (u32*)0x0208B350;

        if (*StarTimer == 0)
        {
                longerStar = false;
        }

        if (*StarTimer == 0x258 && longerStar == false)
        {
                longerStar = true;
                *StarTimer = 0x3C0; //Change this value to change the Starman's duration (Currently set to the lenght of Super Mario World's starman duration, or 16 seconds).
        }

        if (*StarTimer == 0x258 && longerStar == true)
        {
                return *StarTimer;
        }
}
Posted on 01-27-18, 11:11 am
Birdo


Karma: 2789
Posts: 2026/2091
Since: 06-26-11
What is the default value?
Posted on 01-27-18, 07:27 pm (rev. 1 by newluigidev on 01-27-18, 07:28 pm)
Nipper Plant


Karma: 2416
Posts: 331/417
Since: 08-17-15
Default is 0x258
Posted on 01-28-18, 08:34 pm (rev. 1 by newluigidev on 01-30-18, 08:00 pm)
Nipper Plant


Karma: 2416
Posts: 332/417
Since: 08-17-15
Auto-Run

Use this nsmb.h: https://nsmbhd.net/get.php?id=udc73BCXlMYd9CJg

Code:

#include "nsmb.h"

void hook_0211F840()
{
        MarioActor* mario = (MarioActor*)getPtrToPlayerActor();
        mario->xVelocity = 0x2000; //Change this value to change how fast Mario/Luigi run.
}


Video:



Makes Mario/Luigi continuously keep walking through-out the entire level, like in Super Mario Run.
Posted on 01-28-18, 11:03 pm (rev. 1 by RicBent on 01-29-18, 12:37 am)
Mariomaster

Karma: 8573
Posts: 1103/1681
Since: 06-09-12
Blocking Left/Right DPad inputs might be a good idea tho.

You can also make this a hack a little more optimized by making MarioActor parameter 1 of the hook as MarioActor::Move is a member of MarioActor.

#include "nsmb.h"

// void MarioActor::Move(void) Hook
void hook_0211F83C(MarioActor* player)
{
        player->xVelocity = 0xBAD1DEA;
}

_________________________
GitHub - Kuribo64 - YouTube
Posted on 02-03-18, 03:08 am (rev. 1 by newluigidev on 02-03-18, 03:08 am)
Nipper Plant


Karma: 2416
Posts: 334/417
Since: 08-17-15
Disable Timer
repl_020A2768:
BX      LR


Disables the timer from decreasing, allowing for infinite time.
Posted on 02-03-18, 07:13 pm
Super Koopa
That MvL Hacker

Karma: 1701
Posts: 578/833
Since: 04-11-15
IIRC you can have infinite time if you set the timer to 0. Or maybe I’m thinking of something else
_________________________
Here's my MvL Hacking thread

Consider joining the NSMB DS Hacking Discord Server! Also, be sure to check out the new wiki!

#HakingNoMore
Posted on 02-03-18, 08:30 pm
Giant Red Paratroopa
Not Edible

Karma: 3386
Posts: 558/1447
Since: 02-12-16
yes. if you set time to 0 you get instant time's up. I tried in the past.
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 03-12-18, 11:00 pm


Karma: 19807
Posts: 1069/1100
Since: 04-02-13
Access the unused Minigame Debug Menu

nsub_0204C9AC_main:
LDR R8, =0x151
CMP R0, R8
LDREQ   R0, =329
MOV  R7, R0
B 0x204C9B0


Go into any minigame to do so.
Posted on 04-01-18, 02:03 pm (rev. 1 by  skawo on 04-01-18, 02:03 pm)


Karma: 19807
Posts: 1072/1100
Since: 04-02-13
Expand Warp Entrance to 255 areas:

repl_02156014_ov_36:
AND     R0, R0, #0xFF
LDR     R2, =#0x424
STRH    R0, [R4, R2]
BX      LR

repl_02156084_ov_36:
BX      LR

repl_021564D4_ov_36:
LDR     R1, =#0x424
LDRH    R1, [R5, R1]
BX      LR

repl_02156514_ov_36:
LDR     R0, =#0x424
LDRH    R0, [R5, R0]
BX      LR

repl_0215663C_ov_36:
LDR     R0, =#0x426
BX      LR


Replaces the glitchy "Disable Sound" nybble as multiplier. Basically, entrance = (Disable Sound Nybble) * 16 * (Warp Area Nybble)
Posted on 07-10-18, 02:14 pm (rev. 1 by  Shadey on 07-10-18, 04:24 pm)
Flurry


Karma: 724
Posts: 247/258
Since: 10-14-11
Small request here.

I'm looking to force the game to always load one entrance type (the default entrance). It would be handy to use for some hacks but mainly MvsL hacks, as it is hardcoded to always use the pipe entrance.