Hi. My goal with this thread is to obtain as much as information about Wario Land 4 which enough to start writing a level editor. Six or seven years ago when I got my GBA this game was my favourite one so that's why I'd like to hack it.
I messed with the US version of the game and here is what I found:
ROM
== Graphics
283F54 - Nintendo logo - 8bit - palette: 283F14 - width: 17
28B234 - Hangar - Indexed bitmap - palette: 28B210 - width: 30
28E880 - Legendary pyramid newspaper - 4bit - palette: 28E780 index: 0,1,2 - width: 32
295954 - Wario logo (?) - 4bit - palette: 2942FC - width: 24
29D4D0, 2A53F8, 2A4E3C - Wario sprites - 4bit - palette: 2DDDA0 - width: 32
2D41D4 - STEAKS! - 4bit - palette: 2D40F4 - width: 32
2D8390 - The End + push start - 4bit - palette: 2D830E index: 0,1,3
2D9D18 - If you continue with this... - 4bit - palette: 2D9C78
68CF5C - Pyramid - Indexed bitmap - palette: near 646358 somewhere
28C730 - Intro hangar sprites - 4bit - palette: 28C570 index: 0,1,2 - width: 32
2A37C0 - Hole - 4bit - palette: 2A37A0 - width: 16
Some of these sprites are compressed
Sprites to which I haven't found palettes:
285A40 - A few days later. - 4bit - w:32
73D764 - Menu - 4bit - w:32
7409C0 - Menutext - 4bit - w:32
74140C - - || -
741D00 - - || -
7430FC, 745350, 745B58
Some palettes: 2DDDA0 (Wario), 2DDFA0, 2DE918, 2DE3A0, 28C566 (intro)
== Level data
Wario Land 4 uses RLE compression for storing the rooms in the ROM. This algorithm is described here. Using this code I wrote a program which extracts this data and prints it to the screen. It can be downloaded from here. (FreePascal/Lazarus source included).
Starting: wl4decomp.exe "X:\\XYZ\\WarioLand4.gba"
Some ROM offsets for testing it:
59F82A 59F924 59f9e0 59fbf4 59fd03 59ff0b 5A0170 5a023c
5a0563 5a06e8 5a07bc 5a0963 5a0acc 5a0b58 5a0d0b 5a0e2b
5a0fb0 5a0fe2 5a1184 5a12e7 5a15bc 5a16bc 5a189b 59ee42
59e6fa 59e4ed 59e55c 59e211 59e16c 59e0cc 59de7b 59dc3c
59daed 59d486 59d2d8 59d004 59cdfa 59cd54 59c55d 59c138
59c073 59bcf8 59bc30 59bbec 59ba1a 59b934 59b857 59b54d
59b2eb 59b1a8 59b073 59ae78 59ad1a 59ac64 59ab3f 59a65b
59a2ac 59a16c 59a008
Right before the compressed data lies the width and height of the room and a list of its items. The following picture shows how does the first room of Palm Tree Paradise look like in the ROM. That room has got only one item, the portal.
Orange rectangle: The first item of the list. 05 is the Y position (from top) and 09 is the X position (from left) of the item. And 11 is the type of the item (01=First quarter box ... 04=Fourth quarter bpx, 05=CD Box, 06=Full health box, 07=Diamond, 08=Frog switch, 11=Portal, 12=Kaentsubo, 13=Totsumen, 14=A rock).
Green rectangle: The end of the list
Blue rectangle: The width and height of the room
Red area: The compressed data of the room
Like in Golden Passage
RAM
The most interesting I found in the RAM is a debug mode. (03000c3c 08)
http://www.youtube.com/watch?v=y1yfnDpp9xQ
And there is a small list of memory addresses with a short description which can be useful for hacking the ROM.
03000005 - A counter (2 bytes)
03000016 - Language - 00(English) 01(Japanese)
03000018 - RESET - 01(only reset) 02(delete savegames)
03000019 - Selected savegame - 00(A) 01(B)
03003C04 - Menu - 00(Eng-normal) 01(Eng-hard) 02(Jap-normal) 03(Jap-hard)
== Title screen
03002C66 - Start demo game (Entry passage) (?)
03002C67 - -||- (?)
03002C98 - "PUSH START" text's X position
03002C9A - Wariocar X position
03002C9C - Wariocar Y position
03002CA2 - 00(Hand) 01(Crown) (2 bytes (?) )
== Pyramid screen
03000002 - Selected passage - 00(Entry) 01(Emerald) 02(Ruby) 03(Topaz) 04(Sapphire) 05(Golden) 06(Sound Room)
03000010 - Selected passage (changes when stopped walking)
03000003 - Selected level in the passage - 00(first lvl) 01(second lvl) 02(third lvl) 03(fourth lvl) 05(Mini-Game Shop) 04(Boss)
03003c98 - Previously selected level in the passage
03003C99 - Gates in the passage - 01-05
03003C4E - 00-F0(Shader left)
03003C4F - 00-F0(Shader right)
03003c60 - 00-08(black cat+pink prof)
03003C6C - Camera position (2 bytes)
03003C88 - Pyramid X position (2 bytes)
03003C8A - Pyramid Y position (2 bytes)
03003c94 - 01(falling down from sound room) 03(enters the pyramid) 04(pyramid opens)
03003c95 - Pyramid - 00(closed) 01(opened) 02(can enter)
03003c97 - Smoke at the pyramid - 01(start)
03003c9c - Earthquake - 00(none) 01(small) 02-04(constant)
03003c94 - 01(wario fall off) 02(pyramid risen partially) 04(pyramid risen entirely) 03(wario enters a passage)
03003c44 - Wario facing - 00 01 02 03
\\ Wario facing in the passage - 00(right) 01(left) 02(things disabled) 04(wario hidden)
03003c45 - is-Wario-walking? - 00 01
03003c14 - Wario position x (4 byte)
03003c6c - Wario position y (4 byte)
03003c45 - Start walking! - 01
03003c6e - Walking path - (straight, curly...)
== Minigames
03000008 - Minigame coins (2 byte)
0300000a - Wario homerun derby highscore
0300000c - Wario hop highscore
0300000e - Wario roulette highscore
030047B8 - Selected minigame - 00 01 02 03(exit)
030047cc - Cursor X
030047ce - Cursor Y
030047D6 - Wario-hop counter
030049ca - Jump - 01(do jump)
030049d4 - Wario's jump y (?)
== Sound room
03004770 - 00-FF(CD Rotation)
03004772 - Music room selected thing - 00(exit) 01(karaoke) 02(karaoke is started) 03(one of the CDs) 04(CD is started)
03004773 - Sound Room CD x - 00 01 02 03
03004774 - Sound Room CD y - 00 01 02 03
0300477e - Kakaoke button highlight - 00(normal) 01(highlighted)
03004781 - Karaoke mode - 00(off) 01(on)
03004782 - Singing - 00(off) 01(on)
03004783 - Karaoke pitch - FD-03
03004784 - Karaoke speed - FD-03
== Pause menu
03000000 - Transition
03004794 - Selected item - 00(return) 01(quit) 02(giveup) 03(no) 04(yes)
03004795 - Menu message - 01(Progress in this...) 02(All the coins...)
== Ingame
03000023 - Current Tileset
03000024 - Room ID
03000025 - Which door is used to enter the room
03000060 - Currect Room width (2 bytes)
03000062 - Currect Room height (2 bytes)
03000c00 - Score's 1st digit
03000bff - Score's 2nd digit
03000bfe - Score's 3rd digit
03000bfd - Score's 4th digit
03000bfc - Score's 5th digit
03000c3a - 00(in intro screen) 01(pyramid screen) 02(ingame) 03(reset) 07(item shop) 0A(some scrambled selecting screen) 0C(credits)
03000c3c - 03(restart current room)
\t\t - ingame - 00(restart room) 01(fade) 03(lose level) 04(pause) 05(freeze) 06(lose level) 08(debug mode)\t\t
//03000c3a 00 + 03000c3c 23 = the end screen
03001910 - Wario's health - 01-08 00(kill wario)
03001911 - Add health to wario (heart count)
03001913 - Countdown before add health (default=8)
03001914 - Health fragment - 01-08 09-11(heart shapes)
03001915 - Add Health fragment to Wario
030019f6 - Disable enemies and wario(2 byte) (until reach 0) - 00-ff
030019f8 - Hide wario - 00(show) 01(hide) (?)
030000d8 - Set layer (secret wall/water/darkness) alpha - 00(alpha=0%) 10(alpha=100%)
030000d9 - Layer alpha
03000B86 - The Big Board counter
0300002A - Set light blurring 01-10
0300002B - Set lighting - 01-10
0300002F - Switch #1 - 00(off) 01(on) 02(switchon) 03(switchoff)
03000030 - Switch #2
03000031 - Switch #3
03000032 - Switch #4
03000033 - Connected with layers (?) - 01(topmost)
03000037 - Waving background -
03000047 - 02(Losing coins) 03(Losing coins without coin counter) 04(hide coin counter) 10(fade to grayscale) 0F(no interaction between wario and enemies)
030000D8 - Set lighting with transition - 00-10
030000D9 - Lighting counter
03000121 - Catbat's/Cuckoo Condor's health
0300014D - Spoiled Rotten's health
03000179 - Aerodent's health
03000255 - Cractus' health
03000A5B/030001FD - Golden diva's health (?)
030019f2 - Wario position x (2 byte) [read only]
030019f4 - Wario position y (2 byte) [read only]
030018aa - Wario position x (2 byte)
030018ac - Wario position y (2 byte)
030018ae - Momentum X (2 byte, signed)
030018b0 - Momentum Y (2 byte, signed)
030018a6 - Wario direction - 10(right) 20(left)
0300320e - Camera DestX (2 bytes)
03003210 - Camera DestY (2 bytes)
03003213 - Camera panning style (1 byte) - 00(default) 05(don't limit camera on y axis)
03003214 - Scroll background (1 byte) - 00(no) 01(yes)
03003215 - A counter
03003216 - Background X position (1 byte)
03003218 - Scroll foreground layer
03000C0D - Open portal - 01
03000BF0 - Countdown seconds' 2nd digit
03000BF1 - Countdown seconds' 1st digit
03000BF2 - Countdown minutes
03001898 - Wario transformations - 00(normal) 01(swimming) 02(burning) 03(fat) 04(frozen) 05(zombie) 06(snowball) 07(spring) 08(floating) 09(bat) 0a(flat)
03001899 - Wario animations - 02(standby) 11(pipe up) 12(pipe down) 36,37,38,39(weightlifting) 0c(do rolling) 0e(rolling) 0f(rolling jump) 13,14(blinking) 16(wall breaking) 17(speeding) 1d(hit down) 1e(connected with swimming?) 24(put on something) 25(throw away) 28,29,2b,2c,2d(climbing) 35(fearing) 34(ducking) 3a(walk forward then enter) 3b(playing) 42(shows his back) 41(shows his biceps) 43(shows his biceps #2) 44(very fearing) 4c(got the key and points to the air) 4d(attack pose) 53(holds something+GAME CRASH) 54(jumping down) 5b(stand wierd)
03001940 - Wario sprites ()
03001950 - Wario sprites ()
03001948 - Holding something - 00(no) 04(yes)
== Enemies
Enemy Slot #1
03000104 - Walking direction - 03(left) 43(right)
0300010c - Position Y
0300010e - Position X
03000118 - animation frame
0300011b - type - 2b(marumen) 2c(spoiled rotten) 11(spear-mask) 10(skeleton bird) 49(menono) 3f(yurei) 4e(ringosuki)
0300011d - tile Y (?)
0300011e - layer - 00-04
0300011f - Colour
03000120 - Anim - 10(walk) 11(turn back) 00(turn into weird colours) 12,14(turning back) 56,58(wario is holding left,right)
03000123 - Decreasing counter, enemy can't touch you while it's counting
Enemy Slot #2 = Enemy Slot #1 + 2C
== Level data
02000000 - Pointer list of the current level's rooms (16x 4 byte pointers)
02000040 - First room usually starts here
+0 - Room width
\t +2 - Room height
\t +4 - Uncompressed room data (1 tile=2 bytes)
== Music
03006110 - Music speed (2 byte)
03ffcf49 - Octaves (2 byte)
== Savegames
02038000 - Start
020382E0 -> Savegame #1
020382E1 - Selected passage (see 03000002)
020382E2 - Selected level 00-03(level #1-#4) 05(minigame) 04(boss) 06(at passage entry)
020382F0 - Selected Passage name (ASCII String, 8 bytes)
020382F8 - Selected Level name (ASCII String, 8 bytes)
02038300 - AutoSAVEWar4key1 (string, 16 bytes)
02038320 - Points (2 bytes)
0203831C - Minigame coins
02038444 - SAVE_END (string, 8 bytes)
And finally, I'm sorry for my poor English.