Views: 934,409,659
15 users online: Airik2112, Anas, crocodileman94, dougeff, gui, kaigem, LucasRCD, Luis Carrasquero, Retro Master HD,  RussianMan, SAMYR DUTRA ARAUJO, semiblind, TCgamerboy2002, TrendzAndz, ZX497 - Guests: 109 - Bots: 124 Users: 52,124 (2,115 active)
Latest: AmnesiaSilence
Tip: Use Kipernal's Blockreator if you want to code custom blocks but you have little to no experience with ASM.
Not logged in.
Camera Documentation
Forum Index - Non-SMW Hacking - Super Mario 64 Hacking - ASM & Data Repository - Camera Documentation
Pages: « 1 » Link
Heya! I just wanted to give some documentation on anything related to the camera I could find. I hope lots of you find this stuff useful!

First I'll document a bit on the lakitu camera.

3C5B4: Right input type, typically it's 0x12 for "previous input", or 0x8033AFA2, but we can also get the "current input" from ram if we instead use 0x8033AFA0, so if you wanted to change the rotation to as long as you hold c-right, you would put 0x10.

3C5D0: Right rotation speed, typically 0x2000, which is extremely fast. So if you were to change the rotation to current input, you would slow this down significantly, I use 0x0200.

3C5E8: Same as 0x3C5B4 but for c-left.

3C604: Same as 3C5D0 but negative, so it's typically 0xE000 (this is equal to -2000). You can calculate negative numbers by subtracting the absolute value of a hex number from 0x10000. So if we wanted c-left to be -0x0200, we subtract 0x0200 from 0x10000, and we would get 0xFE00. This is due to the "negative rule" where every integer after 0x7FFF is a negative number.

I have no documentation on c-up or c-down. I've dug all through this area of the ROM but they seem to be in completely different spots. I'll do some debugging down the road to get it though. (unfortunately it's the same issue for Mario's cam)

For the Mario cam, I'll only repeat stuff that's already been documented by Skelux.

46F14: Camera rotation amount, it applies to both c-left and c-right. It's typically 0x1000. (I've been trying to find the actual speed to no avail).

46F24: C-right input type, it's the exact same rules as Lakitu's camera

46FA8: Same as 0x46F24 but for c-left.

Next up, some weird special camera types the game likes to change to.

Door Camera:
67B14: Here is a JAL which is called to change the camera to the "door camera" (the function is 0x802AC958). This JAL is executed right after opening a door (there is a small delay though). If you write a NOP here, when Mario opens a door you'll notice that the camera doesn't change.

Zoom Camera:
There are tons of spots in the game where a function is called to zoom the camera in, like flight or water (the function is 0x80286188). Since this is called so many times, if you wanted to make the camera normal for all of these you can either search the ROM for the JAL and NOP it all out (0C 0A 18 62) or you can simply make the function do nothing with this simple code.

.org 0x41190
LW RA, 0x1C (SP)
ADDIU SP, SP, 0x28

This will make the function jump back the beginning right after it starts.
The zoom camera has a weird angle change, so to fix that, you can change its' angle at 0x3F0C8 by changing what float is loaded into AT. Typically it's 0x4348 (200 in decimal, which is way too high). You can offset it by basically nothing if you instead change it to 0x3F80 (1 in decimal)

You may notice in the original SM64 the camera just would not go through walls whatsoever. Well, this is due to a function at 0x8028F914 in ram, which is JALed twice in the game for Lakitu and Mario cam. You can find it being JALed at 0x3BCF8 and 0x3F108 and NOP it if you don't wanna deal with those pesky walls.

I'm going to add more documentation on the camera as I figure it out.
Info on the Mario Cam was found here thanks to Skelux:
I also found more info in his multiplayer doc on his old website:
Pages: « 1 » Link
Forum Index - Non-SMW Hacking - Super Mario 64 Hacking - ASM & Data Repository - Camera Documentation

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy
  • sm64romhacks