11 March 2016 - Forum Rules

Main Menu

Indiana Jones and The Temple of Doom

Started by Trax, June 30, 2012, 09:00:32 PM

Previous topic - Next topic


I've come to know this game because of a critic of the Angy Video Game Nerd. I gave it a try and it's exactly my kind of game. Systematic retrieval of captured children, items and keys through a maze gets me hooked, for some reason. Sure the AVGN did hit quite a few things that suck about this game, or at the very least, are annoying. This includes the A and B buttons that are inverted, and the pixel precision needed to avoid dying (dip your small toe in lava and you're toast). Other than that, it's a cool game...

So I digged in the ROM and came with some interesting data, which I used to put together an editor called Skull. Level data starts at the very beginning of Bank 0, which is convenient. I managed to get the tile mappings for the tiles that make the maps, except for a few variations that don't make the editor glitchy, anyway. I didn't find the exact way the palettes are mapped for each tile though, so for now, I'm using arbitrary colors. Here's what level 1 and 2 look like:

The game has 8 PRG banks and 8 CHR banks, and uses the MMC3 mapper...

The way the levels are distributed around the ROM is not clear. Each level has a "Mine Cart" counterpart and a secret level, but their respective data is not contiguous in the ROM. Children data is part of the level data, but has a format that is not straightforward. They seem to be placed relative to Indiana's initial position, and possibly in a relative way among themselves. That's something that need to be decoded.

Level data always start with a level "header". That's my analysis of level 1 so far:

0003: Data for Level 1 (19 bytes)

1C 80   001C   Address for Level Tiles
84 81   0184   Address for ?
80 01   0180   Offset (from 001C) for Children types
68 01   0168   Offset for ?
18   Level Width
10   Level Height
C0   Vertical Repeat ?
C0   Horizontal Repeat ?
00   ?
6F 80   006F   Address for Exit Door Tile
0B 03   Position of Exit Door
E8 80   00E8   Address for Starting Point Tile
0C 08   Position of Starting Point
5A 80   005A   Address for Secret Door Tile (bottom)
0E 02   Position of Secret Door

All levels have a similar structure, except that there can be a lot more pointer/offset pairs past byte C (the "?" mark). All levels have at least a starting point, an exit door and a secret door. But levels 2 and above have more than 2 doors in them. And Mine Carts entrances and exits are also considered doors in the game. Following that header comes the level tiles. They are coded from the top-left of the level, going right, then down. No compression...

After the level tiles, there's the children data, in two parts, both with variable length. The first part is like an enumeration of the children in the level. A value of 00 seems to mean "nothing here", and any other value refers to an index in the next part. Always seem to end with "10 00". The first part of children data for level 1 looks like that:

01 02 00 00 00 00 00 00 00 03 00 00 00 05 04 00 00 00 00 00 00 00 00 00 10 00

Then, there's the table that sets the children's position (relative, apparently), and the item they give when you save them.

FC 0E 27   -04 , 0E   3 Sabers   Child 01
FE 0F 06   -02 , 0F   Red Key    Child 02
0F 06 01    0F , 06   Up Arrow   Child 03
FE 0C 17   -02 , 0C   2 Sabers   Child 04
FE 0D 00   -02 , 0D   1 Gun      Child 05

FD   ?

The items byte is easy to decode, where bits 0-3 is the type, and bits 4-7 is the quantity:

x0 = Gun
x1 = Up Arrow
x2 = Down Arrow
x3 = Right Arrow
x4 = Left Arrow
x5 = Map
x6 = Key
x7 = Saber
x8 = Hat
09 = Orange Gem
19 = Red Gem
29 = Blue Gem
xA = Bomb
xB = Glitch
xC = Glitch
xD = Glitch
xE = Glitch
xF = Glitch

Then, you have the data for Level 1 Cart Part. Then Level 2. The location of the level data seems to be determined by a table located at 3592. I can't figure this table competely. If you have any idea how it could work, let me know. There is also more level data located in Bank 2, starting at 8003...


I also think this game definitely isn't subpar. It is a nice maze-game. I have seen in video reviews that later on there are some interesting puzzles, which sadly are spoiled for me now. The worst part is the weak presentation. It is lacking colours, and the colours that are there are ugly.