-
-
Notifications
You must be signed in to change notification settings - Fork 4
Therons Quest File Formats
Theron's Quest targets the PC Engine / TurboGrafx-CD (Hudson Soft, 1992 JP / 1993 US). CPU: HuC6280 (65C02 derivative) at 7.16 MHz. Resolution: 256x224. All multi-byte values are little-endian.
The game ships on a CD-ROM with the PC Engine CD-ROM System Card interface. There is no ISO 9660 filesystem — data is addressed by raw CD sector numbers.
| Track | Format | Content |
|---|---|---|
| 1 | CDDA | Opening audio |
| 2 | MODE1/2352 | Game code, graphics, dungeon data |
| 3-18 | CDDA | Music tracks |
| 19 | Data / ISO | Additional data |
| Field | Value |
|---|---|
| JP size | 8,102,640 bytes |
| US size | 8,104,992 bytes |
| Sector size | 2,352 bytes (raw) |
| User data per sector | 2,048 bytes (offset 16-2063) |
Offset Size Description
0x000 16 Sync/header
0x010 2048 User data
0x810 288 EDC/ECC/subheader
- IPL loads record
0x0003E7into local RAM at$4000 - Stage-two CD_READ loads one sector into
$3800:- JP: record
0x04DF - US: record
0x04E0
- JP: record
- Payload begins with
BRK $FFfollowed by a$0308envelope containing a 218-entry manifest - Each manifest entry is 6 bytes (structural provenance, not files)
Offset Size Description
0x00 2 Width (uint16 LE)
0x02 2 Height (uint16 LE)
0x04 4 Seed (uint32 LE)
0x08 2 Level index (uint16 LE)
0x0A 2 Header extension
0x0C W*H Grid cell data (1 byte per cell)
Grid cells use a 5-bit classification (32 possible tile values).
The game has 7 quest blocks of 262,144 bytes (0x40000) each, one per mini-dungeon.
Known startup level: seed 0x0108E938, level_index 0x0026, record
0x0B52, grid 32x27 = 864 bytes.
At US ISO offset 0x1584: nine LE uint16 words with stride 0x0400,
values ranging from 0x0020 to 0x2020.
| Field | Value |
|---|---|
| Tile size | 32 bytes (8x8 pixels, 4 bits/pixel) |
| Palette entries | 16 per palette |
| Palette word size | 2 bytes LE (9-bit HuC6260/VCE color) |
| Palette data size | 32 bytes (16 x 2) |
| Max bitmap atlas | 256x8 pixels |
Bit: 8-6 5-3 2-0
GGG RRR BBB
3 bits per channel: blue (bits 0-2), red (bits 3-5), green (bits 6-8).
Tracks 1 and 3-18 are Red Book audio (44.1 kHz stereo PCM). In Firestaff's data directory these are stored as OGG Vorbis re-encodes:
| File | Size | Content |
|---|---|---|
| TQJP01.ogg | 705 KB | JP opening audio |
| TQUS01.ogg | 218 KB | US opening audio |
| TQ04-TQ18.ogg | 272 KB - 3.7 MB | Music tracks |
Maximum queued CDDA sectors: 16.
Standard CUE format declaring track layout:
FILE "TQUS02.bin" BINARY
TRACK 02 MODE1/2352
INDEX 01 00:00:00
Firestaff requires exactly one TRACK 02 MODE1/2352 entry backed by a
FILE "..." BINARY declaration.
| File | Size |
|---|---|
| syscard3.pce | 262,656 bytes |
The PC Engine System Card 3.0 ROM, required by CD-ROM System games. Used by Mednafen for live capture/trace support.
| Field | Value |
|---|---|
| Slots | 5 (slot0.srm through slot4.srm) |
| Encoding | gzip-wrapped (DEFLATE) |
| Gzip magic | 0x1F 0x8B 0x08 |
| Max inflate probe | 1,024 bytes |
Matches the PC Engine Save Disk cartridge format. Validated via gzip framing, optional header fields, CRC32, and ISIZE.
Classification states: PRESENT_AND_RECOGNIZED, UNRECOGNIZED
(non-gzip / Sphenx raw), MALFORMED (truncated gzip), ABSENT.
Firestaff uses its own save format for between-dungeon saves (no in-dungeon saves by design).
Path: saves/theron/slotN.tqsv
| Offset | Size | Field |
|---|---|---|
| 0x00 | 4 | Magic: 0x54515220 ("TQR ") |
| 0x04 | 2 | Version (1) |
| 0x06 | 2 | Checksum (16-bit sum) |
| 0x08 | 1 | Quest items collected (7-bit bitmap) |
| 0x09 | 1 | Current dungeon ID |
| 0x0A | 1 | Current dungeon state |
| 0x0B | 1 | Current level (1-3) |
| 0x0C | 4 | Dungeon seeds (7 x 4-bit packed) |
| 0x10 | 4 | Dungeon states (7 x 2-bit packed) |
| 0x14 | 4 | Champion gold |
| 0x18 | 4 | Play time (seconds) |
| 0x1C | 4 | Timestamp (Unix epoch) |
| 0x20 | 32 | Label (null-terminated ASCII) |
| 0x40 | 36 | Reserved |
Body: 4 champion slots x 128 bytes each (same layout as DM1 v1).
Footer: 4-byte checksum. XOR obfuscation seed: 0x5A. 8 save slots
total.
Firestaff recognizes these disc layout variants:
| Layout | Description |
|---|---|
| RAW_BIN | Standalone Track 02 BIN |
| ISO | Standalone ISO extract |
| BIN_CUE | BIN + CUE pair |
| ISO_OGG_CUE | ISO + OGG audio + CUE |
| OGG_ONLY | OGG audio files only |
| Variant | MD5 |
|---|---|
| JP Track 02 BIN | b7afb338ad31be1025b53f9aff12d73a |
| US Track 02 BIN | f23601102138f87c33025877767ebf76 |
| JP Rev 1 ISO | 397039af02d50d15c70b74088eb8a1cb |
| US ISO (concatenated) | ceb02343868f80cec899e9b239aff2da |
| US ISO tail only | 3d8b78571dcd0e6eb8eb4b01eeb7fbba |