Melbourne House’s The Hobbit (ZX Spectrum, 1982) running in the browser as a readable text game: a transcript instead of a Spectrum screen, a proper text box that works on a phone, tap-to-play options for the exits and things around you, hints, and the location illustrations from the 1985 Macintosh version, in colour.
Everything is one self-contained file, hobbit.html, with version 1.2 of the
tape (the bug-fixed release) built in: open it and play. Another tape image can be
loaded from the menu and is then remembered by the browser. Nothing is uploaded
anywhere; saved games stay in the browser’s storage and can be exported as files.
The same treatment for MECC’s The Oregon Trail, each a self-contained page that works on a phone and keeps the journey across reloads:
oregon-trail-1978/ — the original text game from the
1978 Creative Computing listing (oregon.html), illustrated with the
landmark pictures, map and tombstone from the 1985 Apple II version.oregon-trail-1985/ — the 1985 Apple II game
(oregon85.html), ported program by program from its BASIC, with the hunting
and rafting screens rebuilt from its machine code and the disks’ own pictures,
sprites and tunes.And an action game, first emulated and then ported:
prince-of-persia/ — Brøderbund’s 1989 Apple II
Prince of Persia (prince.html), the real program from its three disk
sides running on a small Apple IIe emulator written for the page (a 65C02,
128K, the language card, a nibble-level Disk II — and no Apple ROM), with a
touch pad and button, automatic disk-side swapping and snapshots.prince-of-persia-native/ — the same game
re-implemented in JavaScript (pop.html) from Jordan Mechner’s published
6502 source: its sequence tables, collision rules, guard programs, movers
and level blueprints as native code, drawn with the same hi-res routines,
and checked frame by frame against the emulator above. The pictures, tunes
and sound effects are captured from the game running there. It can also
draw itself with the 1992 Macintosh version’s art, black-and-white or
256-colour, placed by that version’s own tables and rules (a menu setting).And a LucasArts adventure on an engine written for the page:
monkey-island/ — The Secret of Monkey Island (the 1993
Macintosh release) on a SCUMM engine ported to JavaScript from ScummVM:
the game’s scripts, rooms, actors, costumes, dialogue, verbs, inventory and
the Macintosh music all run natively in the browser, with touch controls and
saves. It needs your own copy of the game (the StuffIt archive can be chosen
as it is) and keeps it on your device.And a Macintosh bar game, rebuilt from its machine code:
shufflepuck-cafe/ — Brøderbund’s 1988 Shufflepuck
Café (index.html, or the single file shufflepuck.html): air hockey
against the nine regulars of a space-port bar, re-implemented in JavaScript
from the 68000 program of the Macintosh release — its copy-protection
loader was run under an emulator just long enough to decrypt the code,
which was then disassembled and ported: the table, the puck’s physics, each
opponent’s reflexes from their own parameter tables, their serves and
reactions, the chalk-hand scoreboard, the tournament and the roster — drawn
with a small QuickDraw from the game’s own pictures, fonts and sounds. Mouse
or touch; a phone’s finger drags the paddle from anywhere on the screen.The page contains a small ZX Spectrum 48K emulator (a Z80 core plus just enough of the machine for this one game) that runs the real program from the tape image. Instead of showing the Spectrum screen, it hooks the game’s own routines:
southwest → sw) because the parser only reads the first letters of a word.LOOK.SAVE/LOAD go to a tape slot,
and snapshots capture the whole machine and the transcript on demand.The built-in tape is whichever image is in tape/ at build time. Any other copy
can be loaded from the menu (.tap, .tzx, or a .zip of one; .z80 and .sna
snapshots also work): version 1.2 is the bug-fixed release; the 1982 releases (Melbourne House’s
own and Sinclair Research Ltd’s) share the earlier code.
python3 build.py # inlines the JS, the character set, the hints and the pictures into hobbit.html
| File | What it is |
|---|---|
index_src.html |
the page: markup, styles and the interface script |
machine.js |
the Spectrum machine, the game hooks and the readers for the game’s data |
z80.js |
Molly Howell’s Z80 core (MIT), with register accessors added |
charset/ |
the 768-byte Spectrum character set the game prints with |
tape/ |
the tape image built into the page |
walkthrough.json |
the hints, produced by test/walkthrough.js |
locpics/ |
one picture per location, named <room number> <description>.png |
locpics.json |
the pictures packed for the page, produced by tools/locpics.py locpics |
tools/macpics.py |
decodes the pictures from the Macintosh version’s data fork |
test/ |
headless checks: play.js runs commands against a tape, browser.js drives the page in Playwright |
To change a picture, edit its PNG in locpics/ (240×128, or an exact multiple such
as the 960×512 they are kept at), then run python3 tools/locpics.py locpics and
python3 build.py.
The 1985 Macintosh version stores its 55 illustrations in a format of its own:
each is a 240×128 image in 16 “inks”, which the Mac showed as black-and-white
dither patterns. tools/macpics.py decodes them (the format was worked out from
the program’s 68000 code). The inks turned out to be a painter’s palette used
consistently across the set — one ink is always sky, one water, one foliage —
so the pictures could be coloured; the ones here were then finished by hand.
The Mac numbers its pictures differently from the Spectrum’s rooms, so they were
paired with the Spectrum’s locations by comparing them with the Spectrum’s own
drawings of the same places.
LICENSE).