Language…
19 users online: Aurel509, buggy789, Chambo, codfish1002, cohimbra, Dennsen86, Fozymandias, Gamet2004, Green, Green Jerry, jirok1, LightAligns, Mischievous Marc, Raychu2021, RicardoDeMelo, RZRider, sinseiga, synthie_cat, tOaO - Guests: 285 - Bots: 303
Users: 64,795 (2,375 active)
Latest user: mathew

The SM64 Hacking Help/FAQ Thread (updated Nov 21)

Link Thread Closed
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122

Originally posted by Kazeshin
im not too sure, but i would try giving the 0x06 command length byte 0x0C and jumping back with 07 04 00 00, since the jumps use some sort of stack and you could mess with it, the way you were doing it.


Nothing changed, still gives the same results. I tried moving commands around, no change. I tried using different RAM segments, but they all ended up at 0x800EA110. I am probably going to use the 0x0C segment as a temporary loading segment, since I don't need to keep the data after the level has loaded.

It's most likely the 0x11 command (in combination with my ASM code) that is doing something to make the game reset back to the title screen. If I remove the command from the segment, then the game works fine.

I used queueRAM's n64split program to find the assembly code for the 0x11 command. It looks like that it does a bit more than just calling an ASM function, can you take a guess on what the function does?

# begin 8037EA98 (0FB818)
LevelCommand_11:
 addiu $sp, $sp, -0x20
 sw $ra, 0x14($sp)
 lw $t6, 0x8038be28 # lui $t6, 0x8039/lw $t6, -0x41d8($t6)
 lw $t7, 4($t6)
 sw $t7, 0x1c($sp)
 lw $t9, 0x1c($sp)
 lw $t8, 0x8038be28 # lui $t8, 0x8039/lw $t8, -0x41d8($t8)
 lw $a1, 0x8038be24 # lui $a1, 0x8039/lw $a1, -0x41dc($a1)
 jalr $t9
 lh $a0, 2($t8)
 lui $at, 0x8039
 sw $v0, -0x41dc($at)
 lw $t0, 0x8038be28 # lui $t0, 0x8039/lw $t0, -0x41d8($t0)
 lui $at, 0x8039
 lbu $t1, 1($t0)
 addu $t2, $t0, $t1
 sw $t2, -0x41d8($at)
 b LLevelCommand_11_5C
 nop
LLevelCommand_11_5C: # 8037EAF4
 lw $ra, 0x14($sp)
 addiu $sp, $sp, 0x20
 jr $ra
 nop
# end LevelCommand_11 8037EB04 (0FB884)
Originally posted by Davideesk
It's most likely the 0x11 command (in combination with my ASM code) that is doing something to make the game reset back to the title screen. If I remove the command from the segment, then the game works fine.

I used queueRAM's n64split program to find the assembly code for the 0x11 command. It looks like that it does a bit more than just calling an ASM function, can you take a guess on what the function does?


This function (like many others) are unnecessarily verbose. It is the equivalent of the C code below. It calls the function at offset 4 from the current level script pointer, passing it two values: the 16 bit value found at offset 2 of the script and some pointer stored at 0x8038be24. That pointer is then updated with the return value from that function. I haven't dug into what that pointer is used for, but if you don't set a v0 in your function, bad things may happen.

Code
struct Level11 {
   uint8 cmd;
   uint8 length;
   uint16 data;
   void* (*func)(uint16, void*);
};
   
extern void *some_ptr; // stored at 0x8038be24
extern uint8 *level_ptr; // pointer to current place in level buffer at 0x8038be28

void LevelScript_11(void) {
   struct Level11 *L11 = (struct Level11 *)level_ptr;
   some_ptr = L11->func(L11->data, some_ptr);
   level_ptr += L11->length;
}


I gleamed through the 0x11 scripts in the ROM and found that all 36 of them had 0x0000 for the 16-bit data and these were the only functions.
0x8016F5B0
0x801766DC
0x80177560
0x8024BCD8
0x8024BD5C
0x8024BE14
0x8024BFA0

I think I will give up on that problem for now. I'll come back to it when I'm better at assembly lol. I did however find a way to make room for my textures in the RAM, which is what I was trying to do in the first place. So here is a little trick for anyone who is looking for a little more RAM to use.

The [!] box has two textures, but for some reason the second texture is stretched (32x64 or 64x32) even though it doesn't need to be. So what I did was shorten that texture to 32x32 for each of the 4 colors. This frees up 0x2000 bytes in the RAM.



