Posted on 09-13-16, 08:27 pm
Nipper Plant


Karma: 2396
Posts: 164/417
Since: 08-17-15


An off-topic post.
Posted on 09-14-16, 12:20 pm (rev. 1 by ImageBot on 11-21-16, 03:24 am)
Panser
I AM DERP INCARNATE

Karma: 498
Posts: 122/328
Since: 08-20-16
LOL, apparently the 8-6 bug affects the junglekusa too!
(And no, it isn't a problem with the file, 'cause i did the same thing in 8-8 and it worked perfectly.)
rip signature
Posted on 09-14-16, 01:09 pm (rev. 1 by  skawo on 09-14-16, 01:09 pm)


Karma: 19572
Posts: 682/1100
Since: 04-02-13

So, I take it my fixed code worked?
Posted on 09-14-16, 01:12 pm
Panser
I AM DERP INCARNATE

Karma: 498
Posts: 123/328
Since: 08-20-16
Posted by skawo

So, I take it my fixed code worked?

Yyyyup.
Posted by MeroMero

Try to play Level 8-6 and you'll see that when you get out of the chimney, the volcanic clouds (or any other animated background that would be there instead for that matter) are not animated.
To fix this:
_decompress overlay 0;
_go to offset 0×3C94E (US) or 0×2C2F6 (EU);
_change 02 02 into 03 01.

What you have to keep in mind is that:
_if you want to go to Area 2 from Area 1, you'll have to put 4 as the Area number.
_if you want to go to Area 1 from Area 2, you'll have to put 3 as the Area number.

*ahem ahem*
Overlay 0 only goes up to 31B90. Did you get your overlays mixed up?
rip signature
Posted on 09-14-16, 02:07 pm (rev. 2 by  MeroMero on 09-14-16, 06:53 pm)
Death by cuteness

Karma: 6499
Posts: 582/598
Since: 05-01-13
Water, Lava and Poison Water fix for ASM-Template:
Shift up Y-position on start:
Horizontal scrolling added for Junglekusa:

repl_021657A4_ov_36: CMP R7, #0x118 LDREQ R12, [R5, #0x60] STREQ R12, [R5, #0x444] LDR R12, [R2] BX LR repl_02165888_ov_36: CMP R7, #0x118 MOVNE R0, R0, LSL #8 BXNE LR ANDS R1, R0, #0x8000 EORNE R0, R0, #0x8000 RSBNE R0, R0, #0 BX LR nsub_0216479C_ov_36: STMFD SP!, {R1} LDRH R1, [R0, #0xC] CMP R1, #0x118 BEQ .Return ANDS R4, R4, #0x2000 MOVEQ R1, #0 STREQ R1, [R0, #0x444] .Return: ANDS R4, R4, #0x2000 LDMFD SP!, {R1} B 0x21647A0 nsub_02164810_ov_36: STRLT R2, [R0, #0x60] LDRH R4, [R0, #0xC] CMP R4, #0x118 STREQ R5, [R0, #0x60] B 0x2164814 nsub_02164934_ov_36: LDRH R1, [R5, #0xC] CMP R1, #0x118 BEQ 0x2164940 CMP R0, #0 B 0x2164938 nsub_0216494C_ov_36: LDRH R4, [R5, #0xC] CMP R4, #0x118 LDREQ R2, [R5, #0x458] SUBNE R1, R1, R3 ADD R1, R2, R1 STREQ R1, [R5, #0x45C] STRNE R1, [R0, #0xC74] B 0x2164958 nsub_0216511C_ov_36: LDRH R1, [R0, #0xC] CMP R1, #0x118 LDREQ R3, [R0, #0x60] LDREQ R2, [R0, #0x45C] ADDEQ R2, R3, R2 STREQ R2, [R0, #0x444] LDR R3, [R0, #0x64] B 0x2165120 @Water, Lava and Poison Water fix when going down: repl_02165024_ov_36: LDR R0, [R4, #8] ANDS R0, R0, #0x80 @Check Liquid direction ADDEQ R1, R1, R2 @If up add R2 to get final position SUBNE R1, R1, R2 @If down subtract R2 to get final position MOV R0, #0x1000 ADD LR, LR, #4 BX LR @Shift up Liquid vertical position on start: repl_02165798_ov_36: MOV R6, R4, LSL #8 MOV R6, R6, LSR #0x1D @Keep only the 3 first bits of nybble 7 MOV R6, R6, LSL #0xD @Multiply by 8192 ADD R12, R12, R6 @Add to Sprite position to get the final vertical position on start STR R12, [R5, #0x64] LDR R6, =0x20CAE0C BX LR

