====== Banjo-Kazooie RAM Map ======
All RAM address below are for the NTSC-U 1.0 version of the game as it is the most commonly used version.
----
====== RAM Map Segments ======
^ Address ^^^^ Type ^ Description ^
^ USA 1.0 ^ USA 1.1 ^ PAL ^ JP ^ ::: ^ ::: ^
| 0x80000400 |||| Static | Bootloader |
| 0x8002D500 |||| Dynamic | Heap |
| 0x8023DA20 | 0x8023d680 | 0x8023E620 | 0x8023D680 | Static | Basic C Libraries Functions |
| 0x80275610 | 0x80274570 | 0x80275470 | 0x80274570 | Static | Basic C Libraries Variables |
| 0x80286F90 | 0x80285DD0 | 0x80286DB0 | 0x80285DD0 | Static | Game Engine Functions |
| 0x80363590 | 0x80362790 | 0x80363A00 | 0x80363AD0 | Static | Game Engine Variables |
| 0x803863F0 | | | | Static per Level | Level Specific Code |
| |||| Dynamic | Stack |
| 0x80400000 |||| Free | Expansion Pak |
----
====== Static Variables ======
===== Bootloader =====
^ Address ^ Type ^ Description ^
===== C Libraries =====
^ Address ^ Type ^ Description ^
===== Game Engine =====
^ Address ^ Type ^ Description ^
| 0x8037C0E0 | [[banjo_kazooie:model_data|model]]* | Player model pointer |
| 0x8037C0E4 | u16 [[banjo_kazooie:rom_map#object_model_files|modelFileIndex]] | Player model file index |
| 0x8037C0E6 | u8 | Player model opacity |
| 0x8037C0E7 | u8 | Player facing banjo or kazooie; 1=Banjo, 2=Kazooie |
| 0x8037C0E8 | u8 bool | Player visible flag |
| 0x8037C0EC | float | Player model scale |
| 0x8037C0E0 | float | Player model rotation X |
| 0x8037C0EC | float | Player model rotation Z |
| 0x8037C0EC | float | Player model rotation Y |
----
====== Static Functions ======
===== Bootloader =====
^ Address ^ Name ^ Inputs ^ Output ^ Description ^
| 0x80002000 | DMA_transfer | bool $a0 direction | | performs DMA transfer, ROM to RAM (0) or RAM to ROM (1) |
| ::: | ::: | u32* $a1 ROM_Addr | ::: | ::: |
| ::: | ::: | u32* $a2 RAM_Addr | ::: | ::: |
| ::: | ::: | u32 $a3 size | ::: | ::: |
| 0x800020E0 | get_DMA_SR | //void// | u32 | returns DMA status register |
===== C Libraries =====
^ Address ^ Name ^ Inputs ^ Output ^ Description ^
| ox8024F764 | loadMusicFile | u32 $z0 [[banjo_kazooie:rom_map#music_files|musicFIleIndex]] | //void// | loads music file into RAM |
| |||||
| 0x80254608 | memcpy | u8* $a0 dest | //void// | bitwise copy of memory for source to destination |
| ::: | ::: | u8* $a1 src | ::: | ::: |
| ::: | ::: | u32 $a2 size | ::: | ::: |
| 0x80254630 | memcpy_fast | u32* $a0 dest | //void// | wordwise copy of memory for source to destination |
| ::: | ::: | u32* $a1 src | ::: | ::: |
| ::: | ::: | u32 $a2 size | ::: | ::: |
| |||||
| 0x80254710 | heap_init | //void// | //void// | initialize heap |
| |||||
| 0x80254CA8 | malloc | u32 $a0 size | void* | returns address of heap segment of specified size |
| |||||
| 0x802550F0 | free | void* $a0 ptr | //void// | frees heap segment |
| |||||
| 0x80255358 | expandArray | void* $a0 srcPtr | void* | expands exisitng dynamic array |
| :::| ::: | uint $a1 size | ::: | ::: |
| |||||
| 0x802588DC | max | float $f12 f1 | float | returns maximum of 2 floats |
| ::: | ::: | float $f14 f2 | ::: | ::: |
| 0x80258904 | min | float $f12 f1 | float | returns minimum of 2 floats |
| ::: | ::: | float $f14 f2 | ::: | ::: |
| 0x8025892C | max | u32 $a0 int1 | u32 | returns maximum of 2 ints |
| ::: | ::: | u32 $a1 int2 | ::: | ::: |
| 0x80258948 | min | u32 $a0 int1 | u32 | returns minimum of 2 ints |
| ::: | ::: | u32 $a1 int2 | ::: | ::: |
| 0x80258964 | abs | float $f12 input | float | returns absolute value of float |
| |||||
| 0x802589CC | abs | S32 $a0 input | u32 | returns absolute value of int |
| |||||
| 0x80258B8C | zero_Vec3 |vec3_f* $a0 XYZ | //void// | clears 3D float vector |
| 0x80258BA4 | copy_Vec3 |vec3_f* $a0 dest | //void// | copies 3D float vector from source to destination |
| ::: | ::: |vec3_f* $a1 src | ::: | ::: |
| 0x80258BC0 | diff_Vec3 | vec3_f* $a0 dest | //void// | dest = (src1 - src2) |
| ::: | ::: | vec3_f* $a1 src1 | ::: | ::: |
| ::: | ::: | vec3_f* $a2 src2 | ::: | ::: |
| 0x80258BF4 | diff_Vec3 | vec3_f* $a0 src1 | //void// | src1 = (src1 - src2) |
| ::: | ::: | vec3_f* $a1 src2 | ::: | ::: |
| 0x80258C28 | set_Vec3 | vec3_f* $a0 dest | //void// | sets xyz vector |
| ::: | ::: | float $a1 X | ::: | ::: |
| ::: | ::: | float $a2 Y | ::: | ::: |
| ::: | ::: | float $a3 Z | ::: | ::: |
| 0x80258C48 | add_Vec3 | vec3_f* $a0 dest | //void// | dest = (src1 + src2) |
| ::: | ::: | vec3_f* $a1 src1 | ::: | ::: |
| ::: | ::: | vec3_f* $a2 src2 | ::: | ::: |
| 0x80258C7C | scale_Vec3 | vec3_f* $a0 src | //void// | scales src by scaler |
| ::: | ::: | float $a1 scaler | ::: | ::: |
| 0x80258CB0 | scale_Vec3 | vec3_f* $a0 dest | //void// | sets destination vector to src scaled by scaler |
| ::: | ::: | vec3_f* $a1 src | ::: | ::: |
| ::: | ::: | float $a2 scaler | ::: | ::: |
| 0x80258CDC | addAbs_Vec3 | vec3_f* $a0 src1 | //void// | src1 = abs(src1)+abs(src2) |
| ::: | ::: | vec3_f* $a1 src2 | ::: | ::: |
| 0x80258D68 | cnvtFToW_Vec3 | vec3_w* $a0 dest | //void// | converts float vector to word vector |
| ::: | ::: | vec3_f* $a1 src | ::: | ::: |
| 0x80258DA8 | cnvtFToH_Vec3 | vec3_h* $a0 dest | //void// | converts float vector to half vector |
| ::: | ::: | vec3_f* $a1 src | ::: | ::: |
| 0x80258DE8 | tuncFToW_Vec3 | vec3_w* $a0 dest | //void// | truncates float vector to word vector |
| ::: | ::: | vec3_f* $a1 src | ::: | ::: |
| 0x80258E24 | tuncFToH_Vec3 | vec3_h* $a0 dest | //void// | truncates float vector to half vector |
| ::: | ::: | vec3_f* $a1 src | ::: | ::: |
===== Game Engine =====
^ Address ^ Name ^ Inputs ^ Output ^ Description ^
|0x8028DE0C | spawn_CarriedObject | $a0 [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | //void// | spawns object relative to banjo, sets it as carried object, and puts banjo in carrying movement state |
| |||||
|0x8028F3B8 | unlockMove | $a0 [[banjo_kazooie:enums#move_index|moveIndex]] | //void// | unlocks specific move |
| |||||
|0x80291E88 | freePlayerModel | //void// | //void// | frees the player's model from memory |
| |||||
|0x80291FA0 | get_PlayerModel | //void// | [[banjo_kazooie:model_data|model]]* | returns pointer to player's model in RAM |
|0x80291FAC | get_PlayerModelFileIndex | //void// | [[banjo_kazooie:rom_map#object_model_files|modelFileIndex]] | returns index to player's model |
|0x80291FB8 | set_PlayerModelOpacity | u8 $a0 opacity | //void// | sets player's opacity |
|0x80291FC4 | set_PlayerModel | [[banjo_kazooie:model_data|model]]* $a0 modelPtr | //void// | sets player's model |
| |||||
|0x80292194 | set_PlayerModelScale | float $f12 scale | //void// | sets player's model scale |
| |||||
|0x80292194 | set_PlayerModelXYZDisjoint | vec3* $a0 disjointXYZ | //void// | sets player's model position disjoint amount|
|0x802921BC | set_PlayerModelYDisjoint | float $f12 disjointY | //void// | sets player's model Y position disjoint amount|
|0x802921C8 | set_PlayerModelVisibe | bool $a0 visibleFlag | //void// | sets player's model visible flag|
| |||||
|0x80292548 | is_PlayerModelVisibe | //void// | bool | returns player's model visible flag |
| |||||
|0x802957D8 | is_moveUnlocked |$a0 [[banjo_kazooie:enums#move_index|moveIndex]] | bool | checks if specific move is unlocked |
|0x802957F0 | get_unlockedMovesBitfield | //void// | u32 |returns bitfield of unlocked moves |
|0x80295804 | lockAllMoves | //void// | //void// | locks all moves |
| |||||
|0x8029AF50 | normalizeFloat | float $f12 input | float | returns float normalized to range |
|::: | ::: | float $f14 lowerLimit | ::: | ::: |
|::: | ::: | float $a2 upperLimit | ::: | ::: |
| |||||
|0x8029B62C | deathWarp | //void// | //void// | Causes Deathwarp |
|0x8029B6F0 | voidOut | //void// | //void// | Causes void out |
| |||||
|0x802C4140 | spawnObject | u32 $a0 [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | //void// | spawns object at position with 0 rotation|
| ::: | ::: | float $a1 XPos | ::: | ::: |
| ::: | ::: | float $a2 YPos | ::: | ::: |
| ::: | ::: | float $a3 ZPos | ::: | ::: |
| |||||
|0x802C4158 | spawn_Object | $a0 [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | //void// | spawns object at position with 0 rotation|
| ::: | ::: | float $a1 XPos | ::: | ::: |
| ::: | ::: | float $a2 YPos | ::: | ::: |
| ::: | ::: | float $a3 ZPos | ::: | ::: |
| |||||
|0x803056FC | spawn_Object | $a0 [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | //void// | spawns object at position and rotation|
| ::: | ::: | vec3_f $a1 posPtr | ::: | ::: |
| ::: | ::: | float $a2 YRotation | ::: | ::: |
| |||||
|0x8032811C | spawn_Object | $a0 [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | //void// | spawns object at position and rotation|
| ::: | ::: | vec3_f $a1 posPtr | ::: | ::: |
| ::: | ::: | float $a2 YRotation | ::: | ::: |
|0x8032813C | spawn_Object | $a0 [[banjo_kazooie:enums#object_spawn_index|objectSpawnIndex]] | //void// | spawns object at position and rotation|
| ::: | ::: | vec3_f $a1 posPtr | ::: | ::: |
| ::: | ::: | float $a2 YRotation | ::: | ::: |
| |||||
|0x8033D5D0 | strcat | char* $a0 dest | //void// | concatenates source string to destination string |
|::: | ::: | char* $a1 scr | ::: | ::: |
|0x8033D6A8 | strcat | char* $a0 dest | //void// | concatenates character to destination string |
|::: | ::: | char $a1 scr | ::: | ::: |
|0x8033D6E0 | FToA | char* $a0 dest | //void// | concatenates float to destination string (2 decimal places)|
|::: | ::: | float $a1 scr | ::: | ::: |
|0x8033D7B0 | FToA | char* $a0 dest | //void// | concatenates float to destination string |
|::: | ::: | float $a1 scr | ::: | ::: |
|::: | ::: | u32 $a2 deciPlace | ::: | ::: |
|0x8033D884 | IToA | char* $a0 dest | //void// | concatenates int to destination string (base 10)|
|::: | ::: | s32 $a1 scr | ::: | ::: |
|0x8033D8A4 | IToA | char* $a0 dest | //void// | concatenates float to destination string |
|::: | ::: | s32 $a1 scr | ::: | ::: |
|::: | ::: | u32 $a2 base | ::: | ::: |
|0x8033D9D4 | strcmp | char* $a0 str1 | u32 | compares 2 strings |
|::: | ::: | char* $a1 str2 | ::: | ::: |
|0x8033DA54 | strcpy | char* $a0 dest | //void// | copies source string to destination string |
|::: | ::: | char* $a1 src | ::: | ::: |
|0x8033DA80 | strlen | char* $a0 str | u32 | returns string length |
|0x8033DAB0 | strcmp2tok | char* $a0 str1 | u32 | compares 2 strings up to delimiter |
|::: | ::: | char* $a1 str2 | ::: | ::: |
|::: | ::: | char* $a2 delim | ::: | ::: |
|0x8033DB18 | strtok | char* $a0 str | char* | returns location of first delimiter in string |
|::: | ::: | char* $a1 delim | ::: | ::: |
|0x8033DB60 | strcpy2tok | char* $a0 dest | //void// | copies source string to destination string up to delimiter|
|::: | ::: | char* $a1 src | ::: | ::: |
|::: | ::: | char* $a2 delim | ::: | ::: |
|0x8033DBA4 | toupper | char* $a0 str | //void// | converts string to uppercase |