explaingit

jmechner/prince-of-persia-apple-ii

6,771AssemblyAudience · researcherComplexity · 5/5LicenseSetup · hard

TLDR

The original 1989 Prince of Persia game source code in 6502 assembly for the Apple II, preserved as a historical archive recovered from a 22-year-old floppy disk.

Mindmap

mindmap
  root((Prince of Persia))
    History
      Written 1985-1989
      Apple II platform
      Published by Broderbund
    Tech
      6502 assembly
      Vintage hardware
    Recovery
      Floppy disk archive
      Internet Archive
    Legal
      Ubisoft owns franchise
      No rights granted
    Resources
      Technical document
      Dev journals
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study how a landmark 1989 video game was architected at the assembly level on vintage hardware.

USE CASE 2

Reference the original code when creating a port or modern reimplementation of the game.

USE CASE 3

Archive and preserve computing history for retro gaming research and education.

Tech stack

6502 AssemblyApple II

Getting it running

Difficulty · hard Time to first run · 1day+

Requires a vintage Apple II or emulator and knowledge of 6502 assembly to run or meaningfully study the code.

The code is posted publicly for historical study but grants no rights to the Prince of Persia franchise, which remains Ubisoft's property.

In plain English

This repository contains the original source code for the Prince of Persia video game, written by Jordan Mechner on the Apple II computer between 1985 and 1989. The code is written in 6502 assembly language, which is the low-level programming language used on that era of hardware. The game was first published by Broderbund Software in 1989 and went on to become a long-running franchise now owned by Ubisoft. The source code was recovered from a 22-year-old floppy disk with the help of archivists at the Internet Archive and a vintage Apple hardware expert named Tony Diaz. The author posted it publicly because it represents a piece of computer history that could otherwise have been lost permanently. Making it available here is not the same as granting any rights to the Prince of Persia franchise, which remains Ubisoft's property. Mechner has been candid that he no longer remembers the details of the code, having moved on from programming to work as a writer, game designer, and creative director. He put together a technical document in 1989 to help teams porting the game to other platforms, and a copy of that document is available on his website for anyone who wants to understand what they are looking at. For readers interested in the broader story behind the game's creation, Mechner has published his development journals from that period and also wrote a graphic novel called REPLAY, released in 2023, which covers his experiences making games on the Apple II alongside his personal history. This is an archive for historical study and curiosity. The community of Apple II enthusiasts and retro computing researchers is the best resource for technical questions, as their collective knowledge on the subject far exceeds what the original author can now recall.

Copy-paste prompts

Prompt 1
I'm reading the Prince of Persia Apple II assembly source code. Explain how the main game loop is structured based on typical 6502 game architectures.
Prompt 2
Walk me through how 6502 assembly handles sprite animation, using early 1989 Apple II games like Prince of Persia as a reference.
Prompt 3
I want to understand how Jordan Mechner implemented the rotoscoped animation technique in Prince of Persia. What parts of a 6502 codebase should I examine to find the animation system?
Open on GitHub → Explain another repo

← jmechner on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.