14 June 2022
Con-Quest is a game written by Derek Brewster in 1986 for a handful of 8-bit micros (CPC, Spectrum, and a C64 port made by Tranz-Form).
The aim of this game is to evict all the nasty minions from a castle you've acquired. Well, one particular one actually. You know in the original Dizzy game, where you collect a bunch of potion ingredients to use on the evil wizard at the end? It's like that.
I had this game on cassette tape for the Amstrad CPC, but it would not load correctly on my 464 Plus. The data would transfer from the tape without issue, but the moment the loading part was done, it would reset. Let me tell you, as a kid with fewer than two dozen games total, I really really wanted it to work — out of desperation, if nothing else. I tried countless times over the years, taking 10-odd minutes for each attempt, without success.
The inlay card gave me some clues as to what the game was about — another game from the collectathon genre, my favourite! I eventually got to play it using an emulator.
I drew out a map of the castle on several sheets of A4, worked out what was inside the chests and cabinets, the effects of all items available, and completed the game in a couple of days.
It's been over 20 years since then, but recently I had the urge to pull the game apart a bit. I wanted some answers to long-standing questions:
The best way to get these answers was to generate a map directly from the room data. I'd have to find it first.
Every time you move between rooms, the play area is cleared, then new exits are drawn.
The plan was simple: pause execution upon writing to the part of the screen where the doors and passages are drawn. It would pause at least twice, with both events being of interest — somewhere between them lied the code where the room layouts are loaded.
Through a series of intermediary breakpoints, and checking the stack for subroutine return addresses, I was able to pinpoint the exact location of the data.
There are 2,608 bytes of room data — 16 bytes per room, for a total of 162 rooms. There are two copies of it: a master copy, and a working copy for when you're playing the game. It is accessed using a pointer to room "
A clever machine-code-like method is used to furnish the room using this data. Think along the lines of opcode and operand(s). Let's deconstruct room
The first byte always refers to the four exits. Two bits are assigned to the north, west, east and south walls, with the following three possible values: solid wall, passage, or locked gate. There are open passages to the east and south. In room Gate IDs are only used for one purpose: to track if it's open ( |
|
This means there is one small chest in the room, ID The lowest bit of the chest ID is used to determine its position in the room, which is the left side in this case ( Items are placed into chests and cabinets using a different list, explained in the next section. |
|
Draw a deer head ornament onto the left wall. |
|
Draw two windows onto the top wall. |
|
This opcode places a table in the centre of the room, and... |
|
Two benches either side of it. Note that it's entirely possible to have a table without benches, or benches without a table. |
|
Draw two crossed swords in the top wall. |
|
Draw a small wall texture onto the top wall, |
|
Another wall texture, |
|
Another wall texture, |
|
When zero is encountered as an opcode, no more room data is processed. |
There are 300 bytes of item data, with 6 bytes per item. There is also a small array for chest and cabinet items.
Every item in the game appears in this table, and if there are two identical items, they both have separate entries. Let's have a look at the Tome of Magic.
The item is in room |
|
It is positioned |
|
|
|
This is the item's ID (Tome of Magic). |
|
Item class. |
|
Item colour — green on CPC. |
The chest/cabinet array is a simple list of items. The chest ID value is also an offset from a position in memory, similar to room IDs, and stores the item ID of the chest's contents. For example, room
The chest contains a coin (
I threw together a program to parse all the data, and generated some maps for the three ports. It turns out that the Spectrum and C64 versions are identical for rooms, items and colours, so that made things slightly easier.
Here are the maps: Amstrad CPC and Spectrum / Commodore 64
There seems to be a bug in the floor layout on the Spectrum/C64 versions. In room
Now for some answers.
The CPC uses a different colour scheme to the Spectrum, probably owing to mode 1 graphics having a limit of 4 colours. The palette for the other two has 6 colours.
Due to the changes, the CPC version's red ornate key ended up in... a red ornate cabinet.
How'd that get locked in there?
I sort of knew the answer to this already, because it's only the CPC version that has a problem here, but it's nice to see confirmation.
Of a similar daftness, the Spectrum doesn't have a green talisman — instead, it has two cyan talismans. I have no idea why, since green is available in all versions.
So what's in the cabinets? The red ornate key, two potions, and a useless sand-timer that causes you to freeze for a moment.
No. Thanks to my quaint pixely maps, I can tell that there are no rooms left to explore. The small, secret area where the scroll is stored is actually placed in the gap between the turret areas of the castle.
The "gap rooms" around the edges can be teleported to with a quick poke, but they're completely empty and inaccessible in normal play.
I visited every room on the map, and the adventure score I received was 96%. This was the main reason why I thought I hadn't completed the game — that there were secret rooms, or something.
I had many theories. My favourite one was that the "gap rooms" were also being counted in the calculation, so I forced some doors into them. I was proven wrong when I ended up with a score well above 100%.
This also quashed my second theory, that since only two digits are implemented on the score screen, the number had to be below 100%. It turns out a special "10" sprite was created for this very purpose, as you can see.
Ugly. But how?
I had a look at the code that calculates the result. Although it does make some rounding errors, owing to the use of integer division (no floats on Z80), it was not at fault. 143 rooms = 100%. It did give me the clue I needed, though.
An array tracks what rooms you've been in, using bit 7. I ripped it out of memory, aligned it in a hex editor at 9 bytes a row, and the zeros spoke for themselves. STAIRS!
It turns out that the stairwell rooms on the top floor are never accessed. Whenever you attempt to move between floors, you're always looking at the stairs on the bottom floor. Always.
That means you're always four rooms short, which results in the 96% score. 100% is impossible to achieve.
Speaking of bugs, a quick note about the vending machines. When a coin is used next to one, you get a selection of 5 items that you can take in return. The CPC version is utterly broken, though — invalid item IDs are happily generated and presented to buy. The worst part is, some combinations cause the game to freeze up, so merely looking at the choices can end your game.
5 looks a bit like a closed fist, but it's not.
So, even though vending machines can generate any item, including all the following ones, I'm still calling this stuff unused content. Only the amulet (and the ring) appear in the item table. Most of them don't do anything, and none of them can be found in chests, cabinets or on the floor (except the ring).
Yes, yes, the ring is in the game. However, the ability to wear it, as referenced by the text "I wear the ring," is not. I assume wearing the ring would free up an inventory slot, and still allow you teleport through the mirrors.
I think this one was supposed to be in the game, but the chest holding the amulet was removed from the map. It appears in the item table as item ID
It's a shame too, because this amulet is fully implemented and is very helpful. It effectively doubles your hit points as long as you hold it in your inventory.
This might just be an alternative drawing of the star item. Either that, or perhaps it was going to glow at the very end of the game?
At least, that's what the string table in the game's item description area tells me it is. Apparently you "wave the staff" when used, but nothing happens when I try.
Summons Mystic Michael, who proceeds to tell you that your chances of winning the game today are "goooood".
Not really. Nothing happens.
It looks like one of those cheap ones you'd find on the front of childrens' comics. It doesn't work, and I'm not sure what ammo it might have used. A green projectile like the sort the wands shoot sounds logical, but again I'm only theorising.
This close look at the game has served its purpose. I have found the red cabinet key, where all the rooms are, and a few other things that I wouldn't have discovered otherwise, like the cyan amulet.
Now that the castle has been thoroughly explored, there isn't anything more to do, so I doubt I will be playing the game again anytime soon. I did get plenty of value out of it though, and now I can sleep at night knowing all the mysteries are solved. I think.
© Andrew Nile 2018-2024. Privacy