Recovering the code of Prince of Persia

March 29th, 2012 10:18 PM
by
Filed under History, Mainstream coverage;
3 comments.

Jordan Mechner, rockstar programmer responsible for Prince of Persia and Karateka and keynote speaker of next week's PAX East convention, published a comprehensive journal of the making of Prince of Persia. In the book and on Mechner's Web site are notes, sketches, concept art, demo videos, and more. The wealth of information he preserved from decades ago.

Yet for all that time, there was one vital piece of data he was missing: the original source code. Whether it had been overwritten, lent or donated, mistakenly or purposely trashed, or simply lost remained unknown to Mechner, despite his best efforts.

This week, that long-lost treasure fell in his lap when his father mailed him a box of assorted unidentified floppies. Contained therein was Prince of Persia in its rawest form.

It never occurred to me that Mechner didn't already have PoP's source code. Given that PoP has appeared on platforms as recent as the Xbox 360, I wonder what version or fork they were basing that port on. It makes even more recent independent ports all the more impressive.

Source Code

Jake Gyllenhaal followed his role as Mechner's Prince of Persia
with the lead in
Source Code... coincidence?!

Mechner's next task is to verify the integrity of the floppies and migrate the data off them. New hardware like the FC5025 and Kyroflux are miracle workers in our ability to access vintage media via a modern operating system, but the fact remains that the floppy disk is a magnetic medium whose charge is dying. I started (but did not finish) my own floppy migration two years ago. It's easy to dismiss it as a low-priority project compared to ongoing and more demanding tasks, but it will be all too soon that I'll have put it off too long.

Once the code is recovered, I wonder what Mechner will do with it? It's still copyrighted material, so will he continue to keep it a secret — or will he publish it under Creative Commons, allowing a variety of variations and ports?

All this reminds me: David X. Cohen, co-creator of the television show Futurama, reported almost five years ago that he too had programmed an Apple II game that needed rescuing from floppies. I wonder what ever came of that?

UPDATE (Mar 30): Jason Scott tells me, "You'll be delighted to know I am leading this expedition."

(Hat tip to Sean Fahey)

Battle of the 'bots

February 9th, 2012 1:45 PM
by
Filed under Happenings, Software showcase;
1 comment.

As I've discussed in Open Apple but not previously on Apple II Bits, you absolutely must check out Jimmy Maher's blog, The Digital Antiquarian. His exhaustive, academic, focused writings on the Apple II and aspects of its history and games (specifically what he refers to a "ludic narratives") are fun and informative reads worth making the time for.

His travels through Apple's history have most recently taken him to the works of Silas Warner, best known for the seminal stealth game Castle Wolfenstein but also developer of RobotWar, published by MUSE Software in 1981. True to its PLATO (Programmed Logic for Automated Teaching Operations) origins, the game served as an instructional tool for teaching programming, challenging users to create routines that describe the behavior of a combative robot. As Maher describes:

You don’t get to design your robot in the physical sense; each is identical in size, in the damage it can absorb, in acceleration and braking, and in having a single rotable radar dish it can use to “see” and a single rotatable gun it can use to shoot. The programming language you work with is extremely primitive even by the standard of BASIC, with just a bare few commands. Actual operation of the robot is accomplished by reading from and writing to a handful of registers. That can seem an odd way to program today — it took me a while to wrap my mind around it again after spending recent months up to my eyebrows in Java — but in 1981, when much microcomputer programming involved PEEKing and POKEing memory locations and hardware registers directly, it probably felt more immediately familiar.

Two to five players would then enter their routines into an arena, and may the strongest robot win!

Terminator T-800 vs Robocop

Inspired by the RobotWar competitions Computer Gaming World once hosted, Maher is looking to resurrect these epic duels with a contest of his own. One cool feature not possible at the time of RobotWar's debut: Maher will do a screencast of each battle and upload the video recording, so that players can not just know the outcome but watch how it came to be. Contestants can tweak their winning 'bots between battles, evolving them to face ever stiffer competition. Grand prizes await the mightiest mech.

This sounds like great fun, in the tradition of HackFest and RetroChallenge. I applaud Maher for actively supporting and even expanding the Apple II community, and I encourage anyone reading this to consider entering the contest.

One shall stand… and one shall fall!

A new generation of programmer