Affects nybbles 9 and 10:
X-Speed:
_from 0 (0x00) to 127 (0x7F)
X-Scrolling:
_leave X-Speed as-is to make Junglekusa scroll to the left (default)
_add +128 (+0x80) to X-Speed to make Junglekusa scroll to the Right

As you can see nybbles 9 and 10 mimic nybbles 11 and 12 (save for the axis).

As for the Y-position on start:
nybbles 7-8 for all 4 Actors:
_leave those nybbles as-is to leave the Y-position on start as-is (default)
_add 32 (0x20) to those nybbles to increase the Y-position on start up to 1/8 block
_add 64 (0x40) to those nybbles to increase the Y-position on start up to 1/4 block
_add 96 (0x60) to those nybbles to increase the Y-position on start up to 3/8 block
_add 128 (0x80) to those nybbles to increase the Y-position on start up to 1/2 block
_add 160 (0xA0) to those nybbles to increase the Y-position on start up to 5/8 block
_add 192 (0xC0) to those nybbles to increase the Y-position on start up to 3/4 block
_add 224 (0xE0) to those nybbles to increase the Y-position on start up to 7/8 block


Works on a NDS.

Posted by MarioKart7z
Overlay 0

I meant arm9, I edited the post.
Posted on 09-14-16, 02:10 pm (rev. 1 by  skawo on 09-14-16, 02:10 pm)


Karma: 19572
Posts: 683/1100
Since: 04-02-13
...You really shouldn't be using the bit notation until everything switches to it.
Posted on 09-14-16, 02:25 pm (rev. 2 by ImageBot on 11-21-16, 03:24 am)
Panser
I AM DERP INCARNATE

Karma: 498
Posts: 124/328
Since: 08-20-16
Posted by MeroMero
Affects nybbles 9 and 10

BUT WHAT ABOUT THE RETEXTURE CODE????????????????

EDIT:

Is this intended? Why did i end up in the 8-5 area 2 instead of the correct one?
rip signature
Posted on 09-14-16, 02:40 pm


Karma: 19572
Posts: 684/1100
Since: 04-02-13
*sighs*
There, I moved the retexture code to use Nybble 8. Simply change LSR R0, R0, #8 to LSR R0, R0, #0x10
Posted on 09-14-16, 02:41 pm
Death by cuteness

Karma: 6499
Posts: 583/598
Since: 05-01-13
Posted by MeroMero
What you have to keep in mind is that:
_if you want to go to Area 2 from Area 1, you'll have to put 4 as the Area number.
_if you want to go to Area 1 from Area 2, you'll have to put 3 as the Area number.

This is because the 2 bytes mentioned earlier are actually the number of areas for Levels 8-5 and 8-6 respectively.
Once you change those 2 numbers, what happens is that the game expects to load the only Area of Level 8-6 from area number 164 (163 in US), but is still loaded from Area 163 (162 in US) due to that information staying as-is in overlay 8, thus the Area count begins from Area 1 Level 8-5 rather than Area 1 Level 8-6.
Posted on 09-14-16, 02:56 pm (rev. 1 by  MarioKart7z on 09-14-16, 03:42 pm)
Panser
I AM DERP INCARNATE

Karma: 498
Posts: 125/328
Since: 08-20-16
Posted by MeroMero
Posted by MeroMero
What you have to keep in mind is that:
_if you want to go to Area 2 from Area 1, you'll have to put 4 as the Area number.
_if you want to go to Area 1 from Area 2, you'll have to put 3 as the Area number.

