Posted on 01-10-17, 01:13 pm (rev. 1 by  MarioKart7z on 01-10-17, 01:13 pm)
Panser
I AM DERP INCARNATE

Karma: 503
Posts: 297/328
Since: 08-20-16
Posted by skawo
Those use the enemy code.

So, uh, i tried out your clone code. I put 3 instances of sprite 0 in a completely unedited W1-5. The 3 clones spawned fine (though they spawned 1 tile above the sprite but that's no problem)
I then tried killing the clones AND the main player via pits. These are the results:

If clone 3 or/and clone 1 die, the emulator crashes
If clone 2 dies, this is the crash:

If the main player dies, this is the crash:

I'll try killing them via other means now
rip signature
Posted on 01-10-17, 01:14 pm


Karma: 19727
Posts: 890/1100
Since: 04-02-13
Maybe this original version will work
Posted on 01-10-17, 01:33 pm (rev. 2 by  MarioKart7z on 01-10-17, 01:48 pm)
Panser
I AM DERP INCARNATE

Karma: 503
Posts: 298/328
Since: 08-20-16
Nope, still crashes.
I tried killing the clones and the main player using an ememy and it works fine, only pits seem to crash. I'll test out lava & poison water now

EDIT: Lava AND poison water both work perfectly fine. Only pits crash
EDIT 2: I tested pits in another level and it seems to work fine. Huh. I guess W1-5 is fucked up somehow, just like how the game crashes if i try to pause the game in my modified W2-1
rip signature
Posted on 01-10-17, 02:15 pm


Karma: 19727
Posts: 891/1100
Since: 04-02-13
....Yeah, I don't know what it is about 1-5 that makes it crash. Sorry.

I fixed one more, unrelated thing.
Posted on 01-10-17, 03:53 pm
Panser
I AM DERP INCARNATE

Karma: 503
Posts: 300/328
Since: 08-20-16
On the enemies code you mispelled "PlayerCount" as "PlayersCount"
rip signature
Posted on 01-24-17, 01:40 pm


Karma: 19727
Posts: 902/1100
Since: 04-02-13
Restore Unused Fifth Jump Animation:
nsub_021144D8_ov_0A: CMP R1, #0x53 LDRNE R0, [R2,#4] BNE 0x21144DC STMFD SP!, {R0-R5, LR} BL 0x200E6F4 LDR R1, =0x7FFF MOV R2, #3 AND R0, R0, R1 MUL R1, R0, R2 MOV R0, R1,LSR#15 AND R4, R0, #0xFF CMP R4, #1 LDMFD SP!, {R0-R5, LR} MOVEQ R1, #0x54 LDR R0, [R2,#4] B 0x21144DC

This will randomly play the unused jump_e animation in place of the jump_d (kicking, third stomp) animation.
Posted on 01-24-17, 07:19 pm
Birdo


Karma: 2754
Posts: 1957/2091
Since: 06-26-11
Is that restoring unused code, or is it new code by you?
Posted on 01-24-17, 07:27 pm (rev. 2 by  skawo on 01-25-17, 06:35 pm)


Karma: 19727
Posts: 903/1100
Since: 04-02-13
New code. The animation is not referenced by the game at all.

Improved Blue Shell for ASM-Template The Not Weird Version (still kinda weird):
repl_021111DC_ov_0A: STMFD SP!, {R6-R7} ADD R7, PC, #0x164 ADD LR, PC, #0 BX R7 CMP R1, R6 ADDLT PC, PC, #0x14 CMP R0, #0 MOVLT R0, R6 RSBLT R0, R0, #0 MOVGE R0, R6 LDMFD SP!, {R6-R7} B 0x21111F4 LDMFD SP!, {R6-R7} B 0x21111FC repl_021114D8_ov_0A: STMFD SP!, {R6-R7} MOV R6, R5 SUB R6, #0x10 NOP LDR R6, [R6, #0x7B0] TST R6, #0x80 MOVEQ R0, #0 ADDNE R0, R0, #0x80 CMP R0, #0 ADDNE PC, PC, #4 LDMFD SP!, {R6-R7} B 0x21114E0 ADD R7, PC, #0x100 ADD LR, PC, #0 BX R7 NOP MOV R7, R5 SUB R7, #0x10 LDR R1, [R7, #0xC4] LDR R2, [R7, #0xC8] CMP R1, R2 MOVEQ R1, #1 MOVNE R1, #0 CMP R2, #0 RSBLT R6, R6, #0 CMP R1, #0 STRNE R6, [R7, #0xC4] STR R6, [R7, #0xC8] LDMFD SP!, {R6-R7} B 0x2111528 repl_0211162C_ov_0A: TST R2, #0x80 @Check if D-Pad_Down is pressed ADDNE R0, R0, #0x80 CMP R0, #0 BNE 0x2111634 B 0x211169C repl_02111874_ov_0A: STMFD SP!, {R6-R7} ADD R7, PC, #0xA0 ADD LR, PC, #0 BX R7 MOV R1, R6 LDMFD SP!, {R6-R7} B 0x2111878 repl_021122E8_ov_0A: STMFD SP!, {R6-R7} ADD R7, PC, #0x84 ADD LR, PC, #0 BX R7 CMP R0, #0 MOVLT R0, R6 RSBLT R0, R0, #0 MOVGE R0, R6 LDMFD SP!, {R6-R7} B 0x21122F8 repl_02112574_ov_0A: STMFD SP!, {R6-R7} ADD R7, PC, #0x5C ADD LR, PC, #0 BX R7 CMP R0, #0 MOVLT R0, R6 RSBLT R0, R0, #0 MOVGE R0, R6 LDMFD SP!, {R6-R7} B 0x2112584 repl_02115D14_ov_0A: STMFD SP!, {R6-R7} ADD R7, PC, #0x68 ADD LR, PC, #0 BX R7 CMP R0, R6 ADDGE PC, PC, #4 LDMFD SP!, {R6-R7} B 0x2115D40 LDMFD SP!, {R6-R7} MOV R0, R4 SUB R0, #0x10 NOP LDR R0, [R0, #0x7B0] TST R0, #0x80 BNE 0x2115D18 B 0x2115D40 @Relative function STMFD SP!, {LR} LDR R7, =0x208B350 @Pointer for Starman duration counter LDR R7, [R7] @Get Starman remaining time CMP R7, #0 @Check if Starman counter is 0 MOVNE R7, #4 MOV R6, R5 SUB R6, #0x10 LDR R6, [R6, #0x264] @Get Mario's current action CMP R6, #0 @Check if Mario is airborne MOVEQ R7, #0 LDR R6, =0x212E344 @Pointer for running speed LDR R6, [R6, R7] @Get max speed LDMFD SP!, {PC} @Relative function 2 because lazy as fuck STMFD SP!, {LR} LDR R6, =0x203A784 LDR R7, =0x208B350 @Pointer for Starman duration counter LDR R7, [R7] @Get Starman remaining time CMP R7, #0 @Check if Starman counter is 0 MOVNE R7, #4 MOV R6, R4 SUB R6, #0x10 LDR R6, [R6, #0x264] @Get Mario's current action CMP R6, #0 @Check if Mario is airborne MOVEQ R7, #0 LDR R6, =0x212E344 @Pointer for running speed LDR R6, [R6, R7] @Get max speed LDMFD SP!, {PC}


I recently broke something in Newer DS that made the original version of code above not work. There it is edited.
Albeit I have absolutely no idea why you would write that like that in the first place.

I mean, why would you get MarioAddress that way, why is it not actually Mario Address but MarioAddress - 0x10, especially since you're jumping from Mario code and therefore MarioAddress is in a register already and why does it rely on some Minigame NARC's end pos and why add directly to PC if you could jump to a label and make this more maintainable?


just

why~
Posted on 01-28-17, 12:52 am


Karma: 19727
Posts: 906/1100
Since: 04-02-13
Disable all music:
nsub_02060244: bx lr


Useful for recording trailers and the like.
Posted on 02-17-17, 10:34 pm (rev. 1 by Asprok on 02-17-17, 11:49 pm)
I Am Not Inteligent

Karma: 979
Posts: 373/380
Since: 03-04-14
Posted by skawo
Proper Blue Shell Block Type
repl_020D07B4_ov_0A: STMFD SP!, {LR} MOV R1, R4 LDR R4, =#0x0088002B CMP R1, R4 LDMNEFD SP!, {PC} BL getPtrToMarioOrLuigi ADD R0, R0, #0x700 LDRB R0, [R0, #0xAB] LDR R1, =#0x0088002B CMP R0, #4 LDREQ R1, =#0x00080000 CMP R0, #0 LDREQ R1, =#0x00080000 LDMFD SP!, {PC}
I get this when trying to compile:
filepath:4: Error: bad expression -- ‘ldr R4,=#0x0088002B’
filepath:10: Error: bad expression -- ‘ldr R1,=#0x0088002B’
filepath:12: Error: bad expression -- ‘ldreq R1,=#0x00080000’
filepath:14: Error: bad expression -- ‘ldreq R1,=#0x00080000’

What am I doing wrong?

EDIT: Sorry, I wrote the error thing incorrectly.

I could not…
Posted on 02-17-17, 11:26 pm


Karma: 19727
Posts: 920/1100
Since: 04-02-13
...I haven't a clue. Try retyping those directly?
Posted on 02-17-17, 11:54 pm
I Am Not Inteligent

Karma: 979
Posts: 374/380
Since: 03-04-14
I rewrote the whole code and nope, still won't work.


(By the way, I didn't write the error message properly.)

I could not…
Posted on 02-18-17, 12:00 am (rev. 2 by  skawo on 02-18-17, 12:00 am)


Karma: 19727
Posts: 921/1100
Since: 04-02-13
No idea, mate.

Does it work if you use this file: https://dl.dropboxusercontent.com/u/4558852/ad.s ?
Posted on 02-18-17, 12:06 am
I Am Not Inteligent

Karma: 979
Posts: 375/380
Since: 03-04-14
No, it doesn't work. Why even is this? *sigh*

I could not…
Posted on 02-18-17, 12:09 am


Karma: 19727
Posts: 922/1100
Since: 04-02-13
Sorry, no clue.
I compile that file into Newer DS everyday, so...
Posted on 02-18-17, 12:32 am
I Am Not Inteligent

Karma: 979
Posts: 376/380
Since: 03-04-14
Shoot. Even tried this with a clean ROM and it just won't work.

I really want this ASM hack. Can anyone try it and tell me if it works for them? I also tried other revisions of the editor (namely, b356, b379, b380 by  MeroMero and RicBent's mod); dunno if this has something to do with failing to compile, but…

Weird. Oh well, what're you gonna do.

I could not…
Posted on 02-18-17, 12:40 am


Karma: 19727
Posts: 923/1100
Since: 04-02-13
Posted on 02-18-17, 12:44 am
I Am Not Inteligent

Karma: 979
Posts: 377/380
Since: 03-04-14
Yes, it now does! Thank you very much. What did you do?

I could not…
Posted on 02-18-17, 01:14 am


Karma: 19727
Posts: 924/1100
Since: 04-02-13
Well, I replaced the LDRs with a bunch of MOVs and ADDs. No idea why the compiler wouldn't allow LDR though
Posted on 02-18-17, 11:15 am
Mariomaster

Karma: 8518
Posts: 800/1681
Since: 06-09-12
Have you tried removing the # in the LDRs?

The official ARM docs don't seems to want these there.
Maybe you have an outdated compiler (devkitARM 41?). If yes update to the latest devkitPro and redownload the patch template.

 Dirbaio merged my pull request that fixes it for the last devkit a few month ago.
_________________________
GitHub - Kuribo64 - YouTube