September 19th, 2011 1:30 PM
by
Filed under Mainstream coverage;
1 comment.

The first in a new Cult of Mac series makes the title, "Me and My Mac", a bit of a misnomer. Their featured Apple user is Lim Xin Mei, who's learning to program Applesoft BASIC on the Apple IIGS. The six-year-old is dubbed "the world's youngest programmer", which may be familiar to retrocomputing enthusiasts: it was just a few years ago that her brother had a similar title.

"I have always wanted to teach my son [Lim Ding Wen] programming when he was a kid," wrote his father, Lim Thye Chean, in 2008. "When he was only 2 years old, he had already know how to insert a disk and boot up a computer, then used the mouse to find the program he wanted, double clicked to run it and have fun. He asked how to write a game when he was in primary one (7 years old), and I promised to teach him programming if he had done well in school, and he did."

Ding Wen and Xin Mei used to appear in a YouTube video series called The Apple IIGS Show, episodes of which are still available online.

Knowing that there are children being raised to be not just computer literate but technically proficient is a refreshing change from Canadian youth who couldn't identify a floppy disk.

How would you ensure your progeny becomes the next generation of Apple II user?

A world without BASIC

June 27th, 2011 10:16 AM
by
Filed under Musings, Software showcase;
6 comments.

The computers that Apple II users grew up with were nowhere near as user-friendly as today's machines. They had unintuitive interfaces, inscrutable error messages, and limited capabilities.

But those same limitations also made them an excellent tool for learning such important concepts as problem-solving, game design, and especially programming.

The Apple II was especially practical for that last function, as it came with BASIC in ROM. Without any other software, a user could turn on her machine and start building a virtual world of her own design. The lack of advanced features meant that the user was playing in a sandbox of conceivable limits yet infinite possibilities.

Yet by 1997, when I started college as a computer science major, I was getting laughed out of the classroom by using BASIC where other students were relying on Java and C++, as I related in Juiced.GS. Today, BASIC is almost nowhere to be found, as detailed in the leading item on Computerworld.com last Thursday "How are students learning programming in a post-Basic world?"

The story is an interesting look at the variety of languages with which to introduce modern students to programming. For some parents and teachers, the old methods work best; "My son's math textbooks contained exercises in Basic, but we could not do the problems until we bought an old Commodore 64 online," said David Brin, author of "Why Johnny Can't Code". Others prefer more popular scripting languages, such as Python; still others use a language designed more for educational than practical use, such as MIT's Scratch, the language of choice of the computer science teacher where I used to teach. She's offering a camp this summer to introduce 13- and 14-year-olds to programming, using a different format from last year's camp: "I changed the language from Alice to Scratch. Alice was too glitchy for me. Scratch is easy to pick up, and hopefully will be fun for middle schoolers."

But none of these languages will offer the same experience as learning BASIC. Author Lamont Wood had once dabbled in BASIC programming but had fallen out of practice until his recent experiment with Python:

The thrill was not the same as in 1979; it hadn't taken months to get the hardware to work, and it sure ran quieter … with Basic, I felt like I was rummaging through a small box containing a few crude tools. With Python, I felt I had pushed open the door to a massive but unlit tool warehouse and was darting in to grab the few that I could see.

I learned BASIC by doing: I was running a Warp Six BBS and needed to make modifications. Eventually, I was inspired to write my own door game, though since it was a port, I had to concern myself only with the coding, not the design. In either case, I always had either the code or design to work with; I never had to conceive and build entirely from scratch (no pun intended).

My challenge in adapting those BASIC programming skills to a modern environment is not so much choosing a language as it is choosing an instruction method. Just as I learned BASIC to run a BBS, I've set a goal of learning PHP to help me run WordPress, a modern equivalent of an online community. But elementary concepts such as functions and arrays seem more confusing than they did twenty years ago.

What's the best computer and language to teach programming — and where does one go from there?

RetroChallenge Winter Warmup commences

January 6th, 2011 9:57 AM
by
Filed under Happenings;
no comments yet.

One of my favorite KansasFest activities is the HackFest, which challenges KFest attendees to write the coolest Apple II program possible within the time constraints of the convention. My programming skills are meager, I found that creativity counted for more than technical accomplishment. I used Applesoft, GSoft, or Spectrum scripting to place in many consecutive competitions, until finally my I tapped dry my well of ideas and switched over to the judging panel.