This is because the 2 bytes mentioned earlier are actually the number of areas for Levels 8-5 and 8-6 respectively.
Once you change those 2 numbers, what happens is that the game expects to load the only Area of Level 8-6 from area number 164 (163 in US), but is still loaded from Area 163 (162 in US) due to that information staying as-is in overlay 8, thus the Area count begins from Area 1 Level 8-5 rather than Area 1 Level 8-6.

Whoops, i read it wrong XD
EDIT: Changed the 03 01 to 04 01, still end up in 8-5. Tried to change the destination area on the warp sprite but it just resets the values to 02 02.
rip signature
Posted on 09-14-16, 04:51 pm
Death by cuteness

Karma: 6499
Posts: 584/598
Since: 05-01-13

Destination Area = What I meant by Area Number.

Also about to values being reset to 02 02, this is because you ASM Patched something after modifying the arm9.
What you should do is look in the ASM-Template folder for a sub-folder named bak, and then open the file named main.bin (which is actually arm9.bin) in a Hex Editor and change 02 02 into 03 01 at offset 0x3C94E.
Posted on 09-14-16, 06:32 pm (rev. 1 by  skawo on 09-14-16, 06:32 pm)


Karma: 19572
Posts: 685/1100
Since: 04-02-13
Soft Cloud Platform Retexture Code:
nsub_021729D4_ov_3C: STMFD SP!, {LR} SUB SP, SP, #4 @ Copy from here LDR R0, =0x544 @ File ID - 0x83 MOV R1, #0 BL loadFileByExtId_3dModel @ to here and paste before the next line to add more models MOV R0, #1 ADD SP, SP, #4 LDMFD SP!, {PC} repl_021729AC_ov_3C: LDR R0, [R5, #8] MOV R0, R0, LSR #8 AND R0, R0, #0xF @ Copy from here CMP R0, #0 LDREQ R0, =0x544 @ to here, paste after this line and change the value in the CMP to add more settings BX LR repl_021730D8_ov_3C: LDR R0, [R6, #8] MOV R0, R0, LSR #8 AND R0, R0, #0xF @ Copy from here CMP R0, #0 LDREQ R0, [SP,#0x8] @ Particle ID when platform is stomped @ to here, paste after this line and change the value in the CMP to add more settings BX LR

Uses nybble 10.
Posted on 09-14-16, 06:55 pm
Death by cuteness

Karma: 6499
Posts: 585/598
Since: 05-01-13
Edited post 51901 to add 2 things:
_Water, Lava and Poison Water fix when going down:
_Shift up Y-position on start
Posted on 09-14-16, 08:04 pm


Karma: 19572
Posts: 686/1100
Since: 04-02-13
World-Based Environmental Moving Particles Retexture Code (Snow):
repl_020D7AEC_ov_0A: @Snow 1 repl_020D7838_ov_0A: LDR R0, =0x02088BFC LDR R0, [R0] @Copy from here CMP R0, #0 LDREQ R0, =0x[FILE ID - 0x83] BXEQ LR @To here and paste after this line. Change the cmp's value to the world you want the snow to change in LDR R0, =0x6EB BX LR repl_020D7AC8_ov_0A: @Snow 2 repl_020D7844_ov_0A: LDR R0, =0x02088BFC LDR R0, [R0] @Copy from here CMP R0, #0 LDREQ R0, =0x[FILE ID - 0x83] BXEQ LR @To here and paste after this line. Change the cmp's value to the world you want the snow to change in LDR R0, =0x6EC BX LR repl_020D7AA4_ov_0A: @Snow 3 repl_020D7850_ov_0A: LDR R0, =0x02088BFC LDR R0, [R0] @Copy from here CMP R0, #0 LDREQ R0, =0x[FILE ID - 0x83] BXEQ LR @To here and paste after this line. Change the cmp's value to the world you want the snow to change in LDR R0, =0x6ED BX LR
Posted on 09-15-16, 12:18 pm (rev. 1 by ImageBot on 11-21-16, 03:24 am)
Panser
I AM DERP INCARNATE

