Original Prince Of Persia Game Source Code Released

The game that launched a multi-billion dollar franchise is now laid bare for your hacking pleasure. [Jordan Mechner] just posted the once-lost source code for Prince of Persia. This game was ground-breaking for its use of rotoscoping to mimic the movements of an actor (in this case it was his younger brother). Oh, and it’s a ton of fun to play.

This comes at an appropriate time since yesterday was the the 35th anniversary of the Apple II release. PoP was written for that platform but should be easy to get running on an emulator if you’re just interested in cloning the repository so that you can play it through once again. Interestingly enough, the source code went missing for many years. [Jordan’s] been looking for the original source code for a decade. Turns out his Dad came across a cardboard box with some original copies of the game in it and shipped it off for [Jordan] to take care of. Inside was a set of 3.5″ disks that are pure retro gold.

So here’s your chance to inject yourself into the game. The question is, will you be the Prince or will you be Jaffar?

Ammo Tin ][

Ammo crate PCs have been around since Unreal Tournament LAN parties, but this one goes further back than that; [Simon] put an Apple II in an ammo crate. It’s a fitting anachronistic build from the same guy that built the TARDIS MAME cabinet.

Thankfully, [Simon] didn’t tear apart an Apple IIc for this build. A bare-bones Celeron motherboard was acquired for this project to run the AppleWin emulator. Instead of shoving all the parts into the box and calling it a day, [Simon] did it right and fabricated a very nice frame for the computer. With a wimpy CPU and no expansion cards, the Ammo Tin ][  can run very cool without drawing a lot of power.

We really have to hand it to [Simon] for this build. The metal work on this build looks great (it should for someone who is rebuilding an Austin 7), and we’ve got to respect the love for the Apple II. Now all that’s needed is a real Apple II keyboard on that USB port.

Apple ][ Converted Into USB Keyboard

Sometimes it’s apparent that there is no practical use for something featured on Hack a Day, but we don’t know if [Andrew Filer]’s Apple ][ USB keyboard qualifies for this.

After reading through the very thorough documentation available in electronic and dead tree formats, [Andrew] decided that Apple ][ would make a great USB keyboard. Unlike modern keyboards, vintage computers like the TRS-80, Commodore 64, and the Apple ][ return the 7-bit ASCII value of the key instead of a scan code. The ASCII codes generated by the keyboard were sent through a Teensyduino running [Andrew]’s keyduino sketch.

Modern PS/2 keyboards use MAKE and BREAK scan codes sent from a microcontroller that reads the keyboard matrix. For example the MAKE code for the letter ‘A’ is 1C, while the BREAK code is F0 1C. There is a reason for this design, but for the DIYer, interfacing a keyboard becomes a challenge without a separate microcontroller. We’re thinking [Andrew]’s keyduino could be a great way to put a keyboard in a project, but we’re not about to tear up our Apples and C64s to get a keyboard.

Apple II Weather Display (part 3)

In parts 1 and 2, I discussed the important parts of what is going on the PC side with lua. While not 110% detailed I hope it gave you an idea on how the data is processed so the Apple II computer could quickly digest it. Now its time to see what happens at the other end of the serial cable. I am using basic, but its not 100% off the rom Applesoft basic, that would be even slower, so I am using a compiler and a fast graphics driver. Both are from “The Beagle Compiler” which was produced by the ever awesome Beagle Bro’s software company, and though still under copyright, the publishers have given permission for use of their software (within reason I don’t think you will get very far selling it).

Continue reading “Apple II Weather Display (part 3)”

Apple II Weather Display (part 2)

In part one of the Apple II weather display I quickly went over how data is fetched and phrased. Now its time to do something with it in part 2. In the order of functions I do the text parts first, and though its very similar to the process that the radar image goes through, its in monochrome and a bit simpler to explain. Before I go into how it works I should explain how I am dividing the Apple II’s screen.

Continue reading “Apple II Weather Display (part 2)”

Apple II Weather Display (part 1)

Due to computer issues I had to rob some parts from my “electronics” computer, which wasn’t bad, since I was not working on anything at the time and I felt a software project itch. I also wanted to do something with my Apple //c, which resides on my computer desk, so this ghetto brute force “solution” to use the 25 year old computer as a weather display came about.

In a nutshell there is the Apple II, a serial cable, and a PC running linux mint 10 and a handful of command line utilities. My specific Apple is the fist revision of the //c which means its got a buggy rom and the serial port(s) can be troublesome, the best speed I was able to get was 600 baud with just basic, though every other model could probably go a little faster.

On the linux side, wget downloads html and the radar image from Weather Underground’s mobile site, which is not a perfect source, but its easy. A lua script phrases text and graphics into string patterns that the Apple II can handle as keyboard input, and its sent down a serial cable where it is drawn on screen in basic.

Yea its pretty darn slow … it typically takes about eight to twelve minutes to redraw the screen, which is not all that horrid (imo) considering what is going on, but anyone with a more serious take on this could find numerous ways to optimize it, I just wanted to see what it would look like.

Join us after the break for a short video and to read all the details about how this all works!

Continue reading “Apple II Weather Display (part 1)”

Make An Arduino Talk To You

arduino_speech_synthesis

One of the highlights from the Music Hack Day in Berlin was the Arduino singing “Daisy Bell”. If you don’t know, this is an homage to the HAL 9000 in the movie 2001: A Space Odyssey; an artificial intelligence that was taught the song in its first steps toward self awareness culminating in an attempt to kill its masters.

It’s unlikely an Arduino will every make it to the point of attempted homicide but with the available code you can find out. Sample code and an explanation of human synthesis is now available through the Cantarino project. The project facilitates the use of phonemes from the SAM Apple II synthesizer to build wave forms that make up recognizable speech on the Arduino platform. The code illustrates how to select and link together speech sounds from the library. Check out the video after the break and then get to work on your own speech synthesis. We’re waiting for someone to put together the theme song from the 1980’s Transformers cartoon. Good luck! Continue reading “Make An Arduino Talk To You”