Wario Land 3/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Clarified what this bit setting does and when it's set.)
m (Xkeeper moved page Wario Land 3:RAM map to Wario Land 3/RAM map: normalize subpages and titles)
 
(One intermediate revision by one other user not shown)
Line 135: Line 135:
  13 - crawling
  13 - crawling
  14 - crouch jump
  14 - crouch jump
15 - hurt on ground (or in air)
16 - end of 15
  1A - stomping ground
  1A - stomping ground
  1E - grabbing object on ground
  1E - grabbing object on ground

Latest revision as of 02:42, 24 January 2024

Chip tiny.png The following article is a RAM map for Wario Land 3.

General

  • 0xC09B = Current scene
0 = start screen
1 = overworld map (20:4392)
2 = level (2:4000)
3 = end of level, displaying treasures and musical coins collected.
4 = pause menu
5 = golf minigame
6 = ???
7 = tutorials
8 = key obtention in level (collect key type of the region & suspends action temporarily)
9 = credits
A = playing golf minigame in the green dome (after collecting all color crayons)
B = ???
C = game over (failing against rudy the clown)
D = time attack mode triggered
E = choosing langage when creating new game
  • 0xC09C = Current operation(s) in the scene.
Level (C09B at 2) : 
 0 = entering level from overworld, white screen fade in. (function 47B)
 1 = loading everything related to the level, warping into the start of the level. (2:4024)
 2 = white screen fade out. (function 5ed)
 3 = level active time. (Main level function, 2:40aa)
 4 = door style warping start (function 928)
 5 = start of warping sequence (into another region), white screen fade in. (function 47B)
 6 = warping into the new region. (Main Warping function, 2:446e)

How C09B & C09C are used to access to the correct code for each scene : C09B is read at 1:4000, right below is a jumptable containing 1 address for each scene (in order and little endian) : rst28 does the jump accordingly. It does the same for C09C afterwards after doing an indirect call.

  • 0xCA04 = Coins (first digit)
  • 0xCA05 = Coins (last two digits)
    • Note: This value is stored as a decimal value; for example, when you have 99 coins, this is stored as 99 in hex, not 63 as you might expect.
  • 0xCA06 = Current Level
  • 0xCA39 = Number of treasures (first digit)
  • 0xCA3A = Number of treasures (last two digits)
    • Note: This value is stored as a decimal value; for example, when you have 99 treasures, this is stored as 99 in hex, not 63 as you might expect.
  • 0xCA3B = Day/Night (day when bit 0 = 0; night when bit 0 = 1)
  • 0xCA3C = Wario's power-ups (values 0A-0C do not affect Wario, but they do change the Action Help screen to the special screens for certain situations)
  • 0xCA3D = Completion state
This is a 4-bit binary value. The format is as follows:
xxxxx... - Unused?
.....x.. - Ability to skip the final boss intro cutscene by pressing the B button; set during either the Game Over or ending sequences
......x. - Time Attack enabled; set if 0xCA39 (first digit of number of treasures) is 1 either during the ending sequence or when the Perfect screen appears after a level is exited while the Rudy defeated flag is also set
.......x - Rudy defeated; set during the ending sequence
This value is then translated into hex.
Example 1: You have defeated Rudy without collecting all treasures. The binary value would be 00000101. In hex, this would be 05.
Example 2: All chests are collected while Rudy is defeated and Time Attack is enabled as a result. The binary value would be 00000111. In hex, this would be 07.
  • 0xCA46 = Language (Japanese when bit 0 = 0; English when bit 0 = 1)
  • 0xCA5B = Keys
This is a 4-bit binary value. The format is as follows:
xxxx.... - Unused
....x... - Blue Key
.....x.. - Green Key
......x. - Red Key
.......x - Gray Key
This value is then translated into hex.
Example 1: You have only a gray key. The binary value would be 00000001. In hex, this would be 01.
Example 2: You have both the blue and green keys. The binary value would be 00001100. In hex, this would be 0C.
Example 3: You have all the keys. The binary value would be 00001111. In hex, this would be 0F.
  • 0xCA5C = Musical Coins
  • 0xCED4 = provokes level end result sequence and treasure collection (and some other events).
0 - do nothing
---- following triggers level end sequence
1 - grey treasure
2 - red "
3 - green "
4 - blue "
5 - no treasure
From 8 to 7F - treasures from other levels. Glitched visuals, which treasure is collected seems relative to the level wario is in.
---- special events
6 = game over against rudy
7 = victory, credits.
  • 0xCEE3 = Last collected treasure in current game.
  • 2xD00E = Next treasure to collect

