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:ISO 9660

From ReverseEngineering.wiki
Format
Platforms Platform:PlayStation
Magic 01 43 44 30 30 31 01 at sector 16 (type, "CD001", version)
Endianness both-endian pairs
On this wiki Facts · Code · Notes · Topics

The file system of CD-ROMs and PlayStation discs: volume descriptors from sector 16 (type byte, "CD001", version), a primary descriptor with the root directory record, directory records with both-endian numbers, and path tables; PlayStation discs add CD-XA system-use fields to each record.

Overview

On a PlayStation disc the logical block is 2048 bytes (the user data of a Format:CD-ROM XA Form 1 sector). Sector 16 is the Primary Volume Descriptor and sector 17 the terminator; there is no Boot Record or Joliet descriptor. Path tables sit usually at sectors 18-21 and the root directory at sector 22. The boot file is named in SYSTEM.CNF (see Format:PS-X EXE).

Volume descriptor (sector 16)

Offset Size Meaning
0x000 1 type: 1 primary, 2 supplementary, 3 partition, 0xFF terminator
0x001 5 "CD001"
0x006 1 version 1
0x008 32 system identifier ("PLAYSTATION")
0x028 32 volume identifier
0x050 8 volume space size in blocks (32-bit little then big endian)
0x078 4 / 4 / 4 volume set size, sequence number, logical block size (0x0800), each as 16-bit pair
0x084 8 path table size (small on PlayStation, max 0x800)
0x08C 4+4+4+4 path table LBAs: L table, optional L copy (little endian), M table, optional M copy (big endian)
0x09C 34 root directory record
0x0BE 128 each volume set, publisher, data preparer, application identifier ("PLAYSTATION")
0x32D 17 x 4 creation, modification, expiration, effective dates (ASCII digits)
0x400 8 "CD-XA001" signature (PlayStation and VCD)

Directory record

Offset Size Meaning
0x00 1 record length (0 = padding up to the next block)
0x01 1 extended attribute length (0)
0x02 8 extent LBA (little endian then big endian)
0x0A 8 data size in bytes (both-endian)
0x12 7 year-1900, month, day, hour, minute, second, timezone
0x19 1 flags: 0 file, 2 directory
0x1A 1+1 file unit size, interleave gap (usually 0 even for streaming files)
0x1C 4 volume sequence number (both-endian 16-bit)
0x20 1 name length
0x21 n name, e.g. "SLUS_000.67;1"; 00 = this directory, 01 = parent
14 CD-XA system use after the name (after one pad byte if the name length is even): owner group and user (big endian 16-bit), attributes (big endian 16-bit), "XA", file number, 5 zero bytes

XA attribute bits: bits 0, 2, 4, 6, 8, 10 permissions, bit 11 mode 2, bit 12 form 2, bit 13 interleaved, bit 14 CD-DA, bit 15 directory. Common values: 0x0D55 normal file, 0x3D55 streaming (ADPCM/MDEC) file, 0x4555 CD-DA track, 0x8D55 directory. Entries are sorted by name, directories included, and never cross a 0x800-byte boundary, so after a zero length byte skip to the next block. The PlayStation kernel handles at most 0x800 bytes of directory.

Path table entry

Name length (1 byte), extended attribute length, extent LBA (4 bytes), parent directory number (2 bytes, 1 = root), name, one pad byte if the name length is odd. Table 1 is little endian, table 3 big endian.

Code & repositories

  • https://github.com/Lameguy64/PSn00bSDK @ 5d9aa2d3dfc7d6e51c2eb942ab4cdbae5571a40a · license: MPL-2.0 (declared by the contributor; GitHub's detector did not recognize LICENSE.md)
    Open-source PlayStation SDK (MPL-2.0 core): libpsxcd ISO structures in libpsn00b/psxcd/isofs.h, EXEC struct in psxapi.h, elf2x tool that writes PS-X EXE headers.
    Tested on: source read, not run: read only · checked 2026-10-18; last activity 2025-01-28; Note: the latest release ships binaries; the wiki links only the source, never the binaries

Pitfalls

  • Every multi-byte field of the ISO 9660 part exists twice; read the little-endian half for dumps from a PC and check both when validating.
  • The XA fields are big endian only.
  • File sizes of Form 2 streaming files count 2048 bytes per sector although a sector holds 2324, so a copy tool that reads only the cooked 2048 bytes truncates them.

Evidence & references

  • psx-spx, "CDROM ISO Volume Descriptors" and "CDROM ISO File and Directory Descriptors" (docs/cdromformat.md in the psx-spx mirror).
  • PSn00bSDK (MPL-2.0), libpsn00b/psxcd/isofs.h: structures ISO_DESCRIPTOR, ISO_DIR_ENTRY and ISO_PATHTABLE_ENTRY.
  • Unverified: the statement about Form 2 file sizes is my reading of the directory-record layout, not a sentence in the sources.