Releases, cracks and hacks

← Dunjunz

Dunjunz: releases, cracks and hacks

Dunjunz was written by Julian Avis and published by Bug-Byte (cassette 1986; disc 1987). This document records what the surviving copies are, how they relate to one another, and the evidence for each relationship.

The reference copy is the official 1987 flippy disc, from flux captures of both its sides (versions/dunjunz-disc/). The other copies are variations on the game: an archive of the same disc's files, an image of the 1986 cassette that has every mark of the original (versions/dunjunz-tape/), Ole's crack of the cassette, and an unofficial sideways RAM hack built from the cassette's files. Statements are tagged by their basis:

The original releases

Cassette (1986)

The cassette version was the first release; its PLOAD scroller ends "(c) Bug Byte 1986" and its title page reads "Author Julian Avis (c) Bugbyte 1986" [confirmed]. It loads each level from tape as the game progresses.

versions/dunjunz-tape/Dunjunz_B.uef is an image of it from The Stairway to Hell archive. Its text file names Bug-Byte, and its origin chunk says it was made with MakeUEF 0.3b; the files are dated June 2002 [confirmed]. It reached the project from an associate of Rob's, who cannot vouch that it is unaltered [reported]. The stardot thread reports an image of the same name on bbcmicro.co.uk [reported].

tools/read_uef.py reads it as 35 files in standard Acorn cassette blocks, every header and data CRC correct, with no copy protection [confirmed]:

File Load Exec Length Contents
DUNJUNZ &0E00 BASIC &2FF Refuses the Electron and the Master, warns on other machines (INKEY-256), then CHAIN"PLOAD"
PLOAD &0E00 BASIC &3C8 Shows PIC, scrolls its text down a one-character text window, then */ runs the next file
PIC &3000 &3000 &4FFF MODE 2 picture of a face
TITLE &2800 &28CE &C00 Title page: "See Inlay Card For Play instructions and Keys"; ends with *TAPE and */
DUNK &0400 &0740 &3FF The game's &0400–&07FE
Dunjunz1 &2000 &2000 &169 A short program that names Dunjunz2–Dunjunz4
Dunjunz2 &3280 &3280 &3200 The loading screen
Dunjunz4 &08C0 &08C0 &1740 The game's &08C0–&1FFF
Dunjunz5 &2000 &2000 &1000 The game's &2000–&2FFF
Dunjunz3 &6E80 &6E80 &1180 The game's &6E80–&7FFF
LEVEL1–LEVEL25 various &2B0 each The levels, encrypted

The levels are saved from consecutive addresses (&2000 + &2B0 × (n − 1)), except LEVEL8 and LEVEL12, saved from &6B00, where the game holds a level [confirmed].

Why it is taken to be the original [inference]: the Bug-Byte credits and the inlay card reference; Ole's PLOAD is this PLOAD with his own text; the official Master conversion's files keep this tape's division of the game (see below); and the level checksum table agrees with its levels, as the crack's does not. Nothing in it is inconsistent with an unaltered copy, but nothing proves it either.

What it settles [confirmed by comparison]:

Flippy disc (1987)

The disc release was a double-sided "flippy" disc with the Master 128 version on one side and the Model B version on the other [reported: billcarr2005, stardot]. The thread dates it to September 1987, from everygamegoing.com [reported].

The disassembly's copy of this release is a pair of flux captures, one per side, in versions/dunjunz-disc/ (see The HFE captures below). The same directory keeps Dunjunz.zip from the NVG archive, which holds the files of the two sides as directories 2/ and 0/; they are byte-identical to the captures' [confirmed]. The contents of the two sides are:

The HFE captures

versions/dunjunz-disc/ holds two HFE v3 files, one per side, dated 26 September 2020. They were supplied by the stardot user Pernod by personal communication [reported: Pernod]. They are captures from a community archive of original BBC Micro discs, catalogued in the spreadsheet "BBC discs and fingerprints" (see below). D1S1 is the Master side and D1S2 the Model B side. Each is a 41-track, single-sided FM capture at 250 kbit/s. tools/read_disc_image.py reads every track through beebium's emulated 8271 (sector IDs, then data) and writes the .ssd and a per-track .json report beside each capture.

What they show [confirmed]:

The archive catalogue

The captures' file names follow the archive's convention (<Title>_<Disc>_<Tracks>_<HFE grab version>_<CRC32>_<Variant>.hfe). The catalogue lists both under Bug Byte, Dunjunz [reported: catalogue]:

