From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:SYSTEM.CNF (PlayStation boot file)" |
|---|
| claim | "DuckStation finds the PS1 boot executable by reading SYSTEM.CNF from the ISO root: it drops spaces and control characters (0x09-0x0D) everywhere, splits lines on CR or LF at the first '=', compares the key 'boot' case-insensitively and takes the value. With strip_subdirectories false (the setting used by ReadExecutableFromImage and GetRegionForImage) it strips the 'cdrom:' prefix (warning if another prefix) and leading slashes; with true it instead keeps only the part after the last backslash (or last colon). Both then cut everything from the last ';'. With no SYSTEM.CNF or no BOOT line it falls back to PSX.EXE." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "DuckStation" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "booting or identifying a PS1 disc image in DuckStation" |
|---|
| effect | "executable path derived from the BOOT key; an optional argument after the path would be glued to the value because spaces are removed" |
|---|
| condition | "DuckStation at the cited commit only; the real BIOS parsing is described in psx-spx (BOOT, TCB, EVENT, STACK keys, argument copied to 0x180)" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Read GetExecutableNameForImage: FALLBACK_EXE_NAME 'PSX.EXE' (line 111), whitespace skipped inside the character loop (lines 793-796), the first '=' switches to value mode, Strcasecmp(key,'boot'), prefix and ';' handling. With strip_subdirectories true it returns the part after the last backslash or colon. The caller that matters for region detection (lines 987-1008) requires the file to exist, otherwise the disc is NonPS1. Consequence of the space removal (my reading, not tested): 'BOOT = cdrom:\X;1 arg' would yield 'cdrom:\X;1arg' and the ';' cut would then keep only 'cdrom:\X'." |
|---|
| repo | "https://github.com/stenzek/duckstation" |
|---|
| commit | "9766391b610fd836ffda0b3e47ab098d04f72ee8" |
|---|
| path | "src/core/system.cpp" |
|---|
| lines | "765-859" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "PS1 BOOT line as DuckStation reads it" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T12:15:29.474Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T13:17:08.406Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read system.cpp GetExecutableNameForImage 765-860, ReadExecutableFromImage 880-900 and GetRegionForImage 985-1008 at 9766391. Matches. Extra detail not in the claim: the 'cdrom:' prefix compare is case-sensitive, and a line with an empty key (starting with '=') is not pushed and its value characters carry over into the next line." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:27:02.688Z" |
|---|
| summary | "Second branch summarized away: GetExecutableNameForImage(iso, strip_subdirectories) (system.cpp 765-859 at 9766391) with strip_subdirectories true returns the part after the last backslash or…" |
|---|
| changed | |
|---|
|
|
|---|