The Citadel Source Discs

(also, Crypt Capers)

A Report

Cowlman is very stupid.

by 'Diminished'
revision 4
24th December 2021

  1. Introduction
  2. Nomenclature
  3. Files
  4. Useful Resources
  5. Watford DFS
  6. Provisional Timeline
  7. Overview of Interesting Files
  8. Build Process (Retail Version)
  9. Build Instructions (Retail Electron Version)
  10. Evaluating the Rebuilt Electron Version
  11. The Development Build Process
  12. Disc 6: An Early Beeb Version
  13. The Figure Tools
  14. Figures: Discs 4, 5, 9 and 10
  15. The Deviant Disc 7 D.FIG
  16. Deactivated Rooms on Disc 2
  17. An Ancient Map on Disc 8
  18. Michael Jakobsen's Wordwise documents
  19. A Questionable Chronology
  20. Acknowledgements
  21. Appendix A: CITAT disassembly
  22. Appendix B: Retail D.FIG Anatomy
  23. Appendix C: MD5 Encyclopædia
  24. Appendix D: Raw Notes on Disc 6 to Disc 12 Engine Changes
  25. Appendix E: Beeb-Era Room Changes: Static Images
  26. Appendix F: Figures for Disc 8 ROOM

1. Introduction

This is a report written on the original source discs for Citadel, written by Michael Jakobsen and published by Superior Software. I was originally approached for this project to help figure out how to build Citadel and to provide instructions for doing so, but things escalated a little from there.

The intent behind this report is primarily one of breadth rather than depth. The goal is to catalogue the discs and to deduce the chronology of what is contained on them. Deeper investigations into the precise workings of Michael Jakobsen's various compilers remain up for grabs.

Complete source for Crypt Capers is also believed to be on these discs, but it has not been looked at here.

2. Nomenclature

I will refer to the game's author, Michael Jakobsen, as MJ.

I will be using the following numbering convention when referring to the source discs:

Disc 101-citadel_bbc_electron_final_13_12_1985_side1
Disc 202-citadel_bbc_electron_final_13_12_1985_side2
Disc 303-crypt_capers_electron_final_25_09_84
Disc 404-design_source_a_n_02_11_1985
Disc 505-design_source_m_z_02_11_1985
Disc 606-citadel_02_11_1985_1.scp.ssd
Disc 707-citadel_design_code_i_electron_side1_1.scp.ssd
Disc 808-citadel_design_code_ii_electron_side2_2.scp.ssd
Disc 909-citadel_designer_copy_a_n_side1_1.scp.fixed.ssd
Disc 1010-citadel_designer_copy_m_z_side2_1.scp.ssd
Disc 1111-citadel_electron_assembly_13_12_1985_side1_1.scp.ssd
Disc 1212-citadel_electron_assembly_13_12_1985_side2.scp.fixed.ssd
Disc 1313-citadel_electron_master_tape_creator_12_12_1985_final_4.scp.ssd
Disc 1414-citadel_sounds_5.scp.ssd
Disc 1515-design_24_09_84_2.scp.fixed.ssd
Disc 1616-citadel_inst_2.scp.fixed.ssd

The game's graphical elements have been variously referred to in previous work as "sprites" or "tiles". MJ refers to them as "figures", so that name will be used here.

There are two figure formats used by the Citadel build process. The abbreviations JKC-U and JKC-C will be used to refer to these two Citadel formats:

3. Files

The distribution package michael-jakobsen-citadel-crypt-capers-source-v1-rc2.zip is organised as follows:

4. Useful Resources

5. Watford DFS

MJ is believed to have used a Model B with a Watford Electronics DFS (most likely version 1.44). This DFS supports an extended catalogue, which allows roughly double the number of files to be written to a DFS disc.You will need to use an emulator or hardware that has a Watford DFS in order to be able to read many of the disc images correctly. In addition, Watford DFS 1.44 is essential for using the pair of build discs that I have constructed for this report.

6. Provisional Timeline

Many of the files on these discs contain dates. It is possible to list all of the dated files in chronological order, along with the disc number upon which they were found. Some files contain multiple dates, in which case the newest date present in each file is used.

Here are the files from the Crypt Capers era:

DiscFilenameDate
15CD20th October 1983
CREATD
R.CD
C163rd November 1983
CO16
CODES16
AS16th November 1983
MENU21st January 1984
R.MENU
INO23rd January 1984
INOUT
R.TRANS
TRANS
DB88th February 1984
R.DB8
14DESIGN11th March 1984
3PS29th March 1984
TAPE30th July 1984
15TAPE
3PYF10th August 1984
PYRA
SCR13th August 1984
15CODE20th September 1984
3LOF24th September 1984

Here are the files from the Citadel era:

DiscFilenameDate
4EXC1st February 1985
9EXC
2A217th February 1985
A4
6A0
A2
A4
A5
12A2
A4
6AR7th April 1985
8ROOM6th June 1985?
7CHFIG26th June 1985
F
14ENVCRE15th August 1985
ENVCREN
R.BENVCRE
4CREAT22nd September 1985
INOUT
5CREAT
INOUT
9CREAT
INOUT
10CREAT
INOUT
6A118th October 1985
A322nd October 1985
2A310th November 1985
12A3
11TAPE18th November 1985
14R.EENVCRE4th December 1985
E.ENVCRE6th December 1985
11AR10th December 1985
7FIG11th December 1985
8FIG
1TAPE12th December 1985
2A0
A1
A5
12A0
A1
A5
13O.TAPE
TAPE
1AR13th December 1985

Note that a lot of files do not contain any dates, so the above is not a comprehensive guide. Additionally, there is no guarantee that these dates are accurate.

7. Overview of Interesting Files

This section looks briefly at relevant files on various discs. Most of these files exist in many different versions. Further information about which of these files match and which do not may be found in Appendix C: MD5 Encyclopædia.

Discs 3 and 15 contain source and assets for MJ's other Acorn game, Crypt Capers, which is not discussed here. Meanwhile, Disc 16 mostly contains old Wordwise documents, so while it is both interesting and relevant, its files are looked at in their own section.

An attempt has been made to be comprehensive here, which makes this section rather long-winded and tedious. The impatient will be forgiven for skipping ahead to the next section, which begins to take a look at how the game is built.

Disc 1 (01-citadel_bbc_electron_final_13_12_1985_side_1)

Disc 2 (02-citadel_bbc_electron_final_13_12_1985_side2)

Disc 3 (03-crypt_capers_electron_final_25_09_84.ssd)

This disc contains Crypt Capers assets and will not be looked at here.

Disc 4 (04-design_source_a_n_02_11_1985)

See the section The Figure Tools for information on using the programs on Discs 4 and 5.

Disc 5 (05-design_source_m_z_02_11_1985)

Disc 6 (06-citadel_02_11_1985_1.scp)

Disc 7 (07-citadel_design_code_i_electron_side1_1)

Disc 8 (08-citadel_design_code_ii_electron_side2_2)

Discs 9 & 10 (*-citadel_design_code_ii_electron_side*)

Discs 9 and 10 are another copy of MJ's figure designing toolkit. These two disc images are a newer fork of Discs 4 and 5. See the discussion on Disc 4 for version information, or the section The Figure Tools for information on using these programs.

Disc 11 (11-citadel_electron_assembly_13_12_1985_side1_1)

Disc 12 (12-citadel_electron_assembly_13_12_1985_side2)

Disc 13 (13-citadel_electron_master_tape_creator_12_12_1985_final_4)

Disc 14 (14-citadel_sounds_5.ssd)

Disc 15 (15-design_24_09_84_2.ssd)

More Crypt Capers content, which is not discussed here.

Disc 16 (16-citadel_inst_2.scp.fixed)

This disc contains various curios, most of which are MJ's old Wordwise documents.

These will be discussed in their own section later on.

8. Build Process (Retail Version)

This diagram shows the build process for the retail release:

Citadel Retail Build Process

The boxes represent generator code, which is either the System Software Assembler in ROM, or BASIC programs. Filenames in bold are BASIC.

9. Build Instructions (Retail Electron Version)

On the evidence of the dates in these files, the Electron version was finished approximately one month after the Model B version. Most of the surviving assets present on these discs are Elk-focussed. Targeting the Electron requires absolutely zero modifications to any of MJ's 1985-vintage source.

It is not clear precisely how the Model B version was packaged. This is partly because it contained the famous (or infamous) Speech! intro. The likelihood is that Superior Software added the Speech! component to the game at their own offices, based on the deliverables from MJ, and so packaging a retail-perfect Beeb copy is not possible using only the assets on these discs. Furthermore, no tools have been found on MJ's discs for mastering a BBC Micro master disc, and again it is possible that this was handled by the publisher. Much of the build process is still compatible with the Model B, though; many files contain a switch for building a Beeb version rather than an Elk one. For example, it is possible to assemble the game engine for the Beeb, and then transplant the resulting binary into a Beeb retail disc image just using *COPY—this procedure has been performed successfully.

A method will be provided here to perform a full tape retail build for the Acorn Electron. Regardless of the target, the game is built on a BBC Micro Model B machine.

To simplify things, two SSD disc images suitable for building the game have been included with this report. Like MJ's discs, these require a Watford Electronics DFS. This is unavoidable, as the FIG utility needs access to 66 individual figure files (with a prompt to change discs during the process). There is simply no way to achieve this without either modifying MJ's FIG utility, or using a DFS with extended catalogue capability (i.e. Watford). Experiments were tried using ADFS images rather than Watford, but errors occurred when the FIG program wanted to swap from one disc to the other, in a manner that could not be resolved in the limited time available for these investigations.

Furthermore, it is strongly advised to stick to the Watford Electronics DFS (not DDFS), and strictly version 1.44. Attempts to use BeebEm with the Watford DDFS 1.53 resulted in horrid outcomes where generated files would contain sporadic &E5 bytes instead of the correct values. It is not known whether this was a BeebEm problem, a DDFS 1.53 problem, or some other problem, but sufficient time to diagnose this issue further was sadly not available.

BeebEm 4.17 for Windows is tentatively recommended for the build, as it is the only emulator I have found which has functional UEF tape writing support. However, it appears to be buggy, as you will find if you use something like uefwalk to try to extract the UEF file this build produces. Nevertheless, it somehow seems to work just about well enough to load the game in Elkulator. The lack of widespread Beeb emulator support for saving to tape is disappointing.

Note that I had terrible trouble building CITAL correctly on an earlier version of BeebEm (4.14), so I would seriously advise updating to 4.17 (or better).

Steps up to (but not including) using the TAPE program to save out the final master tape may be performed using a different emulator, if you prefer. Of course, if you are reading this in the future, you now live in a utopia in which every single Beeb emulator has perfect, bug-free tape writing support to both CSW and UEF files, as well as audio output for sending directly to a tape recorder, in which case you can use whatever emulator you like.

No modifications needed to be made to any of MJ's code or data in the process of putting together these discs—the files have simply been rearranged. The contents of these two build discs were sourced from MJ's discs as follows:

FileMJ Source Disc #Build Disc
CTX99, CTXTI7A
FIG7
A0, A1, A2, A3, A4, A52B
ROOM2
CC2
TAPE1
AR1
CITADEL13
CITAT13
66 JKC-C figure files7 and 8A and B

As stated in the discussion on the disc inventories, some figure files appear on both Discs 7 and 8 with the same name. To obtain a retail Electron release, the copies from Disc 7 should be prioritised over those from Disc 8. If you are preparing your own build setup, you will want to copy Disc 8's figures to your build drive first, followed by Disc 7, so that the Disc 7 figures overwrite the similarly-named Disc 8 ones.

Some emulators write-protect discs by default—you will need to remember to un-write-protect the discs when you insert them.

Here are the build discs:

Detailed steps for building using BeebEm 4.17 and the provided pair of build discs will now follow.

1. Setting up BeebEm

Use the BeebEm menu bar to configure the machine and discs now:

2. Build T.TX99 using CTX99

T.TX99 contains the encrypted "Ruler of Citadel" competition message. It is generated by a BASIC program called CTX99:

> CHAIN "CTX99"
Then, press Y at the prompt to save the T.TX99 file.

