PSF1 Format
This is a variant of the
PSF Format, using a version byte of 0x01, for Playstation sequenced music.
Contents
Program section: PS-X EXE consumer-format executable file, including header.
Reserved section: Not used. May be ignored, removed, etc.
File Extensions
- psf, psf1 (self-contained program)
- minipsf, minipsf1 (program relying on extra library data)
- psflib, psf1lib (library for use with minipsf files)
Description
The program section is an executable file for use with the original Playstation console. It's responsible for initializing the SPU, loading samples, setting up interrupts, etc. - anything a real program must do. It runs at the shell level and has full access to kernel functions.
Uncompressed size of the executable must not exceed 2,033,664 bytes.
PSF1 follows the standard rules for
MiniPSF files.
PS-X EXE Format
The executable must be in the standard consumer "PS-X EXE" format, which is described below for reference.
First 0x800 bytes - header
Next N bytes - text section
Header format:
0x000 (8 bytes): ASCII "PS-X EXE"
0x010 (4 bytes): Initial PC, little-endian unsigned long
0x018 (4 bytes): Text section start address, little-endian unsigned long
0x01C (4 bytes): Text section size, little-endian unsigned long
0x030 (4 bytes): Initial SP ($29), little-endian unsigned long
0x04C: ASCII marker: "Sony Computer Entertainment Inc. for North America area" (or similar for other regions)
Everything else is zero.
Text section should be a multiple of 2048 bytes.
Refresh Rate
The region specified by the ASCII marker at offset 0x4C should be used to determine the screen refresh rate and frequency of the VBlank interrupt (NTSC vs. PAL):
- "North America" = 60Hz
- "Japan" = 60Hz
- "Europe" = 50Hz
- (please let me know if there are other regions I should include here)
Also, if the "_refresh" tag is present, it specifies the refresh rate in Hz directly. This tag overrides the region information in the EXE header. Currently only _refresh=50 and _refresh=60 are valid.
Emulation Notes
See
PSF1 Emulation Notes for more information on how to properly emulate a PSF1 executable.
CategoryPSF