Our first example is room 11 of Knight Lore. This is shown to the right. It has items on the floor (including a special item) and the ceiling. This will allow us to see how the location offsets work.

It is advisable to open up another window and use this to show the relevant layout pages to work out the bytes, masks, etc for each type.

The location data is as follows:

DB 06Fh,014h,006h
DB 006h,007h,00Fh,011h,0FFh,01Ah,02Dh,02Eh,02Fh,022h,06Dh,06Eh,06Fh,09Bh, 03Dh,035h
DB 07Dh,075h

This is located by first going to location 6251 and then finding the room number 6Fh. If you have an editor showing line numbers it is about line 250 in the disassembly file.

The first three bytes describe the room. Remember, all numbers are hex.

  • Byte 1 (6F) is the room number
  • Byte 2 (14) shows the next room is located 20 bytes on (if you count the number of bytes from the 14h byte you will see there are 19)
  • Byte 3 (6) shows it is room size 0 and has a colour of INK 6. Using either the map file, the viewer or the link shown earlier for Chris Wild's site, you will see that room type 0 is a 8x8 room.

The remainder of the bytes describe the background and room object data. Finding the background/room object separator (FF) you can see that the background items are:

006h,007h,00Fh,011h

The background items are described from location 6CE2 onwards. If you have a line number view in your editor it is approximately row 570.

  • 6 is a tree arch east
  • 7 is a tree arch west
  • F is a 'trees size 0'
  • 11 is a 'trees size 2'

So far so good, our room is being described as the screenshot says. If you are a bit confused as to the 'trees size x' line, open up the Knight Lore map file and find the entries, these have references to the actual bitmaps. Within the actual game data, these are described as a series of repeating images. The two different types describe a continuous tree wall and a tree wall with a gap in it.

The data after the background bytes are the room objects:

01Ah,02Dh,02Eh,02Fh,022h,06Dh,06Eh,06Fh,09Bh, 03Dh,035h, 07Dh,075h

 

Remember, this is a series of byte description, byte(s) locations.

1A translates to 11010 in binary, therefore this is 3 (remember the block count is zero based) blocks of type 3. Reading the disassembly (location 6BD1 - line 507) or the map file for Knight Lore at line 8, you can see this is a rock. Our room is beginning to look just like the screenshot!

The following three bytes are therefore the locations (2D, 2E, 2F). Using the x,y,z bit mask already described this shows that for all three the y location is 5 and the z location is 0. The x becomes 5, 6 and 7.

22 translates to 2 blocks of type 4 (gargoyle). Taking the next three bytes 6D, 6E, 6F you will find that they are the same location as the rock but have a z location of 1. Which is exactly what the room has.

9B is 10011011, this translates to 4 blocks of type 19 (spike ball - high/falling). The locations 3D, 35, 7D,75 translates to x,y,z values of 5,7,0 (3D) 5,6,0 (35) 5,7,1 (7D) 5,6,1 (75). This gives us four spiky balls as shown in the picture. The problem being that they aren't at z=0 and z=1.

The description for Knight Lore states that the block description contains extra information showing among other things an offset for the location. The description for block type 19 (at location 6C7B) shows as the sixth byte 30h. This byte is the offset. 30h is 110000. Therefore x is 0, y is 0 and z is 3 (x/y are 2 bits and z is 4 bits). So adding this 3 to the original values gives z of 4 and 5 for the spikes.

This then describes our room. Except of course the jewel.

The previous section describes the special items. One of them is at room 111 and the location is 8,8,0.

 

To jump to locations in Knight Lore poke 23568 with the room number and for Alien 8 poke 23440 with the room number. Note the change will not happen until you move out then back in to the room. It's either skill or luck whether you exit the right door or not!

Pentagram is a bit more tricky. Using a standard emulator you cannot change the room location, instead what you have to do is change the start room from the main menu and start the game. Poke 49896, 49897, 49898, 49899 with the room number.

There are four possible start locations for each room (chosen randomly). They are:

Knight Lore - 47, 68, 179, 143

Alien 8 - 19, 78, 136, 215

Pentagram - 51, 92, 100, 12

Our second example is one from Alien 8, room 68. This will show us blocks that come after 32 (the control block) and are in the upper half of the screen.

The location data is as follows:

DB 044h,035h,030h
DB 000h,001h,002h,004h,007h,0FFh,037h,062h,0A2h,0E2h,05Bh,09Bh,0DBh,052h,092h,035h
DB 0D2h,059h,099h,0D9h,05Ah,09Ah,010h,00Eh,000h,030h,008h,01Ah,000h,000h,0F0h,0DAh
DB 0F8h,000h,028h,01Ah,008h,019h,010h,022h,018h,01Bh,020h,012h,035h,02Eh,02Fh,025h
DB 01Dh,016h,017h

