Donkey Kong Land III info

Share ROM offsets and general DKC hacking documentation

Donkey Kong Land III info

Postby Raccoon Sam » January 18th, 2009, 1:05 pm

First of all, the spark that lit up this fuse for DKL3 ROM hacking was none other than our very own Blaziken257, whose noble hacking effort bore fruit and eventually grew into a small document consisting of the Header format of Donkey Kong Land III. He has also made a Colorization hack and documented his discoveries very well, so I can do no more than thank you; you are an outstanding hacker.

Now, let's get down to business. The primary ROM we'll be using is the US 1.0 Game Boy version of Donkey Kong Land III. The Japanese colored version should be treated as the secondary ROM, as its differences are big, but the general arrays stay the same.
0x40065 starts the header array. Each header is $19 bytes long and store the information of the level. There are 42 headers in total, and in total take up 1050 bytes.
The information below is based on the first header, Total Rekoil.

03 = Level byte.
00 = Unknown. Tileset related?
00 = Unknown. Sprite related?
00 = Properties (bitwise). Bit 6 = water visibility, Bit 3 = facing direction, Bit 0 = slipperiness. Other bits have no effect.
11 = Music.
FF = Water tide. Lower value = higher surface.
FF = Rain effect. 00 = snow, 01 = water.
30 = X position from start.
32 = Y position from start.
07 = X position from midway barrel.
15 = Y position from midway barrel.
30 = X position from first bonus.
32 = Y position from first bonus.
32 = X position from second bonus.
06 = Y position from second bonus.
0E = X position from Warp.
05 = Y position from Warp.
06 = Bonus #1.
07 = Bonus #2.
C9 = Warp level.
00 = Unknown. Is either 00 or 01.
01 = Unknown. Is either 00 or 01.
01 = Unknown. Is either 00 or 01.
06 = Unknown. See below
80 = Unknown. Is linked to the byte above. If both are 00, you will die upon entering the level. All other values show no visible effect(?)

