尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A playable, documented refactor of the 1985 BBC Micro adventure by Hal Renko & Sam Edwards with Arend Rensink (Addison-Wesley, ISBN 0-201-14080-4). The program listings in the book are dated July 1984.
The game was published as a type-in listing, so its buyers spent seven evenings copying an encoded program out of a book without being able to read a line of it. What they were typing was bytecode for a small virtual machine the authors called ALADIN. This repository holds that game's logic, disassembled from the bytecode and rewritten as commented JavaScript that runs on its own — no BBC Micro, no emulator, no BASIC. It is a translation, not a remake, and the claim is tested rather than asserted.
Online, right now: dmcr45.github.io/arendarvon-castle
From a download: take the zip from the
latest release
and open arendarvon.html, keeping it next to arendarvon-engine.js.
In a terminal, with Node.js:
node arendarvon.js
Commands are a verb and what it applies to: TAKE TORCH, OPEN DOOR,
STRIKE WALL AHEAD. Directions are relative to the way you face — AHEAD,
RIGHT, BACK, LEFT. Words can be shortened (TOR finds the torch), unknown
words are ignored, lower case is fine, and QUIT leaves.
Text wraps to the window in ordinary sentence case; the original printed capitals on a 40-column screen.
arendarvon-engine.js | the game: rules, parser, printer and world data, in one file |
arendarvon.html, arendarvon.js | browser and terminal front ends |
validation/ | the test harness: a 6502 emulator, the BASIC host re-implemented, and the comparison campaign |
reference/ | listings made from the disc: bytecode, the 6502 VM, vocabulary, messages, descriptions, world data, the BASIC host |
maps/ | a map of all five floors, drawn from the game data |
docs/ | validation report |
disc/ | the disc image the harness runs against |
Every statement carries the offset of the bytecode it came from, so any line can
be checked against reference/bytecode_listing.txt:
if ((door.flags & HAS_LOCK) == 0) { // @042c
say("THE $7 HAS NO LOCK."); // @0433
} else if (objects[OBJ_KEYS].location != CARRIED) { // @0438
The JavaScript refactor is checked against the original program rather than against anyone's reading of it. A 6502 emulator runs the real ALADIN machine code and bytecode from the disc, with the BBC BASIC host re-implemented; both are given the same commands and the same random numbers, and compared after every one — every message, every random number, and all 1,672 bytes of saved state.
docs/VALIDATION_REPORT.txt has the detail; the suite can be re-run.
Eleven, each documented at the top of the engine: lower-case input, sentence
case, wrapping to the window, JSON saves, QUIT/EXIT in place of the authors'
debug word XXX, a typo at @012b written as intended, and five bug fixes —
among them an inverted test after STRIKE TORCH, and LOCK/UNLOCK letting
the keys open doors the author had nailed shut.
Each fix was also written into the original bytecode, so the comparison above
still runs against a like-for-like original;
reference/fixes_bytecode_listing.txt lists those patches.
All five floors, generated from the game's tables rather than drawn by hand: every room at the size MEASURE reports, every door in the state it starts in, every object and character where the game puts them, the staircases with the way up marked, and the oddities: the magical passway, the one-way entrance to the Study, the drawbridge that ends the game.
To redraw them after a change to the engine:
node tools/mapmodel.js arendarvon-engine.js tools/map-layout.json > model.json
node tools/makemap.js model.json maps
tools/map-layout.json holds where each room sits. The game fixes the rooms'
sizes and which walls they share, but not where a corridor slides along a wall;
those few free choices are frozen in that file.
The game is still in copyright: it rests with the authors or with Addison-Wesley's successor, and none of it is mine to give away. My own work here — the refactor, the harness, the front ends and the documentation — is MIT licensed; see LICENSE. The two are not cleanly separable, since the engine is a translation of the authors' program and embeds their text and world data, so treat the whole as a derivative work.
It is published as preservation of a type-in listing forty years out of print, following the line bbcmicro.co.uk draws: the program is archived so people can play it, and the printed book is left to others. The program is here; the book is not. And if any of the authors or rights holders would prefer this be changed or taken down, their request will be promptly honored.
The game is by Hal Renko & Sam Edwards with Arend Rensink. The first two are pen names, used across a number of 1980s computer books: Hal Renko is Kasper Boon, Sam Edwards is Alex Pelsmaeker. Rensink's own name signs the program listings, dated 7 July 1984. The castle, the writing, the puzzles and ALADIN itself are theirs.
The refactor, harness and documentation are mine — Dennis McRitchie — working with Claude Code (Anthropic), running Claude Opus 5: I set the goals, made the design decisions, desk-checked the code, and played the result as an additional validation; Claude Code did the disassembly, wrote the code, and built and ran the test harness.