RAM map (Boktai 1): Difference between revisions
m →IWRAM |
Add camera, text output, etc |
||
(11 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
|- | |- | ||
! Address || Type || Description | ! Address || Type || Description | ||
|- | |||
| 0x02000000 || || [[Heap]] (105 KiB) | |||
|- | |- | ||
| 0x020011c0 || i32 || [[Solar sensor]]: Calibrated level (0=dark, 140=max brightness. Calibrated level = calibration - raw level, then clamp to 0-140) | | 0x020011c0 || i32 || [[Solar sensor]]: Calibrated level (0=dark, 140=max brightness. Calibrated level = calibration - raw level, then clamp to 0-140) | ||
Line 31: | Line 33: | ||
|- | |- | ||
| 0x02008be6 || i16 || Purification: bottom left tower health | | 0x02008be6 || i16 || Purification: bottom left tower health | ||
|- | |||
| 0x0201a400 || struct || Decompressed [[tile map file]] (only used if the tile map file was compressed, uncompressed files are accessed directly from ROM) | |||
|- | |- | ||
| 0x0203c800 || u16[1024] || [[Random number generator|RNG table]] (generated by the bootstrap RNG once on power-on) | | 0x0203c800 || u16[1024] || [[Random number generator|RNG table]] (generated by the bootstrap RNG once on power-on) | ||
|- | |- | ||
| 0x0203d800 || byte[ | | 0x0203d800 || byte[0x580] || [[#Stat struct]] | ||
|- | |- | ||
| 0x0203e000 || byte[ | | 0x0203e000 || byte[0x580] || Stat struct - backup (created on screen transitions, reloaded on death, saved to save file when saving) | ||
|- | |- | ||
| 0x0203e800 || byte[ | | 0x0203e800 || byte[0x400] || [[#World struct]] | ||
|- | |- | ||
| 0x0203ec00 || byte[ | | 0x0203ec00 || byte[0x400] || World struct - backup | ||
|- | |- | ||
| 0x0203f000 || byte[ | | 0x0203f000 || byte[0x400] || [[#Scratch struct]] | ||
|} | |} | ||
Line 123: | Line 127: | ||
| 0x0203dcd8 || i16[8] || Lens EXP | | 0x0203dcd8 || i16[8] || Lens EXP | ||
|- | |- | ||
| 0x0203dce8 || i32 || Solar | | 0x0203dce8 || i32 || Solar station | ||
|- | |- | ||
| 0x0203dd2c || i16 || Link points source | | 0x0203dd2c || i16 || Link points source | ||
Line 156: | Line 160: | ||
|- | |- | ||
| 0x0203e8d0:3 || bit || Undead: Trigger dungeon intro | | 0x0203e8d0:3 || bit || Undead: Trigger dungeon intro | ||
|- | |||
| 0x0203e8d4 || u8 || Azure Sky Tower: Current room (0=NE, 1=SE, 2=NW, 3=SW) | |||
|- | |||
| 0x0203e8dc || u8 || Azure Sky Tower: Enemy index of key holder (see 0x0203eab4 and 0x0203eac4) | |||
|- | |||
| 0x0203e8dd || u8 || Azure Sky Tower: Current floor | |||
|- | |||
| 0x0203e8e0 || u8 || Azure Sky Tower: Number of completions | |||
|- | |||
| 0x0203e8de || u8 || Azure Sky Tower: Current palette (0-7) | |||
|- | |||
| 0x0203e8e1 || u8[4] || Azure Sky Tower: Current floor room indices (indices: 0=NE, 1=SE, 2=NW, 3=SW). The index of the current room will be copied to 0x0203f2f6. | |||
|- | |- | ||
| 0x0203ea1a || i16 || Current door ID | | 0x0203ea1a || i16 || Current door ID | ||
|- | |||
| 0x0203ea1c || i32 || Current door script ID (used for respawning the player after using the bank/loans) | |||
|- | |- | ||
| 0x0203ea91 || u8 || Bloodrust mansion courtyard layout | | 0x0203ea91 || u8 || Bloodrust mansion courtyard layout | ||
|- | |||
| 0x0203eab4 || u8[16] || Azure Sky Tower: Current floor enemy types. Entries 0-3=NE room, 4-7=SE, 8-11=NW, 12-15=SW. (TODO: value list) | |||
|- | |||
| 0x0203eac4 || u8[32] || Azure Sky Tower: Current floor enemy coordinates (TODO: how does this work?) | |||
|} | |} | ||
Line 182: | Line 204: | ||
|- | |- | ||
| 0x0203f1c8 || u8 || Carmilla: Pattern index (index into pattern pool) - the (current/next?) pattern is pattern_list[pattern_pool[next_pool_value]] | | 0x0203f1c8 || u8 || Carmilla: Pattern index (index into pattern pool) - the (current/next?) pattern is pattern_list[pattern_pool[next_pool_value]] | ||
|- | |||
| 0x0203f2f6 || u8 || Azure Sky Tower: Current room index (0-31) | |||
|} | |} | ||
Line 189: | Line 213: | ||
|- | |- | ||
! Address || Type || Description | ! Address || Type || Description | ||
|- | |||
| 0x03000600 || void* || ID of [[Tile map file]] that has been decompressed to 0x0201a400 | |||
|- | |- | ||
| 0x03000630 || i32 || Solar sensor interface: State (0=measuring, 1=resetting, 2=idle) | | 0x03000630 || i32 || Solar sensor interface: State (0=measuring, 1=resetting, 2=idle) | ||
Line 198: | Line 224: | ||
| 0x03000648 || void* || [[Script directory]]: Script index pointer | | 0x03000648 || void* || [[Script directory]]: Script index pointer | ||
|- | |- | ||
| | | 0x0300064c || void* || Script directory: Script count | ||
|- | |||
| 0x03000650 || void* || Script directory: Script data pointer | |||
|- | |||
| 0x03000654 || void* || Script directory: Special script pointer | |||
|- | |||
| 0x03000658 || void* || Script directory: Script index end pointer | |||
|- | |||
| 0x0300065c || void* || Script directory: String index pointer | |||
|- | |||
| 0x03000660 || void* || Script directory: String data pointer | |||
|- | |- | ||
| 0x03000108 || treasure_data* || Pointer to this map's [[#Treasure data]] (NULL if map has no treasures) | | 0x03000108 || treasure_data* || Pointer to this map's [[#Treasure data]] (NULL if map has no treasures) | ||
|- | |||
| 0x03001c20 || Actor* || Pointer to coffin [[actor]] | |||
|- | |- | ||
| 0x03001c2c || i16 || Solar sensor: Bars. See 0x020011c2. | | 0x03001c2c || i16 || Solar sensor: Bars. See 0x020011c2. | ||
Line 216: | Line 254: | ||
| + 0x18 || i32 || Current lens level | | + 0x18 || i32 || Current lens level | ||
|- | |- | ||
| + | | + 0x24 || i16[3] || Current position | ||
| | |- | ||
|Max HP - Current HP | | + 0x11a || || Max HP - Current HP | ||
|- | |||
| + 0x79a || u16 || Enduranut buffered damage | |||
|- | |- | ||
| + 0x7dc || i32 || Astro battery unlock password | | + 0x7dc || i32 || Astro battery unlock password | ||
|- | |- | ||
| 0x03001cc8 || void* || Pointer to linked list of bat enemies? | | 0x03001cc8 || void* || Pointer to linked list of bat enemies? | ||
|- | |||
| 0x03002578 || i16 || Tile map X coordinate in view space | |||
|- | |||
| 0x0300257a || i16 || Tile map Y coordinate in view space | |||
|- | |||
| 0x030025b0 || i32 || Sprite palette count | |||
|- | |||
| 0x030025b4 || void* || Pointer to sprite palettes | |||
|- | |||
| 0x03002650 || GBA_OBJ[128] || GBA [https://problemkaputt.de/gbatek-lcd-obj-oam-attributes.htm OAM], will be copied to OAM memory every frame | |||
|- | |||
| 0x03002a58 || i32 || OAM size | |||
|- | |||
| 0x03002e80 || u16 || GBA [https://problemkaputt.de/gbatek-lcd-i-o-display-control.htm DISPCNT] register | |||
|- | |||
| 0x03003fb0 || u16[0x100] || OBJ palette buffer (copied to PAL memory every frame) | |||
|- | |||
| 0x030043c4 || void* || ''Pointer'' to background palette buffer (0x200 bytes, in IWRAM, copied to PAL memory every frame) | |||
|- | |||
| 0x030043fc || u8 || Text output: Current X coordinate | |||
|- | |||
| 0x03004400 || u8 || Text output: Character count | |||
|- | |||
| 0x03004404 || u8 || Text output: Line height | |||
|- | |||
| 0x03004408 || u8 || Text output: Start X coordinate | |||
|- | |||
| 0x03004410 || u8 || Text output: Character width | |||
|- | |||
| 0x03004414 || u8 || Text output: Current Y coordinate | |||
|- | |- | ||
| 0x03004438 || u32 || [[Actor]] disable flags | | 0x03004438 || u32 || [[Actor]] disable flags | ||
|- | |||
| 0x03004450 || u16 || Keypad: down buttons (active-high) | |||
|- | |||
| 0x03004452 || u16 || Keypad: pressed buttons (down current frame, up on previous frame) | |||
|- | |||
| 0x03004454 || u16 || Keypad: released buttons (up on current frame, down on previous frame) | |||
|- | |- | ||
| 0x03004478 || i32 || [[Random number generator|Bootstrap RNG seed]] | | 0x03004478 || i32 || [[Random number generator|Bootstrap RNG seed]] | ||
Line 266: | Line 342: | ||
| 0x030046c4 || struct* || Pointer to [[#Global save data]] (always 0x03000750) | | 0x030046c4 || struct* || Pointer to [[#Global save data]] (always 0x03000750) | ||
|- | |- | ||
| 0x030046e8 || i16[3] || [[Coordinate systems|Camera]] position | | 0x030046e8 || i16[3] || [[Coordinate systems|Camera]] position in view space | ||
|- | |||
| 0x030046f0 || Camera* || Pointer to camera actor | |||
|} | |} | ||
Line 287: | Line 365: | ||
|- | |- | ||
| 0x04 || i32 || Solar sensor calibration (<code>raw level - 2</code> at time of calibration) | | 0x04 || i32 || Solar sensor calibration (<code>raw level - 2</code> at time of calibration) | ||
|- | |||
| 0x08 || i32 || Solar bank | |||
|} | |} | ||