Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

Wario Land 3/RAM map

From Data Crystal
Jump to navigation Jump to search

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)
  • 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.
  • 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
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

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)