This is located by first going to location 6469 and then finding the room number 44h. If you have an editor showing line numbers it is about line 240 in the disassembly file.

The first three bytes describe the room. Remember, all numbers are hex.

  • Byte 1 (44) is the room number
  • Byte 2 (35) shows the next room is located 53 bytes on
  • Byte 3 (30) shows it is room size 0 and has a colour of INK 0 and INK 6 when the cryonauts are freed. Room type 0 is an 8x8 room (the same as Knight Lore).

The remainder of the bytes describe the background and room object data. Finding the background/room object separator (FF) you can see that the background items are:

000h,001h,002h,004h,007h

The background items are described from location 7519 onwards. If you have a line number view in your editor it is approximately row 691. There are a lot less background items than Knight Lore and Pentagram. This is because there is only one door and wall type.

  • 0 is a door north
  • 1 is a door east
  • 2 is a door south
  • 4 is a wall on the west with no doors
  • 7 is a wall on the north with a gap for a door

So far so good, our room is being described as the screenshot says. The data after the background bytes are the room objects:

037h,062h,0A2h,0E2h,05Bh,09Bh,0DBh,052h,092h,035h, 0D2h,059h,099h,0D9h,05Ah,09Ah,010h,00Eh,000h,030h,008h,01Ah,000h,000h,0F0h,0DAh, 0F8h,000h,028h,01Ah,008h,019h,010h,022h,018h,01Bh,020h,012h,035h,02Eh,02Fh,025h,01Dh,016h,017h

 

Remember, this is a series of byte description, byte(s) locations.

37 translates to 110111 in binary, therefore this is 8 (the most you can have at one time) of type 6 (collapsing block). The following 8 bytes are therefore the locations of 8 collapsing blocks (062h,0A2h,0E2h,05Bh,09Bh,0DBh,052h,092h). Skipping full translation (as we've done it before with Knight Lore above) this is at x/y 2/4 and 3/3 and 2/2 for z locations 1,2,3. Very organised way of drawing blocks :)

The following byte (35) is 6 blocks of type 6 (collapsing block). From this you'd be right in thinking its more blocks on top of the ones just drawn. What is at z=0 below these collapsing blocks? I guess somehow you'll have to find a way to jump on the top and they will all collapse showing what's below. Maybe it's something to do with getting past those mines in the screenshot and somehow that funny looking block (I call it a rhombus block)!

The next block (10h) is 1 block of type 2 (rhombus block). This is at location Eh (or x:6, y:1 to us humans).

Following the block description bytes at location 741E for the rhombus byte 4 is the flags (you'll have to consult Chris Wild's site - see Downloads) for this extra detail. Bit 3 states that this is moveable and the collapsing blocks are not.

This is stored in the map file at line 10 for the rhombus block.

The next block is 0. This is a location control block as mentioned prior. This means that this byte is ignored but the following bytes is the offset (as opposed to the offset being stored in the block data for Knight Lore). The offset is 30h (in fact almost all, if not all - I can't remember - offsets use 30h). This translates to 0 for x and y and 12 for z. The z offset is 12 pixels (as 12 is the block height, this is 1 block offset).

The next block is 8h (remember this is now a block with an offset). This translates to 1 block of type 1 (solid block). The location is 1A (or 2,3,0 x,y,z). This is the block at the top of the pile. The offset is 12 pixels (or 1 block) so add this to the z (0) and the default start for high blocks (3) you then get 4 for the z.

The next byte is 0 (meaning the offset is about to change). The following byte is also 0 which signifies that the offsets are reset back to off.

The following byte is F0. This says it is 1 of block type 1E (remote controlled robot). DA states it is at location x,y,z 2,3,3 (in other words it is hidden inside the middle of the block tower!).

F8 is 1 block of type 1F. Remembering above, this is the block offset. In other words ignore this byte (and the next) but every block from now on in this room starts from type 1F.

The first byte after this is 28, which is 1 block of type (1F+5) which is 24, or the remote control block, followed by its location. The next four blocks (8,10,18,20) are four blocks of type remote controlled arrows (west, north, east, south respectively).

Byte 35 shows 6 of type 6 (or 25 using the offset), which is a spiky done. The locations show them as per the screenshot.

And that is our Alien 8 screen. It has taken some working out! Although this is probably the most complicated room, you can see now why I said Alien 8 was much more complicated. Hopefully by understanding the improved/changed control block system is is pretty obvious why I made the statement at the beginning that Alien 8 came after Knight Lore.

From this analysis, you can now visit room 68 and finish the room as follows: first go to room 21 and collect the item (if none there, restart the game and repeat until it is there). Now go to room 68 and move the rhombus block to near the tower, drop the object on top of the rhombus (room 21 has no significance, it just has an object there) and do a high jump, remove all the collapsing blocks and repeat to show the control the robot and clear the mines.

Job done, and all that work was just to clear a doorway ;)