Original Prince of Persia source-code discovered, posted as free software

Jordan Mechner, creator of the classic bestselling video-game Prince of Persia recently discovered the floppies with the game's original sourcecode in a closet, where they'd sat for more than 20 years. He'd long believed the discs to be lost. Jubilant at their rediscovery, he's released the game as free/open code, with the source available on GitHub. The source awaits your download and remixing!

Prince of Persia Source Code Released On Github

(Images: Prince of Persia Source Code — Found!, jordanmechner.com; Original Prince of Persia game (screenshot), Softpedia)


  1. I’ve seen this on 10 or so different sites now, and it’s funny to me that the screenshots are always from the MS-DOS port, and not the original Apple II version (which this code is for).

    1. The old Macintosh (not Apple II, System ~6 Mac) version is even prettier. Better MIDI, too.

    2. Is that Xbox 360 version based on the original? It looks very pretty! Too bad no Windows version since I haven’t had a video game console since Atari 2600.

    1. I don’t see the graphics included, so you can’t build it.

      But there is the source code to their copy-protection – it is obfuscated and you can see both the original source and the de-obfuscator.

      Most interesting is their  proprietary 18-sector disc format (instead of the usual 16 sector). I researched this more last night – apparently, if you slow your drive down, you can record 18 sectors that will still be readable by normal-speed drives. Not only does this get you more data on a disc, but it also means that a normal drive can’t make a copy of it.

  2. Amazing in two ways: first, that the floppies were still readable, and secondly, that he could find a system with a working floppy drive to read them with. Bravo on both counts!

  3. Haven’t looked at it yet, but I’m sure it’ll make me wish I knew assembly for the Apple II.  Coders from that era wrote code that was virtually indistinguishable from magic.

  4. The source code isn’t well commented, but be sure to check out this awesome technical document mentioned in the README: http://jordanmechner.com/wp-content/uploads/1989/10/popsource009.pdf

  5. This is not free software. From the readme file:

        “As the author and copyright holder of this source code, I personally have no problem with anyone studying it, modifying it, attempting to run it, etc. Please understand that this does NOT constitute a grant of rights of any kind in Prince of Persia, which is an ongoing Ubisoft game franchise. Ubisoft alone has the right to make and distribute Prince of Persia games.”

      1. It is hard to tell. The code does not come with an actual, clearly-written license. Only the above statement. Notice he does not at all mention_distributing_ any modifications you make.

        Strictly speaking, this is not free software (nor even open source) by a long shot.

Comments are closed.