3. Build T.TXTI using CTXTI

T.TXTI contains the title screen text. There is evidence in the development loader versions of AR that this was once loaded as a separate file, but in later builds it is concatenated as part of D.FIG. It is generated by a BASIC program called CTXTI.

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> CHAIN "CTXTI"
Again, press Y at the prompt to save the T.TXTI file.

4. Build D.FIG using FIG

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> PAGE=&1100
> CHAIN "FIG"
Press a key to start D.FIG compilation. After about 30 seconds, you will be prompted to switch discs. Using the BeebEm menu bar again: Press a key to continue compilation. After another 35 seconds or so, you will be prompted to press a key to save D.FIG. Finally, at the "Press T to RUN" prompt, just press ESCAPE to exit the program.

5. Build M

M is the assembled binary of the game engine, assembled using the System Software Assembler ROM, from the A0-A5 game engine source.

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> *ASM A0 M
Building the game engine takes about six and-a-half minutes.

There are various options in A0 to change the nature of the build, the most significant being the "ELK" variable to build for either a Beeb or Electron. Tools to perform a full Beeb build were unfortunately not included with the Electron source, but it is possible to take a CITAM built for a Beeb and transplant it successfully into a retail (protected) Beeb copy of the game.

6. Build D.ROOM using ROOM

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> PAGE=&1300
> CHAIN "ROOM"
Press any key to start the room compiler, which should take about two minutes.

7. Build CITAM from D.ROOM, D.FIG and M, using CC

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> CHAIN "CC"
at "Incert Destination Disc" (sic) prompt, press any key to save out CITAM.

8. Build CITAL, the machine code loader, from AR

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> *ASM AR CITAL
This will take about 40 seconds.

On an older version of BeebEm for Windows, CITAL ended up much too large, so you might like to check here (*INFO CITAL) to make sure that your CITAL is less than a kilobyte in size.

The AR source file also has a few assembly switches for Beeb/Electron and disc/tape.

9. Master the tape

Reset the machine with Ctrl-BREAK (Ctrl-F12 in BeebEm), then:
> CHAIN "TAPE"
This process will take about five minutes. If you wish, you can bring up BeebEm's Tape Control window, click Stop, and verify that the image has been written successfully. Then, click Eject to eject the UEF image.

One word of warning about the TAPE utility—it uses the commands *D. and *T. intending them to mean *DISC and *TAPE. However, depending on the machine's ROM configuration, these commands might expand to something else. If you are having problems here, you may need to adjust your ROM configuration (or modify the TAPE program).

You should hopefully end up with a UEF image, which can be loaded and played on an Electron. If you are using Elkulator, be warned that its fastest tape speed causes problems with Citadel's loader. The medium tape speed setting is recommended.

10. Evaluating the Rebuilt Electron Version

We can extract the files from the retail Electron version's UEF image using the uefwalk utility, and compare them with the versions on Build Disc B that have just been built.

CITAT is identical out of the box:

$ md5sum rebuild/CITAT retail/CITAT
9e48af1f4d9ab7a3da212294714f053b  rebuild/CITAT
9e48af1f4d9ab7a3da212294714f053b  retail/CITAT

CITADEL and CITAL are padded by the tape mastering process, so the retail files are larger than the ones from the build discs:

-rw-r--r-- 1 me me 1932 Nov 23 13:23 rebuild/CITADEL
-rw-r--r-- 1 me me 2047 Nov 23 13:06 retail/CITADEL
-rw-r--r-- 1 me me  673 Nov 23 13:23 rebuild/CITAL
-rw-r--r-- 1 me me  767 Nov 23 13:06 retail/CITAL

We slim down the files from the retail tape so they are the same length as the ones from Build Disc B. Then these two rebuilt files match the original ones perfectly, too:

$ dd bs=1 count=1932 if=retail/CITADEL of=retail/CITADEL_slim
$ dd bs=1 count=673 if=retail/CITAL of=retail/CITAL_slim
$ md5sum rebuild/CITAL retail/CITAL_slim rebuild/CITADEL retail/CITADEL_slim

fe5313a9ae7387f7d04d20245fc5ac46  rebuild/CITAL
fe5313a9ae7387f7d04d20245fc5ac46  retail/CITAL_slim
cd5b24bd0982d458dd0f0c250ee3e35c  rebuild/CITADEL
cd5b24bd0982d458dd0f0c250ee3e35c  retail/CITADEL_slim

This leaves CITAM to evaluate. CITAM is tougher, because the uefwalk tool is confused by the tape protection system's per-block changing from upper to lower case and back; rather than emitting a single CITAM file, it produces two files (CITAM and citam), each containing half of the data. A short bash script will re-interleave the blocks from the upper and lower case files:

#!/bin/bash

BLOCK_SIZE="256"
IN1="CITAM"
IN2="citam"
OP="CITAM-fixed"
NUM_BLOCKS=$[ (0x40 / 2) ]

rm "${OP}"

INPOS=0
for N in `seq 0 ${NUM_BLOCKS}` ; do
  dd if="${IN1}" bs=1 skip=${INPOS} count=${BLOCK_SIZE} >> ${OP}
  dd if="${IN2}" bs=1 skip=${INPOS} count=${BLOCK_SIZE} >> ${OP}
  INPOS=$[ ${INPOS} + ${BLOCK_SIZE} ]
done
In both builds, CITAM was padded with random data when it was saved, so these files will not match yet. Here is MJ's relevant BASIC code from CC:
1050FORX%=&6480 TO&64FF:?X%=RND(256):NEXT

