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

Karma: 16268
Posts: 1030/1031
Since: 04-02-13
Fine Firebar Speed Control
        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: 16268
Posts: 1031/1031
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.
        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
        LDR     R0, =0x20CAC7C         
        STRB    R2, [R0]

        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

Karma: 1073
Posts: 288/289
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)
I hack games, then I play them!
Pages: « 293031323334