Disc Tracks CRC32 Variant DFS title Cycle Submitter Duplicates
D1S1 (boot, Master) 40 8518BF40 1 MASTER 128 V 42 VectorEyes VectorEyes, pumpkin, ip
D1S2 (model B) 40 54F4B47A 1 Dunjunz 59 VectorEyes VectorEyes, pumpkin, ip

The DFS titles and cycle numbers (&42, &59) match the captures' catalogues [confirmed]. The catalogue gives no "birthday" date and no copy-protection notes for either side, and lists only one variant. VectorEyes submitted the captures. Discs owned by pumpkin and ip have the same fingerprints.

Three copies owned by different people having identical fingerprints shows that this is the disc as Bug-Byte duplicated it, not a one-off copy [inference]. If so, the draft BOOT in the Master side's free space and the Model B side's 80-track catalogue were on every copy sold, copied sector for sector from the master disc.

The NVG archive copy

Dunjunz.zip from the NVG archive (dated 31 July 1996 inside the archive) is the files of this disc and nothing else. Its 2/ holds the Master side's 19 files and its 0/ the Model B side's 31, all byte-identical to the captures', with the same load and exec addresses [confirmed].

DFS compatibility

The disc version only runs on real hardware with DFS 0.90. With DFS 1.20 and later it fails with "Bad command", and with Watford DFS it hangs after level 2 loads [reported: billcarr2005, lurkio, richardtoohey, stardot]. The game overwrites &0D00–&10FF, the DFS's NMI and workspace area, so later levels cannot be loaded through DFS [reported: duikkie, stardot].

The Master side avoids the problem rather than depending on a DFS version [confirmed]: - the game stays resident and loads each level through OSCLI; - it saves the filing system's page &0D in private RAM, and puts it back before every load; - DFS 2.24 keeps the rest of its workspace in private RAM, away from the game.

See the-master-128-version.md.

Variations

Ole's crack of the cassette

Dunjunz-tape.zip from the NVG archive (versions/dunjunz-tape_crack_ole/) is not the original cassette. It is a crack [confirmed]:

duikkie reports that the tape version works reliably where the disc versions do not, because it "uses &A00 rather than &D00" [reported, stardot].

The sideways RAM hack

Disc060-DunjunzRx2.ssd (versions/dunjunz-swram_hack/), from the BBC Micro Games Archive, is an unofficial conversion that keeps all 25 levels in two banks of sideways RAM as ROMFS images and loads them through the MOS's ROM filing system [reported as unofficial: billcarr2005, stardot]. Its credits say only "(c) Bug Byte 1986"; whoever made it is not named. It is built from the cassette's files, with two traces of Ole's crack [confirmed]:

So the decrypt-and-check routine at &0450, the FILEV level loader at &1447 and the filename at &16D0, which the crack lacks, are the cassette's own code. The crack and the hack share two things the cassette image does not have, so they share an ancestor that is not this image: another copy or issue of the cassette, or a transfer of it [inference]. - Levels. Its 25 LEVELn files, in Beebug ROMFS images (RFS (C) BEEBUG), are byte-identical to the cassette's. The checksum table, however, holds the crack's &1A for level 5, so the hack resets the machine on reaching level 5 [confirmed in beebium]; see findings.md. - Loading. It selects *TAPE then *ROM and reads levels through ROMFS with the cassette's loader, so after start-up it never needs DFS, whose workspace the game overwrites. Whether this was the reason for the design is [inference]. - Loader. DUNK copies the two ROMFS images into the first two sockets above 3 that look like sideways RAM, refuses to run on a Master 128, and assembles a machine-code loader at &6480. Its instructions say banks 4 and 5 are required, but the loader does not fix the banks; see findings.md [confirmed].

Summary of relationships

Cassette (Bug-Byte, 1986) ──cracked──> Ole's crack (NVG Dunjunz-tape.zip)
  (STH Dunjunz_B.uef)                          │
   │   │                                       │ checksum table entry,
   │   │                                       │ leftover command
   │   └──files: game, levels, title, pictures─┴──> Sideways RAM hack
   v                                                (BBC Micro Games Archive
Flippy disc (Bug-Byte, 1987)                         Disc060-DunjunzRx2.ssd)
  Model B side: the cassette's game, reworked
  Master side: converted from the cassette's files
  (HFE captures, both sides; files archived as NVG Dunjunz.zip)

The crack and the hack share two differences from the cassette image (&0495 and the leftover command at &0705), so they may come from a common copy of the cassette rather than the hack from the crack [inference].

Wanted

Sources