Journal
This week I received a rectangular anachronism through the post. I had suddenly remembered about the very first programming book that I had ever seen, the catchily-titled The Times Book of Computer Puzzles and Games, and had gone on a search online for it a couple of weeks ago. I was surprised to find the 26 year old book still available, and now that it's arrived, equally surprised that it's in such good-as-new condition. It's a collection of program listings for little Commodore 64 games that were sent in to the Times, aimed at computer hobbyists who might want to try them and pull them around - an open source X-Box Live Arcade of the 80s. Of course, it arrived with the notable lack of the accompanying tape (though now that I come to think of it, I'm not sure what I expected to be able to do with that these days) so I was going to have to put some effort in myself to bring these things back to the world.

After looking at the first few fragments of Commodore BASIC, my initial overwhelming feelings of nostalgia were quickly replaced with wondering how on earth people used to seriously program with this. The C++ family, so incomprehensible to people who look at it for the first time, seems beginner-oriented compared to having to POKE seemingly random collections of numbers into memory, keeping track of variables with names like ZC$ with no concept of scope. And when a program begins (as one does) with "GOTO 10051" followed by "GOTO 204", you know it's not going to be easy to follow the program flow.

To avoid all this, I had hoped to take advantage of some modern inventions that would save me from the traditional method of clunking through thousands of lines on the Commodore's tank-like keyboard, but the first attempts at OCR on the book's tiny 80s typeface came up with this masterpiece:

1 OTH OHUNTING 10iO RESTORE
? RIH OOPYRIGHT J. R. JOOKSOO
5 OOTO IGOS1: REM GETOP 1OEO E$=“
K9? GOTO QO4 ” l
BOO X3=G(ZP+481 1025 LET H$=“ ABCOEFGHIJK ”: LET IS
?O1 X4¤INT£X3{25b1: X3=X3·256*X4: PO =" OBOOEFGHTJK “
EO4 REO EMO OF NOTE SOBROOTINE 3
1GGG RER SHOOTING
1005 REM ? J. R. JOEKSON
100? OIR X${501: DIM PANTS OF 112O DATO 255,56,36.255,255,255,0,0


So I took that as a message that I was going to be typing these in by hand. Fortunately, some wonderful person has developed an actual Windows IDE for the Commodore 64, so that you don't have to use the actual machine's more... eccentric layout, and (for example) have to remember that "Inverted heart, inverted pi, four inverted Qs" means "Clear the screen and get ready to type somewhere". After about forty lines even in that, I was beginning to appreciate how little I actually missed the program distribution method of typing in twelve columns of code character by character, knowing that you don't have a debugging method if a single character is wrong, and armed this time with the author's name, successfully found tape images of some of the individual programs, including the one I was attempting (but I'll have to provide most of them myself).

SHUNTING, then (and neither OHUNTING nor SHOOTING - or to give it its full imaginative title, "Train Shunting Puzzle"), is a Laytonesque little conundrum set by the Reverend J. R. Jackson. In it, you start with a train in the siding, some carriages in the depot and some trucks in the station, and because British Rail only has one train capable of movement at any one time, it's up to you to trundle around connecting and disconnecting the carriages with the aim of swapping the trucks and carriages round and leaving the train back where it started. Just to top it all off, the right side of the screen is taken up by a tunnel which only the train can enter, for reasons that are left unexplained.

And I'm proud to say that - after setting the emulator speed up to five times normal to prevent being driven mad by the little animation every time a move was made - I successfully did it, in only about double the moves he expected me to. I'm not entirely sure how I did it, either, I just seemed to rely on luck - but solving it at all is good enough for me by this point, seeing as if we measure from the first time I ever saw it, it took me roughly twenty-one years.

2010-08-28 09:20:00