# Highly Experimental v2.09

PSF player plugin
Copyright © 2003-2006 Neill Corlett

# Introduction

Highly Experimental is an input plugin for Winamp and XMPlay that plays PSF and PSF2 files, which contain music from Playstation and Playstation 2 games. Highly Experimental emulates the CPU and sound hardware in order to play the music from these games. The same concept has been used with similar formats for other game systems: NSF, SPC, SID, and GBS.

If you don't have any PSF files to play, check the mirror links at PSF Central:

http://www.neillcorlett.com/psf/

# File Format Overview

Short name | Long name | Description
.psf | Playstation Sound Format | A self-contained file with one song. Includes driver code, samples, and sequence data.
.minipsf | Miniature Playstation Sound Format | An abbreviated file generally only containing the sequence data for a song. Relies on .psflib files, residing in the same directory, for driver code and/or samples.
.psflib | Playstation Sound Format Library | A file providing driver code and/or samples for one or more .minipsf files. Not playable as a separate file.
.psf2, .minipsf2, .psf2lib | Playstation Sound Format 2 | Similar to the above, but for Playstation 2.

# Requirements

Operating system |

- Windows 98 or higher

Media player | One of the following:

- Winamp 2.0 or higher
- XMPlay 3.3 or higher
- Any other player that supports the Winamp 2, Winamp 3, or XMPlay 3.3 API

CPU |

- Pentium MMX 233MHz or higher for realtime PSF playback
- Pentium II 333MHz or higher for realtime PSF2 playback

# Configuration - Winamp 2.x, 5.x, or XMPlay

General
Force all songs to play indefinitely | Select this if you want all songs to loop for as long as possible. Winamp will still show the standard length and standard seekbar, but when it reaches the end of the seekbar, it will keep going. Note that songs may still end if there is a prolonged period of silence, and you have the "Stop after ___ sec. of silence" option enabled.
Default length / fade | This is the default length for PSFs that don't have length information in their tags. Format is minutes:seconds.
Suppress opening silence | This will cause the plugin to skip silence at the beginning of songs.
Stop after ___ sec. of silence | This will cause songs to end prematurely if a prolonged period of silence is detected. This is useful for songs that don't loop, but also don't have a length tag. You can define how prolonged is "prolonged" by entering a number of seconds into the edit box.
Thread Priority | Selects the priority of the emulation thread. Higher priorities may help if you encounter problems with skipping. Note that if you select "Above Normal" or "Highest", the thread will temporarily demote itself to "Normal" during initial load and seeking.
Output
Global Volume | This is a multiplier that affects the volume of all PSF files and is independant of Winamp's main volume. Change this if you notice that all your PSFs are a different volume than all your MP3s, or something similar. +6.00 dB is the default, and will give you the equivalent of SMPTE K-14 if you're using replay gain. +0.00 dB will give you K-20.
Resample output to _____ Hz | Normally, PSF files play at 44100 Hz and PSF2 files play at 48000 Hz (the real hardware sample rates). Enable this option if you'd rather have them play at the sample rate of your choice. This may be helpful if you're trying to diskwrite CD tracks from PSF2s, or if your sound card isn't capable of 48KHz output.

This option dramatically increases CPU usage, so you probably shouldn't use it unless you have to.

