(Back) into The Valley
Remembering a BASIC coding classic from 1982
Forgotten Tech I first explored The Valley late in 1982. My method of entry: a Research Machines 380Z. I loved it and didn't want to leave.
But the school lunch period ended at 1.30 and the computer room was locked then, so I had to wait a day or two until I could get time on the RM again.
The Valley had been hacked onto the 380Z by a guy called Roy Walker. In a rare moment of schoolboy honesty, he admitted he'd keyed it in from a listing in a magazine. The publication was Computing Today, which had run an article - bylined only 'HB' and 'RM' - in April that year centred on a modular sword-and-sorcery "real-time adventure with graphics" designed to not only be entertaining to play but also to be used as a programming teaching aid.
"The published listing was developed and tested on a 32K Commodore Pet but will, if all non-essential spaces and REMs are removed, run in 16K," the authors promised.
"The best way to implement the program on your system is to key it in one module at a time following the notes," we were advised. "As each block is completed, SAVE it on tape before adding the next; 16K is a lot of program to lose if you make a mistake!"
Hard drive users - they don't know they're born...
CT published follow-up articles during the following months, mostly centred on adapting the code for other machines. The May 1982 issue, for example, featured writer Peter Green detailing a TRS-80 version. In the August 1982 number, Andrew Bain offered notes on coding The Valley for the Sharp MZ-80K. A year after the initial listing, readers' additions - extra spells and conversion hints - were being published en masse.
The original Valley was written for the Commodore Pet, but Roy had tweaked it into RM's dialect of Basic. I asked if I could borrow the listing to recode it for Microsoft Colour Basic - what my Dragon 32 used - but Roy told me to piss off.
A friend, Iain, was more lucky. He too had a Dragon and, after he'd borrowed the listing from Roy for an evening or two, I had a photocopy of the Pet code. Iain was no coder, but he knew I was and wanted to play the game on his own machine, so it made sense for him to get me the listing.
I can't recall how long the conversion took. Not long, I think. The hard bit was working out what the addresses that codes were Poke'd into the Pet's memory map represented. I made some guesses and seemed to get it right.
Old style programming: not a hint of procedures, GOTO commands taking you hither and yon, no variable declarations - and line numbers to boot. Ah, those were the days...
We all had a lot of fun, tweaking the code to cheat and just playing the game the proper way.
What are you... Barbarian or Wizard?
Time went by and other kids moved on to different, more visually exciting games, but I always kept the Boots C15 cassette I kept The Valley on near to hand. Dragon games were more expensive and less exciting than their Spectrum equivalents, so I didn't have a lot else to play. Only Ken Kalish's Doom-before-its time Phantom Slayer got as much screen time.
But The Valley got me really programming. A Frogger clone came first, with 6809 machine code routines Poke'd into place to handle the side-scrolling logs and lorries.
Screen magic: text-as-graphics in glorious monochrome
And I carried on playing it. Until A levels took up almost all of my free time. Then University.
Computing Today was long gone, but I never stopped thinking about The Valley. It never ocurred to me not to hack into the Amstrad PCW 8256 I bought up to type up my third-year Physics project.
I came back to The Valley many years later only to find that old Boots C15 tape was long lost - though I still have the Dragon 32, Phantom Slayer, a fiendish Donkey Kong clone and a few other titles, all of which still load and run. I occasionally get it out for my son, who's young enough still not to dismiss the ancient four-colour blocky graphics out of hand.
IT professionals, take up your swords...
I pondered coding it up for Mac OS X, but without the listing I'd not only be re-inventing the wheel but producing a hybrid of recollection and guesswork. It would be a Valley, but not the Valley.
Since I couldn't remember the name of the publication The Valley first appeared in, Google proved unhelpful.
Until a couple of weeks ago, when I came across Fraser Charlton's Valley memorial page, complete with a version written in BBC Basic, a Windows runtime of BBC port, and some scans of the original pages - it's where I got the pictures from for this article.
Fraser's now a Consultant Pathologist at the Royal Victoria Infirmary, Newcastle Upon Tyne, but he still remembers The Valley fondly. I do too, and I suspect we're not alone.
Right, last one to Vounim's Lair is a wuss... ®
I'd like to thank Fraser for not only posting the sample scans and BBC Basic code, but also agreeing to my cheeky request to scan in the entire listing.