<file> element adds individual files to the ISO file system. mkpsxiso supports various file types including standard data files, XA audio, STR video, and CD-DA track references.
Basic File Entry
Required Attributes
At least one of these attributes must be specified:The file name as it appears in the ISO. If omitted, the source file’s name is used. Must follow ISO 9660 naming rules
Path to the source file. If omitted, the file name is used as the source (must be in the current directory or
srcdir)You can specify both, only
name, or only source. If both are omitted, an error occurs.Naming Behavior
File Types
The file type determines how the file is encoded in the ISO:
data: Standard data file (default)mixed,xa,str: Mixed mode files (2336 bytes/sector)da: CD-DA audio track reference
Data Files (type=“data”)
Standard files stored as Mode 2 Form 1 sectors:type="data" can be omitted.
Mixed Mode Files (type=“mixed”, “xa”, or “str”)
Mixed mode files contain 2336 bytes per sector where each sector is marked as either Mode 2 Form 1 or Mode 2 Form 2. mkpsxiso reads the sub-header to properly encode each sector.xa and str are aliases for mixed. All three type values work identically.XA/STR File Validation
When using XA/STR files, mkpsxiso validates:- The file is not a WAV/RIFF container
- The file size is a multiple of 2336 bytes (or 2048 bytes for data-only STR)
DA Files (type=“da”)
DA files are references to CD-DA audio tracks. They don’t contain audio data themselves but link to audio tracks defined elsewhere in the project.For DA files only. References the audio track with the matching
trackid attribute. The track must be defined in the <iso_project> with type="audio" and the same trackidOptional Attributes
File Visibility
Controls file visibility:
0: Not hidden (default)1: Hidden (file exists but marked as hidden)2: Obfuscated (not added to Directory Record)3: Obfuscated and hidden
Directory Order
Custom directory record order for images with
new_type="true" in the track element. Files with negative order appear first, followed by unordered files (0), then positive order files. This doesn’t modify the LBA addressISO 9660 Naming Rules
File names must follow ISO 9660 Level 1 restrictions:- Only uppercase letters (A-Z), digits (0-9), and underscores (_)
- Exactly one dot (.) separator
- Maximum length: 31 characters (12 recommended)
- Format:
NAME.EXT(e.g.,GAME.EXE,LEVEL_01.DAT)
Valid File Names
Invalid File Names
Advanced Attributes
XA Extended Attributes
XA Extended Attributes
For CD-XA extended attributes (advanced users):Example:
XA file attributes byte. For XA/STR files, defaults to the first byte of the file or 0x38 if 0xFF
XA permission flags
XA group ID
XA user ID
GMT offset for the file’s timestamp in 15-minute intervals
Force the file to start at a specific LBA (Logical Block Address). Use with caution as this can cause file overlap issues
Complete Examples
Standard Game Files
Mixed Media Types
Next Steps
Directory Tree
Organize files in directories
Audio Tracks
Link DA files to audio tracks