Reverse-engineering notes on Origami (EagleVision interactive productions b.v., 1993) — a Philips CD-i title that teaches paper folding, and one of the purest examples of what the format was actually built for.
This repository documents the European pressing: a single-track disc filled to 98 % of a CD, holding 46 files, one 82 KB OS-9/68000 executable, and 631 MB of multi-channel real-time video and audio. Nothing on the disc is compressed. There is not a single bitmap file, palette, font or sprite anywhere on it.
Documentation only. No game assets, no extracted images, no audio, no
executable code is committed here. The tools in tools/ reproduce
every figure, table and image in these pages from your own legally obtained
copy.
| Doc | Contents |
|---|---|
| 00-overview.md | The release, the disc, what 739 MB is actually made of, and the afternoon it was authored |
| 01-disc-image.md | The track, and 5.2 MB of speech in front of the file system that turns out to be a CD-DA stream with the sector headers written over it |
| 02-filesystem.md | Green Book descriptor, path table, attributes, and four files of plain text worth more than the rest of the disc |
| 03-executable.md | cdi_origami: four OS-9 modules, all CRC-clean, and nine names that are not the credits |
| 04-realtime-files.md | How seven independent streams share one file, and why 26.7 % of the disc is nothing |
| 05-video.md | DYUV, CLUT7, finding geometry with no header to read, and every picture stored twice |
| 06-audio.md | Level C ADPCM, five narration channels, and the language that is not on the box |
| 07-presentation.md | The title card, the transport bar, the chapter ruler, the credit roll that assembles rather than scrolls |
| 08-leftovers.md | The archaeology: a home address, a debug hex dumper, a missing model1, three spellings of the publisher |
| 09-open-questions.md | Everything unresolved, with the measurements behind it |
| notes/file-inventory.md | All 51 directory entries with LBA, size, date and attributes |
| notes/rtf-inventory.md | All 40 real-time files: frames per standard, narration length per language, padding |
| notes/string-inventory.md | Every readable string in the executable, grouped |
| cdi-platformnotes-doc | Platform checklist — what to look for on any CD-i disc, now covering three titles. Shared by every CD-i pipeline; this repo no longer keeps a copy |
Fifty-two sectors of this disc are the program and the file system. Out of 326,400. That is 0.016 %. Everything else is presentation data or the padding between it:
| what | sectors | MB | share |
|---|---|---|---|
| real-time bitrate padding | 87,103 | 193.0 | 26.7 % |
| video, PAL plane | 82,970 | 183.9 | 25.4 % |
| video, NTSC plane | 70,672 | 156.6 | 21.7 % |
| audio, five languages | 67,565 | 149.7 | 20.7 % |
| tail padding | 15,770 | 35.0 | 4.8 % |
| pre-file-system region | 2,268 | 5.0 | 0.7 % |
| file system and program | 52 | 0.1 | 0.0 % |
There is a fifth language, and it is Japanese. The disc is catalogued as
(En,Fr,De,Nl). Every model file carries five ADPCM narration channels,
the language menu has five entries — Nederlands, English, Français,
Deutsch, 日本語 — and the disc-error screen ships in five localisations,
including 読み取りが難しくなってきました。 A Dutch origami disc from Hilversum
with four hours of narration in five languages, one of which nobody wrote
down.
Every photograph is stored twice, once per video standard. The two video channels in each file are not double buffering. They are the same picture at 384×193 and 384×167 — 69 % of the height of a PAL 384×280 screen and 69 % of an NTSC 384×240 one. Frame k of one channel correlates 0.88 with frame k of the other and 0.6–0.75 with its neighbours. The consequence is that a fifth of the pressing is video the player in front of you will never read.
The pre-file-system region is a CD-DA stream with sector headers written over it. Sectors 18–2,267 descramble to 29.39 seconds of 44.1 kHz speech that no file references. The recovered audio jumps at every sector boundary, and the jump matches a six-frame gap — exactly the 24 bytes of sync, header and subheader that the CD-i authoring system laid over each 2,352-byte audio block:
mean |x[n] - x[n-1]| away from boundaries 266.1
mean |x[n] - x[n-1]| at a sector boundary 792.3
lag 6 expectation 805.4 <== match
The Philips library's authors are riding inside the binary. At offset
0x48 of the cdi_bpsys module, before any code:
M.Armendariz,L.Barnes,W.Hunt,J.Kesselman,S.McClellan,R.Moore,T.Nutt,J.Piesing,J.Rotter.
That is the author list of the CD-i base program system — the Philips/OptImage
support library — not of this game, and J. Piesing is Jon Piesing of
Philips' CD-i standards work. It should be in every disc linking the same
library revision, which makes it a free toolchain fingerprint.
The programmer's home address was pressed onto every copy. /message.txt,
306 bytes in the root, is named by nothing and opened by nothing. It holds the
studio's Hilversum address, and then Paul Brand's private home address in
Almere-Buiten and his home telephone number. It is documented here; it is not
reproduced here.
ORIGAMI is great! — the entire contents of the abstract file, the
19-byte field the Green Book sets aside for a catalogue description of the
disc. On the same afternoon somebody column-aligned a careful eight-person
credit list into bibliographic and wrote a proper legal notice into
copyright, in which the company's name is spelled differently from both
other places it appears.
A video-plane hex dumper is still linked in. PLANE_A, PLANE_B,
\r\rPlane = %s\r\r, \rLine %d\r, %2X %2X %2X %2X\r — a routine that
dumps a video plane to a terminal four bytes at a time, unreachable from
anything the user can do, shipped on a commercial pressing. Evidence, too, of
a host terminal on a serial line at the other end.
DOEMEER contains model2 and model3, and there is no model1. Two
working filenames that reached the shipped name table, the menu order and the
glass master. model3 is the smallest model on the disc.
Nothing else is out of place. All 37 model names in the executable resolve to files; all 40 real-time files are named by the executable; no file is all-zero; nothing is compressed; there are no dangling references in either direction. For contrast, the sibling Ultra CD-i Soccer pipeline found eight dangling paths and 1 MB of empty files. Origami was authored once, in one afternoon, from material that was already finished — the timestamps run 13:30 to 16:11 on 28 May 1993 and the executable was built last.
Pure Python 3. numpy and pillow are needed for the rendering paths;
nothing else.
tools/cdilib.py sectors, subheaders, the Green Book file system
tools/cdifs.py list / tree / extract / sector map
tools/cdihead.py the pre-file-system region: descramble, classify, dump the audio
tools/os9mod.py OS-9/68000 module headers, parity and CRC-24
tools/cdistrings.py strings, with 68000 object-code noise filtered out
tools/cdicensus.py the tables in notes/: files, real-time files, whole-disc sectors
tools/cdidyuv.py DYUV decoding; model frames -> PNG or contact sheet
tools/cdipic.py the /MISC presentation files, whose geometry varies
tools/cdirta.py audio channels out of a real-time file -> WAV
tools/cdiaudio.py the CD-i Level B/C ADPCM codec
Start here:
unzip "Origami (Europe) (EnFrDeNl).zip" -d _work
mv _work/Origami*.bin _work/origami.bin
python tools/cdifs.py list
python tools/cdihead.py map
python tools/cdicensus.py sectors
python tools/os9mod.py _work/files/cdi_origami
python tools/cdirta.py info /BASIS/bergen.rtf
python tools/cdidyuv.py sheet /BASIS/bergen.rtf bergen.png
python tools/cdipic.py png /MISC/origami_pictures.rtf pics/
Everything defaults to _work/origami.bin, and _work/ is git-ignored.
cdi-platformnotes-doc is a
checklist that now draws on three titles across the whole range of the format —
a 1997 British game using 2.4 % of a CD, this 1993 Dutch presentation using
98 %, and a 1993 American streaming game using 77 %. Findings confirmed on all
three are marked [all]; those confirmed on two are marked [2 of 3]; the
rest are named after the disc they came from, so you know which to test rather
than assume. It is shared by every CD-i pipeline rather than forked into each,
so this repository no longer keeps a copy.
It covers the sector and Green Book layouts, the scrambler test for the
pre-file-system region and the lag test that explains it, OS-9 module
validation and the Armendariz fingerprint, the subheader coding bytes, DYUV
decoding and the corrupted delta table that will waste your afternoon, how to
find frame geometry in a stream with no header, multi-channel real-time
interleave, the ADPCM sound-group layout, and the order of work that paid best.
It also records all three discs' numbers side by side, so you can tell what is normal for CD-i from what your title is doing differently.
Companion pipelines: cdi-ultracdisoccer-doc and cdi-linkthefacesofevil-doc.
This is a documentation pipeline. There is no port, no patch, no reimplementation here, and no plan for one in this repository. What is here is a description of how the disc is put together, accurate to the byte where it claims to be, and explicit about which parts are inference — those are collected in 09-open-questions.md, and two of them would be closed by somebody simply listening to a WAV.
Corrections and answers to the open questions are welcome.