[Advanced] How to manually trigger a warp
#1
I'm sharing a couple of addresses I found a while ago to let you activate a warp at any time.

First you need to know which version of SM64 you are using. The only difference between the different versions of SM64 is the addresses in RAM. For this post I'm going to keep things vague so you can follow with any version.

Version Starting RAM Address
Japan 0x80339EE2
North America 0x8033B252
Europe 0x8030951A
Shindou 0x8031DAAA
IQue Player 0x80320A86

Here is the table layout for each of the values starting at the RAM address specified above:

Data Type Description
s16  A value that tells the game that the warp delay timer is active or not.
s16 Warp delay timer. Value decrements if active, and will warp Mario to the Warp ID when it reaches zero.
s16 Warp ID to warp to.
s32 Optional Parameters or Flags? Used to determine which side of the door Mario will stand once a door warp is completed.
0x00000005 = Mario opened the door by pulling it inward.
0x00000006 = Mario opened the door by pushing it outward.


The idea is that you first set the warp delay timer to some value above 0 (minimum of 1), set the Warp ID, then set the first value to any number besides zero. The warp delay timer decrements every frame. Once it reaches zero, the warp will activate instantly.



Failed Level Exit (Lose a life)

Warp ID 0xF1 is used when Mario dies. He will exit the level and lose a life in the process.

Note: The player will not Game-Over if Mario has 0 lives. The game will decrement Mario lives to -1. You will need to check Mario's lives yourself.



Successful Level Exit (Star grabbed)

Warp ID 0xF0 is used when Mario grabs a star or bowser key. He will go back to the castle and prompt the "Save and Continue" menu.

Note 1: Since you didn't actually collect a star/key, the star counter will not be increased. You will need to code that in yourself.

Note 2: You need to set a specific byte in RAM, otherwise the game will crash when trying to display the text of the star you should've gotten. It is normally set when Mario grabs a star/key. This byte should be set between 1 and 6, corresponding to the act # you want to display.  

Below is a table with the corresponding to the address of the byte you need to change for each version:

Version Address for gotten star # (Byte)
Japan 0x8032CE24
North America 0x8032DD84
Europe 0x802F9F54
Shindou 0x8030D4B4
IQue Player 0x8030FA14
Reply
#2
i'm always using 8024a9cc for this.


FADE SCREEN OUT, handles all warps: 8024A9CC, A0 (Mario struct), A1(type)
jump to A1 value///used when
8024ABEC 1 star select
8024AC3C 2 ?
8024ACF0 3 door
8024AD60 4 slide entrance
8024AC8C 5 ?
8024AE60 6 to 10 title screen
8024AACC 11 ?
8024AB0C 12 bowser death warp
8024AB74 13 circle, use death warp
8024AE60 14 title screen
8024AA88 15 ?
8024AA44 16 starform (goes to title screen?)
8024ADC0 17 black (warps to the credits)
8024ADEC 18 ?
8024AA44 19 starform + use success warp
Reply




Users browsing this thread: 1 Guest(s)