Karma: 498
Posts: 126/328
Since: 08-20-16
The rocks don't seem to be properly aligned to the background volcanoes when the screen is zoomed out (in this case by a Spin-Block, but i put a zoom sprite in 8-8 and it causes the misalignment too)
Can it be fixed?
rip signature
Posted on 09-15-16, 11:56 pm
Lantern Ghost
That MvL Hacker

Karma: 1537
Posts: 89/769
Since: 04-11-15
I was wondering do you have to have the start of level character changer to use NSLU Physics hack? Wanted to add this to something I'm working on, without custom level intros
_________________________
Here's my MvL Hacking thread

Consider joining my NSMB DS Hacking Discord Server!

#HakingNoMore
Posted on 09-16-16, 12:07 am


Karma: 19572
Posts: 688/1100
Since: 04-02-13
No, you do not.
Posted on 09-16-16, 01:28 am
Lantern Ghost
That MvL Hacker

Karma: 1537
Posts: 90/769
Since: 04-11-15
Ok thx
_________________________
Here's my MvL Hacking thread

Consider joining my NSMB DS Hacking Discord Server!

#HakingNoMore
Posted on 09-16-16, 03:40 pm
Panser
I AM DERP INCARNATE

Karma: 498
Posts: 135/328
Since: 08-20-16
A lot of tilesets and BGs, when modified, seem to clone themselves over other tileset/BG slots. Is there a way to fix this and make all tileset/BG slots separate?
rip signature
Posted on 09-16-16, 04:30 pm (rev. 5 by  skawo on 09-16-16, 07:24 pm)


Karma: 19572
Posts: 689/1100
Since: 04-02-13
Unused Spinning Log (Sprite 70) Improvements:
repl_02187864_ov_64: STMFD SP!, {R2,R3,LR} LDR R2, [R0, #8] LSR R2, #0xC AND R2, #0xF CMP R2, #2 LDMEQFD SP!,{R2,R3,PC} LDR R2, [R0, #8] LSR R2, #4 ANDS R2, #0xF MOVEQ R2, #0x200 MOVNE R3, #0x80 SUBNE R2, #1 MULNE R2, R3 ADDNE R2, #0x100 LDR R3, [R0, #8] LSR R3, #8 ANDS R3, #0xF ADDEQ R1, R1, R2 SUBNE R1, R1, R2 LDMFD SP!, {R2,R3,PC} repl_02187828_ov_64: BNE 0x218783C ADD R1, R2, #1 STRB R1, [R0,#0x56C] STMFD SP!, {R2} LDR R2, [R0, #8] LSR R2, #4 AND R2, #0xF LDR R1, =Time LDRB R1, [R1,R2] LDR R2, [R0, #8] LSR R2, #8 ANDS R2, #0xF SUBNE R1, #2 LDMFD SP!, {R2} STRB R1, [R0,#0x56E] B 0x218789C repl_021877A8_ov_64: repl_02187760_ov_64: ADD R0, R6, R0 STMFD SP!, {R1} MOV R1, #0xB STRB R1, [R0,#0x55] LDMFD SP!, {R1} BX LR repl_02187898_ov_64: STMFD SP!, {R0} LDR R0, [R0, #8] LSR R0, #0xC ANDS R0, #0xF LDMFD SP!, {R0} BEQ 0x02187960 BX LR .data .balign 4 Time: .word 0x40578040 .word 0x22262B35 .word 0x17181A1D .word 0x00141516

Fixes collision so you don't slide on it.

Additional nybbles:
Nybble 11 - Speed. (0 is default, 1 starts at half of original speed and increases the higher the value)
Nybble 10 - Direction (0 = Counterclockwise, 1 = Clockwise)
Nybble 9 - Mode (0 = Default, 1 = Always spinning, 2 = Stopped)


A lot of tilesets and BGs, when modified, seem to clone themselves over other tileset/BG slots. Is there a way to fix this and make all tileset/BG slots separate?


No idea about tilesets, but you can assign new files to Background slots in this version of NSMBe.


EDIT: Slight bugfix