Wario

  • 0xCA61 = Sector Y position
  • 0xCA62 = Y position
  • 0xCA61 = Sector X position
  • 0xCA62 = X position
  • 0xCA69 = Orientation (1 = right ; 0 = left)
  • 0xCA6F = Hitbox top border (signed byte, negative)
  • 0xCA70 = Hitbox bottom border (positive)
  • 0xCA71 = Hitbox left border (signed byte, negative)
  • 0xCA72 = Hitbox right border (positive)
  • 0xCA73 = Scrolling screen flag, suspends action.
  • 0xCA74 = Jump type. Higher value means bigger jump. Linked to CA75.
- 0 : contact with ground (no jump)
- 1 : 1 tile jump (ex : fat wario jumps)
- 2 : 2 tiles jump (ex : crouch jumping)
- 3 : 3 tiles jump (ex : high jump upgrade)
- 4 : normal spring jump
- 5 : boosted spring jump
  • 0xCA75 = counter increasing each frame, starting at 0 (start of jump) and ending at 0x27 (end of fall).

It helps determining the vertical speed at each frame of the jump/fall.

The jumping/falling mechanism is located in 0:1488.

For each type of jump, an address is given pointing to a list which contains the vertical speed for each frame of the chosen jump.

- Jump 1 : 18f7
- Jump 2 : 18a7
- Jump 3 : 18cf
- Jump 4 : 191f
- Jump 5 : 1947

It selects the value in the list corresponding to the CA75 frame counter and simply adds it to Wario's Y position.

Starting with high negative values for the jump (Y-axis is inverted), progressing towards 0 and then positive values (fall), so it creates that pseudo-parabolic curve.


  • 0xCA83 = Wario Animation
0 - standing still
1 - walking
2 - turning over while walking
4 - jumping
5 - landing
6 - crouch sliding
7 - shoulderbash on ground
8 - shoulderbash in air
9 - bumping into walls, getting bumped by some enemies, etc. (19 does too in some cases)
A - falling into water
B - swimming slowly
C - paddling at the surface (not moving)
D - same as C but moving right or left.
E - swimming rapidly
F - bumping into walls while swimming rapidly
10 - hurt in water
12 - crouching 
13 - crawling
14 - crouch jump
15 - hurt on ground (or in air)
16 - end of 15
1A - stomping ground
1E - grabbing object on ground
1F - holding object while standing on ground
20 - 1F but walking
21 - 1F but in the air
22 - initiating throw
23 - charging mad throw
24 - throwing object while standing on ground
25 - 24 but in the air
27 - gliding on slope
28 - rolling on ground
29 - rolling in the air
4B - sleeping

At 7:4000 is the "hub" for all animations. First it checks invicibility and earthquake timer. Then it proceeds to separate animations into 4 groups with conditions.

Locations of the 4 groups of animations  :

- 0 to 2F : 7:404d
- 30 to 5F : 6:5c1b
- 60 to AF : A:4000
- B0 and superior : 7B:4000

(Precise location of each animation is as usual given in the jumptable below these 4 addresses)

  • 0xCA84-CA85 = frame counter to trigger various animations
Examples : 
 - When wario is standing still and doing nothing, it increments until it reaches 0x700 (~29s duration), which makes Wario falls asleep.
 - Crouch sliding is stopped when counter reaches 0x40 (~1s).
  • 0xCA8A = Intangibility flag, used when a door is entered by Wario to avoid being hurt or bumped by passing enemy.
  • 0xCA8C = Invincibility trigger (and timer). Prevents from being attacked or transformed by the environment.
0 : vulnerable 
Other values : invulnerable. 

Starts at 1 and increments by 1 each frame until 0x28 is attained (reset to 0).

  • 0xCA8D = Invisibility trigger. (0 = wario sprites allowed in OAM ; 1 = no wario sprites allowed)
  • 0xCA8E = Wario Status.
0 : normal state
9 : spring 
48 : zombie
53 : teruteru on wario's head (dark screen, vision blocked)
84 : fat 
85 : electrocuted
C1 : wario in fire
  • 0xCA8F = 2
  • 0xCA90-CA91 = Status timer. (for fat, spring, fire wario, etc)
  • 0xCA93 = Interaction upon contact with objects.
0 : normal
1 : ?? freezes the game until another value is set
2 : can't grab objects   
3 : bash them
4 : destroy them (crushing effect )
Rest of values seem to do a similar effect as 2.
  • 0xCA96 = Butt stomping flags. (1 = butt stomping in the air ; 81 = butt stomping on ground)
  • 0xCA97 = Earthquake timer.
  • 0xCA98 = Earthquake type flag. (1 = wario earthquake ; 0 = from enemy).