RAM map (Boktai 2): Difference between revisions

Heap, camera, time
 
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
|-
|-
! Address || Type || Description
! Address || Type || Description
|-
| 0x02000000 || || [[Heap]] (129 KiB)
|-
|-
| 0x0200184c || || Is full moon (*0x030047f6 == 4)
| 0x0200184c || || Is full moon (*0x030047f6 == 4)
Line 18: Line 20:


== Stat struct ==
== Stat struct ==
Access this struct via 0x030046a0. See also: [[Inventory (Boktai 2)]].
Access this struct via 0x030046a0. Size: 0x958 bytes. See also: [[Inventory (Boktai 2)]].


{| class="wikitable exportable"
{| class="wikitable exportable"
Line 65: Line 67:
|-
|-
| 0x2ce || || Sabata: Kaamos status
| 0x2ce || || Sabata: Kaamos status
|-
| 0x3bc || i32 || Solar Station
|-
|-
| 0x3d0 || struct[16] || [[Inventory (Boktai 2)#Weapons|Weapon inventory]]
| 0x3d0 || struct[16] || [[Inventory (Boktai 2)#Weapons|Weapon inventory]]
|-
| 0x910 || i32 || Solar Bank
|}
|}
''* <small>Sabata's level is always Django's level +10. His stats are also spread evenly. Each point is added in the following order : VIT > SPR > STR > AGI > Repeat</small>''
''* <small>Sabata's level is always Django's level +10. His stats are also spread evenly. Each point is added in the following order : VIT > SPR > STR > AGI > Repeat.</small>''


== World struct ==
== World struct ==
Access this struct via 0x03004698. ''Note:'' In the Japanese version, this struct is laid out slightly differently.
Access this struct via 0x03004698. Size: 0x400 bytes. ''Note:'' In the Japanese version, this struct is laid out slightly differently.


{| class="wikitable exportable"
{| class="wikitable exportable"
Line 86: Line 92:
|-
|-
| 0x180 || u8 || Spiral tower axe+ puzzle: Sabata's direction (0=East, 1=West)
| 0x180 || u8 || Spiral tower axe+ puzzle: Sabata's direction (0=East, 1=West)
|-
| 0x1ac:0 || bit || House of Time: Present/past flag
|-
|-
| 0x1e8 || i16 || Current door ID
| 0x1e8 || i16 || Current door ID
Line 116: Line 124:
| + 0x364 || i32[2] || Current HP/ENE
| + 0x364 || i32[2] || Current HP/ENE
|-
|-
| 0x03002cb8 || code* || Pointer to TM3 interrupt handler
| 0x03002cb4 || code* || Pointer to SIO IRQ handler
|-
| 0x03002cb8 || code* || Pointer to TM3 IRQ handler
|-
| 0x03002ce4 || i32 || MusicPlayer2000 VBlank IRQ done flag (set by VBlank IRQ handler to 1 after calling MP2K_SoundVSync(), but before video processing)
|-
|-
| 0x03002cf0 || i32 || Frames since reset
| 0x03002cf0 || i32 || Frames since reset
|-
| 0x03003540 || |i16[3] || [[Coordinate systems|Camera]] position in world space
|-
| 0x03003548 || i16 || Tile map X coordinate in view space
|-
| 0x0300354a || i16 || Tile map Y coordinate in view space
|-
|-
| 0x030044bc || u32 || [[Actor]] disable flags
| 0x030044bc || u32 || [[Actor]] disable flags
Line 133: Line 151:
|-
|-
| 0x03004690 || void* || Pointer to [[#Scratch struct]], defaults to 0x0203e200 on hard reset (but moves on soft resets)
| 0x03004690 || void* || Pointer to [[#Scratch struct]], defaults to 0x0203e200 on hard reset (but moves on soft resets)
|-
| 0x03004694 || void* || Pointer to backup of the world struct (created on screen transitions, reloaded on death, saved to save file when saving)
|-
|-
| 0x03004698 || void* || Pointer to [[#World struct]], defaults to 0x0203da00 on hard reset (but moves on soft resets)
| 0x03004698 || void* || Pointer to [[#World struct]], defaults to 0x0203da00 on hard reset (but moves on soft resets)
|-
| 0x0300469c || void* || Pointer to backup of the stat struct
|-
|-
| 0x030046a0 || void* || Pointer to [[#Stat struct]], defaults to 0x0203c400 on hard reset (but moves on soft resets)
| 0x030046a0 || void* || Pointer to [[#Stat struct]], defaults to 0x0203c400 on hard reset (but moves on soft resets)
Line 141: Line 163:
|-
|-
| 0x030046b8 || i32 || [[Random number generator|RNG index]]
| 0x030046b8 || i32 || [[Random number generator|RNG index]]
|-
| 0x030047c8 || i16[3] || [[Coordinate systems|Camera]] position in view space
|-
| 0x030047d0 || Camera* || Pointer to camera actor
|-
|-
| 0x030047e0 || u32 || RTC date (BCD, yyyymmdd)
| 0x030047e0 || u32 || RTC date (BCD, yyyymmdd)
Line 161: Line 187:
|-
|-
| 0x030047ed || u8 || Sunset minutes
| 0x030047ed || u8 || Sunset minutes
|-
| 0x030047f0 || u8 || Hours until sunset
|-
| 0x030047f1 || u8 || Minutes until sunset
|-
| 0x030047f2 || u8 || Hours until sunrise
|-
| 0x030047f3 || u8 || Minutes until sunrise
|-
|-
| 0x030047f6 || i32 || Current moon phase
| 0x030047f6 || i32 || Current moon phase
Line 175: Line 209:
|-
|-
| 0x030057c8 || i32 || Solar sensor interface: Raw level (counter / 2 when GPIO_DATA & 8 becomes nonzero. 0=max brightness, 255=dark)
| 0x030057c8 || i32 || Solar sensor interface: Raw level (counter / 2 when GPIO_DATA & 8 becomes nonzero. 0=max brightness, 255=dark)
|-
| 0x03007ff0 || void* || MusicPlayer2000: Pointer to sound buffer
|}
|}