psx.wiki

SYSTEM.CNF

System designation file that names the program to start from a disc.

SYSTEM.CNF
File nameSYSTEM.CNF
LocationRoot directory of the disc

Overview

SYSTEM.CNF is Sony's system designation file. It describes the PlayStation system settings and the application that is to be started.1 The kernel reads the file at boot time and uses it to reserve memory for the stack, the tasks and the events.2 The PS-X OS first checks the type of disc in the CD-ROM drive, and only an appropriate disc has its SYSTEM.CNF read and the named program executed.1 The boot page describes the whole sequence.

Syntax

Each parameter is described from the beginning of a line in <key word> = <content> format. All characters are 1-byte uppercase alphanumerics, and lowercase characters may not be used. A space is necessary on both sides of the equal sign. When the same parameter appears more than once in a file, the first one found takes precedence.1 The TCB and EVENT values are written in hexadecimal.2

Keywords

The parameters that may be described are shown below.

Table 1: System designation file keywords
Key word Contents Default Minimum Example
BOOT Device name, file name and version of the boot executable2 cdrom:PSX.EXE;1 BOOT = cdrom:\SLUS_123.45;1
TCB Number of task control blocks (hex) 4 1 TCB = 5
EVENT Number of event control blocks (hex) 0x10 0 EVENT = 5
STACK Stack pointer value when the BOOT file starts 0x801FFF00 0x8010000 STACK = 800FFF0

The PlayStation Operating System manual gives the STACK default as 0x8001FF00.1 The Run-Time Library Overview and psx-spx both give 0x801FFF00, which is 256 bytes below the top of 2 MB of memory in segment B.23

Limits

The number of task control blocks and event control blocks that can be allocated is limited by the formula TCB * 192 + EVENT * 32 + 544 < 4096.2 The BIOS itself opens 5 events for its CD-ROM functions. Consequently, of the 16 events given by the default EVENT = 10, only 11 are available to the game.4

Boot Argument

The BOOT line may carry an argument string after the file name. The BIOS copies this string to the 128-byte area at address 0x00000180, where the executable may read it.35

Boot File Name

Licensed games name the boot executable after the product code printed on the case. Because ISO 9660 level 1 allows only 8 characters in a base name, the minus sign is replaced by an underscore and the last two digits move into the extension, so SLUS-12345 becomes SLUS_123.45.3 The suffix ";1" is the ISO 9660 file version number. When a disc has no SYSTEM.CNF, the BIOS boots the file PSX.EXE instead.3

Example

A typical SYSTEM.CNF reads as follows.3

BOOT = cdrom:\SLUS_123.45;1
TCB = 4
EVENT = 10
STACK = 801FFF00

References


  1. ^ a b c d Sony Computer Entertainment Inc. PlayStation Operating System. August 1998. Page 2-3, Table 2-1.

  2. ^ a b c d e Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 2-3, Table 2-1.

  3. ^ a b c d e psx-spx. CDROM File Formats, SYSTEM.CNF. https://psx-spx.consoledev.net/cdromfileformats/

  4. ^ psx-spx. Kernel (BIOS), B(08h) OpenEvent. https://psx-spx.consoledev.net/kernelbios/

  5. ^ psx-spx. Kernel (BIOS), BIOS RAM Map. https://psx-spx.consoledev.net/kernelbios/