ToolsSDLPoP
SDLPoP: the Open-Source Prince of Persia Port, Mods and Setup
SDLPoP is a free reimplementation of the first game's DOS version that runs natively on current systems. This page covers what it adds, how mods work and where the project lives.
What SDLPoP is
SDLPoP is a free, open-source reimplementation of the DOS version of Prince of Persia. The readme on its GitHub page says it is based on a disassembly of the original game, which is why the game logic follows the 1989 release so closely. The name points to SDL, the cross-platform library that handles graphics, sound and input, and to PoP, the usual short form of the game’s title. On a current PC the result starts as a normal program, with no emulator in between.
It is not only a preservation project. The port adds features the DOS program never had: replays that can be recorded and played back, a quicksave that stores the exact state of the game, a menu with settings, and a set of bug fixes that can be switched off for anyone who wants the original behaviour. Quicksave in particular makes it practical to work through hard levels. The play page places the port among the other ways to run the game.
Licence and platforms
The licence is the GNU GPL version 3, with the licence text in the project source, and a few bundled libraries carry licences of their own. The readme gives build instructions for Windows, GNU/Linux and macOS. All of them need the development versions of SDL2 and SDL2_image. On Linux the build is a matter of installing those packages and running make, on macOS it uses Homebrew or MacPorts plus the Xcode command-line tools, and on Windows several routes are listed, among them Visual Studio and CMake with MinGW-w64.
For anyone who prefers not to compile, the readme says that compiled builds for the three systems can be had from popot.org, and it points to the community forum for unofficial ports to other systems. The project page itself is on GitHub, and it is the place to check for the current version, since the readme’s own text mentions features up to version 1.23 and does not name a latest release.
Game data, and why this site hosts none
SDLPoP reads the game’s resources from DAT files such as LEVELS.DAT, the same family of containers described on the DAT files page. The readme explains how modified DAT files can be copied into the game folder, that LEVELS.DAT has been supported since version 1.02 and that every DAT file has been usable since 1.03. It does not set out a list of files that a user must supply, so the project page is the authority on what each package contains.
The game itself remains under copyright, and no source that could be verified sells the 1989 original today. This site therefore links to no game files. The port’s code and the instructions are free to read and build, and what each package contains is stated in the project’s readme. Choosing a legitimate source for the game’s files is the user’s responsibility, as it is for every route covered on the play page.
Mods and level sets in SDLPoP
Mods are the feature that makes SDLPoP more than a port. Since version 1.17 the game can load a mod from a folder named mods, and a mod needs to contain only the files that differ from the original version 1.0 data. A mod is selected by setting the levelset option in SDLPoP.ini to the name of its folder, or by starting the game with the mod command and the name in quotation marks. A mod folder can hold a mod.ini file that overrides most gameplay options from the main settings file, and the hall of fame and the saves are kept in the folder too.
The readme mentions Secrets of the Citadel as an example of a mod designed for the port. Fans who build levels of their own use Apoplexy, the level editor, which the readme names as supporting the port’s extra tiles: fake tiles, coloured torches and teleports, from the versions the readme lists. Changed graphics and sounds come from a resource editor such as PR, and the whole chain ends with the mod folder.
Command line and other options
The command line accepts the options of the original game, such as a level number from 0 to 15, and adds its own. Among them are full, record and replay for the replay system, validate for checking a replay file, and mod for choosing a mod. A seed option makes the random numbers repeatable, and screenshot options can capture a level. The version and help flags work as usual. Players who like precision can start a chosen level directly, which makes the port convenient for testing.
Quicksave and quickload sit on the F6 and F9 keys. A separate save, on Ctrl+G, works on levels 3 to 13 and stores only the level, the remaining time and the hit points. Since version 1.21 a quicksave made during a recording can be loaded again to continue recording from that point.
How the port relates to the original
Both SDLPoP and a DOS emulator run the first game, and they differ in what stays untouched. An emulator runs the original program as it was shipped. The port is new code that matches it and extends it. Readers who want the history of the DOS release, and how it relates to the other versions, can start with the 1989 game page, and the other programs of the community are gathered on the tools overview.
Frequently asked questions
Does SDLPoP play the sequel?
The port is based on a disassembly of the first game's DOS program, so it covers that game. The Shadow and the Flame is a separate DOS release from 1993 and is usually run in a DOS emulator instead, as the play page explains.
What do the fixes and enhancements switch do?
The readme describes a setting named use_fixes_and_enhancements. Set to false, it gives the original behaviour, and the same choice can be toggled in the in-game menu under Enhanced mode, which allows bug fixes. Players who want the DOS quirks can keep it off.
Where do save files go?
Hall of fame and save files are kept in the folder of the active mod. The readme also names an environment variable, SDLPOP_SAVE_PATH, that sets where saves and the hall of fame are written.
Are there ports for other systems?
The readme says unofficial ports to other systems are listed on the community forum and that the authors did not make them. The official instructions cover Windows, GNU/Linux and macOS.