RAM map (Boktai 3): Difference between revisions
Appearance
No edit summary |
→Global save data: Sound test flag |
||
(36 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
= EWRAM = | = EWRAM = | ||
{| class="wikitable" | {| class="wikitable exportable" | ||
|- | |- | ||
! Address || Type || Description | ! Address || Type || Description | ||
|- | |- | ||
| 0x02000580 || void* || Pointer | | 0x0200035c || bytecode* || "Enter password" menu base64 decoder table | ||
|- | |||
| 0x02000360 || bytecode* || "Enter password" menu player name decoder table | |||
|- | |||
| 0x02000580 || void* || Pointer to Django's actor data | |||
|- | |- | ||
| + 0x30 || i16[3] || Current position | | + 0x30 || i16[3] || Current position | ||
|- | |||
| + 0x332 | |||
|i16[3] | |||
|VIT/SPR/STR from equipment | |||
|- | |||
| + 0x41c | |||
|i16[3] | |||
|VIT/SPR/STR from stat points & cards | |||
|- | |- | ||
| + 0x424 || i16 || Current HP | | + 0x424 || i16 || Current HP | ||
|- | |||
| + 0x426 || i16 || Max HP | |||
|- | |- | ||
| + 0x428 || i16 || Current ENE | | + 0x428 || i16 || Current ENE | ||
|- | |- | ||
| | | + 0x430 || i16 || Max ENE | ||
|- | |||
| + 0x42C || i16 || Current TRC | |||
|- | |||
| 0x02000610 || script* || [[Bytecode]] interpreter: Program counter | |||
|- | |- | ||
| | | 0x02000700 || void* || Pointer to [[#Scratch struct]], defaults to 0x0203e200 on hard reset (but moves on soft resets) | ||
|- | |- | ||
| | | 0x0200070c || void* || Pointer to backup of the stat struct (created on screen transitions, reloaded on death, saved to save file when saving) | ||
|- | |||
| 0x02000708 || void* || Pointer to [[#World struct]], defaults to 0x0203e200 on hard reset (but moves on soft resets) | |||
|- | |||
| 0x0200070c || void* || Pointer to backup of the stat struct | |||
|- | |||
| 0x02000710 || void* || Pointer to [[#Stat struct]], defaults to 0x0203c400 on hard reset (but moves on soft resets) | |||
|- | |||
| 0x02000714 || || [[Heap]] (≈123.2 KiB) | |||
|- | |||
| 0x0200eec0 || || Boss HP | |||
|- | |||
| 0x020031c1 || i8 || [[Dialogue box]] portrait | |||
|- | |||
|0x02001bc8 | |||
|i32 | |||
|Total EXP until next level | |||
|} | |} | ||
== Stat struct == | == Stat struct == | ||
Access this struct via | Access this struct via 0x02000710. Size: 0x89c. See also: [[Inventory (Boktai 3)]]. | ||
{| class="wikitable" | {| class="wikitable exportable" | ||
|- | |- | ||
! Offset || Type || Description | ! Offset || Type || Description | ||
|- | |- | ||
| 0x18 || i16[4] || | | 0x18 || i16[4] || VIT/SPR/STR/? from stat points | ||
|- | |||
|0x20 | |||
|i16[4] | |||
|VIT/SPR/STR/? from cards | |||
|- | |||
| 0x28 || i16 || Current HP | |||
|- | |||
| 0x2a || i16 || Max HP | |||
|- | |||
| 0x2c || i16 || Current ENE | |||
|- | |||
| 0x2e || i16 || Max ENE | |||
|- | |||
| 0x30 || i16[3] || Django position | |||
|- | |||
|0x40 | |||
|i16 | |||
|Current level | |||
|- | |||
| 0x42 || i16 || Allocatable stat points | |||
|- | |||
| 0x48 || i32 || Total EXP | |||
|- | |||
| 0x50 || i16[8] || Current equipment (Weapon/Lens/Head/Body/Arms/Legs/?/?) | |||
|- | |||
| 0x68 || || Quick change list (sword) | |||
|- | |||
| 0x78 || || Quick change list (frame) | |||
|- | |||
| 0x90 || || Quick change list (lens) | |||
|- | |||
| 0xa0 || i16[48] || Item [[Inventory (Boktai 3)|inventory]] slots | |||
|- | |||
| 0xc0 || || Warehouse item box 1 | |||
|- | |||
| 0xe0 || || Warehouse item box 2 | |||
|- | |||
| 0x100 || i16[48] || Item inventory durability (negative = chocolate-covered) | |||
|- | |||
| 0x160 || || Accessory inventory | |||
|- | |||
| 0x180 || || Warehouse accessory box 1 | |||
|- | |||
| 0x1a0 || || Warehouse accessory box 2 | |||
|- | |||
| 0x1c0 || || Sword inventory | |||
|- | |||
| 0x2c0 || || Warehouse sword box 1 | |||
|- | |||
| 0x3c0 || || Warehouse sword box 2 | |||
|- | |||
| 0x4c0 || || Frame inventory | |||
|- | |||
| 0x5a4 || i32 || Current map's init script ID | |||
|- | |||
| 0x596 || i16 || Stuffed dolls (bitmask) | |||
|- | |||
| 0x598 || i16 || Solar bank interest rate (stored as (1+r)*64, e.g. 14.0625% = 73). Defaults to 65 when starting a new game. When the date changes, the rate will change to 65 + (IGT_frame_counter XOR RTC_seconds) mod 13 (effectively uniformly distributed in the interval [1.5625%, 20.3125%]). | |||
|- | |||
| 0x5ac || i16 || Current [[Maps (Boktai 3)#Areas|area ID]] | |||
|- | |||
| 0x5b8 || i32 || Acquired maps | |||
|- | |||
|0x50c | |||
|i16 | |||
|Dark loans | |||
|- | |||
| 0x608 || i32 || TRC gauge (0-1000) | |||
|- | |||
| 0x610 || i16 || Mr. Rainnot enabled | |||
|- | |||
| 0x614 || i32 || IGT frame counter for this save file | |||
|- | |||
| 0x638 || i32 || Red Django use | |||
|- | |||
| 0x63c || i32 || Black Django use | |||
|- | |||
| 0x6f0 || || Library: Monsters | |||
|- | |||
| 0x701 || || Library: Monster items | |||
|- | |||
| 0x720 || || Library: Head | |||
|- | |||
| 0x721 || || Library: Body | |||
|- | |||
| 0x722 || || Library: Body | |||
|- | |||
| 0x723 || || Library: Arms | |||
|- | |||
| 0x724 || || Library: Legs | |||
|- | |||
| 0x72c || || Library: Swords | |||
|- | |||
| 0x740 || i16 || Current [[Maps (Boktai 3)|map ID]] | |||
|- | |||
| 0x77c || i32 || Solar station balance | |||
|- | |||
| 0x780 || char[16] || Player name | |||
|- | |||
| 0x780 || char[?] || Coffin bike name | |||
|- | |||
| 0x7b0 || i16 || Solar bank balance | |||
|- | |||
| 0x7b2 || i16 || Bike battle - points | |||
|- | |||
| 0x7b4 || i16 || Bike battle - number of matches | |||
|- | |||
| 0x7b6 || i16 || Bike battle - number of wins | |||
|- | |||
| 0x7a0 || || [[Bike]] parts: Front | |||
|- | |||
| 0x7a2 || || Bike parts: Tires | |||
|- | |||
| 0x7a4 || || Bike parts: Body | |||
|- | |||
| 0x7a6 || || Bike parts: Special | |||
|- | |||
| 0x81a || || Bike parts: Color | |||
|- | |||
| 0x7a8 || || Bike parts: Option 1 | |||
|- | |||
|0x7aa | |||
| | |||
|Bike parts: Option 2 | |||
|- | |||
|0x7ac | |||
| | |||
|Bike parts: Option 3 | |||
|- | |||
|0x7ae | |||
| | |||
|Bike parts: Option 4 | |||
|- | |||
| 0x828 || || Lens inventory | |||
|- | |||
| 0x838 || || Key item inventory | |||
|- | |||
| 0x876 || || Solar sensor: Bars | |||
|} | |} | ||
== World struct == | == World struct == | ||
Access this struct via | Access this struct via 0x02000708. Size: 0x400. | ||
{| class="wikitable" | {| class="wikitable exportable" | ||
|- | |- | ||
! Offset || Type || Description | ! Offset || Type || Description | ||
|- | |- | ||
| 0x3c || i16 || Global story progress | |||
|- | |||
| 0x70 || i16 || Current door ID | |||
|- | |||
| 0x14e:1 || bit[4] || Dark Castle B15 wing completion flags | |||
|- | |||
| 0x14f:5 || bit[4] || Dark Castle B9 wing completion flags | |||
|- | |||
| 0x15d || bit[9] || Titles (Adept/Gladiator/SP Agent/Champion/Dark Hunter/Alchemist/Collector/Doll Master/Storyteller) | |||
|- | |||
| 0x19c:4 || bit[20] || ??? (bit 4 = Title: Grand master) | |||
|} | |} | ||
== Scratch struct == | == Scratch struct == | ||
Access this struct via | Access this struct via 0x02000700. | ||
{| class="wikitable" | {| class="wikitable exportable" | ||
|- | |- | ||
! Offset || Type || Description | ! Offset || Type || Description | ||
Line 50: | Line 233: | ||
= IWRAM = | = IWRAM = | ||
{| class="wikitable" | {| class="wikitable exportable" | ||
|- | |- | ||
! Address || Type || Description | ! Address || Type || Description | ||
|- | |||
| 0x03001664 || void* || Pointer to [[font]] | |||
|- | |||
| 0x0300523c || u32 || [[Actor]] disable flags | |||
|- | |||
| 0x03005260 || u16 || Keypad: down buttons (active-high) | |||
|- | |||
| 0x03005262 || u16 || Keypad: pressed buttons (down current frame, up on previous frame) | |||
|- | |||
| 0x03005264 || u16 || Keypad: released buttons (up on current frame, down on previous frame) | |||
|- | |||
| 0x03005280 || Array || [[Actor]] list | |||
|- | |- | ||
| 0x030052f4 || struct* || Pointer to current [[Map file]] descriptor (usually/always 0x02000010) | | 0x030052f4 || struct* || Pointer to current [[Map file]] descriptor (usually/always 0x02000010) | ||
Line 67: | Line 262: | ||
|- | |- | ||
| 0x03005308 || i32 || [[Random_number_generator|RNG]] index | | 0x03005308 || i32 || [[Random_number_generator|RNG]] index | ||
|- | |||
| 0x030053f8 || struct* || Pointer to [[#Global save data]] (always 0x030025c0) | |||
|- | |- | ||
| 0x03005418 || i16[3] || [[Coordinate systems|Camera]] position | | 0x03005418 || i16[3] || [[Coordinate systems|Camera]] position | ||
|- | |||
| 0x03005430 || u32 || RTC date (BCD, yyyymmdd) | |||
|- | |||
| 0x03005434 || u8 || RTC hours | |||
|- | |||
| 0x03005435 || u8 || RTC minutes | |||
|- | |||
| 0x03005436 || u8 || RTC seconds | |||
|- | |||
| 0x03005437 || u8 || RTC frames | |||
|- | |||
| 0x03005438 || u8 || RTC day of week | |||
|- | |||
| 0x0300543a || u8 || [[Time|Sunrise]] hours | |||
|- | |||
| 0x0300543b || u8 || Sunrise minutes | |||
|- | |||
| 0x0300543c || u8 || Sunset hours | |||
|- | |||
| 0x0300543d || u8 || Sunset minutes | |||
|- | |||
| 0x0300543e || u8 || Unknown, sunrise/sunset related | |||
|- | |||
| 0x0300543f || u8 || Unknown, sunrise/sunset related | |||
|- | |||
| 0x03005440 || u8 || Hours until sunset | |||
|- | |||
| 0x03005441 || u8 || Minutes until sunset | |||
|- | |||
| 0x03005442 || u8 || Hours until sunrise | |||
|- | |||
| 0x03005443 || u8 || Minutes until sunries | |||
|- | |||
| 0x03005448 || i32 || [[Time|Region]] latitude | |||
|- | |||
| 0x0300544c || i32 || Region longitude | |||
|} | |||
== Global save data == | |||
{| class="wikitable exportable" | |||
|- | |||
! Offset || Type || Description | |||
|- | |||
| 0x00 || i32 || Global frame counter | |||
|- | |||
| 0x04 || i32 || Solar sensor calibration (<code>raw_level - 2</code> at time of calibration) | |||
|- | |||
| 0x09 || u8 || Sound test unlock flag | |||
|- | |||
| 0x0b || u8 || Daylight savings time active | |||
|- | |||
| 0x18 || i32 || [[Time|Region ID]] | |||
|} | |} | ||