Game industry veteran Jordan Mechner has released the source code for the original Apple II version of Prince of Persia
, more than two decades after the game's release.
Mechner previously presumed that the source code, which was saved on three 3.5" floppy disks, was gone forever after losing track of the disks. He searched for them on and off over the last ten years, and pestered former co-workers at publisher Brøderbund to see if they had the disks, to no avail.
He had already given up hope of ever finding them when his father (who composed the music for Prince of Persia
) recently discovered the disks
and other old games in the back of a closet while doing some spring cleaning.
The next challenge was to transfer the data from the old and fragile disks to a modern system. For that, Mechner worked with the makers of DiscFerret
, Apple II collector Tony Diaz, and GDC/digital historian Jason Scott -- the latter happened to attend the same high school as Jordan's brother David, the motion model for Prince of Persia
Looking to avoid a number of problems that can arise when retrieving data from old storage formats, the group used a custom hardware setup (pictured, more photos available
on Scott's Flickr page) to pull magnetic readings off the disks. They also duplicated
other old Mechner games and a never released clone of Tetris
developed for fun at Brøderbund by Roland Gustafsson.
The transfer was a success, and Mechner has posted the source code
for Prince of Persia
, which he programmed in 6502 assembly language between 1985 and 1989, online on Github for free.
To help developers who want to tinker with the source code, Mechner has posted a technical document
that he originally put together in 1989 to assist others who planned to port Prince of Persia
to other platforms like Amiga and Genesis.
"We extracted and posted the 6502 code because it was a piece of computer history that could be of interest to others, and because if we hadn't, it might have been lost for all time," says Mechner. "As for me, it's time to get back to my day job of making new games and making up stories."
You can read about the game's development in Mechner's ebook The Making of Prince of Persia
-- excerpts from the book and an interview with Mechner are available in this recently published Gamasutra feature