Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:CUE and BIN

From ReverseEngineering.wiki
Format
Platforms Platform:PlayStation
Extensions .cue, .bin, .img
On this wiki Facts · Code · Notes · Topics

CDRWIN-style disc image: a .BIN holding raw 2352-byte sectors from 00:02:00 on (the 2-second lead-in and PREGAPs are not stored) and a text .CUE with FILE, TRACK (MODE2/2352, AUDIO) and INDEX lines; the usual dump format for PlayStation games.

Overview

The BIN is the concatenation of sectors; the CUE describes the tracks. A PlayStation game normally has track 1 MODE2/2352 (data, see Format:CD-ROM XA) and optional AUDIO tracks (2352 bytes of PCM per sector).

FILE "game.bin" BINARY
  TRACK 01 MODE2/2352
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    PREGAP 00:02:00
    INDEX 01 08:09:29

Rules

  • Addresses in the CUE are positions in the BIN, not on the disc. Real disc address = CUE address + 2 seconds, plus any PREGAP seen so far (PREGAPs are not stored in the BIN).
  • The end of the last track is the BIN size converted to minutes:seconds:frames (75 frames per second); the CUE does not state it.
  • Track types and the bytes they cover per sector: AUDIO 2352 (0x000-0x92F), MODE1/2048 2048 (0x010-0x80F), MODE1/2352 2352, MODE2/2336 2336 (0x010-0x92F), MODE2/2352 2352.
  • Other keywords: INDEX 00 (pregap start), PREGAP and POSTGAP (silence, not stored), FLAGS, CATALOG, ISRC, PERFORMER/SONGWRITER/TITLE (CD-Text), CDTEXTFILE, REM.
  • CloneCD images use .IMG (2352 bytes per sector) plus .SUB (96 bytes of subchannel data per sector) and .CCD; the .SUB matters only for discs with non-standard subchannel data.

Evidence & references

  • psx-spx, "CDROM Disk Images CUE/BIN/CDT (Cdrwin)" and "CCD/IMG/SUB (CloneCD)" (docs/cdromfileformats.md in the psx-spx mirror).