Jump to content
IGNORED

How Prince of Persia Defeated Apple II's Memory Limitations


Recommended Posts

I watched this video with great interest, but there were a lot of annoyances in it and misleading statements:

 

 

First let's get the annoyances out of the way.  The video shows how the studio was setup for Mechner's talk, but the main background computer is an IBM PC.  Mechner is talking almost exclusively about development of Prince of Persia for the Apple II, which was the original development machine for the game.  They have the wrong machine in the background!  Moreover, Prince of Persia is almost unplayable on an IBM PC, despite being almost invariably more advanced than even an Apple IIe Enhanced.

 

Additionally, at several instances in the video, footage from the Apple II version is shown but Adlib music from the PC version is played.  The Apple II version was limited to clicking the internal speaker, it did not support sound cards but you cannot expect a casual viewer to know that.

 

Now those flaws are solely on the producers of the video, but let's turn to Mechner's comments.  

 

"At that time the Apple was the #1 game plaform" - Debatable in the early 1980s when Karateka was first being conceived, but defensible if you add the word "computer" before "game".  By 1985 when Mechner first started developing Prince of Persia, the Commodore 64 would have been a stronger contender for the #1 computer gaming platform.

 

"[The Apple II] only had four colors" - This statement is true only if you limit color to exclude black and white and ignore the 16-color capable Graphics and Double High Resolution Graphics modes.  Mechner used purple and green very seldomly when Prince of Persia's used High Resolution Graphics mode, which is the only mode in which gameplay occurs.  He did use Double High Resolution Graphics mode for the opening title, credits and title captions (5 screens).  

 

"Everything had to fit into 48K of memory" - Only on an Apple II or II+ without a Language Card.  Karateka ran in 48KiB Apple II and II+s, but Prince of Persia required 128KiB of RAM.  The video make not make it clear that Prince of Persia loads levels from a floppy disks, copying the data from the disk to RAM, so the whole game did not have to fit in 48KiB but 140KiB x number of disk sides used.  Even Karateka loads only a portion of itself at any given time.  Prince of Persia used both sides of a floppy disk.

 

"I found a way to take 12K of memory that was hiding in the Auxillary Memory Card of the Apple II" - The idea that some memory was hiding from a programmer so familiar with the Apple II platform is ludicrous.  The Apple II, even the IIe and the //c were very well-documented machines.  It is true that they had a fairly Byzantine approach to memory mapping (required for backwards compatibility), but the intricacies of the bankswitching should have been well-known before 1989.  Prince of Persia requires a 128KiB machine and not just because it supports Double High Resolution Graphics.  Even though the gameplay was limited to High Resolution Graphics, the game ended up using almost every byte of memory available to an Apple IIe with 128KiB of RAM according to Mechner's Prince of Persia Technical Information document : http://www.jordanmechner.com/downloads/popsource.pdf

 

What I think Mechner meant that the 12KiB was "hidden" was not that he did not know about it, 12KiB being way too large to hide, but hidden in the sense that it was tricky to use and therefore unavailable without a great deal of effort.  The area I believe he is referring to is the 12KiB provided by Language Card functionality on the Auxillary Memory Card, which requires bankswitching on top of bankswitching to access.  

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

I talked to Mechner a few years ago on Twitter when he learned I still played PoP on an actual IIe.  He couldn't believe that people (at the time) still used those computers.  He's hardly a historian or authoritative figure when it comes to vintage computers.

 

I agree with your statements.  I think he's a good person (from what little I know) but if you look, he comes out of hiding every 5 years or so to promote his book(s).  A few years ago (I think it was the 25th anniversary) he released his book on the making of PoP (which I bought).  I think people (like me) still assumed he would be an Apple II fanatic to this day.  But he's not.

 

Also, I've often wondered why 128 KiB could barely handle PoP.  Even though I'm a developer by profession, I've never thought that PoP would need that much RAM.  Especially since it's not a single load.  I know there are a lot of frames of animation but only in the main character (plus the enemies but much of that could be reused).

Link to comment
Share on other sites

  • 2 years later...
On 4/6/2020 at 3:21 PM, cbmeeks said:

Also, I've often wondered why 128 KiB could barely handle PoP.  Even though I'm a developer by profession, I've never thought that PoP would need that much RAM.  Especially since it's not a single load.  I know there are a lot of frames of animation but only in the main character (plus the enemies but much of that could be reused).

My knowledge is more from European side computers but I can't see that they work THAT much differently, however:

128kb only seems like a lot until you have to subtract whatevers being used up but the screen buffer. Back in the day of our BBC Micro 32K, once the buffer takes its big wet chomp, there's nothing left. Beam chasers like 80s games consoles are different, they only draw the immediate next line of the screen.

But that's no good for "computers with graphics", you need to be able to see and edit the important business thing you're doing, you need more RAM than enough to store your high score and how many lives you have left.

 

RoboJ1M

Link to comment
Share on other sites

  • 2 weeks later...

Most of your gripes are minor.  The faux-pas committed by the videography company are not really that important.

Plus we have to understand that it's been 30 plus years since Jordan Mechner wrote those software, and even he has likely forgotten some of the technical intricacies of the Apple II.

It could be (I'll have to re-read the book "The Making of Prince Of Persia" to fully recall how it went down at the time, but perhaps it was something like programmers' block that he experienced and had a small eureka moment to discover the extra 12K of memory that he hadn't considered.

More interesting to me are the passages in the book (and explained in the video) about how he wanted to have some sort of combat and came up with the shadow-equivalent of the Prince using a cute memory shift technique and was able to re-use huge chunks of code, thereby being able to fit the shadow character into the available memory where otherwise it would not have been possible.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...