Skip to content

discinfo ​

Tool tools/disc/discinfo.py (program, Discs and disk images). First look at a CD image (CUE/BIN, raw BIN or ISO): its tracks, its file systems, its dates, and the files on it.

Run it with ./gameframe run discinfo ARGS or python3 tools/disc/discinfo.py. Source on GitHub.

Its own help ​

This is the help text in the tool itself, as ./gameframe tool discinfo prints it.

text
First look at a CD image (CUE/BIN, raw BIN or ISO): its tracks, its file systems, its dates,
and the files on it. It can also copy the files and the audio tracks out.

Usage: discinfo.py IMAGE [--files] [--map] [--extract DIR] [--audio DIR] [--swap] [--json]

  IMAGE           a .cue sheet (its BIN files beside it), a raw .bin, or a .iso
  --files         list every file: disc sector, size, date, path
  --map           list the runs of sectors that hold data but belong to no file (slower: it
                  reads every sector of the data tracks)
  --extract DIR   copy every file of the first readable volume into DIR (Joliet names if present)
  --audio DIR     write each audio track as a WAV file (44,100 Hz, 16-bit stereo) into DIR
  --swap          the audio was ripped big-endian: swap the bytes of each sample
  --json          print everything as JSON

What it reports, and why it matters for a port:
- the tracks: data or audio, the sector mode (Mode 1, Mode 2 XA), the start and length. A
  game with audio tracks plays its music from the disc (CD-DA), so the port must play those
  tracks, and the game's code holds a table of track numbers.
- the file systems: ISO 9660, Joliet (long Windows names), Rock Ridge, High Sierra, El Torito
  (a bootable disc), and HFS or HFS+ (a hybrid Mac and PC disc, where the Mac files can differ).
- the identifiers and dates in the volume descriptor: the publisher, the data preparer, the
  application that mastered it, and when. With the file dates, they date a release and tell
  two pressings apart.
- Mode 2 Form 2 sectors (video, streamed sound) in a data track, which a cooked .iso drops.
- hidden files and files outside the volume's size, which some copy protections use.
- files in Mode 2 Form 2 (XA): PlayStation STR video and XA sound, for example. --extract
  copies these as whole 2352-byte sectors, because a copy of 2048 bytes per sector loses data.
- the system area (sectors 0 to 15): empty on a PC disc, the licence and boot data on a console.
- files that only one of the ISO 9660 and Joliet trees lists, and files dated after the volume.

It reads the image only. The files it copies are game material: extract into target/ (or
another folder git ignores). Standard library only.

Named by ​

Skills: re-inventory.

Code: Apache 2.0. Content: CC0 1.0. No game material: bring your own copy.