Therefore we need to ignore the last 128 bytes of each of these files when comparing them. (A task for another day will be working out the value with which MJ's MOS random number generator was seeded, in order to reproduce his pseudo-random sequence verbatim.)

$ dd if=rebuild/CITAM of=rebuild/CITAM_slim bs=1 count=$[ 16640 - 128 ]
$ dd if=retail/CITAM-fixed of=retail/CITAM-fixed_slim bs=1 count=$[ 16640 - 128 ]
$ md5sum rebuild/CITAM_slim retail/CITAM-fixed_slim

4d5ebdeab6730848cad72c9c9c77e0a4  rebuild/CITAM_slim
4d5ebdeab6730848cad72c9c9c77e0a4  retail/CITAM-fixed_slim

CITAM now matches, too. Therefore, building using the files from MJ's discs as described above appears to yield a perfect 1:1 copy of the Electron version of Citadel.

By modifying the Elkulator emulator to make it possible to dump RAM from its debugger, RAM dumps of rebuilt and retail Elk versions of the game may be compared, which are also confirmed to match in all significant regions. This backs up the above analysis.

This is—to borrow Chris Evans' verdict—a "satisfying result".

11. The Development Build Process

This diagram shows the build process for the development cycle. Again, the shaded area comprises the game's loader; the unshaded area deals with the game itself:

Citadel Development Build Process

Working examples of this process exist on Discs 6 (a Beeb example) and 11 (an Electron example). We will have a look at Disc 6 next.

12. Disc 6: An Early Beeb Version

There is an early, working development build of Citadel on Disc 6. At the current time, this is the earliest known runnable copy of the game (although there is an even older artefact on Disc 8, on which more later).

In its default form, the build present on Disc 6 requires a joystick to play, so you will need to use an emulator with working joystick support (b-em, at least, should work).

To try it, load 06-citadel_02_11_1985_1.scp.ssd and start it with CHAIN "T". At the "Room?" prompt, enter a room number from 0 to 255 (this is the room in which the game starts). Press Fire on the joystick at the title screen to start the game.

Based on the dates in the A0-A5 engine source files, this build appears to date from about 22nd October 1985. Superficially, this game shows many of the differences from the retail Beeb version as the old, prerelease "Citadel-early" version of the game that popped up on Stairway to Hell many years ago. However, we can do a bit better than that.

Disc 6: Engine

The closest version to Disc 6 for which source code exists is the much later Disc 12 (near-Electron retail) revision. By diffing the Disc 6 source against the Disc 12 source, it is possible to observe the changes that were made between this version and retail. Most (but not all) such changes exist to support the Electron, since Disc 6 is a Beeb-only version. Some scratchy notes from a hasty journey through the Disc 6 to Disc 12 source code diff are available as Appendix D: Raw Notes on Disc 6 to Disc 12 Engine Changes.

Perhaps a more interesting question is how the Disc 6 engine compares to its much closer relative, Citadel-early. Unfortunately no source for Citadel-early exists, so without performing a full disassembly, a direct comparison is not possible.

As a compromise, a summary of the changes to the Beeb engine between Discs 6 and 12 may be supplemented with some testing on Citadel-early of any such changed behaviours:

I do not know whether any information exists concerning the provenance of Citadel-early. Based on the fact that the issues fixed in Citadel-early seem to be genuine bugs (trampolines, item pickup, the bucket puzzle), it is speculated that perhaps Citadel-early was a demonstration version sent to potential publishers. A little more information on MJ's pitch process (including some dates) may be found amongst Michael Jakobsen's Wordwise Documents (Disc 16).

Beeb-Era Room Changes: Disc 6, Citadel-early, Retail

The Disc 6 build exhibits some exciting early glimpses of some of the game's rooms. In order to catalogue these comprehensively, the three known Beeb builds of the game (Disc 6, Citadel-early, and the retail version) were modified with the attract mode patch, making it possible to abuse the game's attract mode to flip through every room in the game at will. A second patch was used to nullify the effect of the game's random number generator on the enemy state, so that the same initial PRNG state would apply for every room and every version. Then, the b-em emulator was modified to save out the MODE 2 video RAM region to a file upon every room change. Finally, this saved MODE 2 data was checksummed for every room and for all three versions, in order to compare them.

(The attract mode and PRNG patches needed to be modified for the non-retail copies of the engine.)

Note that if a room was identical between Disc 6 and Citadel-early, then it is not listed here, regardless of whether it might have changed between Citadel-early and the Beeb release version. The rationale for this is that this is not an investigation into Citadel-early—the subject matter here is MJ's vintage discs. There is, for example, a known and documented change to Star Port between Citadel-early and retail. It does not make an appearance in the following list, because no such change exists on the discs which are under consideration here.

Animated GIFs have been produced of the visual changes, which are probably the most revealing way to view the differences between rooms. These animated GIFs have not been inlined directly into the table below, because they are visually very confusing when they are all playing simultaneously in large numbers. Instead, the following table contains a set of clickable links. If you would prefer to see a table with a static set of images instead of the animations, such a spot-the-difference challenge may be found in Appendix E: Beeb-Era Room Changes: Static Images.

Room
Clickable GIF
Notes
001 (The Pyramid)
animated GIF
011
animated GIF
020 (The Pyramid)
animated GIF
[1]
021 (The Pyramid)
animated GIF
[1]
041 (The Pyramid)
animated GIF
048 (West Tower)
animated GIF
068 (West Tower)
animated GIF
070
animated GIF
073 (Top of Castle)
animated GIF
[2]
088 (West Wing)
animated GIF
090 (The Kitchen)
animated GIF
091 (Thorn Maze)
animated GIF
093 (East Fireplace)
animated GIF
094 (East Wing)
animated GIF
103 (The Wasteland)
animated GIF
111 (Central Castle)
animated GIF
113 (The Well Wheel)
animated GIF
114 (East Wing)
animated GIF
121 (The Island)
animated GIF
129 (West Wing)
animated GIF
130 (Central Castle)
animated GIF
132 (Central Castle)
animated GIF
136 (On The Beach)
animated GIF
138 (The Island)
animated GIF
139 (The Island)
animated GIF
144
animated GIF
[3]
145 (Witch's House)
animated GIF
[3]
150 (The Cellar)
animated GIF
153 (The Well)
animated GIF
[4]
154 (The Drain)
animated GIF
[4]
155 (The Drain)
animated GIF
[4]
156 (The Ocean)
animated GIF
157 (The Ocean)
animated GIF
158 (The Ocean)
animated GIF
193 (The Well)
animated GIF
196 (The Lab)
animated GIF
205 (The Island)
animated GIF
227 (The Island)
animated GIF
237 (The Pyramid)
animated GIF
[5]

None of the invisible collision maps for these rooms have been shown here (although a full set has been included along with the files for this report). However, there are a few observations that should be made about the collision maps for some of the rooms:

[0] The cannonball item had its collision changed from solid to climbable in Citadel-early. This means that rooms 208 (the title screen) and 234 (The Mountains) exhibit collision map differences between Disc 6 and Citadel-early, but these are trivial changes caused by the cannonball. These two rooms have not been included in the above table because they are identical in all other respects for all three versions.

[1] One of the crowns was originally intended to be situated in a secret chamber off The Pyramid! In addition to the presence of this chamber in the Disc 6 version, room 21 (one of The Pyramid's lower chambers) contained an invisible, permeable tunnel through the western wall in order to reach this chamber, as may be seen in the collision map from Disc 6:

-disc6
-early
Beeb retail
021

[2] Although the chimney's graphics look like a brick wall in Disc 6's room 73, they are climbable just as they are in the other versions:

-disc6
-early
073

[3] In Citadel-early, the above crown that was originally in The Pyramid was moved to the Witch's House. This entailed a modification to Room 145 in Citadel-early in order to insert the familiar invisible tunnel high up on the western wall:

-disc6
-early
145

[4] A two-room pipe at the bottom of The Well was accessible in the Disc 6 version (it was known as The Drain). Its entrance (from halfway down The Well, on the eastern wall) was raised in Citadel-early to make it inaccessible, and the two rooms containing the pipe were removed.

[5] The Pyramid had a completely different entry maze in the Disc 6 version, as its collision map shows:

-disc6
-early
Beeb retail
237

Based on the above evidence, it should be fairly obvious that the timeline of surviving Beeb builds is Disc 6 first, followed by Citadel-early, and finally the retail copy. Disc 6 is therefore the oldest surviving complete build at this time, although other bits and pieces will be presented which are older than this build.

13. The Figure Tools

Complete or partial copies of MJ's figure designer toolkit may be found on Discs 4, 5, 9, 10, 14 and 15.

To use these, load (for example) Disc 4 and boot it with SHIFT & BREAK. At the "IN OUT" menu, choose option 0 to see all the JKC-U figures on the disc. Load a figure with option 1. Then, choose option 4 to load the figure designer, from where the figure may be viewed and edited.

To return to the "IN OUT" menu from the designer tool, press @ (this may be the backtick key, or the left curly bracket key, in some emulators).

An edited figure may be saved back to disc in JKC-U (uncompressed) format using option 2 (SAVE FIGURES). Alternatively, it may be exported in JKC-C (compressed) format using option 3 (SAVE CODE). These figures are in a format that is native to Citadel's figure routines. The figures on Discs 7 and 8, from which Citadel is built, were presumably all exported from this tool using option 3. At this stage I have not yet tried exporting all of the individual figures used to build the game, so the build above was performed using the pre-compressed copies already provided by MJ on Discs 7 and 8.

14. Figures: Discs 4, 5, 9 and 10

A piece of software (jakview) was written (or rather, hastily adapted) to convert MJ's JKC-U format to TIFF, allowing easy conversion of all the uncompressed figures from the "design discs": 4, 5, 9 and 10.

The figures on Disc 5 appear to be identical to those on Disc 10. The figures on Disc 4 are almost identical to those on Disc 9, but with an extra layer on D.BUTTON, some redesigned female player figures, and a slight modification to layer zero of the moose head. Interestingly, this lopsided moose head features in Citadel-early, too.

Figure name
(discs 4, 5, 9, 10)
Layer 0Layer 1Layer 2Layer 3Layer 4Layer 5Layer 6Layer 7Notes
D.BARREL
D.BONE
D.BOTTEL
D.BRICK
D.BRICKB
D.BRICKC
D.BROUNCH
D.BUTTON
D.BUTTON
(Disc 9)
Disc 9 version: Layer 2 added
D.CANBALL
D.CANNON
D.CAULDON
D.CHAIN
D.CHANDEL
D.CHICKEN
D.COLUMN
D.COWLMEN
D.CROWN
D.DIAMOND
D.DIGONAL
D.DOORKEY
D.FIRE
D.GHOST
D.GHOUL
D.GIRL
D.GIRL
(Disc 9)
Disc 9 version: Final female design
D.GIRLB
D.GIRLB
(Disc 9)
Disc 9 version: Altered
D.GIRLO
D.GIRLT
D.GIRLN
(Disc 9)
New in Disc 9: Alternative female design
D.GROUND
D.HEADLopsided layer 0 appears in Citadel-early
D.HEAD
(Disc 9)
Disc 9 version: Subtle change to Layer 0
D.IBASE
D.ICECRYS
D.ITEMS2
D.ITEMS3
D.JARS
D.JARS2
D.JELLY
D.MAN
D.METLANT
D.MONST
D.MONSTER
D.MUMMY
D.P0
D.P1
D.P2
D.P3
D.PHARO
D.PHAROLV
D.PICTURS
D.PIG
D.PULSAR
D.PYRAFIG
D.RABBIT
D.RYYBI
D.SCALE
D.SCROLL
D.SEABING
D.SHACKLE
D.S@JLESøjle: Danish for "pillar"?
D.SKELTON
D.SKULL
D.SKY
D.SNAKE
D.SORPION
D.SPIEKO
D.SPIKE
D.SPINNER
D.STARPT
D.STARS
D.STATUE
D.STONE
D.TABLE
D.TORCH
D.TRAMPO
D.TREE
D.TROLL
D.TV
D.WATER
D.WHEEL
D.WITCH

15. The Deviant Disc 7 D.FIG

With so much on the discs to look at, this gem was almost missed...

A unique compiled figures file exists on Disc 7. It definitely belongs to Citadel, but does not appear to match any other version of anything.

A first clue that something is odd with this file is that the tile data does not begin at &555 within the file (or &955 in memory once loaded), as it does for the retail D.FIG (see Appendix B: Retail D.FIG Anatomy). Much of the auxiliary data that appears in later versions of D.FIG (for example the female player sprite) is absent in this copy.

The figure data does start with the crystals in positions 0-5, as the later copies of FIG and D.FIG do. (Later on in this report, a piece of evidence will be presented suggesting that this was not always the case).

The modern crunpack tool (which performs room extraction from Citadel's game data files) was hastily adapted to dump figure sets instead, and given this rogue D.FIG upon which to chew. One disclaimer: It is of course not possible to be absolutely sure that crunpack is completely compatible with this old version of D.FIG, but here are some of the more unexpected results of this process.

Remember, this was presumably from a playable version of the game at some point.

D.FIG Figure IDLayer 0Layer 1Layer 2Layer 3Notes
7matches D.BOTTEL layer 6
8recoloured variant; flasks in this version were S-type
15matches D.P0 layers 0-3; plants everywhere!
16matches D.P1 layers 0-3
17recoloured D.P2 layers 0-4; reminiscent of Exile!
18recoloured D.P3 layers 0-3; reminiscent of Exile!
24recoloured D.BARREL layer 2
28recoloured D.SPIKE layer 4 variants
31recoloured D.SKELTON variants
33scary and unique
40variant D.METLANT layers 4 and 5
41cauldron smoke?
42different pot or cauldron
43D.JELLY frame 6
44D.JELLY frame 7
48layers 1 and 3; red variant
50unique
51unique
52unique
53D.SKY layers 0-3
56layer 2: black background variant
57unusual single-layer 3-colour earth
62recoloured D.BONE layer 3 variants; shorter bone
63D.HEAD; lopsided Disc 4 version, appears in Citadel-early

The most interesting curiosities in this D.FIG may be the doors and keys, which are novel. It seems the colour-coding of these was originally going to work differently:

D.FIG Figure ID
6465666768697071
7273747576777879
D.FIG Figure ID

It is easy to see why this was eventually changed. To finish, here are some smaller brick figures and some instances of the "cracked" stone texture, in novel colourways.

D.FIG Figure ID
8081828384858687
9293949596979899
D.FIG Figure ID

Interestingly, the pillar figure is completely missing from this copy of D.FIG.

The other figures in this D.FIG appear identical to the retail ones.

As mentioned, Disc 7 contains three copies of the figure generator; F, CHFIG, and FIG (with FIG being the one that was used to produce the retail Elk build earlier on). Of these, the F file seems most closely related to the generated D.FIG file found on Disc 7, although it does not seem to correspond exactly. This has not been tested, since F will not run to completion as it stands: JKC-C figure data is not provided for some of the figures needed by F; the missing figures would need to be exported from the CREAT utility.

It is clear that playing a copy of the game based on this figure set would have been quite a bit different to the other versions encountered so far.

16. Deactivated Rooms on Disc 2

ROOM on Disc 2, the BASIC utility that contains all room definitions and generates the D.ROOM file for inclusion in CITAM, contains four rooms that were commented out at some point in development.

Unfortunately, two of these rooms are not defined in a way which is entirely compatible with the latest version of ROOM, for example:

6960 REM PROCR("The Lake","ROCK")
6964 REM PROCC("0070:454C:567C:CDCF","0070:558656:868DDC:7DCECD")
6970 REM PROCP(&1A)

Uncommenting these lines and adding @ to the start of the room name (since it is not in the global room name table) causes a Bad Hex error in this line of code in PROCC:

8264 IFT%?1=&70THENPRINT"WATER":T%?2=EVAL("&"+MID$($A,Y%+4,2)):T%?3=EVAL("&"+MID$($A,Y%+6,2)):T%=T%+2:Y%=Y%+4

The first four digits of the hex string passed to PROCC being 0070 in such cases seems to indicate that the room contains water, but ROOM now expects somewhat different syntax for rooms like this. This line is clearly expecting an 8-digit hex string (from MID$($A,Y%+6,2)) rather than two 4-digit hex strings.

A naïve effort to attempt to render these rooms within the game engine involves simply removing that first colon:

> 6964 PROCC("0070454C:567C:CDCF","0070:558656:868DDC:7DCECD")

ROOM succeeds now, but it reports that the extra room overflows the space permitted for D.ROOM.

One way to make space for all four new rooms is just to remove some detail from some of the other rooms, leaving them defined, but lacking any contents. For example, shortening the title screen's name, and gutting its contents by deleting lines of BASIC code:

> 6160 PROCR(" ","ROCK")
> 6162
> 6164
> 6166
> 6167
> 6174

Also slimming down The Well:

> 6262
> 6264
> 6265
> 6266
> 6268
> 6274

as well as shortening the name of Main Hall to make room in the text tables:

> 4620 PROCR(" ","BB")

Similar modifications may be made to introduce the other missing rooms at lines 5100, 6460 and 6980. (The name of The Drain will need a * prepending to it, since it is the first use of that name in the code.) A Beeb CITAM may be built from the resulting D.ROOM, and then transplanted into a Citadel_D1S1_40T_HG3_727E20AD_1 image.

Here are some screenshots of the unearthed rooms. It is likely that The Lake and World's End were a pair of rooms that were intended to be connected to one another, perhaps beyond the "unpassable room" at the far east end of The Island.

The Crypt
The Drain
The Lake
World's End

The Drain has of course already been seen, as room 155 on the Disc 6 build.

There are clearly some rendering problems. It may well be possible to get a better rendition of these old rooms—this area would benefit from some research, but there are still more map secrets on these discs.

17. An Ancient Map on Disc 8

Something is funny with Disc 8. The FIG file on here is dated 11th December 1985, around the Electron release of the game. It has additionally been proven (by building a retail-equivalent Electron copy of the game using the figures from this disc) that the Disc 8 JKC-C figure data is also very modern. The ROOM file on this disc seems anachronistic, however. It contains various dates, the most recent of which is 6th June 1985.

Does this ROOM file contain something very old?

Examining Disc 8's ROOM yields some interesting room names:

3980PROCR("@The Dessert","GRASS")
4600PROCR("*Welcome !","BRICK2")
5660PROCR("*Tele Port","BRICK1")

"The Dessert" is presumably a charming misspelling of The Desert, which was fixed before release. "Welcome !" might be the title screen, before it was renamed to "Welcome to..". "Tele Port" presumably matured into "Star Port". Evidence is good that this is the oldest version of the map yet encountered, but there is more:

3760PROCR("*S.I.V.","BC6")
4180PROCR("*Up'n Down","BC5")
4740PROCR("@The Lake","BRICK")
4780PROCR("*Sacrif Cliff","ROCK")
4960PROCR("*Crown Room IV","MUD")
5020PROCR("*Spieko's Lair","BRICK7")
5080PROCR("@The Drain","MUD")
6580PROCR("*The Reef","ROCK")
6980PROCR("*Worlds End","ROCK")

This looks like a promising archæological dig.

The Disc 8 Map: Rebuilding the Figures

By a stroke of luck, the ROOM programs contain the IDs of various important figures (whose JKC-C binaries would be supplied in D.FIG) that are then used in the room definitions. It is immediately obvious that this ROOM uses an outmoded set of figure IDs. For example, even the old version of ROOM on Disc 6 exhibits the well-known retail standard of the lowest-numbered figures being the crystals:

1000N=0
1100DIAM=N:IBASE=N+6:BOTTLE=N+7:N=N+9
The figure DIAM ("diamond", a.k.a. a crystal) is defined to be ID 0, and six slots (0-5) are reserved for the six layers of the D.DIAMOND figure before the next sprite (which is IBASE, the item pad). The crystals are treated specially by the game engine, so they can be procedurally arranged within The Sanctuary. All versions of the engine so far seen therefore expect the crystals to occupy the first six slots of the figures list. However, Disc 8's ROOM is old enough that it does not respect this standard:
1000REM"Figures Numbers
1010N=0
1100IBASE=N:BOTTLE=N+1:N=N+3

Here it may be seen that figure ID 0 was once the item pad (and in fact the six layers of DIAM were placed immediately after the keys and doors instead, which start at slot 64).

There are other anachronisms in the figure ID definitions of the Disc 8 ROOM. The SKY family of figures (see the table above) is not included in any other known build of the game, but Disc 8's ROOM requires them:

1880SKY=N:SKYA=N+1:SKYAB=N+2:SKYAC=N+3
1882SKYB=N+4:SKYC=N+5:N=N+6

These SKY figure ID definitions are referenced later on in the room definition code, for example:

2166PROCSO("*000SKY:E9:EA:*200SKYA:E8:*001SKYAB:EB:*032SKYB:D9:*033SKYB:DA:*033SKYC:E9:*030SKYC:EA")

There are plenty of other notable inclusions and omissions from the Disc 8 ROOM's figure list—for example, the plants and flowers shown above are included (but actually unused), and Citadel's talismanic Cowlman figure is not present at all.

This is both good and bad news. On the good side, there is clearly a precious historical artefact here—an ancient, seductive edition of the game map, which has never been seen before. On the bad side, evidence is mounting that the copy of ROOM on Disc 8 requires both a highly variant, unavailable build of the game engine, and an equally deviant and unavailable copy of FIG.

Tackling the FIG problem first, a list of needed figures may be compiled using the information provided in the Disc 8 ROOM. One might be tempted to use a modified version of one of MJ's FIG programs to try to generate a compatible D.FIG file. Unfortunately, a number of the needed figures do not have compressed JKC-C versions available, so they would need to be exported individually using the CREAT program on the sprite discs. Worse, one or two of these needed figures do not actually exist uncompressed on the sprite discs at all.

Instead, two existing D.FIG files from two different eras of development (Disc 7 and Disc 2) will be split back up into their constituent compressed sprites. This has the advantage that the metadata inserted when these D.FIG files were emitted by the relevant FIG programs is also preserved, which will be needed. A tacky bash script should suffice:

#!/bin/bash

# start offset: use 0x300 for the Disc 7 D.FIG, and 0x555 for the Disc 2 one:
P=$[ 0x300 ]

N=0
IN="/tmp/D.FIG"
OUTPFX="/tmp/DFIG-tiles/FIG-"

while /bin/true ; do
  # get value of Pth byte
  LEN=`head -c $[ ${P} + 1 ] "${IN}" | tail -c 1 - | hexdump -ve '1/1 "%u"'`
  if [ ${LEN} == 0 ] ; then exit ; fi
  # copy to output file
  OP="${OUTPFX}${N}"
  dd if="${IN}" of="${OP}" bs=1 skip=${P} count=${LEN} 2> /dev/null
  echo tile ${N} at ${P}, len ${LEN}, written to "${OP}"
  P=$[ ${P} + ${LEN} ]
  N=$[ ${N} + 1 ]
done

This splits the two D.FIGs back into their constituent sprites. By picking and choosing from these two sets, a complete "candidate set" of figures is established (see Appendix F: Figures for Disc 8 ROOM for a list). These candidate files are re-concatenated to produce a Frankenstein sprite file hopefully suitable for use with the Disc 8 ROOM. This file is then padded with zeros up to the nominal length of 2635 bytes. Note that this is not a true D.FIG file, as it lacks the various auxiliary header data present in an authentic D.FIG.

This takes care of the sprites to accompany the ROOM file; now for the ROOM file itself.

The Disc 8 Map: Massaging ROOM

In its raw form, this Disc 8 ROOM does not even execute without errors. In order to try to create a working version, it would be necessary to choose a target. The Disc 8 ROOM could be fixed up so it produces a D.ROOM file compatible with an engine of its own era (which is not available). Alternatively, one of the other ROOM files (from Disc 6, Disc 2 or Disc 12) could be used as a base, and an attempt could made to merge the room definitions from the Disc 8 copy into one of these other files, producing a D.ROOM that is hopefully compatible with an engine of the selected era.

The decision is made to target the retail Beeb version of the game. There are sound reasons for this choice—this edition of the game engine is the one that is best understood at this time, and the one that is likely to contain the fewest bugs. Also, there exists a "reassembly" of this engine, which facilitates the building of hybrid versions on a modern machine with the minimum of fuss. Skipping over the gory details, the procedures at the end of the Disc 2 (retail) ROOM file remain as they are, but the room definitions (i.e. the calls to those procedures) are merged in from Disc 8. The resulting Frankenstein ROOM file is then pummelled into a state where it will execute successfully. The resulting ASCII text will need tokenising to BBC BASIC (basictool -t) before it can be used. A D.ROOM file is produced.

Looking at the x740.bin composite data file from the 0.1 Citadel "reassembly" package, the first 533 bytes of this blob are saved off to a separate file. A new x740.bin file can then be built by concatenating this header, the Frankenstein sprite file from the previous subsection, and the D.ROOM just built, e.g.:

cat x740-1-header.bin x740-2-figs-pad.bin x740-3-D.ROOM.bin > x740.bin

Unfortunately, no data is forthcoming on where the energy flasks are meant to be located, nor is it known which items are supposed to be in which rooms. Both of these pieces of information are contained within D.FIG's auxiliary header data, which is not available for this Disc 8 ROOM. The simplest course of action is simply to patch the engine to prevent items and flasks from being placed in rooms at all. Additionally, the engine expects the item pad figure to have ID 6, but Disc 8's ROOM assumes it has ID 0. This may also be patched in the engine. Other patches made to the engine include disabling the routine responsible for solving puzzles and the code which handles draining The Well, and disabling the title screen text overlay. These patches are performed in such a way that addresses remain the same as they are in the retail version, so that well-established run-time pokes should work without modification.

Finally, D_CHEAT_INVINCIBLE and D_CHEAT_UNLOCK_DOORS are set to 1, in order to make traversing the resulting map a little easier. A reassembly of the game may then be performed as detailed in the reassembly instructions (or using its build.sh file).

Now the Disc 8 map can finally be tested. The result—equal parts predictable and disappointing—is a crash.

Returning to the Disc 8 ROOM, it transpires that there are ten troublesome rooms causing the retail engine to crash. One option is to replace these rooms with the default empty "barrel" room present in this version, for example:

However, with a little more effort, a more minimal trimming may be performed instead. The aim is to allow these awkward rooms still to render without completely eliding them (or crashing the engine). This allows at least some idea of how the rooms are supposed to look, minus some of their features (often the animations). The "reassembly" process above may now be repeated to yield a playable copy of the game.

The Disc 8 Map: Results

This process results in three deliverables:

18. Michael Jakobsen's Wordwise Documents (Disc 16)

Disc 16 contains some of MJ's old Wordwise documents, some of which are of particular relevance to Citadel. It also contains a few other files.

Note that the original disc image as captured has not been released. The reason for this is that many of MJ's documents contained an address and a telephone number, and it was decided not to make those pieces of information public. Instead, the opportunity has been taken to convert the old Wordwise documents to more useful plain ASCII text, while redacting the personal information. They have been released here as individual files. A rebuilt Acorn DFS disc image of the few BASIC programs on this disc has been compiled and presented separately, in case you are interested in running those programs.

An inventory of the Wordwise documents follows:

Interesting non-Wordwise files on this disc are as follows:

19. A Questionable Chronology

With everything that has been learned, here is a final attempt to establish a timeline, as far as such a thing is possible:

20. Acknowledgements

Special thanks go, naturally, to Michael Jakobsen.


21. Appendix A: CITAT Disassembly

this is the routine to display the game's title screen
called from BASIC, it unpacks the packed image data at &3000 (earlier in this file)
to screen memory in mode 4

the packed image format is quite simple.
- if a byte is not 00 or FF, just write it to video RAM
- a 00 byte means add one to the following byte and then write
  that number of 00 bytes to video RAM
- a FF byte means add one to the following byte and then write
  that number of FF bytes to video RAM

so 0x00 and 0xff are effectively "escape characters", which just tell the routine to
write a number of 00 or ff bytes in a row, that number being the value of the following
byte plus one. Once that's over, the routine just carries on.


$4200> A0 00:   LDY #$00        ; set up zero page pointers:
$4202> 84 80:   STY $80         ; &80=0
$4204> 84 70:   STY $70         ; &70=0
$4206> A9 58:   LDA #$58        ; 
$4208> 85 71:   STA $71         ; &71=&58
$420A> A9 30:   LDA #$30        ; 
$420C> 85 81:   STA $81         ; &81=&30
$420E> A0 00:   LDY #$00        ;
$4210> B1 80:   LDA ($80),Y     ; zero page - loop through memory from &3000 to load packed source image data
$4212> F0 15:   BEQ $4229       ; is loaded byte 00 ? yes, jump to &4229
$4214> C9 FF:   CMP #$ff        ; is loaded byte FF ?
$4216> F0 26:   BEQ $423E       ;                     yes, jump to &423E
$4218> 91 70:   STA ($70),Y     ; byte is 00<b<FF, store it in MODE 4 screen memory starting at &5800
$421A> E6 80:   INC $80         ; low source byte = low source byte + 1
$421C> D0 02:   BNE $4220       ; is low byte now 00 ? (hooray for the 6502 zero page bug)
$421E> E6 81:   INC $81         ; yes, high source byte = high source byte + 1
$4220> E6 70:   INC $70         ; low destination byte = low destination byte + 1
$4222> D0 EA:   BNE $420E       ; if dest low byte != 0, just continue looping
$4224> E6 71:   INC $71         ; dest low byte=0, so increment dest high byte
$4226> 10 E6:   BPL $420E       ; branch until high byte goes negative (&8000, end of screen memory)
$4228> 60:      RTS             ; return to BASIC

jump here if loaded source byte was 00 (for a chain of unlit pixels)

$4229> C8:      INY             ; 
$422A> B1 80:   LDA ($80),Y     ; load next byte
$422C> A8:      TAY             ; place in Y
$422D> 84 90:   STY $90         ; store at &0090
$422F> A9 00:   LDA #$00        ; A=0
$4231> 91 70:   STA ($70),Y     ; store 0 in screen memory
$4233> 88:      DEY             ; Y=Y-1
$4234> C0 FF:   CPY #$ff        ; did Y equal 0 ?
$4236> D0 F9:   BNE $4231       ; no, jump to &4231 and carry on writing those null bytes
$4238> A4 90:   LDY $90         ; restore original "next byte" from &0090 (see &422D)
$423A> C8:      INY             ; Y=Y+1
$423B> 4C 5042: JMP $4250       ; jump to &4250

jump here if loaded source byte was FF (for a chain of lit pixels)
this code is identical to the above, but writes FF to the screen
instead of 00

$423E> C8:      INY             ;
$423F> B1 80:   LDA ($80),Y     ;
$4241> A8:      TAY             ;
$4242> 84 90:   STY $90         ;
$4244> A9 FF:   LDA #$ff        ;
$4246> 91 70:   STA ($70),Y     ;
$4248> 88:      DEY             ;
$4249> C0 FF:   CPY #$ff        ;
$424B> D0 F9:   BNE $4246       ;
$424D> A4 90:   LDY $90         ;
$424F> C8:      INY             ;

both the 00 and FF routines then end up running this piece of code,
which just makes sure that the &70 and &80 destination and source
pointers in zero page are updated to the correct values so that the
original loop can continue where it left off

$4250> A9 02:   LDA #$02        ; A=2
$4252> 18:      CLC             ; 
$4253> 65 80:   ADC $80         ; add two onto the source low byte
$4255> 85 80:   STA $80         ; and store again (i.e. skip over the two "special bytes")
$4257> A5 81:   LDA $81         ; 
$4259> 69 00:   ADC #$00        ; if the carry was set, increment the source high byte as well
$425B> 85 81:   STA $81         ; 
$425D> 98:      TYA             ; this was the "packed length" byte that followed 00 or FF
$425E> 18:      CLC             ;
$425F> 65 70:   ADC $70         ; these next instructions just skip over the relevant chunk of
$4261> 85 70:   STA $70         ; screen memory that was filled by the unpacking, so we
$4263> A5 71:   LDA $71         ; start again in the right place when we return to the original loop
$4265> 69 00:   ADC #$00        ; again, if the carry was set, increment the dest high byte as well
$4267> 85 71:   STA $71         ;
$4269> 10 A3:   BPL $420E       ; continue with the original loop
$426B> 60:      RTS             ;
$426C> 00:      BRK             ;

22. Appendix B: Retail D.FIG Anatomy

Here is some background on the nature of D.FIG.

This is how the CC tool loads the constituent parts of CITAM:

1100 *LO."D.FIG" 2400
1200 *LO."D.ROOM" 33A0
1300 *LO."M" 4500

and then later on, after obfuscation:

4100 *SAVE"CITAM" 2400 6500 A670

So D.FIG is placed at the start of CITAM, which ultimately is moved to &400, but some parts of it are moved around once CITAM has finished loading. Here is the region of 6502 memory map that corresponds to where D.FIG is loaded:

Retail D.FIG Anatomy

If the player has selected the female character, the two memory moves signified by the "if female" arrows are executed to copy the female figure (GILDAT) and its colour palette (GILCOL) over the male MANDAT and MANCOL. Regardless of whether these moves were done or not, the third memory move (labelled "always") is now executed unconditionally to bring the item tile table into position at &4C8.

The game will reclaim the regions from &400 to &4C7 and &500 to &5C3 for use as tile workspace.

Here is a summary of the "Data" portions of D.FIG. I have provided MJ's symbol names, those from my own disassembly, and the ones from the level7 disassembly.

SectionMJ symbol nameReassembly symbol namelevel7 symbol nameAddressLength
Data DTXSDSTARPORT_DESTROYEDstar_port_destroyed_string&5D435 bytes
&5F7blank, 1 byte
TCOLTEXT_COLOURStext_colour_table&5F88 bytes
MADLT_600_ANIMATIONS (head)player_sprites_address_low_table&60016 bytes
Data ATDRNT_ATTRACT_ROOMStitle_screen_rooms&75032 bytes
TITXTITLESCR_TEXTtitle_screen_text&77084 bytes
TEVt_puzzle_flagspuzzle_states, switch_states&7F4blank, 17 bytes
TVSDt_puzzle_flags_2star_port_destroyed&7FE
Data BSIRT_ITEM_ROOM_MASTERinitial_object_room_table&88040 bytes
TDFt_track_doorsdoors_opened&8A8blank, 8 bytes
TBRT_FLASKS_ROOM_IDrooms_that_contain_energy&8B016 bytes
Data CTBPT_FLASKS_ROOM_POSenergy_coordinates_table&8F016 bytes
TX99SECRET_MESSAGEencrypted_completion_message&90067 bytes
TXRPREPROGRAMMINGreprogramming_string&94318 bytes

23. Appendix C: MD5 Encyclopædia

Note that files which only appear once on MJ's discs are not listed here—this only includes files on the discs for which multiple copies exist with the same filename.

        A0    cfb6f5c96154ef7c8dd16512062e9403    06-citadel_02_11_1985_1
        A0    a05f1181e5f389cbaea32647b290d6aa    02-citadel_bbc_electron_final_13_12_1985_side2
        A0    a05f1181e5f389cbaea32647b290d6aa    12-citadel_electron_assembly_13_12_1985_side2

        A1    ff35ddd8b38ebd5303a38883c86594ee    06-citadel_02_11_1985_1
        A1    c34521e2f5b64eb4d63a4d0b33861606    02-citadel_bbc_electron_final_13_12_1985_side2
        A1    044b9e3fbe89684014a1ce7815d71b8a    12-citadel_electron_assembly_13_12_1985_side2

        A2    5c9352f7a9c486f4daefafc6336056dc    06-citadel_02_11_1985_1
        A2    5c9352f7a9c486f4daefafc6336056dc    02-citadel_bbc_electron_final_13_12_1985_side2
        A2    5c9352f7a9c486f4daefafc6336056dc    12-citadel_electron_assembly_13_12_1985_side2

        A3    28f0591c49191d00443ab3de3f97e5fe    06-citadel_02_11_1985_1
        A3    1792f332515d706472b662157494d8d5    02-citadel_bbc_electron_final_13_12_1985_side2
        A3    1792f332515d706472b662157494d8d5    12-citadel_electron_assembly_13_12_1985_side2

        A4    2cd2a03bd413e2c1a1320e49ce9e62ba    06-citadel_02_11_1985_1
        A4    5ba1402c7c7f35b0ea2754a45e842540    02-citadel_bbc_electron_final_13_12_1985_side2
        A4    5ba1402c7c7f35b0ea2754a45e842540    12-citadel_electron_assembly_13_12_1985_side2

        A5    c92b346f2bb93cd21d629fe5e96bfa4a    06-citadel_02_11_1985_1
        A5    10b9f9033d67755da9d70e3b4d03b076    02-citadel_bbc_electron_final_13_12_1985_side2
        A5    10b9f9033d67755da9d70e3b4d03b076    12-citadel_electron_assembly_13_12_1985_side2

        AR    7fb0cfaf59bde2f451dcd0ecf86c1445    06-citadel_02_11_1985_1
        AR    63d788150d2af8128e86590aa973bfff    01-citadel_bbc_electron_final_13_12_1985_side1
        AR    8b67bb7ac6899a8d45b6846cc1112bcb    11-citadel_electron_assembly_13_12_1985_side1_1
also:
{     D.AR    fb9aac73ce8e106e32a6a55c62e02613    01-citadel_bbc_electron_final_13_12_1985_side1  }
{     T.AR    8b67bb7ac6899a8d45b6846cc1112bcb    11-citadel_electron_assembly_13_12_1985_side1_1 }

     !BOOT    24f73dd4903a40ed7474c6b4bbf4a21e    05-design_source_m_z_02_11_1985
     !BOOT    24f73dd4903a40ed7474c6b4bbf4a21e    10-citadel_designer_copy_m_z_side2_1
     !BOOT    71f2bc0d62d053298b3b380f31e8cd01    06-citadel_02_11_1985_1
     !BOOT    77f91309e6eeeecc7a9291a921f4687b    15-design_24_09_84_2
     !BOOT    a2fef03f5cce856ea7484bc6365fcc34    04-design_source_a_n_02_11_1985
     !BOOT    a2fef03f5cce856ea7484bc6365fcc34    09-citadel_designer_copy_a_n_side1_1
     !BOOT    d4bde096af63b256a856fc6b4c0452db    13-citadel_electron_master_tape_creator_12_12_1985_final_4

        CC    33e149a19cbe7e294e7b239f24bd06ba    02-citadel_bbc_electron_final_13_12_1985_side2
        CC    33e149a19cbe7e294e7b239f24bd06ba    12-citadel_electron_assembly_13_12_1985_side2

   C.CHAIN    99610657aed15ca1c6b2176dfb560497    07-citadel_design_code_i_electron_side1_1
   C.CHAIN    a5081135f4dc02e1ce8d59ea6e9783dd    08-citadel_design_code_ii_electron_side2_2

   C.CHAIR    27ce1af8d35f4480ecd786157bec4232    07-citadel_design_code_i_electron_side1_1
   C.CHAIR    27ce1af8d35f4480ecd786157bec4232    08-citadel_design_code_ii_electron_side2_2

 C.CITADEL    daa075f2c0f0e073908c306872573779    01-citadel_bbc_electron_final_13_12_1985_side1
 C.CITADEL    daa075f2c0f0e073908c306872573779    13-citadel_electron_master_tape_creator_12_12_1985_final_4
also:
{  CITADEL    cd5b24bd0982d458dd0f0c250ee3e35c    13-citadel_electron_master_tape_creator_12_12_1985_final_4  }

 C.COATARM    cfdbfb883bc06d57094ee3d15e11094e    07-citadel_design_code_i_electron_side1_1
 C.COATARM    cfdbfb883bc06d57094ee3d15e11094e    08-citadel_design_code_ii_electron_side2_2

   C.CROWN    4e7c7170058c66db7928cf7657a61ceb    07-citadel_design_code_i_electron_side1_1
   C.CROWN    c2b9ce0fbd2f62dfd9cd8d1cb1b8fec2    08-citadel_design_code_ii_electron_side2_2

 C.DIAMOND    5a592e2efcc2f2ac2568168a01dd48bb    08-citadel_design_code_ii_electron_side2_2
 C.DIAMOND    cfe6ea637bac0ba9c179dd79fb171dc2    07-citadel_design_code_i_electron_side1_1

     CITAL    5792340c2c383b0bf9d4d9b6e4cddd9f    11-citadel_electron_assembly_13_12_1985_side1_1 (572 bytes)
     CITAL    b81d1c599d007ba43a0c57a4736fe325    01-citadel_bbc_electron_final_13_12_1985_side1  (541 bytes)
     CITAL    fe5313a9ae7387f7d04d20245fc5ac46    13-citadel_electron_master_tape_creator_12_12_1985_final_4 (673 bytes)
also:
{  T.CITAL    304f34c1aaa9afc456fb0a4061b83e24    11-citadel_electron_assembly_13_12_1985_side1_1  (710 bytes) }
{  T.CITAL    fe5313a9ae7387f7d04d20245fc5ac46    01-citadel_bbc_electron_final_13_12_1985_side1   (673 bytes) }

     CITAM    55f0ff3f75369d734161e2ae7ca96f79    11-citadel_electron_assembly_13_12_1985_side1_1
     CITAM    fcb1f575c31b2427cbfd616d7ca1df06    01-citadel_bbc_electron_final_13_12_1985_side1
     CITAM    fcb1f575c31b2427cbfd616d7ca1df06    13-citadel_electron_master_tape_creator_12_12_1985_final_4

   C.MUMMY    fbfd82f4983fa8e0ada348239a2cda4c    07-citadel_design_code_i_electron_side1_1
   C.MUMMY    fbfd82f4983fa8e0ada348239a2cda4c    08-citadel_design_code_ii_electron_side2_2

     CREAT    a430eee5493613b77b1e345f6c73d922    05-design_source_m_z_02_11_1985
     CREAT    a430eee5493613b77b1e345f6c73d922    10-citadel_designer_copy_m_z_side2_1
     CREAT    a85457c65e3942219ec6fd6f18b32d70    04-design_source_a_n_02_11_1985
     CREAT    a85457c65e3942219ec6fd6f18b32d70    09-citadel_designer_copy_a_n_side1_1
also:
{   DESIGN    bb0b8ce470aee0d98593fc8ecb9481f3    14-citadel_sounds_5                   } 

 C.SHACKLE    795f6b3c84ed7653c41ed0730382bdcc    07-citadel_design_code_i_electron_side1_1
 C.SHACKLE    795f6b3c84ed7653c41ed0730382bdcc    08-citadel_design_code_ii_electron_side2_2

  C.TEARED    fab87cab3f70ff94ea7eb2c988547447    07-citadel_design_code_i_electron_side1_1
  C.TEARED    fab87cab3f70ff94ea7eb2c988547447    08-citadel_design_code_ii_electron_side2_2

  D.BARREL    150ad829d3cab9471e6255110dddbb11    04-design_source_a_n_02_11_1985
  D.BARREL    150ad829d3cab9471e6255110dddbb11    09-citadel_designer_copy_a_n_side1_1

   D.BEANS    b64e5403503b5e07e81abfa7105e6c44    04-design_source_a_n_02_11_1985
   D.BEANS    b64e5403503b5e07e81abfa7105e6c44    09-citadel_designer_copy_a_n_side1_1

    D.BONE    ac2726d61a082278a0c52c4c39aa6bf4    04-design_source_a_n_02_11_1985
    D.BONE    ac2726d61a082278a0c52c4c39aa6bf4    09-citadel_designer_copy_a_n_side1_1

  D.BOTTEL    43c1b59719d808c478335ecc91b33fc0    04-design_source_a_n_02_11_1985
  D.BOTTEL    43c1b59719d808c478335ecc91b33fc0    09-citadel_designer_copy_a_n_side1_1

   D.BRICK    b6a160d34bcd662128e1e8e9a2736abf    04-design_source_a_n_02_11_1985
   D.BRICK    b6a160d34bcd662128e1e8e9a2736abf    09-citadel_designer_copy_a_n_side1_1

  D.BRICKB    85a2cf54643c9cafc518c4ae25a87d88    04-design_source_a_n_02_11_1985
  D.BRICKB    85a2cf54643c9cafc518c4ae25a87d88    09-citadel_designer_copy_a_n_side1_1

  D.BRICKC    f176b072ffa8791ff2b5080a1ab07d85    04-design_source_a_n_02_11_1985
  D.BRICKC    f176b072ffa8791ff2b5080a1ab07d85    09-citadel_designer_copy_a_n_side1_1

 D.BROUNCH    35213a9e22dbcea11c51c6972f62d065    04-design_source_a_n_02_11_1985
 D.BROUNCH    35213a9e22dbcea11c51c6972f62d065    09-citadel_designer_copy_a_n_side1_1

  D.BUCKET    750be18cc81c34a741834211bc2458f1    04-design_source_a_n_02_11_1985
  D.BUCKET    750be18cc81c34a741834211bc2458f1    09-citadel_designer_copy_a_n_side1_1

  D.BUTTON    0ea8f6ff834017cb41f8dda3b51ed5b3    09-citadel_designer_copy_a_n_side1_1
  D.BUTTON    aecdd619f92522a1d7bf845799483dbe    04-design_source_a_n_02_11_1985

 D.CANBALL    5f6f5faea437cc34d93bc3c76fa3e706    04-design_source_a_n_02_11_1985
 D.CANBALL    5f6f5faea437cc34d93bc3c76fa3e706    09-citadel_designer_copy_a_n_side1_1

  D.CANNON    3b136263fa87644cf132aaff9a70ec8f    04-design_source_a_n_02_11_1985
  D.CANNON    3b136263fa87644cf132aaff9a70ec8f    09-citadel_designer_copy_a_n_side1_1

 D.CAULDON    22922eb3d2fe2600009958d36a55d691    04-design_source_a_n_02_11_1985
 D.CAULDON    22922eb3d2fe2600009958d36a55d691    09-citadel_designer_copy_a_n_side1_1

   D.CHAIN    dc21d1247dcca5ff59984c716dcca820    04-design_source_a_n_02_11_1985
   D.CHAIN    dc21d1247dcca5ff59984c716dcca820    09-citadel_designer_copy_a_n_side1_1

 D.CHANDEL    0797c0f4f53363ded478db871d3767a2    05-design_source_m_z_02_11_1985
 D.CHANDEL    0797c0f4f53363ded478db871d3767a2    10-citadel_designer_copy_m_z_side2_1

 D.CHICKEN    f0c10452872c7466657019edd5232c65    04-design_source_a_n_02_11_1985
 D.CHICKEN    f0c10452872c7466657019edd5232c65    09-citadel_designer_copy_a_n_side1_1

 D.COLUMN2    328e34a9a59c7eee571f82e217de0103    04-design_source_a_n_02_11_1985
 D.COLUMN2    328e34a9a59c7eee571f82e217de0103    09-citadel_designer_copy_a_n_side1_1

  D.COLUMN    c37187045645666dc8d8a1652a2dc695    04-design_source_a_n_02_11_1985
  D.COLUMN    c37187045645666dc8d8a1652a2dc695    09-citadel_designer_copy_a_n_side1_1

 D.COWLMEN    07f7349f7c76b5f1a64e9f3cfaa67bd6    04-design_source_a_n_02_11_1985
 D.COWLMEN    07f7349f7c76b5f1a64e9f3cfaa67bd6    09-citadel_designer_copy_a_n_side1_1

   D.CROWN    79f1d7e00ca2a54fdc1227e02e1f2d4e    05-design_source_m_z_02_11_1985
   D.CROWN    79f1d7e00ca2a54fdc1227e02e1f2d4e    10-citadel_designer_copy_m_z_side2_1
   D.CROWN    8c2caca0c0e3f65a34191f3538512321    04-design_source_a_n_02_11_1985
   D.CROWN    8c2caca0c0e3f65a34191f3538512321    09-citadel_designer_copy_a_n_side1_1

 D.DIAMOND    28c585483df52fc5aa8285b513828eb4    04-design_source_a_n_02_11_1985
 D.DIAMOND    28c585483df52fc5aa8285b513828eb4    09-citadel_designer_copy_a_n_side1_1

 D.DIGONAL    077dbf3423824c899e04e78c10dc9b83    04-design_source_a_n_02_11_1985
 D.DIGONAL    077dbf3423824c899e04e78c10dc9b83    09-citadel_designer_copy_a_n_side1_1

     D.DOG    f05ca826a93128ba86a3d564407fc5b7    04-design_source_a_n_02_11_1985
     D.DOG    f05ca826a93128ba86a3d564407fc5b7    09-citadel_designer_copy_a_n_side1_1

 D.DOORKEY    1a37d09b05f32848171f6ddc4a096cbe    04-design_source_a_n_02_11_1985
 D.DOORKEY    1a37d09b05f32848171f6ddc4a096cbe    09-citadel_designer_copy_a_n_side1_1

     D.FIG    42dc74e607c0267b60fc458c3c80aaf6    02-citadel_bbc_electron_final_13_12_1985_side2
     D.FIG    42dc74e607c0267b60fc458c3c80aaf6    12-citadel_electron_assembly_13_12_1985_side2
     D.FIG    87cc108de703d36a8daabec7a7b71d98    07-citadel_design_code_i_electron_side1_1
     D.FIG    f0cf78edd6019cee67b6fa9b4256691d    06-citadel_02_11_1985_1

    D.FIRE    5802e88904c8c573c05c607ed0f2b337    04-design_source_a_n_02_11_1985
    D.FIRE    5802e88904c8c573c05c607ed0f2b337    09-citadel_designer_copy_a_n_side1_1

   D.GHOST    140bdd6cb7ad72d2c7dc669f580cbf16    15-design_24_09_84_2
   D.GHOST    dc91f1bc048597f025aae5027bae8793    04-design_source_a_n_02_11_1985
   D.GHOST    dc91f1bc048597f025aae5027bae8793    09-citadel_designer_copy_a_n_side1_1

   D.GHOUL    38aaf68f1e900c259b27f1472b58c676    04-design_source_a_n_02_11_1985
   D.GHOUL    38aaf68f1e900c259b27f1472b58c676    09-citadel_designer_copy_a_n_side1_1

    D.GIRL    0c84990b5fdf82115dc0775478fb08c9    09-citadel_designer_copy_a_n_side1_1
    D.GIRL    80c2882c36fe1da9897cf3f4877e6d8c    04-design_source_a_n_02_11_1985

   D.GIRLB    154fced16a0ee3d181d8f35ed7c98496    04-design_source_a_n_02_11_1985
   D.GIRLB    fab5b1b18c9084288ddc88c4bda9e998    09-citadel_designer_copy_a_n_side1_1

   D.GIRLO    75a0693ef28b436102b7548efd62b8e7    04-design_source_a_n_02_11_1985
   D.GIRLO    75a0693ef28b436102b7548efd62b8e7    09-citadel_designer_copy_a_n_side1_1

   D.GRASS    26d3d8ab690f3bfba325623f1ea57e4d    04-design_source_a_n_02_11_1985
   D.GRASS    26d3d8ab690f3bfba325623f1ea57e4d    09-citadel_designer_copy_a_n_side1_1

  D.GROUND    4a609f6e79022bb2e3792a47f3bc3481    04-design_source_a_n_02_11_1985
  D.GROUND    4a609f6e79022bb2e3792a47f3bc3481    09-citadel_designer_copy_a_n_side1_1

    D.HEAD    144984c773da37b8b04a6c55d0aacea5    09-citadel_designer_copy_a_n_side1_1
    D.HEAD    3be2d325e836d0144e81c7b9f204a8e4    04-design_source_a_n_02_11_1985

   D.IBASE    4ccf0e61cf2e5991eb1041aa1b57ceee    04-design_source_a_n_02_11_1985
   D.IBASE    4ccf0e61cf2e5991eb1041aa1b57ceee    09-citadel_designer_copy_a_n_side1_1

 D.ICECRYS    2add6d2f2c33751a4235ccf475a5a50b    04-design_source_a_n_02_11_1985
 D.ICECRYS    2add6d2f2c33751a4235ccf475a5a50b    09-citadel_designer_copy_a_n_side1_1

  D.ITEMS2    c3eb3680d7a3d2d44beb1e78aca125b3    04-design_source_a_n_02_11_1985
  D.ITEMS2    c3eb3680d7a3d2d44beb1e78aca125b3    09-citadel_designer_copy_a_n_side1_1

  D.ITEMS3    b928c2a5cacdd55203d9e24d0ee653d5    04-design_source_a_n_02_11_1985
  D.ITEMS3    b928c2a5cacdd55203d9e24d0ee653d5    09-citadel_designer_copy_a_n_side1_1

   D.ITEMS    b648dff05f0c2ae1f8d61d083b1eae67    04-design_source_a_n_02_11_1985
   D.ITEMS    b648dff05f0c2ae1f8d61d083b1eae67    09-citadel_designer_copy_a_n_side1_1

   D.JARS2    41f3a71061fb18b0f047b99838f6bb7d    04-design_source_a_n_02_11_1985
   D.JARS2    41f3a71061fb18b0f047b99838f6bb7d    09-citadel_designer_copy_a_n_side1_1

    D.JARS    2ca00409925f0535b712247978cd8f47    04-design_source_a_n_02_11_1985
    D.JARS    2ca00409925f0535b712247978cd8f47    09-citadel_designer_copy_a_n_side1_1

   D.JELLY    dba096544ff48a730c1c0f531e28b62d    04-design_source_a_n_02_11_1985
   D.JELLY    dba096544ff48a730c1c0f531e28b62d    09-citadel_designer_copy_a_n_side1_1

     D.MAN    5bf25ffef0edf9e06a731f80bad4af2f    15-design_24_09_84_2
     D.MAN    8c8a580ca07017fb106cff327657a84f    05-design_source_m_z_02_11_1985
     D.MAN    8c8a580ca07017fb106cff327657a84f    10-citadel_designer_copy_m_z_side2_1

 D.METLANT    be57fd33fbf82b0b9136af004ec6be3c    05-design_source_m_z_02_11_1985
 D.METLANT    be57fd33fbf82b0b9136af004ec6be3c    10-citadel_designer_copy_m_z_side2_1

   D.MONST    58bebd74d3bb6c809f69c9d3d7db2362    04-design_source_a_n_02_11_1985
   D.MONST    58bebd74d3bb6c809f69c9d3d7db2362    09-citadel_designer_copy_a_n_side1_1

 D.MONSTER    37f5835ab0547e8179868fa78ebc7ea6    05-design_source_m_z_02_11_1985
 D.MONSTER    37f5835ab0547e8179868fa78ebc7ea6    10-citadel_designer_copy_m_z_side2_1

   D.MUMMY    4872c70c25712fa702baa44430c89191    05-design_source_m_z_02_11_1985
   D.MUMMY    4872c70c25712fa702baa44430c89191    10-citadel_designer_copy_m_z_side2_1

      D.P0    234b26f702a4092570276a570d3b122d    05-design_source_m_z_02_11_1985
      D.P0    234b26f702a4092570276a570d3b122d    10-citadel_designer_copy_m_z_side2_1

      D.P1    3cf7c1ab1358e5146fce7af917e555fb    05-design_source_m_z_02_11_1985
      D.P1    3cf7c1ab1358e5146fce7af917e555fb    10-citadel_designer_copy_m_z_side2_1

      D.P2    d5a485cd948435b5685cb658c49fe3c3    05-design_source_m_z_02_11_1985
      D.P2    d5a485cd948435b5685cb658c49fe3c3    10-citadel_designer_copy_m_z_side2_1

      D.P3    1eff337753e9d3b4b92f5cfe3c0e9de5    05-design_source_m_z_02_11_1985
      D.P3    1eff337753e9d3b4b92f5cfe3c0e9de5    10-citadel_designer_copy_m_z_side2_1

   D.PHARO    da2e4d019e12e14d64f770f4937129e6    05-design_source_m_z_02_11_1985
   D.PHARO    da2e4d019e12e14d64f770f4937129e6    10-citadel_designer_copy_m_z_side2_1

 D.PHAROLV    489668d0131a54d213a41f0a0e137678    05-design_source_m_z_02_11_1985
 D.PHAROLV    489668d0131a54d213a41f0a0e137678    10-citadel_designer_copy_m_z_side2_1

 D.PICTURS    dea2ac3aa581cfa8020db73c0558f1ca    05-design_source_m_z_02_11_1985
 D.PICTURS    dea2ac3aa581cfa8020db73c0558f1ca    10-citadel_designer_copy_m_z_side2_1

     D.PIG    2ce33f3ea535a4e9b52e97eb6da2a008    04-design_source_a_n_02_11_1985
     D.PIG    2ce33f3ea535a4e9b52e97eb6da2a008    09-citadel_designer_copy_a_n_side1_1
     D.PIG    c07818d7dc4b71c986cca3302b951fcb    05-design_source_m_z_02_11_1985
     D.PIG    c07818d7dc4b71c986cca3302b951fcb    10-citadel_designer_copy_m_z_side2_1

  D.PRISON    91ab3d88208f04a367631cca90b99f67    05-design_source_m_z_02_11_1985
  D.PRISON    91ab3d88208f04a367631cca90b99f67    10-citadel_designer_copy_m_z_side2_1

  D.PULSAR    3ff957e32c1b8572d7349cad836ddf92    05-design_source_m_z_02_11_1985
  D.PULSAR    3ff957e32c1b8572d7349cad836ddf92    10-citadel_designer_copy_m_z_side2_1

 D.PYRAFIG    3ed1386a4ee7384153d7d972b815725a    05-design_source_m_z_02_11_1985
 D.PYRAFIG    3ed1386a4ee7384153d7d972b815725a    10-citadel_designer_copy_m_z_side2_1

  D.RABBIT    c196ec8e217fed25f301832e63f629d5    05-design_source_m_z_02_11_1985
  D.RABBIT    c196ec8e217fed25f301832e63f629d5    10-citadel_designer_copy_m_z_side2_1

    D.ROOM    46e78369a8245f3fd9191f36e98018ff    12-citadel_electron_assembly_13_12_1985_side2
    D.ROOM    5fb3cbf088234f3b1a0b03da8e62fd7f    06-citadel_02_11_1985_1
    D.ROOM    ef464e71eb04e0a4a330861db2449399    02-citadel_bbc_electron_final_13_12_1985_side2

   D.RYYBI    10503187d0f6e31e85e8135a1a804569    05-design_source_m_z_02_11_1985
   D.RYYBI    10503187d0f6e31e85e8135a1a804569    10-citadel_designer_copy_m_z_side2_1

   D.SCALE    2b950a48f8549d0ee509bd3188b86287    04-design_source_a_n_02_11_1985
   D.SCALE    2b950a48f8549d0ee509bd3188b86287    09-citadel_designer_copy_a_n_side1_1

  D.SCROLL    837ace99fb38e1fccffbd11d4cf2182f    05-design_source_m_z_02_11_1985
  D.SCROLL    837ace99fb38e1fccffbd11d4cf2182f    10-citadel_designer_copy_m_z_side2_1

 D.SEABING    2d483b14497c7b468a5e1053c2e9e14b    05-design_source_m_z_02_11_1985
 D.SEABING    2d483b14497c7b468a5e1053c2e9e14b    10-citadel_designer_copy_m_z_side2_1

 D.SHACKLE    30dd88f5669dfa24aded2bd014133ce1    05-design_source_m_z_02_11_1985
 D.SHACKLE    30dd88f5669dfa24aded2bd014133ce1    10-citadel_designer_copy_m_z_side2_1

   D.S@JLE    22bb28ec8ac2ef90b28f4d4cd60b3138    05-design_source_m_z_02_11_1985
   D.S@JLE    22bb28ec8ac2ef90b28f4d4cd60b3138    10-citadel_designer_copy_m_z_side2_1

 D.SKELTON    39bc68b7c2c923d2a4ac59823c2d9c21    05-design_source_m_z_02_11_1985
 D.SKELTON    39bc68b7c2c923d2a4ac59823c2d9c21    10-citadel_designer_copy_m_z_side2_1

   D.SKULL    04a8c39eaf679b9c8923fd4f5a266c4b    05-design_source_m_z_02_11_1985
   D.SKULL    04a8c39eaf679b9c8923fd4f5a266c4b    10-citadel_designer_copy_m_z_side2_1

     D.SKY    e1df728ad200fba58ecd675c0a790549    05-design_source_m_z_02_11_1985
     D.SKY    e1df728ad200fba58ecd675c0a790549    10-citadel_designer_copy_m_z_side2_1

 D.SNABLOS    ab04721a34026aeb01c847cb4db50ff0    05-design_source_m_z_02_11_1985
 D.SNABLOS    ab04721a34026aeb01c847cb4db50ff0    10-citadel_designer_copy_m_z_side2_1

   D.SNAKE    25a460840bb170df0e22a3d058e08ebb    15-design_24_09_84_2
   D.SNAKE    a3dad1b05b5b1f7ea58e451c679063b1    05-design_source_m_z_02_11_1985
   D.SNAKE    a3dad1b05b5b1f7ea58e451c679063b1    10-citadel_designer_copy_m_z_side2_1

 D.SORPION    55dcc4544b87ab2819649d617e2cf457    05-design_source_m_z_02_11_1985
 D.SORPION    55dcc4544b87ab2819649d617e2cf457    10-citadel_designer_copy_m_z_side2_1

  D.SPIEKO    0fccb5a8020f2975c91c4290ed936d0a    05-design_source_m_z_02_11_1985
  D.SPIEKO    0fccb5a8020f2975c91c4290ed936d0a    10-citadel_designer_copy_m_z_side2_1

   D.SPIKE    e56a626841cd07742f7c3a93410368a9    05-design_source_m_z_02_11_1985
   D.SPIKE    e56a626841cd07742f7c3a93410368a9    10-citadel_designer_copy_m_z_side2_1

 D.SPINNER    591b810c252fdd44e141d11588c6ccf1    05-design_source_m_z_02_11_1985
 D.SPINNER    591b810c252fdd44e141d11588c6ccf1    10-citadel_designer_copy_m_z_side2_1

  D.STARPT    8b90a189162b5e28359e3e795a0dd24e    05-design_source_m_z_02_11_1985
  D.STARPT    8b90a189162b5e28359e3e795a0dd24e    10-citadel_designer_copy_m_z_side2_1

   D.STARS    4e1ced0251e594a5c0df3e465f5d90e4    05-design_source_m_z_02_11_1985
   D.STARS    4e1ced0251e594a5c0df3e465f5d90e4    10-citadel_designer_copy_m_z_side2_1

  D.STATUE    0082424fd7203c27ea5d36fa04a5f8ca    05-design_source_m_z_02_11_1985
  D.STATUE    0082424fd7203c27ea5d36fa04a5f8ca    10-citadel_designer_copy_m_z_side2_1

   D.STONE    d26c2486106627c6f9875f39a7de8b40    05-design_source_m_z_02_11_1985
   D.STONE    d26c2486106627c6f9875f39a7de8b40    10-citadel_designer_copy_m_z_side2_1

   D.TABLE    42f9a2bbfcd9219ae4104c0fec7210e1    05-design_source_m_z_02_11_1985
   D.TABLE    42f9a2bbfcd9219ae4104c0fec7210e1    10-citadel_designer_copy_m_z_side2_1

   D.TORCH    7b1d9859de3b6804c0fe3e70b1eb5ab2    05-design_source_m_z_02_11_1985
   D.TORCH    7b1d9859de3b6804c0fe3e70b1eb5ab2    10-citadel_designer_copy_m_z_side2_1

  D.TRAMPO    25b4efcdaac31b5831af5cc79765a6c9    05-design_source_m_z_02_11_1985
  D.TRAMPO    25b4efcdaac31b5831af5cc79765a6c9    10-citadel_designer_copy_m_z_side2_1

   D.TREAS    7ee5ae13506b7b26b2b7ec40d59f033c    15-design_24_09_84_2
   D.TREAS    8b91da601ab07ba56eee3c3cd10dc2af    05-design_source_m_z_02_11_1985
   D.TREAS    8b91da601ab07ba56eee3c3cd10dc2af    10-citadel_designer_copy_m_z_side2_1

    D.TREE    7cf3f5170d9f972a9cdad3ddef0369e0    05-design_source_m_z_02_11_1985
    D.TREE    7cf3f5170d9f972a9cdad3ddef0369e0    10-citadel_designer_copy_m_z_side2_1

   D.TROLL    ae0a904f6c65fd0b893857aea461ce63    05-design_source_m_z_02_11_1985
   D.TROLL    ae0a904f6c65fd0b893857aea461ce63    10-citadel_designer_copy_m_z_side2_1

      D.TV    9fd21ec346a93d319bbf75cdcf98edaf    05-design_source_m_z_02_11_1985
      D.TV    9fd21ec346a93d319bbf75cdcf98edaf    10-citadel_designer_copy_m_z_side2_1

   D.WATER    1d31c26303a476b6bcc4cffd9da0223b    05-design_source_m_z_02_11_1985
   D.WATER    1d31c26303a476b6bcc4cffd9da0223b    10-citadel_designer_copy_m_z_side2_1

   D.WHEEL    8be1e863371d37f0dd7e92a864ea5881    05-design_source_m_z_02_11_1985
   D.WHEEL    8be1e863371d37f0dd7e92a864ea5881    10-citadel_designer_copy_m_z_side2_1

   D.WITCH    73d835c9fd9ad8e0ba9cdf64a4a48aca    05-design_source_m_z_02_11_1985
   D.WITCH    73d835c9fd9ad8e0ba9cdf64a4a48aca    10-citadel_designer_copy_m_z_side2_1

       EXC    548fce1a7f1bf6b23eecdb1383f1240e    04-design_source_a_n_02_11_1985
       EXC    548fce1a7f1bf6b23eecdb1383f1240e    09-citadel_designer_copy_a_n_side1_1

       FIG    2f4a33d83577b1dfd7c85cde55cf6b5e    07-citadel_design_code_i_electron_side1_1
       FIG    2f4a33d83577b1dfd7c85cde55cf6b5e    08-citadel_design_code_ii_electron_side2_2
also:
{      CHFIG  00ed25f4f1898513d1f9963e4e22d338    07-citadel_design_code_i_electron_side1_1  }
{      F      13cb0ea19e03b472c96393d8e9e9a3bc    07-citadel_design_code_i_electron_side1_1  }

      INFO    986526d9fea3189373f3c9bb8351f0b4    06-citadel_02_11_1985_1
      INFO    b3e391c009be1e6bdf38f67c419d3834    01-citadel_bbc_electron_final_13_12_1985_side1
      INFO    b3e391c009be1e6bdf38f67c419d3834    02-citadel_bbc_electron_final_13_12_1985_side2
      INFO    b3e391c009be1e6bdf38f67c419d3834    07-citadel_design_code_i_electron_side1_1
      INFO    b3e391c009be1e6bdf38f67c419d3834    08-citadel_design_code_ii_electron_side2_2
      INFO    b3e391c009be1e6bdf38f67c419d3834    09-citadel_designer_copy_a_n_side1_1
      INFO    b3e391c009be1e6bdf38f67c419d3834    10-citadel_designer_copy_m_z_side2_1
      INFO    b3e391c009be1e6bdf38f67c419d3834    11-citadel_electron_assembly_13_12_1985_side1_1
      INFO    b3e391c009be1e6bdf38f67c419d3834    12-citadel_electron_assembly_13_12_1985_side2
      INFO    ddcdb95d677225b379f97a338288d45b    04-design_source_a_n_02_11_1985
      INFO    ddcdb95d677225b379f97a338288d45b    05-design_source_m_z_02_11_1985

     INOUT    3d0f871a42b7505b29a115dd4656ab83    15-design_24_09_84_2
     INOUT    70000417f0fa6de3eda52ecccd5a08c4    05-design_source_m_z_02_11_1985
     INOUT    70000417f0fa6de3eda52ecccd5a08c4    10-citadel_designer_copy_m_z_side2_1
     INOUT    bf4fe8cfb340281769755da594b7c3e4    04-design_source_a_n_02_11_1985
     INOUT    bf4fe8cfb340281769755da594b7c3e4    09-citadel_designer_copy_a_n_side1_1

         K    0768f941efa1ae91f387a1dad765d62b    01-citadel_bbc_electron_final_13_12_1985_side1
         K    0768f941efa1ae91f387a1dad765d62b    02-citadel_bbc_electron_final_13_12_1985_side2
         K    0768f941efa1ae91f387a1dad765d62b    04-design_source_a_n_02_11_1985
         K    0768f941efa1ae91f387a1dad765d62b    05-design_source_m_z_02_11_1985
         K    0768f941efa1ae91f387a1dad765d62b    06-citadel_02_11_1985_1
         K    0768f941efa1ae91f387a1dad765d62b    09-citadel_designer_copy_a_n_side1_1
         K    0768f941efa1ae91f387a1dad765d62b    10-citadel_designer_copy_m_z_side2_1
         K    0768f941efa1ae91f387a1dad765d62b    11-citadel_electron_assembly_13_12_1985_side1_1
         K    0768f941efa1ae91f387a1dad765d62b    12-citadel_electron_assembly_13_12_1985_side2
         K    0768f941efa1ae91f387a1dad765d62b    13-citadel_electron_master_tape_creator_12_12_1985_final_4
         K    0768f941efa1ae91f387a1dad765d62b    14-citadel_sounds_5

         M    450dbfcb47434cd51afae6dc32ec457b    11-citadel_electron_assembly_13_12_1985_side1_1
         M    765c72aced05ae0697d45b062edf09c1    06-citadel_02_11_1985_1
         M    9f8c4d256d17c8e149e006992ad4fcb5    02-citadel_bbc_electron_final_13_12_1985_side2
         M    9f8d2195a5ac8551bf7eb1d97adba83d    12-citadel_electron_assembly_13_12_1985_side2

       MAC    6f318f91658437849f19fc9c80834160    01-citadel_bbc_electron_final_13_12_1985_side1
       MAC    6f318f91658437849f19fc9c80834160    02-citadel_bbc_electron_final_13_12_1985_side2
       MAC    6f318f91658437849f19fc9c80834160    06-citadel_02_11_1985_1
       MAC    6f318f91658437849f19fc9c80834160    11-citadel_electron_assembly_13_12_1985_side1_1
       MAC    6f318f91658437849f19fc9c80834160    12-citadel_electron_assembly_13_12_1985_side2

        RK    0c91fd7a9bd887cf6a7dfa5b3bef45b4    02-citadel_bbc_electron_final_13_12_1985_side2
        RK    0c91fd7a9bd887cf6a7dfa5b3bef45b4    06-citadel_02_11_1985_1
        RK    0c91fd7a9bd887cf6a7dfa5b3bef45b4    12-citadel_electron_assembly_13_12_1985_side2

      ROOM    162562e0ea24ceb113004b660ef27586    08-citadel_design_code_ii_electron_side2_2
      ROOM    4b9298ae46f022640450b1240a0170be    02-citadel_bbc_electron_final_13_12_1985_side2
      ROOM    d31d31657c312db85c62cdd4e2f478ea    12-citadel_electron_assembly_13_12_1985_side2
      ROOM    df9575abe4bad8503fa7527912010ef2    06-citadel_02_11_1985_1

         T    0727f59fb8e6e06c70b134110b67ded7    01-citadel_bbc_electron_final_13_12_1985_side1
         T    1a248d62fb02fc1617f7fc197c9e323a    06-citadel_02_11_1985_1
         T    53ef94562ed1e359225ffb00dc55c542    11-citadel_electron_assembly_13_12_1985_side1_1

      TAPE    4effc38e92e03c1630f8ed42388c15f3    15-design_24_09_84_2
      TAPE    749f254884b0ea7e0492cd5be776b435    11-citadel_electron_assembly_13_12_1985_side1_1
      TAPE    de31118551ef981522996a41288e3d16    01-citadel_bbc_electron_final_13_12_1985_side1
      TAPE    de31118551ef981522996a41288e3d16    13-citadel_electron_master_tape_creator_12_12_1985_final_4
also:
{   O.TAPE    b26e2713590300d3693cc57962990859    13-citadel_electron_master_tape_creator_12_12_1985_final_4  }

   T.CITAL    304f34c1aaa9afc456fb0a4061b83e24    11-citadel_electron_assembly_13_12_1985_side1_1
   T.CITAL    fe5313a9ae7387f7d04d20245fc5ac46    01-citadel_bbc_electron_final_13_12_1985_side1

24. Appendix D: Raw Notes on Disc 6 to Disc 12 Engine Changes

The majority of the differences are changes that were made to support the Acorn Electron (since Disc 6 dates from the Beeb development era, whereas Disc 12 dates from the Electron port era). However, there are many other changes that are not related to the Electron port. My rough notes on these changes, based on a cursory glance through the diffs, are listed below. I make occasional reference to label names in my own disassembly. This analysis was not performed with great thoroughness, so mistakes are likely.

25. Appendix E: Beeb-Era Room Changes: Static Images

These are the static versions of the room changes which were presented as animated GIFs earlier on.

-disc6
-early
Beeb retail
001
same as early
011
same as early
020
same as early
021
041
same as early
048
same as early
068
070
same as early
073
same as early
088
same as early
090
091
093
094
103
111
113
same as early
114
121
129
130
132
136
138
139
144
145
150
153
same as early
154
same as early
155
same as early
156
157
158
193
196
205
227
237

26. Appendix F: Figures for Disc 8 ROOM

The various fields of these filenames (separated by hyphens) should be self-explanatory, but they are as follows:

Figures 60 to 63 are believed to be unused, but are needed to pad the figures list so that ID 64 is the first of the doors. The SKULL figure (since it is small, and single-layer) was used as padding in these four slots, as the filenames suggest.

000-IBASE-D2-FIG-6
001-BOTTLE-D2-FIG-7
002-BOTTLE2-D2-FIG-8
003-BUCKET-D2-FIG-9
004-BUCKET2-D2-FIG-10
005-BUCKC-D2-FIG-11
006-WATER-D2-FIG-12
007-ICE-D2-FIG-13
008-ICECRYS-D2-FIG-14
009-PA-D7-FIG-15
010-PB-D7-FIG-16
011-PC-D7-FIG-17
012-PD-D7-FIG-18
013-BUTTON-D2-FIG-15
014-PHARO-D2-FIG-60
015-PYFIG-D2-FIG-17
016-PLATF-D2-FIG-112
017-SHACKLE-D2-FIG-37
018-BARREL-D7-FIG-24
019-COLUMN-D2-FIG-104
020-JARS-D2-FIG-98
021-TABLE-D2-FIG-99
022-TRAMPO-D2-FIG-58
023-SPIKED-D7-FIG-27
024-SPIKEU-D7-FIG-28
025-Torch-D2-FIG-117
026-LIFT-D2-FIG-39
027-DEMON-D7-FIG-31
028-SORPION-D7-FIG-32-four-layer-version
029-DOG-D7-FIG-33
030-SNAKE-D2-FIG-43
031-PULSAR-D2-FIG-44
032-FIRE-D2-FIG-45
033-SPIEKO-D2-FIG-46
034-BROUNCH-D2-FIG-47
035-BROB-D2-FIG-48
036-METLANT-D7-FIG-40
037-CAULDON-D2-FIG-51
038-STEAM-D2-FIG-50
039-JELLY-D7-FIG-43-single-layer-YOLO
040-MUMMY-D2-FIG-54
041-CANNON-D2-FIG-106-three-layer-version
042-CHAIR-D2-FIG-55
043-COATARM-D7-FIG-48
044-SKY-D7-FIG-49
045-SKYA-D7-FIG-50
046-SKYAB-D7-FIG-51
047-SKYAC-D7-FIG-52
048-SKYB-D7-FIG-53
049-SKYC-D7-FIG-54
050-STATUE-D7-FIG-55
051-PIRAT-D7-FIG-56-three-layer-version
052-GRASS-D7-FIG-57
053-MUD-D7-FIG-58
054-ROCK-D7-FIG-59
055-SAND-D7-FIG-60
056-SKULL-D7-FIG-61
057-BONE-D7-FIG-62
058-CHAIN-D7-FIG-21-2-layer-version
059-HEAD-D2-FIG-61-2-layer-version
060-SKULL-D7-FIG-61-dupe-blank
061-SKULL-D7-FIG-61-dupe-blank
062-SKULL-D7-FIG-61-dupe-blank
063-SKULL-D7-FIG-61-dupe-blank
064-DOOR-D7-FIG-64
065-DOOR2-D7-FIG-65
066-DOOR3-D7-FIG-66
067-DOOR4-D7-FIG-67
068-DOOR5-D7-FIG-68
069-DOOR6-D7-FIG-69
070-DOOR7-D7-FIG-70
071-DOOR8-D7-FIG-71
072-KEY-D7-FIG-72
073-KEY2-D7-FIG-73
074-KEY3-D7-FIG-74
075-KEY4-D7-FIG-75
076-KEY5-D7-FIG-76
077-KEY6-D7-FIG-77
078-KEY7-D7-FIG-78
079-KEY8-D7-FIG-79
080-CRY-D2-FIG-0
081-CRY2-D2-FIG-1
082-CRY3-D2-FIG-2
083-CRY4-D2-FIG-3
084-CRY5-D2-FIG-4
085-CRY6-D2-FIG-5
086-BRICK-D7-FIG-80
087-BRICK2-D7-FIG-81
088-BRICK3-D7-FIG-82
089-BRICK4-D7-FIG-83
090-BRICK5-D7-FIG-84
091-BRICK6-D7-FIG-85
092-BRICK7-D7-FIG-86
093-BRICK8-D7-FIG-87
094-BB-D7-FIG-88
095-BB2-D7-FIG-89
096-BB3-D7-FIG-90
097-BB4-D7-FIG-91
098-BC-D7-FIG-92
099-BC2-D7-FIG-93
100-BC3-D7-FIG-94
101-BC4-D7-FIG-95
102-BC5-D7-FIG-96
103-BC6-D7-FIG-97
104-BC7-D7-FIG-98
105-BC8-D7-FIG-99
106-DIGONAL-D7-FIG-100