Posted on 07-29-16, 05:17 pm (rev. 3 by  MeroMero on 07-29-16, 05:22 pm)
Death by cuteness

Karma: 6499
Posts: 499/598
Since: 05-01-13
EDIT: Nevermind, you're right, half-word code is better by a measly 2 bytes lol.
Posted on 07-29-16, 05:21 pm (rev. 2 by  skawo on 07-29-16, 05:22 pm)


Karma: 19572
Posts: 529/1100
Since: 04-02-13
Every bit counts
Posted on 07-30-16, 05:40 pm
Fire Brother


Karma: 3602
Posts: 913/1102
Since: 11-29-11
I bet that someday, Skawo and MeroMero will be able to make a rideable Yoshi in NSMB :')
Posted on 07-30-16, 05:53 pm


Karma: 19572
Posts: 533/1100
Since: 04-02-13
Podoboo graphics flip on way down:
repl_02148214_ov_30: LDRB R0,[R4,#0xD6] CMP R0,#0xFF MOVEQ R2,#0x2 MOVNE R2,#0x0 MOV R0,R4 BX LR

Allows you do insert in a real podoboo, complete with the flipping effect:
Posted on 07-30-16, 06:32 pm (rev. 1 by ImageBot on 11-21-16, 03:22 am)
Death by cuteness

Karma: 6499
Posts: 500/598
Since: 05-01-13
Posted by skawo
Podoboo graphics flip on way down



My +1's, take them, take all of them.




Posted by KingYoshi
A rideable Yoshi in NSMB

How to answer this in the most polite way possible? Hmm…
Posted by MeroMero
I want to switch focus now and put on hold NSMB for a while, and go back to Pokémon Mind Crystal to polish all the ASM Hacks I did in it.

Please understand.
Posted on 07-30-16, 06:41 pm
Fire Brother


Karma: 3602
Posts: 914/1102
Since: 11-29-11
Posted by MeroMero
Posted by MeroMero
I want to switch focus now and put on hold NSMB for a while, and go back to Pokémon Mind Crystal to polish all the ASM Hacks I did in it.

Please understand.


Oh yea, sorry, forgot about that post.
Posted on 07-30-16, 06:43 pm (rev. 5 by  skawo on 07-30-16, 08:46 pm)


Karma: 19572
Posts: 534/1100
Since: 04-02-13
There's also some documentation on the Podoboo here I might as well post:

spriteaddress + 6A = u16 X Pos spriteaddress + 6C = u16 Y Pos spriteaddress + D4 = u32 Velocity (only uses the bottom 24 bits) spriteaddress + 47A = u16 Jump height spriteaddress + 488 = u16 add to tail bit 1 ncg id spriteaddress + 48A = u16 add to tail bit 2 ncg id spriteaddress + 48C = u16 add to tail bit 3 ncg id spriteaddress + 498 = u16 add to tail bit 1 ??? spriteaddress + 49A = u16 add to tail bit 2 ??? spriteaddress + 49C = u16 add to tail bit 3 ??? spriteaddress + 4B8 = u16 Tail bit 1 NCG ID spriteaddress + 4BA = u16 Tail bit 2 NCG ID spriteaddress + 4BC = u16 Tail bit 3 NCG ID spriteaddress + 4C8 = u16 IsPodobooUnderLava spriteaddress + 4CA = u16 LavaTimer (jumps out if <=1) spriteaddress + 4CC = u16 something about drawing the tail spriteaddress + 4CE = u16 head pos wiggle offset X spriteaddress + 4D0 = u16 head pos wiggle offset Y spriteaddress + 4D6 = u8 HeadRotation (2 = upside down, 0 = regular)
Posted on 07-30-16, 06:51 pm
Fire Brother


Karma: 3602
Posts: 915/1102
Since: 11-29-11
Would you be able to make something so that you can choose the time it takes for the fireball to come out of the lava again after it went back into the level, a la NSMBWii?
Posted on 07-30-16, 06:54 pm


Karma: 19572
Posts: 535/1100
Since: 04-02-13
I can do that very easily, yeah. Want me to?
Posted on 07-30-16, 07:06 pm
Fire Brother


Karma: 3602
Posts: 916/1102
Since: 11-29-11
It would be a nice feature, yes. (Don't know if I'm the only one to think that tho ).
Posted on 07-30-16, 07:09 pm
Red Goomba


Karma: 45
Posts: 1/40
Since: 07-29-16
I want you to do it Skawo
Posted on 07-30-16, 07:21 pm (rev. 3 by  KingYoshi on 07-30-16, 07:22 pm)
Fire Brother


Karma: 3602
Posts: 917/1102
Since: 11-29-11
Posted by ConorDoesHacks
I want you to do it Skawo


Correction: "I would like you to do it."
Posted on 07-30-16, 08:31 pm (rev. 2 by  skawo on 07-30-16, 08:43 pm)


Karma: 19572
Posts: 536/1100
Since: 04-02-13
Timed Podoboos:
repl_021480D0_ov_30: STMFD SP!, {R1,LR} LDR R1, [R4, #8] LSR R1,R1,#0 AND R1, R1, #0xFF CMP R1, #0 STREQH R0,[R3,#0xCA] LDMEQFD SP!, {R1,PC} CMP R1, #1 MOVGE R0,#0x5 STREQH R0,[R3,#0xCA] LDMEQFD SP!, {R1,PC} MUL R0, R1, R0 STRH R0, [R3,#0xCA] LDMFD SP!, {R1,PC}


Uses nybbles 11 and 12 (the two last ones). If 0, it'll use the timer the game calculates (i.e a random one). If not, it'll do 5 ticks * nybble.

Posted on 07-31-16, 05:22 pm
Death by cuteness

Karma: 6499
Posts: 502/598
Since: 05-01-13
Fast Star Coins (originally from Skawo):
repl_0209DC2C_ov_00: LDRH R0, [R4, #0xC] CMP R0, #0x43 ADDEQ LR, LR, #4 @Star Coin is fully collected even if level is completed… MOV R0, #1 @… regardless of the influence of the NoFreeze patch BX LR repl_021549F4_ov_36: ADD LR, LR, #4 MOV R1, #1 STRH R1, [R0, #0x14] LDR R1, [R4, #8] AND R1, R1, #0xF00 MOV R1, R1, LSR #0x8 MOV R0, R1, LSL #1 LDR R4, =StarCoinStack LDRB R1, [R4] CMP R0, #0 MOVEQ R0, #1 ORR R0, R1, R0 STRB R0, [R4] MOV R1, #1 BX LR repl_02154A08_ov_36: STMFD SP!, {R3, R5, LR} LDR R0, [R4, #8] AND R0, R0, #0xF00 MOV R0, R0, LSR #0x8 LDR R1, =StarCoinStack LDRB R3, [R1] LDRH R5, [R2, #0x14] CMP R0, #1 BNE .StarCoin3 TST R3, #1 ADDNE R5, R5, #1 B .Return .StarCoin3: CMP R0, #2 BNE .Return TST R3, #1 ADDNE R5, R5, #1 BNE .Return TST R3, #2 ADDNE R5, R5, #1 .Return: STRH R5, [R2, #0x14] LDRH R0, [R2, #0x14] LDMFD SP!, {R3, R5, PC} repl_02154AFC_ov_36: LDR R0, [R4, #8] AND R0, R0, #0xF00 MOV R0, R0, LSR #0x8 LDR R1, =StarCoinStack LDRB R3, [R1] CMP R0, #0 BICEQ R3, R3, #1 CMP R0, #1 BICEQ R3, R3, #2 CMP R0, #2 BICEQ R3, R3, #4 STRB R3, [R1] LDR R1, =0x203C4BC STR R1, [R4, #0x3F4] BX LR .data .balign 1 StarCoinStack: .byte 0x0



But wait, now they are even faster:






And I also took into account the case where 2 or more Star Coins are collected exactly on the same frame.
Priority is: Star Coin 1 > Star Coin 2 > Star Coin 3
Posted on 07-31-16, 05:34 pm
Fire Brother


Karma: 3602
Posts: 919/1102
Since: 11-29-11
Woop woop this really has become some ASM Hacks heaven.
Posted on 07-31-16, 05:38 pm (rev. 9 by  skawo on 08-01-16, 11:11 am)


Karma: 19572
Posts: 539/1100
Since: 04-02-13
Well, the second thing's quite nice, though I don't really see that ever happening.

...but I've already done the "super fast coins" thing in the "Ghost Star Coin" patch, and it works just like you've shown. So, uh... :l

Crude Common Enemy Retexture Code:
hook_02006984_main: STMFD SP!, {R0,R1,R2,LR} LDR R1, =0x212EE94 MOV R2, #0x600 ADD R2, #0xA9 STRH R2, [R1] LDR R1, =0x212EED4 MOV R2, #0x600 ADD R2, #0x6D STRH R2, [R1] BL .AlternateGoomba BL .AlternateKoopa LDMFD SP!, {R0,R1,R2,PC} .AlternateGoomba: #Example of world-based retexture LDR R0, =0x2088BFC LDR R0,[R0] CMP R0,#0x4 #World ID LDR R1, =0x212EE94 MOVEQ R2, #0x1C #Custom NCG ID - 0x83 here STREQH R2, [R1] BX LR .AlternateKoopa: #Example of level-based retexture LDR R0, =0x2088BFC LDR R0,[R0] CMP R0,#0x5 #World ID BXNE LR LDR R0, =0x02085A9C LDR R0,[R0] CMP R0,#0x2 #Level ID BXNE LR LDREQ R1, =0x212EED4 MOVEQ R2, #0x1C #Custom NCG ID - 0x83 here STREQH R2, [R1] BX LR




Allows you to hardcode retextures of Koopa Troopas and Goombas based on the World and Level.
Posted on 07-31-16, 05:43 pm (rev. 1 by  KingYoshi on 07-31-16, 05:44 pm)
Fire Brother


Karma: 3602
Posts: 920/1102
Since: 11-29-11
Posted by MeroMero
Improved Red Coins:

(…)

Possible values:
_Nybble 4:
0: Fire Flower
1: Mini Mushroom
2: Blue Shell
3: Fire Flower
modulo 4



What's the difference between 0 and 3?

Also, I assume you'll have to set the values you want in all eight red coin-sprites?
Posted on 07-31-16, 05:52 pm (rev. 2 by  MeroMero on 07-31-16, 05:53 pm)
Death by cuteness

Karma: 6499
Posts: 503/598
Since: 05-01-13
Posted by skawo
Well, the second thing's quite nice, though I don't really see that ever happening.

...but I've already done the "super fast coins" thing in the "Ghost Star Coin" patch, and it works just like you've shown. So, uh... :l


Actually look at the timing where the Star Coin disappear, it's even earlier than in you video.
Don't scare me like that, I thought I had wasted a few hours just to do a duplicate *faints from shock*

Posted by KingYoshi
Posted by MeroMero
Improved Red Coins:

(…)

Possible values:
_Nybble 4:
0: Fire Flower
1: Mini Mushroom
2: Blue Shell
3: Fire Flower
modulo 4



What's the difference between 0 and 3?

Also, I assume you'll have to set the values you want in all eight red coin-sprites?

Values 0 and 3 are the same, no difference whatsoever.
And yes you have to put the values for all 8 red coins.
I know, it would have been more intuitive to put the value on the Red Ring, but coding-wise it was simply easier to set the value for the Red Coins instead.
Posted on 07-31-16, 05:54 pm
Fire Brother


Karma: 3602
Posts: 921/1102
Since: 11-29-11
Posted by MeroMero
Values 0 and 3 are the same, no difference whatsoever.
And yes you have to put the values for all 8 red coins.
I know, it would have been more intuitive to put the value on the Red Ring, but coding-wise it was simply easier to set the value for the Red Coins instead.


Ah okay. But what if you don't set the same value for all 8 coins? Does the game only look at the value of the last red coin you take?
Posted on 07-31-16, 05:57 pm
Death by cuteness

Karma: 6499
Posts: 504/598
Since: 05-01-13
Indeed that's what the game does, you can setup different parameters to throw in a twist.

Don't do that though, this ASM hack was not designed for that purpose.