

So the starting point is in BOOT.S: a file that we will see it later contains POP bootloader. 04 Support/MakeDisk/DRAZ/DRAZ.S:org = $800 03 Disk Protection/POPBOOT0.S:org = $800 In order to find the starting point we can look what module was hinted to run at $800 by searching for ORG directive:įabiensanglard$ find.
THE PRINCE OF PERSIA MANUAL
Two great books that are unfortunately out of print today : Apple II Reference Manual and Inside the Apple IIe. There was no operating system and no linker/loader on Apple II: The developer had to "somehow" manage to transfer the instructions from floppy disc Trivia : ORG directives were really just hints. One of the good feature of Merlin is the ORG directive which allows to hint the assembler where the instructions will be loaded in RAM: In POP, there is a ORG directive at the top of every files. S files are.Īccording to Jordan Mechner's book: Making of Prince of Persia, POP used Merlin assembler. To achieve high performances developers had to work down to the metal using 6502 assembly. That is the first thing that programmers back then did not have: High level languages with high quality compilers. The interesting part is in /Prince-of-Persia-Apple-II/01 POP Source/Source/ which contains the game engine made of numerous.
THE PRINCE OF PERSIA CODE
The source code is available in a GitHub repository and can be downloaded with one command: EDIT June 17th, 2013 : Andreas Varga (whom reverse engineer POP before the source code release) also commentd (#41) ! Part I : Introduction Part II : Bootloader Part III : Code explained EDIT June 17th, 2013 : Jordan Mechner commented on this article (#32). Acknowledgment : I would like to thank Miles.J from and Roland Gustafsson (author of RWTS18) for patiently sharing their knowledge with me. I hope it will inspire others to read more source code and become better engineers. As usual I took numerous notes that I have cleaned up on this page.

Reading the source allowed me not only to learn about the game development process of the 80s but it also renewed my appreciation for things that we take for granted today. The Apple II apparent poor environment for game programming was actually ground to unmatched innovation and creativity : From self-modifying code, in-house bootloader, clever floppy discįormat to skewing lookup tables: Prince Of Persia features engineering treasures in every modules. On Jordan Mechner released the source code of Prince of Persia.Įven though it is the Apple II version written in 6502 assembly language, it was a pleasant experience to dive in the code of that mythical game: As usual there were many fascinating sofware wizardries to discover. June 14th, 2013 Prince Of Persia Code Review: Part 1 (Introduction)