To shorten the texture on the box object, you need to edit some hex values at 0xA9A74E, 0xA9A77E, 0xA9A79E, 0xA9A7AE, 0xA9A9D4, 0xA9A9E4, 0xA9AA24, and 0xA9AA34. You need to set them to be the value 0x03E0 instead of 0x07DE.

If you use CajeASM, you can just insert this code:

.org 0xA9A74E
hex{ 03 E0 }
.org 0xA9A77E
hex{ 03 E0 }
.org 0xA9A79E
hex{ 03 E0 }
.org 0xA9A7AE
hex{ 03 E0 }

/* There are 2 seperate display lists for the Red/Blue boxes and the Green/Yellow boxes. This is because some of the long textures stretch 32x64, while the others stretch 64x32. It is so very dumb; this should not even be a thing. You should remove one for more room in the RAM, because there is no reason for it to exist. */

.org 0xA9A9D4
hex{ 03 E0 }
.org 0xA9A9E4
hex{ 03 E0 }
.org 0xA9AA24
hex{ 03 E0 }
.org 0xA9AA34
hex{ 03 E0 }


This trick allows me to add 4 32x32 textures. After doing some edits with the [!] box's Geo Layout/Polygon scripts and a minor edit with the 0x802C1308 function (Which defines which texture id to use for the 0xF0 offset), I added 2 more colored boxes to the game:



Wing Cap ID (B.Param 2): 0 (Red)
Metal Cap ID (B.Param 2): 1 (Green)
Vanish Cap ID (B.Param 2): 2 (Blue)
Koopa Shell ID (B.Param 2): 3 (Purple)
Single Coin ID (B.Param 2): 4 (Black)
Anything with an ID (B.Param 2) that is larger than 4 will be in the yellow box.

I could add more, but I would need to find some more room in the RAM for the textures. (0x1000 bytes per box)