Replay gain | Use replay gain data to adjust the volume of the song, instead of manual volume adjustment. You can choose to use the track-specific, or the whole-album, gain. For more information on replay gain, see http://www.replaygain.org/.
Clip protect | Use peak data included in the song tag (typically from a replay gain scanner) to prevent the volume from being turned to a level which would cause clipping. You can choose to use the track-specific, or the whole-album, peak.
Soft saturate | Use a tanh compression function to minimize the effects of clipping. Soft saturation is only used when a song doesn't have peak data, or when "Clip protect" is disabled. This option should never be disabled unless you really need the reduced CPU load.
Errors
Perform strict format checking on all files | Enable this option to perform additional file format checks on every file played. Highly Experimental will refuse to play a file that fails the checks. CRC checking is only performed when this option is enabled.
Show error messages instead of silently advancing | When this option is checked, Highly Experimental will pop up a message box on every error, rather than just allowing the player to advance to the next song.
Title
Title Format | This affects the titles shown in Winamp's main player window and the playlist. Variables enclosed in % signs, such as %title% or %game%, are replaced with the corresponding values from the PSF file's tag. Note that this option has no effect if you're using Winamp 2.9, 5.0, or later with Advanced Title Formatting enabled. This is configured from Winamp - General Preferences - Titles.
Fallback if no variables are defined | If a particular file contains none of the variables listed in the title format, then the plugin will use this alternate format instead.
Emulation
Enable Main | Lets you enable or disable the main (non-reverb) output. Useful if you want to "solo" the reverb effects alone. I added this for debugging and decided to leave it in as a permanent option.
Enable Reverb | Lets you enable or disable reverb effects. For authentic sound, you should leave this on. I left it optional in case someone wants to diskwrite and add their own effects, for instance.
Simulate frequency response of real PSX/PS2 | Filters the sound to make it closer to the real Playstation analog output.
Show R3000 CPU usage (percent) under "kbps" | Check this option to make Winamp's kbps display (which is otherwise unused) show the current R3000 CPU usage. This is based on the number of idle cycles detected during emulation, and is not related to host CPU usage.

# File Information - Winamp 2.x or 5.x

## Tag fields

The layout of the File Information (Alt+3) box should be familiar to anyone who's used Winamp to play MP3s before. Here you may edit the title, artist, game, year, genre, comment, and copyright associated with the song, and the name of the PSF file's creator ("PSF by").

## Volume

You can set the relative volume of the file here. This volume is applied in addition to the global volume set under Configuration. If replay gain is enabled, and if it's present in the file, you'll see the replay gain instead of the relative volume, and it will not be editable.

Click the "Replay Gain..." button for a detailed view of the replay gain information. From here, you can also scan individual tracks or albums.

For more information on replay gain, see http://www.replaygain.org/.

## Length

Since PSF is an emulated format, tracks don't have an inherent length. You can set the song and fade length of each file. Lengths set here will override the defaults.

If the file is currently playing, you can click the "Now" button to copy the current playback position into the song length box.

## Raw Mode

The Raw Mode button will allow you to edit the raw ASCII tag associated with the PSF file. This can be useful if you wish to add your own custom variables to the tag. Simply add extra lines of the format variable=value to the end of the tag. You can then make these show up in Winamp's player window and playlist, by adding %variable% to the title format under Configuration.

# Known Bugs, Issues

- Winamp 3 support is incomplete.
- Seeking - Seeking forwards is slow, and seeking backwards requires the plugin to rewind the PSF to the beginning. This is an unfortunate tradeoff of the format.
- Speed - There's still a lot of room for improvement on the emulation speed / CPU usage.
- Emulation - PSF ripping would probably be slightly easier if I filled in some more gaps in the emulation.
- Reverb - It sounds great and I don't plan on revisiting it anytime soon, but it's still not 100% accurate.

# Terms of Use

Highly Experimental is freeware and may be distributed freely as long as it is not modified, and this documentation is included and not modified either. "Distributed freely" means no money, goods, or services may be charged or solicited for Highly Experimental or any media or software package containing it.

Anyone using Highly Experimental does so at their own risk. I will not be held liable for any loss or damage arising from its use. No warranty is expressed or implied.

Highly Experimental includes code from the following projects, all of which were licensed under the LGPL. Source code is available from the links provided:

- zlib Copyright © 1995-2005 Jean-loup Gailly and Mark Adler: http://www.gzip.org/zlib/
- UPX Copyright © 1996-2004 Markus F.X.J. Oberhumer & László Molnár: http://upx.sourceforge.net/
- Replay gain analyzer Copyright © 2001 David Robinson, Glen Sawyer, Frank Klemm and Marcel Müller, from MP3Gain: http://mp3gain.sourceforge.net/

# Thanks to

- _Demo_ for ePSXe.
- Ian Luck for assistance with XMPlay support.
- Necrosaro/radimvice. This was all his crazy idea; blame him.
- Peter Pawlowski for assistance with Winamp 3 support.
- ProtoCat, for everything.

# Where to find me

email: neill@neillcorlett.com

web: http://www.neillcorlett.com/