Tweaks and Tutorials

On this page I will keep my personal romhacking tutorials and some small tweaks. I am doing this because I want a public place to post tweaks and tutorials that is not limited to private discords. If you have specific things you want me to add here you can join this discord https://discord.gg/M7MsNAH. This discord will not be a romhacking help one, it is solely for updating info on this page. If you have an urgent need to contact me then email me: sm64romhackswebsite@gmail.com

SM64 Tutorials

I will keep my tutorials here. Originally focused on ASM, now the main focus is advanced decomp topics. ASM topics are still relevant, but may contain outdated information or methods.

Before Anything Else:

Fast64 and Modelling:

Decomp Tutorials:

Sequences:

Binary Non ASM:

Beginner ASM:

Advanced ASM:

Unfinished:

Tweaks (never really updated)

  • Recover from slide kick with A or B instead of just A

  • 23350: 31 f8 20 02

  • Pole fix (by frame perfection)

  • A948: 24 0E 00 01 AF AE 00 20 8F A4 00 28 8C 98 00 88 0C 09 32 25 AF B8 00 1C 8F B8 00 1C 8F B9 00 30 8F A9 00 28 AD 39 00 78 AD 39 00 80 AD 20 00 4C AD 20 00 54 AF 00 01 08 AF 00 01 0C C5 30 00 40 C7 32 00 A4 46 12 81 01 44 80 30 00 46 06 20 3E 00 00 00 00 45 00 00 02 00 00 00 00 44 80 20 00 E7 04 01 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Some old asm tools

Flags (WIP)+Random RAM locations

Flags are basically pieces of info the game uses to do certain things. They're almost always taken bit wise.

8033b26a = HUD display flags (bitwise)

  • 0x01 = lives

  • 0x02 = coins

  • 0x04 = stars

  • 0x08 = camera

  • 0x10 = nothing

  • 0x20 = nothing

  • 0x40 = time

  • 0x80 = nothing

  • 0x8000 = not sure

Graph Flags (bitwise)

  • 0x20 = always enabled

  • 0x8/0x4 = enable billboarding

  • 0x3 = make invisible

  • 0x1 = make visible

change volume of music track:

  • 0x80222630 (float from 0 to 1 as percent volume)

//0x14c:bowser action states

You can just store the action directly in bowser's struct and he will start doing the action listed below. Great for making an easy custom boss.

  • //0=random attack, switches state to 11/F next frame

  • //1=tail grab/in air

  • //2=fell off arena/jumping back

  • //3=bowser dance

  • //4=defeated

  • //5=talking to mario

  • //6=walking forward for cutscene

  • //7=running towards mario

  • //8=bowser 3 blue fire eruption thing

  • //9=single flame spit

  • //A=teetering on edge

  • //B=turn around

  • //c=hit by bomb

  • //D=jumping straight up

  • //E=walking

  • //F=breathing fire forwards

  • //10=Teleport

  • //11=jumping forward attack

  • //12=idle

  • //13=random attack, switches state to 11/F next frame

  • //14=crash

Time Stop

  • U32 @ 8033d480

  • ORI word with 0x2 and it starts time stop without mario being frozen. [2=freeze everything but mario, ORI 0x200000 to 0x74 in obj struct to not freeze an object]

Cutscene controller:

0x30 from *ptr 0x24 from *ptr at (0x8032ddcc) - Basically just a byte that sets the current cutscene. This value is represents a table value with pointers to all the cutscene functions. My notation for this location isn't very good but this is the asm I use to load this:

  • lui t2, 0x8033

  • lw t1, 0xddcc (T2) //its always been 8033b90c as far as I can tell

  • lw t1, 0x24 (T1)

  • lb t1, 0x30 (T1) //cutscene controller

Here is a list of some bytes and their cutscenes:

  • 0x0 - Normal Camera

  • Anything outside cutscene table range - Camera Locked in place, does not follow mario.

  • Anything in 0x[82-b5]- All cutscenes. Most do nothing by themselves, though some play without the object they are meant to be paired with. Below is what I could tell from a glance (these all do something, I am just listing what they do when you store the byte directly from zero, also these seem to act differently in each course, you can find the cutscene function by doing 4*(table index-82) + 80337668).

  • 0x82 - door 0

  • 0x83 - door 1

  • 0x85 - enter cannon

  • 0x86 - enter painting

  • 0x87 - exit painting from death

  • 0x8b - door exit

  • 0x8c - door A

  • 0x8d - door B

  • 0x8e - peach intro

  • 0x8f - star dance 1-1 (wobbly camera)

  • 0x93 - over the shoulder of mario

  • 0x95 - sliding star door opening

  • 0x96 - prepare cannon

  • 0x97 - unlock key door

  • 0x98 - standing death (super wobbly camera located at mario)

  • 0x99 - death cutscene 2 (small wobbles located at same pos as above)

  • 0x9a - death while on back (zoom in and wobble at same pos)

  • 0x9b - drowning death (over the shoulder wobbly camera focused on mario)

  • 0x9c - exit bowser course (wobbly camera that circles around mario)

  • 0x9d + 0x9e - focused on hardcoded pos?

  • 0xA0 - follows mario from a fixed position

  • 0xA1 - cap switch press (goes slightly in front of mario and pans across him)

  • 0xA2 - talking to NPC

  • 0xA3 - talking to NPC 2

  • 0xA5 - star get cutscene

  • 0xA6 - star get cutscene 2

  • 0xA7 - key get cutscene

  • 0xA8 - Focuses on something and then shakes the camera

  • 0xA9 - exit BBH

  • 0xAA - Bowser talking/Non painting death

  • 0xAB - reading sign

  • 0xAC - Peach end cutscene

  • 0xAD - 100 coin star spawn. Locks camera in place until its set to zero. Set chain chomp free cutscene as well

  • 0xAE - grand star

  • 0xB0 - special star spawn

  • 0xB1 - mario waving at end cutscene

  • 0xB2 - credits

  • 0xB3 - exit waterfall

  • 0xB4 - exit WMOTR into castle grounds

  • 0xB5 - enter HMC pool

Various References and Notes:

I will keep various notes that I use to make some cool systems that don't seem to be written elsewhere as well as tools I make to help with romhacking. This will just be a mess of stuff mostly for myself but the tools may be helpful.