Here's this problem I have, How can I add more warp destination? For one I replaced inside castle and hazy mazy cave and I already config the Warp ID to inside castle, it blackout after Mario falls, PJ64 was stopped because the misconfig Warp ID. Hope you guys help me with tho please? *update*
Originally posted by DavideeskThis trick allows me to add 4 32x32 textures. After doing some edits with the [!
box's Geo Layout/Polygon scripts and a minor edit with the 0x802C1308 function (Which defines which texture id to use for the 0xF0 offset), I added 2 more colored boxes to the game:



Wing Cap ID (B.Param 2): 0 (Red)
Metal Cap ID (B.Param 2): 1 (Green)
Vanish Cap ID (B.Param 2): 2 (Blue)
Koopa Shell ID (B.Param 2): 3 (Purple)
Single Coin ID (B.Param 2): 4 (Black)
Anything with an ID (B.Param 2) that is larger than 4 will be in the yellow box.

I could add more, but I would need to find some more room in the RAM for the textures. (0x1000 bytes per box)


that's actually pretty cool, can you give the assembly code out too? will safe some work. im sure others would want to use it too.
Originally posted by Kazeshin
Originally posted by Davideesk


that's actually pretty cool, can you give the assembly code out too? will safe some work. im sure others would want to use it too.

That's very interesting to add new power-up [!] blocks, we could as well implement new power-ups! Not to mention, the star and koopa shell get their own specified [!] block.

Originally posted by SmithJrBlaquaLuigi


Here's this problem I have, How can I add more warp destination? For one I replaced inside castle and hazy mazy cave and I already config the Warp ID to inside castle, it blackout after Mario falls, PJ64 was stopped because the misconfig Warp ID. Hope you guys help me with tho please? *update*


You can't manually add warp destinations unless you inserted the MoreWarpObjects patch. If you are concerned about level warp issues, watch this tutorial Meltfire has instructed.
SUPER CRASH TIME YEAH!
Hey I have this problem, whenever I put in my level a Piranha Plant Object, my level crashes, like this:


In Toads Tool


After I entered to the level ( pressed A in the star select )



I don't know Why this is happening :P, I will be very thankfull if you respond to this question, I want them to spawn a star, just like Tiny Huge Island ;)
Working on SM64: A New Adventure
https://www.youtube.com/watch?v=ZxVwAPAQdnc
http://i.imgur.com/qblZTfb.png
You have to use this patch since you use Kaze's object patch. http://bin.smwcentral.net/u/21427/fix.ppf

''If you want to use Piranha plants from THI in your hack, apply this patch aswell (link)
their new behavior ID will be 3910''
I don't even give a shit about this website anymore
no problem man #w{=P}
I don't even give a shit about this website anymore
Now I have another question:

When I Defeat the King bomb omb the star number is 1 ( That's correct)

but...

When I Defeat the 5 piranha plants and I get the star from them, the star that I got is Number 1 ( the same of Big Bomb Omb )

so, Do Anyone Knows how to change the star number from The Giant Piranha
Plants mission ????
Working on SM64: A New Adventure
https://www.youtube.com/watch?v=ZxVwAPAQdnc
http://i.imgur.com/qblZTfb.png
I don't think it's possible to change it, if it is, then I don't know how.
I don't even give a shit about this website anymore
Change B.Params 1, it's normally the same as all bosses
Projects :

Ztar Attack 2 A Blast to the Past

Overworlds : 2/3 done
World 1 : 4/4 levels done
World 2 : 4/4 levels done
World 3 : 4/4 levels done
World 4 : 4/4 imported, 3/4 with objects
World 5 : 1/4 level done
World 6 (extra) : 2/3 levels imported, 0/3 with objectss

Youtube -
http://www.youtube.com/channel/UCiD6DYZSuu7N2302h83pLeQ

Allons, enfants de la paaaatrie ! :D
REALLY THANKS, It works !!, However King Bomb omb mission is now Star 2


EDIT: A noob question maybe..., Anyone knows how to change the star names from a level ??
Working on SM64: A New Adventure
https://www.youtube.com/watch?v=ZxVwAPAQdnc
http://i.imgur.com/qblZTfb.png
Originally posted by TheGael95
Change B.Params 1, it's normally the same as all bosses


That actually didn't work for me when I tried to do it.

You have to use the SM64 Text Wrangler to change the star names for a level
I don't even give a shit about this website anymore
I'm trying to make a custom object for a platform that moves up and down. I used Kaze's old tutorial on how to replace existing objects with skelux model replacer. Instead I imported using the level importer 1.9.3s and replaced castle in the sky. After this I followed The tutorial and replaced the collision pointers of the moving up and down behavior, but now when I go into a level with the rainbow ride object bank the game freezes whenever I go in that level. All I did was import with the Import collision box checked in the importer and nothing else was changed. Any help would be appreciated.

EDIT: I fixed my own problem. I somehow copied the wrong collision pointer, but I decided to use skelux's old model replacer anyways, because there was already a tutorial made using it.
Working on Super Mario 64 Blast Off along with 55supershadow

Courses 9/15
Secret levels 1/6
Bowser levels 1/3
Hub 1/3

Check out the preview latest preview https://www.youtube.com/watch?v=bHKKsnbbF3E
I've got a little problem about a course from a future hack : it takes about 7 seconds to load from a certain entrance, unlike other courses and other entrances. Here is a video if you want to see it :

https://youtu.be/peA9pzLiEj8

What could cause this problem ?

EDIT : Nevermind, problem solved !
Projects :

Ztar Attack 2 A Blast to the Past

Overworlds : 2/3 done
World 1 : 4/4 levels done
World 2 : 4/4 levels done
World 3 : 4/4 levels done
World 4 : 4/4 imported, 3/4 with objects
World 5 : 1/4 level done
World 6 (extra) : 2/3 levels imported, 0/3 with objectss

Youtube -
http://www.youtube.com/channel/UCiD6DYZSuu7N2302h83pLeQ

Allons, enfants de la paaaatrie ! :D
By sheer chance, would anyone know how to play a sound at lower pitch and louder ? It's for playing a sound that's already in the ROM and I know I can play it by calling the function at 0x802CA1E0 with the argument A0 = 90105081 from the object's behavior processing.

Thanks.
Uber Mario 64 Demo released, 16 awesomely challenging stars awaits YOU!
Originally posted by ArchangelGabriel
By sheer chance, would anyone know how to play a sound at lower pitch and louder ? It's for playing a sound that's already in the ROM and I know I can play it by calling the function at 0x802CA1E0 with the argument A0 = 90105081 from the object's behavior processing.

Thanks.


i havent found the final solution to this, but you might want to have a look at 78280081 to 782f0081 as arguments for a0. those are the red coin sounds with different pitches.
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
Link Thread Closed