You might remember my very first topic at Map Requests where I needed the Jungle Hijinxs map and kinda succeeded thanks to Fearnavigatr's excellent effort.
However, this time I'm into a more technical thing. I'm talking about a method contrary to screenshot-mapping; writing a program that does the maps for us. Allow me to elaborate.
Donkey Kong Country's level format is ridiculously simple. A level is always* 64 tiles wide and 16 tiles high, is sequenced in columns of tiles, one tile being 32 x 32 pixels. Take a look at the very first column of 'Jungle Hijinxs', thats level array begins at 0x190000.
81 40 67 00 78 00 80 00 68 00 49 00 EA 00 EB 00 EC 00 ED 00 EE 00 EF 00 F0 00 F1 00 F2 00 00 00And since it's 2 bytes per tile, let's isolate to words:
81 40 |
67 00 |
78 00 |
80 00 |
68 00 |
49 00 |
EA 00 |
EB 00 |
EC 00 |
ED 00 |
EE 00 |
EF 00 |
F0 00 |
F1 00 |
F2 00 |
00 00The very first tile, '81 40' means literally 'Tile 81, flipped horizontally'. Why? Because the first byte, 81, or whatever it might be is always just the tile. You can change it to any value, and the desired tile will change. The second byte, 40, will be read nibble-by-nibble;
The first nibble,
4, must be read in binary.
Binary table is the following:
Flip Vertically || Flip Horizontally || Ghost || Ghost
If a bit is set, the action is true. 4 is 0100 in Binary, so...
DON'T Flip Vertically,
DO Flip Horizontally, DON'T make a ghost, DON'T make a ghost.
(Ghost means that the tile looks normal, but you have no interaction with it. You just walk/fall through it. No idea why it must be defined twice, and who gives a damn anyway since it doesn't serve a purpose in mapping.)
The second nibble, 0 in this case means what bank to use. 0 means use bank 0, 1 means use bank 1, etc...
Now we know how the levels work, but where are the tiles read from? That's when I kick in. I've ripped tilesets of most DKC level types. Below are the links to the Jungle tileset banks 0 to 2.
http://i126.photobucket.com/albums/p82/Raccoon_Sam/Jungle_0.pnghttp://i126.photobucket.com/albums/p82/Raccoon_Sam/Jungle_1.pnghttp://i126.photobucket.com/albums/p82/Raccoon_Sam/Jungle_2.pngIn short, the program works like this:
1. Read two bytes from desired location
2. Check bank and load corresponding PNG
3. Check the tile byte and print the corresponding tile to the array
4. Check for Vertical or Horizontal flip and apply if true
5. Read next 2 bytes and repeat process
Once 16 tiles are printed below each other, the first column is done, and another column will be started.
Repeat until 1024 tiles are printed.
I've attached a demo movie if you don't get it (requires Flash Player
.
So yeah, if you're a software developer, be sure to look into this. I'm more than glad to help and will provide all the necessary tilesets if this project gets anywhere.