Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Classic Games (Games) Games

Prince of Persia Source Code Released On Github 101

rbarreira writes "The source code for the original Prince of Persia game has been released on github by its author, Jordan Mechner. This release comes three weeks after Jordan announced the find of a box containing old floppy disks that had been forgotten in the back of a closet for 20+ years. A 'digital archeology' effort was launched to recover the contents of the floppy disks, with the help of Jason Scott from textfiles.com. Some photos from the 'copy party' have also been posted."
This discussion has been archived. No new comments can be posted.

Prince of Persia Source Code Released On Github

Comments Filter:
  • browsing the source (Score:5, Interesting)

    by hackula ( 2596247 ) on Tuesday April 17, 2012 @04:25PM (#39716177)
    This is terrific. It is awesome looking through the source; kind of like a time capsule.
    • by hackula ( 2596247 ) on Tuesday April 17, 2012 @04:26PM (#39716187)
      Also-- just an aside-- the code is exceptionally clean.
    • by bfandreas ( 603438 ) on Tuesday April 17, 2012 @08:34PM (#39718603)
      Prince of Persia was a very novel and highly frustrating game. I remember getting all the way on PC just to fail near the end boss. I vividly remember a mirror...
      The motion of the player character was so fluid it simply fascinated me back in the day. It did fit onto on floppy.

      Now, a couple of sequels later(mostly pompous irrelevant wasteful and shallow money grabbing console games and as I've been told a movie on top of that) the original still stands out. It had a certain elegant charme. And very grizzly deaths. After a while I got sick of being sliced up, spiked, smashed, mauled and grieviously injured to be honest. It was very raphic.
      And it did fit onto one floppy. It's nice to see one of the ol masterpieces revealed. Did he include the artwork?
      • by RaySnake ( 607687 ) on Tuesday April 17, 2012 @10:41PM (#39719331)
        At that time Jordan kept a bunch of journals of the development process, they're all online. He even has video of the motion captures he did of his brother, these were used to animate the Prince and it's really uncanny to see how much of that came through in the game. Warning, if you click the link be prepared to waste a LOT of time reading, it's addictive. http://jordanmechner.com/old-journals/1985/10/october-20-1985/ [jordanmechner.com]
      • by Anonymous Coward

        Just to make this clear:
        - Prince of Persia - The Sands of Time was another masterpiece
        - Warrior Within was a bit meh, but still a good game
        - Two Thrones was better, but still not as good as SoT (mostly because the characters where shallower)
        - The new series had a promising start, though it had neither good gameplay nor a story that had anything that could even resemble a good ending
        - I didn't play Forgotten Sands, but mostly because I don't like publishers milking finished story lines
        - The movie was a gener

      • Actually, years ago in the 90s when I first played it on a PC, I found the final level - fighting Jaffar - to be easier than some of the earlier ones, like walking through the saws, taking the long jump to cross a major gap, and so on. Recently, I had this game on my Mot Razr (not the Android phone, the original Razr) and I found that at a certain level, I was unable to defeat one of the guards.

        I agree that in most cases, the games didn't improve. Civilization was a notable exception. I always wished t

      • I think I was in middle school when I got this game. It took a bit of effort once I recognized the time limit. It became not just a matter of defeating a level but being able to beat it quickly. That principle was particularly important early in the game other wise you would leave yourself very little time for experimentation in later levels.

        The two things I remember most are the mirror image "fight" and the display inversion potion. Both of which to me were really neat twists. I don't know how inovative th

        • The coolest was one time when I forced the enemy to retreat into the shifting saws, which really chopped him up. Then, it was just a case of crossing them.
      • by AmiMoJo ( 196126 )

        Sands of Time was very good. Very much about exploration and puzzle solving, similar to the original games. Even the combat was okay.

  • by Anonymous Coward on Tuesday April 17, 2012 @04:30PM (#39716245)

    The times where you see a ton of really old tech, taking up a whole table, crunching away, and a blackberry sitting on top of one of the computers, which probably has more processing power than all those computers put together, make a really cool pic :)

  • Geeze (Score:5, Interesting)

    by Hatta ( 162192 ) on Tuesday April 17, 2012 @04:31PM (#39716267) Journal

    This would have helped the guy who ported it to the C64 [blogspot.com]. Although, that might have spoiled some of the fun.

    • by Anonymous Coward

      To quote the blog you link to: "The C64 conversion of Prince of Persia, based on the original Apple II code by Jordan Mechner has been released today." That was on "Sunday, October 16, 2011", So were did these sources come from and why was the data salvage operation we're reading about now required, is the port based on incomplete sources?

      • Perhaps they ported from disassembled binaries and not the original, cleaner and commented source.

      • by Hatta ( 162192 )

        Yes, the port was based on a disassembly of the original Apple II PoP binary. Since the Apple II, C64, Atari 800, etc. share the same CPU porting software between the platforms is a common hobby project for retrocomputing enthusiasts.

      • If you look at the comments from the same page, below the blog post you can answer the question.

        MrSid: ...Thanks for creating an awesome game. I've spent most of the last 2.5 years digging through your work, dissecting it and putting it back together in different form. It was a huge pleasure working on making the kid run and jump again...

        Jordan: I'm amazed and humbled by the amount of work this must have taken. Did you actually work from the disassembled Apple II 6502 object code? Because the Apple II source code is lost, as far as I know... at least I've never been able to find a copy.

  • Awesome (Score:4, Interesting)

    by deblau ( 68023 ) <slashdot.25.flickboy@spamgourmet.com> on Tuesday April 17, 2012 @04:32PM (#39716269) Journal

    This is unbelievably cool, and everyone involved deserves a beer. If you're in the Boston area, send me a tweet @DavidEBlau and I'll buy you drinks for the night!

  • New terminology (Score:3, Interesting)

    by Anonymous Coward on Tuesday April 17, 2012 @04:36PM (#39716331)

    'digital archeology': the act of trying to find a functioning drive to read whatever old storage format was in use.

    Easy dig: 3.5" floppy
    Hard dig: 5.25" floppy
    Very hard dig: proprietary tape backup (any)
    Extremely hard dig: LS120 (I can joke about this because I had one, and 5 discs for it)

    • 3.5", 5.25" floppies, LS120, 3.5" MO - easy (I have the drives). 8" floppy - really hard.

      I like old tech and keep it around. Mainly audio stuff though, as I don't come across old computer stuff often... I have a working 286 and a CGA card for really old games (and an ISA VGA card for a bit newer games).

      • Our computer club in HS had a PDP-11/04 with a couple of 8" floppy drives. Wasn't very useful though, the most that thing seemed to be able to do was boot up and make clunking sounds with the floppy drives. We also occasionally used it to test how sturdy other hardware was (it was mounted in a full-height 19" rack on wheels). IBM workstation hardware was no match for the mighty PDP (although we did almost topple it over a friend of mine when crushing what I think was a DAT unit for an RS/6000).

        We considered

      • FWIW I have three 8" floppy drives and am happy to help anyone try to recover their old 8" disks with a low-level read from a Kryoflux [kryoflux.com]. Just ask on their forums.
    • by ledow ( 319597 )

      Think an LS120 is hard?

      I had a parallel port Syquest Sparq drive, used MO disks and stored 1Gb - a sort of expensive contemporary of the ZIP disk at the time.

      I defy you to find a working model because a) drivers don't exist for anything much past Windows 95 (even had DOS drivers, which is where I used it), b) they were inherently flaky and failed over time (my personal one went back twice in the first year).

      I still have three disks for these - God knows what's on them, because the only drive I still have is

      • by 0123456 ( 636235 )

        I had a 2GB tape backup system that recorded to VHS tapes. So at a minimum you'd need the ISA card, a Win 95/98 box you could plug the card into and a VHS tape player.

        I removed my LS-120 drive a few years ago for reasons I can't remember. Probably either the drive died or they stopped selling LS-120 disks.

        • by mmcxii ( 1707574 )
          You can still get the disks and you can still get the drives if you really wanted to. The OP was incorrect... this isn't a hard dig at all. I could have a drive and the media for it before the weekend if I really wanted it.
          • You want a toe? I can get you a toe, believe me. Hell, I can get you a toe by 3 o'clock this afternoon... with nail polish.

            Sorry. Had to. :)

      • You might have better luck finding an IDE Sparq and using that. Even if you don't have IDE ports in your PC, a working PC that does can be found anywhere, probably for free.
      • Could be worse, how about 1.6MB GCR formatted 3.5" HD floppies? Applied Engineering made such a drive for the Apple IIgs. It didn't require any controllers since it used the onboard IWM chip. Instead of the 800k DSDD disks it normally uses, the AE drive also wrote 1600k DSHD disks using GCR. Neat trick, but a nightmare for data recovery, although Tony Diaz (in the linked pictures and who provided a lot of Apple II hardware for this task) should have a few of the drives and the GS/OS driver.
    • Re: (Score:2, Funny)

      by Anonymous Coward

      I hollowed out my LS120 and taped the drive door to the back of the front faceplate. That way I could put a small tray inside the hollow box, pop the front off, and slide it in or out concealing the goods.

      I hid my pot in there from my dad. I'd just pop the front plate off, slide out my plastic tray, smoke, and put it all back. It sat right on my desk in my room and due to said uselessness it was the only device my parents or siblings would never touch or even bother to slide a disk in. Good thing they didn'

    • hmmm...

      Easy dig: 3.5" floppy
      Easy dig: 5.25" floppy (though the controller might be a problem since I have an ISA card for it and no motherboard with an ISA slot - that said I do have a Commodore CP/M external drive as well)
      Easy dig: 3" floppy (take your pick: I have a Sinclair +3, access to a still functioning Amstrad CPW6128, and a custom wired bare drive to RS232 serial interface)
      Easy dig: DC300 tape
      Easy dig: HP Colorado 8 DAT (one internal with PCI controller card and one external SCSI)
      Easy dig: LS120 (h

      • Wouldn't you lose high frequencies by running the tape at much higher speeds than it was recorded at (unless the heads are very, very, very sensitive)?

        • I understand the electronic heads are more sensitive to high frequencies than your ears are.
        • apparently not, the IDE model can always stream data faster than it can run the tape. That said, I've always been a fan of the XDR Soundburst - where a climbing tone at the beginning of each side is used to gauge the quality of the tape. If any part of the XDR tone drops... let's just say, I don't have many IEC Type I tapes. They're all Type II (CrO2) or Type IV (Metal). And yes, the heads are designed to be very responsive and very sensitive for the tape to stream that fast. My only real concern is the num

      • by AK Marc ( 707885 )
        I had an RLL HD from my XT long after the XT was discarded, and if I still had it, I'd have no idea how to get it spun up in a modern computer. My 5+ year old computer doesn't even have an ISA expansion slot for a controller.
    • Impossible dig: QicEXtra tapes from sometime around 1995. For those who don't remember them, they were tapes that were supposedly compatible with Qic40/80 drives, but were roughly 3X as deep (with 2/3 the tape cartridge hanging out of the drive).

      Seriously. Those damn tapes were "write-only roach-motel media" -- bits got in, and never got out. :-(

  • by Fned ( 43219 ) on Tuesday April 17, 2012 @04:36PM (#39716339) Journal

    Prince of Persia [imdb.com]

    Source Code [imdb.com] ... but I can't quite put my finger on it.

  • by Xtifr ( 1323 ) on Tuesday April 17, 2012 @04:50PM (#39716535) Homepage

    Damn, my brother just finally got rid of his Apple ][+ last year, or we could have given this a try. :)

    • Re: (Score:3, Informative)

      by Thuktun ( 221615 )

      hint [lmgtfy.com]

      • by Xtifr ( 1323 )

        Sorry, nowhere near as much fun! :p ;)

        (Plus, he actually had things like the high-quality professional assembler you'd need to build this. I seriously doubt that the built-in ROM assembler is up to the task.)

  • by oldhack ( 1037484 ) on Tuesday April 17, 2012 @05:08PM (#39716769)
    I don't do this often, but massive props to the slashdot web monkeys - that story icon is just awesome. Actually, your whole last site overhaul is pretty neat.
    • While I'm at it, I also like how this "lamer" dude is selecting/summarizing stories, unlike that troll clown samzenpus. :-)
  • jsr setback ;draw on bg plane

    Were there snakes on this plane?

  • by Anonymous Coward

    Never thought I'd see an actual game programmed in assembly.

    • What has also amazed me that something as modern as the original Rollercoaster Tycoon is programmed using assembly (with some higher level DirectX glue). Would be interesting to see the source.
  • by flimflammer ( 956759 ) on Tuesday April 17, 2012 @05:59PM (#39717397)

    His journal is certainly an interesting read as well as the source. Shame it costs money for the whole thing, but I'm interested enough that I think I'll pick it up.

  • Wait... a copy party? So they did copy that floppy? Oh dear...

  • by Machtyn ( 759119 ) on Tuesday April 17, 2012 @09:51PM (#39719075) Homepage Journal
    Hmm, if I can figure out how to compile the thing for a modern x86, I'd take that darn 60 minute time limit off... or at least increase it to 90 minutes and finally finish the darn game. Twice I got to the second to last level, once looking at the doorway, when time ran out.
    • You can modify your savegame in a hex editor and increase the time.
  • Took a glance at the code. Boy am I glad the days of assembler are over. Probably was fun to hand craft this super fast code, but I'd be surprised if anyone can be bothered figuring it out now.

    • by Desler ( 1608317 )

      It's days aren't over. It's still used for SIMD optimization in game engnes, video/audio/image codecs, embedded work, etc. just because your janky LOB or bloated Java 'enterprise' apps don't use it doesn't mean it's over.

      • Indeed. And it's definitely not true that compilers always do a better job of optimizing than humans. Compilers are much better than they used to be, but for certain specific routines they still can't beat an expert Assembly programmer who can try out several strategies in a flexible optimize-benchmark-optimize feedback loop that compilers aren't able to do.

  • Awesome read! At the JANUARY 29, 1987, entry,

    "Roland is a hacker of the old school. He’s polite and unprepossessing in his dress and demeanor, careful about money and contracts. He drives a Saab with license plate SNABBIL."

    That plate text translates to FAST CAR in Swedish... doubt if he knew... since he didn't comment on it ;)
  • I have a collection of 5-1/4" floppies that I've partially archived using an old PC. But I would rally love to use a 5-1/4" USB floppy drive to complete the process. So far I haven't come across anything - not even hints on converting a USB 3-1/2" if it's possible. Any suggestions?

Avoid strange women and temporary variables.

Working...