Pages: 1
Posted on 06-24-20, 08:22 pm
Red Koopa


Karma: 338
Posts: 122/123
Since: 06-19-17
Hey guys, been a while haha.
I'm trying to insert an ASM hack I found into the NSMB rom. I was able to do the simple binary cut and paste for other ASM's, but this ASM is different to the others, I think. I want to put this code into the game:
https://nsmbhd.net/thread/3328-item-on-select/
hook_0211F844_ov_0A: STMFD SP!, {R0, R1, LR} LDR R0, =0x04000130 LDRB R0, [R0] LSR R0, #2 ANDS R0, #1 LDMNEFD SP!, {R0, R1, PC} LDR R0, =0x0208B698 LDR R1, =0x009500DA STR R1, [R0] LDR R1, =0x09600D40 STR R1, [R0, #0x8] LDR R1, =0x1 STR R1, [R0, #0x4] STR R1, [R0, #0xC] LDMFD SP!, {R0, R1, PC}


Luckily, I did find someone who was trying to do the same, but the explanation was very confusing for my tiny brain:
https://gbatemp.net/threads/how-to-import-a-patch-for-nsmb.560609/

So could someone help me with some (very) basic instructions? I already have NSMBe v.356 and HxD installed, if that's important
Posted on 06-25-20, 06:52 pm (rev. 1 by RicBent on 06-25-20, 06:52 pm)
Mariomaster

Karma: 7924
Posts: 1552/1569
Since: 06-09-12
It is explained here: https://nsmbhd.net/thread/1281-how-asm-hacks-are-setup-tutorial/

What you got there is an ARM assembly source file. Save it in an file with the '.s' extension in the source folder and hit 'Run make and insert'
_________________________
GitHub - Kuribo64 - YouTube
Posted on 06-26-20, 10:45 am (rev. 1 by  Ninja NAH on 06-26-20, 10:48 am)
Red Koopa


Karma: 338
Posts: 123/123
Since: 06-19-17
Thanks for the help, but I think I ran into another problem
Doing those steps gets me this:


I installed DevkitPro already, so I'm not sure what the error is for.
I tested it out using the ASM project template, but even using the default files (without the custom .s one) gave me an error anyway,
Heres the full text: https://pastebin.com/aQm0eP6z
Posted on 06-26-20, 02:49 pm
Goomba


Karma: -1
Posts: 24/28
Since: 04-07-18
For the lgcc problem you should either remove lgcc from the makefile or follow RicBent's instructions on how to update your makefile https://nsmbhd.net/thread/3662-devkitpro-and-asm-help/#52113
_________________________
I hack MvsL, because I like playing MvsL with friends. Yes, I am lucky enough to have friends.

Old hack:


Posted on 06-27-20, 09:00 pm
Hammer Brother
El Psy Kongroo

Karma: 2416
Posts: 1067/1079
Since: 02-12-16
I don't recommend removing lgcc because that can cause issues with certain code hacks, most notably skawo's fmv intro asm hack.
_________________________
Nothing to say, so jadnjkfmnjamnfjkldnajfnjkanfjdksan jsdnvj m.

Posted on 07-01-20, 09:32 am (rev. 1 by RicBent on 07-01-20, 09:40 am)
Mariomaster

Karma: 7924
Posts: 1553/1569
Since: 06-09-12
-lgcc missing is caused by devkitARM updating the gcc (the compiler) it uses.

See this commit https://github.com/Dirbaio/ASMPatchTemplate/commit/b6786d589a8237dce03aec66b88f89c363734084

It fixed the same issue 4 years ago.

But gcc got updated several times since then again. The current version devkitARM uses is 10.1.0.
You can always find out what version you got by looking into the devkitpro/devkitARM/lib/gcc/arm-none-eabi/ folder.
There should be a single folder inside with the version of the install gcc.

Just change the gcc version in the Makefile and you are good to go!

Edit: I made a pull request to the patch template repo. Just have to wait for  Dirbaio to approve it now.
_________________________
GitHub - Kuribo64 - YouTube
Pages: 1