These are the headers for all of the levels in the order they appear in the ROM. It is yet unknown if Bonus and Warp levels use a different header format, but they are not directly before or after these level header arrays.
Spoiler!
03 00 00 00 11 FF FF 30 32 07 15 30 32 32 06 0E 05 06 07 C9 00 01 01 06 80 - Total Rekoil
04 00 00 00 11 FF FF 05 45 1C 17 1A 30 03 0C 03 16 08 09 CA 01 00 00 08 E0 - Liftshaft Lottery
05 00 00 00 11 FF FF 02 6D 10 43 10 63 0D 15 00 00 0A 0B FF 01 01 01 0D E0 - Miller Instinct
09 01 01 01 12 FF 00 02 05 6A 07 EA 04 C6 05 00 00 17 16 FF 01 00 01 01 A0 - Black Ice Blitz
0A 01 01 01 15 FF 00 02 03 74 04 57 06 A1 06 00 00 12 13 FF 00 00 01 01 E0 - Polar Pitfalls
0B 01 01 01 15 FF FF 0A 03 76 04 02 03 50 06 00 00 14 15 FF 00 00 01 01 80 - Tundra Blunda
27 01 01 09 1B FF FF 04 06 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 01 40 - Bleak Magic
0D 02 02 00 0B 08 FF 03 05 66 04 31 04 7C 02 BA 05 1A 1B CD 00 00 00 01 C0 - Red Wharf
0E 02 02 00 0B 08 FF 08 05 65 04 97 03 54 05 BA 05 1C 1D FF 00 00 00 01 C0 - Ford knocks
0C 02 02 00 0B 08 FF 02 07 53 04 4A 07 84 07 93 06 18 19 CC 00 00 00 01 C0 - Jetty Jitters
06 03 03 00 0C 08 FF 02 07 4D 0A 47 03 89 07 9F 05 0C 0D CB 00 00 00 01 C0 - Koco Channel
07 03 03 00 0C 0C FF 05 04 5A 09 12 0F 90 0F 9F 05 0E 0F FF 00 00 00 02 40 - Riverbank Riot
08 03 03 00 0C 09 FF 0A 08 6C 07 02 06 4C 05 9F 05 10 11 FF 00 00 00 01 E0 - Surface Tension
00 04 04 00 10 00 FF 04 02 10 25 0B 43 33 43 43 39 00 01 C8 00 00 00 09 00 - Seabed Shanty
01 04 04 00 10 00 FF 02 45 2C 3D 1C 3B 08 17 06 04 02 03 FF 00 01 01 09 20 - Coral Quarrel
02 04 04 00 10 00 FF 02 07 36 0B 22 02 41 33 08 17 04 05 FF 01 00 01 09 60 - Deep Reef Grief
24 04 04 00 1B 00 FF 03 03 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 01 20 - Barbos Bastion
0F 05 05 00 0E FF FF 03 2E 1F 23 1B 24 3C 01 00 00 1E 1F FF 00 00 00 06 20 - Minky Mischief
10 05 05 00 0E FF FF 03 03 1F 0A 03 14 28 19 00 00 20 21 FF 00 00 00 05 00 - Redwood Rampage
11 05 05 08 0E FF FF 3E 20 1A 1F 23 12 12 06 00 00 22 23 FF 01 01 00 04 60 - Simian Shimmy
25 05 05 00 1B FF FF 03 06 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 01 20 - Arich Attack
12 06 06 00 0F FF 01 02 05 09 3C 0D 22 09 5F 00 00 24 25 FF 00 01 00 0C 60 - Vertigo Verge
13 06 06 00 0F FF 01 02 43 15 1B 0A 25 33 04 00 00 26 27 FF 01 01 00 08 A0 - Rockface Chase
14 06 06 08 0F FF 01 20 04 14 2B 09 16 07 66 00 00 28 29 FF 00 00 00 0E 80 - Clifftop Critters
15 07 07 08 15 FF FF 17 6D 0E 2E 18 5C 06 0D 00 00 2A 2B FF 00 00 00 0E 00 - Rocketeer Rally
16 07 07 00 15 FF FF 02 51 1C 2B 18 33 2C 03 00 00 2C 2D FF 00 01 00 0A 80 - Footloose Falls
17 07 07 08 15 FF FF 48 36 29 1F 32 21 03 05 00 00 2E 2F FF 01 00 00 07 60 - Rickety Rapids
18 08 08 00 16 FF FF 02 15 60 14 3F 06 05 21 00 00 30 31 FF 00 00 00 05 20 - Stalagmite Frights
19 08 08 48 16 25 FF 3A 2D 24 1B 1E 31 18 13 00 00 32 33 FF 01 00 00 07 20 - Haunted Hollows
1A 08 08 00 16 FF FF 02 08 1A 2B 1B 22 20 35 00 00 34 35 FF 01 01 00 08 E0 - Ghoulish Grotto
29 08 08 00 1B FF FF 06 07 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 01 60 - K. Rool's Last Stand
1B 09 09 00 13 FF FF 02 04 86 05 3D 07 C5 07 02 02 36 37 FF 00 00 01 01 60 - Jungle Jeopardy
1C 09 09 00 13 FF FF 05 04 5E 06 5A 06 E7 01 02 02 38 39 FF 00 01 01 01 80 - Tropical Tightropes
1D 09 09 00 13 FF FF 10 04 65 03 D4 03 10 04 10 04 3A 3B FF 00 00 01 01 40 - Rainforest Rumble
1E 0A 0A 00 0D FF FF 02 06 27 15 41 06 1D 28 00 00 3C 3D FF 01 00 01 05 40 - Karbine Kaos
1F 0A 0A 00 0D FF FF 02 44 2A 25 08 30 3F 16 02 02 3E 3F FF 01 01 01 08 C0 - Bazuka Bombard
20 0A 0A 00 0D FF FF 02 26 2C 14 4C 1F 04 08 02 02 40 41 FF 00 00 01 05 40 - Kuchuka Karnage
21 0A 0A 08 0D FF FF 1B 06 0A 24 33 17 2F 45 02 02 42 43 FF 01 00 01 FF FF - Barrel Boulevard
26 0A 0A 00 1B FF FF 02 09 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 01 80 - Krazy Kaos
22 0B 0B 40 16 1D FF 22 2F 12 1A 04 2B 2D 0D 00 00 44 45 FF 01 01 01 06 60 - Ugly Ducting
23 0B 0B 00 12 FF FF 03 04 6C 06 BE 04 BE 04 02 02 46 47 FF 01 01 01 01 A0 - Whiplash Dash
28 0B 0B 40 1B FF FF 04 02 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 01 40 - K. Rool Duel

