Views: 23,105,723 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
12-06-24 09:06 PM |
Guest: |
0 users reading SM64DS ASM Hacking Template | 1 bot |
Main - General SM64DS hacking - SM64DS ASM Hacking Template | Hide post layouts | New reply |
Fiachra |
| ||
Local moderator Level: 65 Posts: 618/1065 EXP: 2298609 Next: 37019 Since: 12-15-12 From: Ireland Last post: 2385 days ago Last view: 335 days ago |
I have created a SM64DS ASM Hacking Template, based on Dirbaio's ASM Hacking Template for NSMB for use with NSMBe.
A tutorial for using the original ASM Hacking Template can be found at: http://nsmbhd.net/thread/1281-how-asm-hacks-are-setup-tutorial/ Required Tools:
Included features:
Compiling the example hover hack:
I won't go over how to create your own as the process is the same as for NSMB, covered in the tutorial in the first link. |
MPG |
| ||
Member Banned for a while: low post quality Level: 37 Posts: 35/296 EXP: 310366 Next: 27887 Since: 10-06-14 Last post: 3566 days ago Last view: 2834 days ago |
Seeems pretty interesting. I may try it out in my spare time. ____________________ My unfinished forum: http://mpgforums.freeforums.net/ |
Fiachra |
| ||
Local moderator Level: 65 Posts: 620/1065 EXP: 2298609 Next: 37019 Since: 12-15-12 From: Ireland Last post: 2385 days ago Last view: 335 days ago |
Can someone please try the above steps and confirm whether it's working or not? It's working for me but not for Stomatol.
Ensure you use this version of SM64DSe and the linked version of NSMBe (the version from nsmbhd.net is not working as it quite outdated). |
CodingKoopa |
| ||
Lakitu she/her Level: 48 Posts: 1/560 EXP: 806842 Next: 16701 Since: 10-13-14 Last post: 1232 days ago Last view: 461 days ago |
When I click Run 'make' and insert in NSMBe, it throws an unhandled exception:
Thanks for reading, help greatly appreciated!(Sorry if this should have been posted in NSMBHD) ____________________ Website | Twitter |
Fiachra |
| ||
Local moderator Level: 65 Posts: 681/1065 EXP: 2298609 Next: 37019 Since: 12-15-12 From: Ireland Last post: 2385 days ago Last view: 335 days ago |
Open your SM64DS ROM in SM64DSe and select 'More'>'Toggle Suitability for NSMBe ASM Patching' and then try patching with NSMBe. If you want your ROM to run on R4 and Acekard flashcarts you should select that option again after patching with NSMBe.
Also, you must use the version of NSMBe linked in the first post (or else check out and compile the latest version from github). |
pacmainia&luigi |
| ||
Red Paratroopa Hacker Level: 29 Posts: 86/178 EXP: 136960 Next: 10925 Since: 10-29-15 From: The Grandfather Paradox Time Loop Last post: 2042 days ago Last view: 1682 days ago |
does mario get a hovering animation? If no, how can I give him one? ____________________ Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka......... |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 134/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
You should add some sort of key reading function, it'd be very useful, something like this:
public void ReadKeyInput(unsigned int key)
{ unsigned int KeyPressed = 0; asm ( "ldr r0,=#0x4000130 \t\n" "ldrh r0, [r0] \t\n" "ldr r1,=key \t\n" "and r0, r0, r1 \t\n" "str r0,=KeyPressed \t\n" ); } then people could just go: unsigned int AKey = 1; ReadKeyInput(AKey); if (KeyPressed == 0) { //code here } ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 153/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
How do all the data types work?
From what I can tell: u8 is 1 byte s16 is 2 bytes u32 is 4 bytes but what is u32*? I'm tryna check the players animation but it wont compile because of some integer pointer error or something like that ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
CodingKoopa |
| ||
Lakitu she/her Level: 48 Posts: 471/560 EXP: 806842 Next: 16701 Since: 10-13-14 Last post: 1232 days ago Last view: 461 days ago |
u32* is a pointer to a 4-byte number. I've also seen people use (vu32*), aka (volatile u32*) meaning a volatile pointer, meaning that it exists outside of your code, and that the compiler won't optimize it and screw things up.
Here's a better explanation. Also, the u and s stand for signed and unsigned respectively. ____________________ Website | Twitter |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 154/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
Posted by TheKoopaKingdom ok, thanks, I understand the template addresses much more now. It was just me neglecting to learn more c++ as usual lol. Problem is, I'm viewing the address as unsigned 4 bytes in desmume and I got the value I want to check and its still not letting me compile the code because of "ISO c++ forbids comparison between pointer and integer" ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
CodingKoopa |
| ||
Lakitu she/her Level: 48 Posts: 472/560 EXP: 806842 Next: 16701 Since: 10-13-14 Last post: 1232 days ago Last view: 461 days ago |
I think you're using pointers wrong. Consider the following code:
// create a u32 pointer
This would be the wrong way of comparing the two variables:
// it can now contain a hexadecimal value that is the address of an actual u32 variable u32* coinsptr; // assign it the address coinsptr = 0x12345678; // the integer/u32 we will be comparing against // it can now contain an actual decimal value u32 numcoins; // assign it the value u32 = 50; if (coinsptr == numcoins)
This is wrong, because pointers are just containers for hexadecimal addresses. If we were to output coinsptr, it would just say 0x12345678.
blarg(); The right way to do it is to use the dereference operator, which is an asterisk (*). This gets the value AT an address. if (*coinsptr == numcoins) blarg(); ____________________ Website | Twitter |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 157/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
Found out the real problem:
currentActionAddress_1 isn't a pointer, currentActionAddress_1 changes when the player changes animations. The real problem was that it was *u32 in the header files when it should've been just u32. Just changed it and my code compiles now. ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 213/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
How does the compiler know which offset is which in the player structure?
All you're typing is: Struct {
void* vtable; u32 Value1; //0x004 u32 Value2; //0x008 u32 Value3; //0x00C }; How does it know that Value1 is 0x004, Value2 is 0x008, Value3 is 0x00C, etc. I noticed that you missed several values, such as 0x6ED, would the structure not have some sort of desync if you didnt add those offsets? ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
pacmainia&luigi |
| ||
Red Paratroopa Hacker Level: 29 Posts: 128/178 EXP: 136960 Next: 10925 Since: 10-29-15 From: The Grandfather Paradox Time Loop Last post: 2042 days ago Last view: 1682 days ago |
did you make hover with limit for your sunshine port? ____________________ Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka......... |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 217/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
Posted by pacmainia&luigi Yes, obviously. The game would be completely broken otherwise. ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
pacmainia&luigi |
| ||
Red Paratroopa Hacker Level: 29 Posts: 129/178 EXP: 136960 Next: 10925 Since: 10-29-15 From: The Grandfather Paradox Time Loop Last post: 2042 days ago Last view: 1682 days ago |
Posted by Sparsite no- I meant, "is the hover with limit patch the same as the hover nozzle in his sunshine hack?" ____________________ Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka......... |
Sparsite |
| ||
take your dumb self out of here. thank you. Level: 34 Posts: 218/270 EXP: 247890 Next: 5761 Since: 05-20-16 Last post: 2933 days ago Last view: 2792 days ago |
Posted by pacmainia&luigi No. The one in his hack has to be refilled by standing in water after a while (you can see his fludd counter on the top screen in the bottom right). The patch example he released just lets you hover for a few seconds and there's no limit to it how much you can do it. ____________________ ASMR: *quietly whispers* move r0 r7 push r4 to r14 load register r4 into r0 POP |
pacmainia&luigi |
|
Gota7 |
| ||
Paragoomba Star Wolf Level: 18 Posts: 44/66 EXP: 28362 Next: 1535 Since: 04-09-17 From: Same as above. ^ Last post: 2255 days ago Last view: 1501 days ago |
Please fix the dead links in your main post.
Join the SM64DS Hacking Discord: https://discord.gg/PhpA9Wt |
CodingKoopa |
| ||
Lakitu she/her Level: 48 Posts: 550/560 EXP: 806842 Next: 16701 Since: 10-13-14 Last post: 1232 days ago Last view: 461 days ago |
Main - General SM64DS hacking - SM64DS ASM Hacking Template | Hide post layouts | New reply |
Page rendered in 0.080 seconds. (2048KB of memory used) MySQL - queries: 27, rows: 235/235, time: 0.009 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |