T&T PC88 Demo: Gull

Filed under: Crusaders of Khazan, PC88, Tunnels & Trolls — denormative @ 12:59

After swapping the disks (Drive 1: Player; Drive 2: Scenario Disk 1) and doing a quick system reset we get a title screen!

With a different image to the DOS version, though much more different than the differences between the intro images. We have only one save-game so there’s only a single Go Game icon, but there’s an analog/digital switch panel. Up switching to analog…

Things look somewhat differently coloured, but that’s it. I guess it’s just to account for the different colour profiles of different monitor types or something. Anyway, time to Go Game!

And so we appear in Gull, in the same place in the DOS version, with things looking pretty similar to the DOS version (though a bit heavier on the eye-searing-colours). So let’s swap to Analog to sear our eyes less.

So heading south into the Adventure Guild…

We discover why the DOS version keeps asking if we want to talk to people:

Because we need to swap to Drive 2’s disk to Scenario Disk 7 to proceed. Though no reboots this time.

And we say Hi to our usual friends. Then proceed to steal them all and dump our random character off.

And of course we need to swap Drive 2 back to Scenario Disk 1 on the way out. Also of note, the game can’t work out whether to spell “Cancel” as “Cansel” or “Cansell”.

And of course checking the inventory of our new characters requires us to swap Scenario Disk 6 into Drive 2…

And then we can see our friendly friend Fergus.

Though only the top half of his DOS portrait. And apparently it doesn’t support the armour/helmet/weapons/items paper-dolls like the DOS version does.

It also seems to be lacking the Gather/Share Money icon the DOS version has. This could be quite inconvenient since the wizards/rogues use a huge amount of gold buying spells, and the warriors use almost none after the first couple of levels since they’ve already bought the best armour they can wear by then.

Inventory has one less item slot available then in the DOS version, but other than that has the same functionality.

And of course to go back out of the inventory I need to swap Drive 2 back to Scenario Disk 1 again…


T&T PC88 Demo: Character Creation

Filed under: Crusaders of Khazan, PC88, Tunnels & Trolls — denormative @ 12:11

A quick run through of the beginning of a game of T&T built for the NEC PC88 system. This was a Z80 based, dual floppy (or tapes, no hard disks) machine, which makes things interesting when trying to play it. And the PC88 series was almost at end of life when T&T was released. Thankfully I’m playing this in an emulator so all the fussy disk swapping is less painful.

Anyway, upon inserting the Program and Player disks I start the machine up and get the intro sequence. Pretty much the same as the DOS version. Though using the 4MHz CPU emulation everything slows to a crawl (and it’s easy enough to notice that the image is packed/rendered in an almost identical way to the DOS version, even though it’s somewhat different), the 8MHz CPU isn’t much better, but it’s reasonably quick to play when the emulation is boosted up to 32MHz.

A quick enter-key press later (I guess there was no “escape” key on the PC88), and we’re straight into the character generation screen.

Creating a character works the same way. Hit M for Make, choose race, gender, roll stats, choose class, pick name; tadah!

Now we’ve got a random character done…

Let us hit G for Go Game! And…

Swap disks. The Player Disk goes into Drive 1, the Scenario Disk 1 goes into Drive 2.


Paperdolls #1

Filed under: Crusaders of Khazan, Tunnels & Trolls — denormative @ 23:26

Beginning of displaying paperdolls.

Only the “base” character portrait layer is rendering at the moment, as you can see from the equipment having to be removed from the character before the original screenshot was taken.

Whilst I know where all the indexes are for the items, and the location of the paperdoll overlays are for the items (the same place the base character portraits are conveniently enough), there does not appear to be any records stored in the item data as to which order they should be rendered in.

It’s possible it simply renders anything marked as equipped “torso” armour first (and maybe then any helmets)  followed by everything else, since none of the items overlap in a way that would cause strange imagery.

New Paperdoll

Original Paperdoll

Spell Details Data Test

Filed under: Bugs, Crusaders of Khazan, Debug, QML — denormative @ 20:24

Quick debug list of spell details.

Of note for some reason there are 68 entries in the spell data block, though only 64 bit flags in the character record to record whether a character knows the spell or not. Though the last five of the 68 records are named ?????????????????? and aren’t used, so there’s still one spot available for a new spell.

Only two unknown bits, and one unknown byte (which only seems to be 0 or 1, so might as well be just a bit) remain to be discovered in the spell details.

Spell Details Data Test


Bytecode Bug

Filed under: Bytecode, Crusaders of Khazan, Debug — denormative @ 23:55

A particularly odd bytecode bug I found whilst reverse engineering the data. It looks like the original bytecode compiler failed to emit an “else” clause for a conditional statement. For the binary code:

Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00003230 73 20 77 72 65 63 6B 69 6E 67 20 6C 69 66 65 2E s wrecking life.
00003240 0A 00 1E FD 31 21 05 1E 34 54 6F 20 65 6E 74 65 ....1!..4To ente
00003250 72 20 74 68 65 20 6D 6F 6E 73 74 65 72 73 20 6F r the monsters o

The string that ends with a null at 3241 is fine.

Opcode 1E is “print a string” and it takes a two byte parameter. This happens to point to the “To enter the monsters…” string just after it. So it looks fine.

At 3245 opcode 0x21 is “prompt yes/no”, given the question is: “To enter the monsters own environment requires some thought. Is there some preparation you are neglecting? Do you just leap in?\n” this makes logical sense

Opcode 0x05 at offset 3246 is a two byte parameter code that says “jump to location of the zero flag is false”, the zeroflag is what the yes/no opcode sets. So:

1E FD 31 - print the "To enter the..."
21 - Prompt for question
05 1E 34 - jump to 341E if zeroflag is set
54 6F 20 65 6E 74 65 - "To ente"
(Which is the string 1E FD 31 printed.)

So it didn’t emit the “else” clause of 05 XX XX.

Offset    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00003230 73 20 77 72 65 63 6B 69 6E 67 20 6C 69 66 65 2E s wrecking life.
00003240 0A 00 1E FD 31 21 05 1E 34 54 6F 20 65 6E 74 65 ....1!..4To ente
00003250 72 20 74 68 65 20 6D 6F 6E 73 74 65 72 73 20 6F r the monsters o
00003260 77 6E 20 65 6E 76 69 72 6F 6E 6D 65 6E 74 20 72 wn environment r
00003270 65 71 75 69 72 65 73 20 73 6F 6D 65 20 74 68 6F equires some tho
00003280 75 67 68 74 2E 20 20 49 73 20 74 68 65 72 65 20 ught.  Is there
00003290 73 6F 6D 65 20 70 72 65 70 61 72 61 74 69 6F 6E some preparation
000032A0 20 79 6F 75 20 61 72 65 20 6E 65 67 6C 65 63 74  you are neglect
000032B0 69 6E 67 3F 20 20 44 6F 20 79 6F 75 20 6A 75 73 ing?  Do you jus
000032C0 74 20 6C 65 61 70 20 69 6E 3F 0A 00 1E 94 32 23 t leap in?.....#
000032D0 BF 00 00 01 02 C0 52 01 00 00 0E 00 00 03 56 35 ......R.......V5
000032E0 49 6E 20 61 6E 20 61 63 74 69 6F 6E 20 74 6F 6F In an action too
000032F0 20 62 6F 6C 64 20 74 6F 20 62 65 20 62 65 6C 69  bold to be beli

At 32CC, right after that chunk of “To enter…. leap in?” text, is an output, 1E 94 32 dumps out the text below the “In an action too…”, which is basically the “no” response to the “are you neglecting something?”. Where you dive into the water without removing your armour first.

Since I vaguely know where this is, on my list of things to do is to actually visit the location and say “no” and see if the game dies.

Working date/time

Filed under: Crusaders of Khazan, Tunnels & Trolls — denormative @ 23:20

Only thing of note in these images is the working date/time in the top right hand corner in the new screen-shot.

The day of the week is calculated as:

 ( (year * 365) + ((month-1) * 12) + day ) % 7

Which should hopefully be correct, but it wouldn’t surprise me if there’s something quirky as far as time goes.

Pondering turning the all-caps month/day names back into the usual title-caps format. Small sized fonts don’t need to be small-caped at this resolution nowadays.

New Timestamp

Original Timestamp

Character Details Data Test

Filed under: Crusaders of Khazan, Debug, QML — denormative @ 21:01

Similar to the item details debug list, this one’s for characters.

Spell details aren’t being displayed, even though I know the spell availability bits, since I haven’t yet got the model loading it yet, though 90% of the record of each spell is documented.

On the other hand, there’s still another 370 or so bytes undocumented for each character record. There’s a couple of simple ones still missing, like the “missing hand, replaced with gremlin/diamond/whatever hand” status bits, presumably for both hands, and the appropriate character portrait index, however there’s a lot of space left over still. I know the bytecode has a number of references to being able to store other  data relating to characters, similar to how it stores them  in the global data, or map data areas, but that still seems like an awful lot of bytes.

Also “hits taken” is strange. It appears to be stored as a byte, but given it increments for every hit in combat, I would assume that it would easily exceed 255, but the only available space for storage as a word would be if it was stored in big endian format, rather then little endian like the rest

Character Data Test


You Are Dead

Filed under: Crusaders of Khazan, Tunnels & Trolls — denormative @ 22:30

Totally party kill screens. Nothing too complex.

Original has time-stamp in upper right, new ones don’t. I probably won’t bother adding it since it doesn’t make much sense on this screen anyway.

Somewhat tidied up the text on the screen. Removed the “chars” contraction and tidied up the title. (Maybe I should be using “your” rather than “the”? It sounds more fluid but the text uses “the brave adventurers”.)

Also tinkered with the body text slightly. Adding spaces after commas where the original text was missing them. Also properly broke the text with linefeeds, and indentation, where the actual data within the executable had appropriate spaces/linefeeds, but it didn’t render them for some reason.

Screens work as they originally did. Press a key/click the mouse to swap between them, then back to the title screen.

New Death First

Original Death First

New Death Second

Original Death Second

Item Details Data Test

Filed under: Crusaders of Khazan, Debug, QML — denormative @ 21:19

A quick debug test of part of a list of all the items in the game.

Remaining four unknown bytes are b01, b07, b08, and b09. At least b01, b07 and b09 appear to be bitfields, but looks can be deceiving.

Data was pulled out of the item details records stored in the 6th index in the PGMCOM.CC file in the English version, or just the DATI file on the PRO disk on the Sharp X68000 (X68k) version. At a quick glance the data seems similar in structure and same record lengths so it should be identical. A quick diff of the two files indicated that there are a small number of changes between the two, though the patterns were indicative of the X68k version being stored via bigendian in comparison to the English x86 version stored little endian. This was expected given the X86k runs with a big endian processor.

Item Details Data Test


Odd Bug #1

Filed under: Bugs, Crusaders of Khazan — denormative @ 20:31

Apparently if you’re dead, your condition is “Good” in a red font, as opposed to when you’re in full health your condition is “Good” in a green font.

The game binary has “Dead” as one of the available options, so I’ve no idea why it’s not showing.

Odd Bug #1

« Newer PostsOlder Posts »

Create a free website or blog at