Music bytes:
Spoiler!
00 - (Silence)
01 - (Silence)
02 - Dixie Beat
03 - Crazy Calypso
04 - Northern Kremisphere
05 - Brothers Bear
06 - Bonus Time (screen)
07 - Bonus Time (stage)
08 - Bonus Win
09 - Bonus Lose
0A - (Silence)
0B - Stilt Village
0C - Enchanted Riverbank
0D - Nuts & Bolts
0E - Treetop Tumble
0F - Rockface Rumble
10 - Water World
11 - Mill Fever
12 - Hot Pursuit
13 - Jungle Jitter
14 - Rocket Run (Unused theme!)
15 - Cascade Capers
16 - Cavern Caprice
17 - (Silence)
18 - (Silence)
19 - Death
1A - Level Complete
1B - Big Boss Blues
1C - Wrinkly Refuge
1D - Baddies on Parade
1E - Game Over
Musical values beyong 1E are just duplicates of earlier songs, starting from Stilt Village.
1F = 0B
20 = 0C
21 = 0D etc...

Our goal here is to gather more and more info on how the game works, compare them to DKL 1 and 2, test, edit, fail, succeed and give potential to maybe even a level editor.
More info available on the Datacrystal page of DKL3, mostly Blaziken's notes.

Our top priority at the moment: Figure out what the unknown bytes in the header mean.
Trailblazer
Bananas received 35
Posts: 267
Joined: 2008

Re: Donkey Kong Land III info

Postby Blaziken257 » January 18th, 2009, 2:23 pm

Yay, you added the info here! And you're welcome! You helped too though. :)

Anyway, there's something important to mention about the music. After the first time you enter a level, the game sets a flag so that if you enter a level again, it adds $14 to the music byte (e.g. $00 -> $14, $01 -> $15, $02 -> $16, and so on). This is to make it the beginning of the music of any level will be shorter (I don't know why this was necessary, but whatever). This doesn't affect bonus stages at all (or else you'd hear it play the boss stage). This flag remains until you turn the game off. And if you hack it so that you pick music that's not in a level (like the file select screen, it changes to something completely different.

Oh, I'd like to elaborate on the fourth byte. With bit 6 (i.e. the 6th least significant bit), it decides whether the water darkens or not (which makes it look like you're pausing the game). When the bit is 1, the water is darkened. When the bit is 0, it's not. For some reason, in the Game Boy Color version, this only affects the Tube and Cave stages, and uses some special programming trick with the scanlines where part of the screen loads a different palette (similar to Sonic for Genesis).

With bit 3, this determines which direction you face when you start the level. If the bit is 0 (this is for most of the levels), you face right. If it's 1, you face left.

With bit 0 (not 1, which is a typo), it affects how slippery it is. When it's 1 (only used in snow stages), the ground is slippery. When it's 0, it's not.

The other bits appear to be unused.

And finally: This is how you can listen to the Rocket Rush theme!!! This is actually what got me to do this in the first place...
Treasure Hunter
Bananas received 114
Posts: 340
Joined: 2008

Re: Donkey Kong Land III info

Postby Raccoon Sam » January 19th, 2009, 12:53 am

Oh, right, bit 0. Good call.
Fixed now!
EDIT: Also, notice how header bytes 2 and 3 are always the same.. Guess they're connected too somehow.
EDIT: The last two unknown bytes could be the point of death in a pit! I changed it to FF FF in Footloose Falls and upon falling to a pit, I never really die. This might explain the sudden death if it's 00 00 and the reason it's FF FF in Barrel Boulevard, which is, indeed a huge level with no pits.
Trailblazer
Bananas received 35
Posts: 267
Joined: 2008


Return to Documentation

Who is online

Users browsing this forum: No registered users and 1 guest

cron