HackFest continues to be a popular feature of KansasFest, though some have called for it to be less stringent in its rules. "Why should someone have to be at KansasFest to compete in HackFest?" I've been asked. Partly it's for the contestants' benefit: the synergy and inspiration abound at KFest, with contestants often working alongside each other, advising them on particular programming challenges. Such was the case with my own now-infamous Maxster, which I believe placed second to my roommate Geoff Weiss's Taipan script.

Nonetheless, it remains true that, although everyone should attend KansasFest, not everyone can. For them, there is an alternative: the RetroChallenge. This competition is held every summer and is not restricted to the Apple II. RetroChallenge occasionally is held in the winter as well, to keep everyone's programming skills current. Courtesy volunteer urbancamo (filling in for traditional host Simon Williams), the RetroChallenge 2011 Winter Warmup is now underway. From the event's Web site:

In a nutshell, the RetroChallenge is a loosely disorganised gathering of RetroComputing enthusiasts who collectively do stuff with old computers for a month.

The event is very much open to interpretation: individuals set [their] own challenges, which can range from programming to multimedia work; hardware restoration to exploring legacy networking — or just plain [messing] around. It really doesn't matter what you do, just so long as you do it.

While the RetroChallenge has its competitive side, it's not really a contest — it's more like global thermonuclear war: everyone can play, but no [one person] really wins.

Come on — give it a go!

The rules aren't quite as stringent as HackFest's and permit the use of any 20th-century pre-Pentium computer, including game consoles and PDAs. Check out the event's discussion forum and Twitter feed for more details.

I won't be able to participate this year, focused as I am on retrocomputing multimedia projects that require no programming — but I encourage all programmers, both budding and veteran, to get out there and represent the Apple II!

Teaching retroprogramming

September 13th, 2010 9:09 AM
by
Filed under Mainstream coverage, Musings;
3 comments.

The annual Beloit College Mindset List, which outlines the world in which the incoming class of college freshman grew up, indicates that for members of the class of 2014, "The first home computer they probably touched was an Apple II or Mac II; they are now in a museum."

Fortunately, for students in Bletchley, Milton Keynes, England, their experience with retrocomputers is more recent — and eminently practical. BBC News reports:

As a former teacher, I can fully get behind this classroom curriculum. It wasn't long ago that I suggested a lab of Apple II computers could be an effective and modern learning tool. Although the computers featured in this video are not Woz's brainchild, they are its contemporaries and teach many of the same lessons my proposed lab would. As one student said, "The old machines have a lot to teach us. They run a lot slower, and you can actually see the instructions executing in real-time."

What I hope the students learn is how to make the most of limited hardware and software resources, though this quotation makes me wonder if they missed that point: "It makes you a lot more efficient, and you think more about your code, because it's harder to type it all in." Although the arduousness of input can indeed be a powerful motivator against error, I don't think it's a programming environment that one need tolerate on even a classic computer. The Apple II worked around this limitation with Beagle Bros' excellent Program Writer for Applesoft BASIC. Such utilities don't encourage sloppy programming but instead improve the rate at which you can learn from your mistakes, whereas modern machines and their gluttonous resources permit sloppy programming that would never fly on a computer whose memory is measured in kilobytes.

This classroom's demographic reminds me of the demoparty I attended this summer, where most attendees were younger than the computers they were hacking. KansasFest likewise has an increasingly youthful attendance, with Apple II users still in or recently out of undergraduate programs. This next generation of retrocomputing enthusiasts has great potential to apply modern programming techniques and structure to classic design. For example, put these students into a limited-time programming contest, and you'd have HackFest. I wonder how they would fare?

I couldn't help but take umbrage when the reporter says that the student's work almost looks like a "real video game". Of course it's a real video game! Software doesn't need rockstar programmers or cutting-edge technology. The original versions of Lode Runner and Oregon Trail have more staying power than any jazzed-up modern adaptations. I wouldn't be surprised if these kids are the next programmers to recapture the fun and wonder of these classic games.

Because BBC is awesome, their story also has one of their own news reports from Oct. 17, 1986, that showcases the computers of the day, including the Apple IIGS. That video is not embeddable, so I encourage you to watch it on their site.

(Hat tip to Slashdot and Mitch Wagner)