Pages: 1
RicBent |
Posted on 08-15-17, 03:58 pm (rev. 2 by RicBent on 08-15-17, 04:03 pm)
|
Mariomaster
Karma: 8528 Posts: 952/1681 Since: 06-09-12 |
If you are working on a long level or an advanced asm hack it might be annoying to go through the main menu and the worldmap every single time you want to test something.
Let's bring that to an end! This hack instantly loads any level you want! You can also specify to load a different level if a specific button is pressed (Look at the "Conditional Overwrites" section of the code). If you press Start while the game boots or you die the hack will disable itself and you can test whatever else. Be sure to remove "nonintendo.cpp" from your patch template as it might clash with this hack. #include "nsmb.h" #include "keys.h" void QuickLoad() { u32 *lives = (u32*) (0x0208B364); *lives = 99; // Default (1-1, Area 1, Entrance 0) u32 world = 0; u32 level = 0; u32 area = 0; s8 entranceId = 0xFF; // 0xFF = Start Entrance set in Level u32* keysDw = (u32*)(0x02087650); // Conditional Overwrites if (*keysDw & KEY_A) { // If A is pressed go to 8-2, Area 1, Entrance 1 world = 7; level = 1; area = 0; entranceId = 1; } else if (*keysDw & KEY_X) { // If X is pressed go to 1-3, Area 1, Entrance 0 level = 2; } loadLevel(0xD, false, world, level, area, 0, 1, 0, 0, true, entranceId, 1); } bool kill = false; // Instantly load MainMenu void hook_0200089c() { (*(vu32*)0x023FFC20) = 0x100; } // MainMenu -> LoadLevel void hook_020D339C_ov_09() { if (kill) return; u32* keysDw = (u32*)(0x02087650); if (*keysDw & KEY_START) { kill = true; return; } loadSave(0, (void*)(0x02088BDC)); QuickLoad(); } // Worldmap -> LoadLevel void hook_020CF108_ov_08() { if (kill) return; u32* keysDw = (u32*)(0x02087650); if (!(*keysDw & KEY_START)) QuickLoad(); else kill = true; } I know that this is very hacky, but it's only for testing anyways _________________________ GitHub - Kuribo64 - YouTube |
Thierry |
Posted on 08-16-17, 08:14 am (rev. 1 by Thierry on 08-16-17, 08:16 am)
|
この記号は… 解読できないよ…
Karma: 6043 Posts: 2231/2725 Since: 01-17-13 |
neat, that will make things much quicker. can't rely on savestates for everything.
random question, is there any way to load unused levels? iirc those don't have IDs or something. |
RicBent |
Posted on 08-16-17, 01:14 pm
|
Mariomaster
Karma: 8528 Posts: 953/1681 Since: 06-09-12 |
Ndymario |
Posted on 08-16-17, 10:20 pm
|
Fuzzy
That MvL Hacker Karma: 1599 Posts: 481/789 Since: 04-11-15 |
Can you make it once you press a button it loads the level or does it require it to be upon boot...or am i not understanding
_________________________ Here's my MvL Hacking thread Consider joining the NSMB DS Hacking Discord Server! #HakingNoMore |
RicBent |
Posted on 08-17-17, 07:28 am
|
Mariomaster
Karma: 8528 Posts: 954/1681 Since: 06-09-12 |
Hiccup |
Posted on 08-19-17, 01:05 pm
|
Birdo
Karma: 2754 Posts: 1989/2091 Since: 06-26-11 |
Are any of the Mario Vs Luigi levels in the level tables?
|
skawo |
Posted on 08-19-17, 01:57 pm
|
Karma: 19757 Posts: 1019/1100 Since: 04-02-13 |
All the 5.
|
Hiccup |
Posted on 08-19-17, 04:34 pm
|
Birdo
Karma: 2754 Posts: 1990/2091 Since: 06-26-11 |
The ones in the course folder or the archived ones?
|
skawo |
Posted on 08-19-17, 05:03 pm (rev. 2 by skawo on 08-19-17, 05:04 pm)
|
Karma: 19757 Posts: 1020/1100 Since: 04-02-13 |
main0:0203CC44 DCD 0xC202041C ; 180
main0:0203CC44 DCD 0xC103041E ; 181 main0:0203CC44 DCD 0xC4020420 ; 182 main0:0203CC44 DCD 0xC6010422 ; 183 main0:0203CC44 DCD 0xC3020424 ; 184 main0:0203CC44 DCD 0 ; 185 main0:0203CC44 DCD 0 ; 186 i.e... Both. As you can see, there's what looks to be two empty slots, too. |
Spud11 |
Posted on 10-21-17, 02:17 am (rev. 2 by RicBent on 10-22-17, 10:39 am)
|
Newcomer
Dank Memes are Dank. Karma: 1 Posts: 1/1 Since: 10-21-17 |
When I try to do the make thing it gives me an error:
quickTest.cpp arm-none-eabi-g++ -MMD -MP -MF /c/Users/crust/Documents/Bady/SMB/ASMPatchTemplate-master/build/quickTest.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -iquote /c/Users/crust/Documents/Bady/SMB/ASMPatchTemplate-master/include -I/c/devkitPro/libnds/include -I/c/devkitPro/devkitARM/include -I/c/devkitPro/devkitARM/arm-none-eabi/include -I/c/Users/crust/Documents/Bady/SMB/ASMPatchTemplate-master/build -DARM9 -nodefaultlibs -I. -fno-builtin -c -fno-rtti -fno-exceptions -c /c/Users/crust/Documents/Bady/SMB/ASMPatchTemplate-master/source/quickTest.cpp -o quickTest.o c:/Users/crust/Documents/Bady/SMB/ASMPatchTemplate-master/source/quickTest.cpp:2:10: fatal error: keys.h: No such file or directory #include "keys.h" ^~~~~~~~ compilation terminated. make[1]: *** [quickTest.o] Error 1 make: *** [build] Error 2 Press any key to continue . . . I don't know what to do, I have a keys.cpp file but there isn't a keys.h but I don't know how to get it or whatever. Thanks. |
newluigidev |
Posted on 10-22-17, 02:38 am (rev. 1 by newluigidev on 10-22-17, 02:49 am)
|
Nipper Plant
Karma: 2406 Posts: 289/417 Since: 08-17-15 |
Just remove the keys.cpp, and remove the "#include "keys.h"" at the top of this code.
|
Cosmic Jobo |
Posted on 05-14-18, 05:10 pm
|
Newcomer
Karma: 5 Posts: 3/8 Since: 05-11-18 |
Sorry for being so dumb, but where do I put this is NSMBE?
|
Ndymario |
Posted on 05-14-18, 06:59 pm (rev. 1 by Ndymario on 05-15-18, 01:47 am)
|
Fuzzy
That MvL Hacker Karma: 1599 Posts: 625/789 Since: 04-11-15 |
This is an ASM hack, so you'll need to save the code as something.cpp, then include that file in the sources folder in the ASM Hack template. If you don't understand, just look here. Feel free to ask another question if you're still confused
_________________________ Here's my MvL Hacking thread Consider joining the NSMB DS Hacking Discord Server! #HakingNoMore |
newluigidev |
Posted on 05-14-18, 07:40 pm
|
Nipper Plant
Karma: 2406 Posts: 349/417 Since: 08-17-15 |
Nope, actually it needs to be in a CPP file, since it's C++ code. S files are only needed when it's assembly code.
|
Cosmic Jobo |
Posted on 05-18-18, 09:38 pm
|
Newcomer
Karma: 5 Posts: 7/8 Since: 05-11-18 |
(Once again sorry for being dumb, but) Which parts of this code do I copy? And I can't seem to get any of the codes from https://nsmbhd.net/thread/1281-how-asm-hacks-are-setup-tutorial/ to work either, please help!
|
RicBent |
Posted on 05-18-18, 09:45 pm
|
Mariomaster
Karma: 8528 Posts: 1223/1681 Since: 06-09-12 |
Cosmic Jobo |
Posted on 05-19-18, 10:22 pm
|
Newcomer
Karma: 5 Posts: 8/8 Since: 05-11-18 |
'make' is not recognized as an internal or external command, operable program or batch file. Press any key to continue . . . I just keep getting this error when I try to insert it. |
RicBent |
Posted on 05-19-18, 10:29 pm
|
Mariomaster
Karma: 8528 Posts: 1227/1681 Since: 06-09-12 |
Pages: 1