Tuesday, August 25, 2015

Elevator Music


Finally we come to a real program. It's a puzzle game for one and I got it from Games Magazine and game designer Sid Sackson. I adapted it to fit the conceit I had developed over the months that LOADSTAR was a towering building in Shreveport LA that grew one story each month and was now up to 81 stories. The story was that Knees Calhoon, my evil clone, was constantly trying to take the Tower away from me.

The puzzle is an excellent one and not easily solveable. The rules are simple and probably a lot of the Read It is unnecessary. 

  Knees Calhoon. The name rolls trippingly off the tongue like a bowling ball off a stepladder. Invariably it’s followed by a scream as if the ball had landed upon a unshod metatarsal — at least around here at the Tower — for Knees Calhoon, my semi-mythical antagonist, has locked me out of my penthouse suite, reprogrammed the Tower’s elevator system, and now threatens to turn LOADSTAR into a professional wrestling magazine.

I knew I should have called up the LOADSTAR SWAT team before opening my door last week. If you remember, Calhoon, who may or may not be a time-travelling plagiarist, brought me a couple of Jukeboxes (see the Read It for 1890’s JUKEBOX III on Side 3), and passed himself off as a friend of LOADSTAR. But I sensed that I didn’t have to go as far as Denmark to find something rotten, and when he swooped into my office that night, throwing me down the elevator shaft, I knew that Nostrodamus’ infamous ‘lost’ quatrain had come true.

When the Weasel takes the Tower
 In the Year the Bush gets Burned
The Quail will run for Cover
 And the Ladders will be Spurned.

It doesn’t take an atomic cosmetologist to see that Calhoon is the Weasel and the Ladders are the elevators of the LOADSTAR Tower, which Calhoon has sabotaged so that I can’t get back into the penthouse. I’m not sure who else is referred to in the quatrain, but it’s probably nobody important.
The good news, dear LOADSTARites, is that I think I’ve devised a way that, with your help, Calhoon can be rousted for good from the Tower. I used all of my electronic and computing skills to figure out what he had done to the elevator system and came up with this program, ELEVATOR MUSIC. What we need to do is fill the sixteen elevators with SWAT teamsters and get them all up to the top four floors of the Tower at one time. Right now the sixteen elevators are on the bottom floors.
The catch is that there are three ‘rules’ we have to follow in moving the elevators.

(1) An elevator can only be moved up a certain number of floors at a time. This number is exactly the number of elevators that occupy the floor it’s currently on. If there are three elevators on a floor, then any one of the elevators can move up three, and only three, floors.

(2) There are four different colors of elevators, and four of each color. You CANNOT have two elevators of the same color on the same floor.

(3) If an elevator is on a floor by itself, it can only move if it is NOT the highest elevator of its color.

You will notice that elevators are in four columns and can jump ‘over’ other elevators. Like I said, Calhoon really sabotaged the system. Each column has one of each color in it. There is no way for elevators to change columns. You have to leapfrog them up to the top of the Tower, following the three rules. It doesn’t make any difference what order they’re in on the top four floors.
I’ve made the program error-proof (famous last words) so that you can’t break the rules. As you move the white cursor around with the CRSR keys, any legal move will be shown to you by a colored ‘phantom’ cursor in a higher story. The choice you have to make is which elevator to move when. Since there are four elevators on each floor to begin with, any of the elevators can be moved up four floors.
Two elevators cannot occupy the same column and floor at the same time, obviously.
Oh yeah. I forgot about the most despicable thing Calhoon has done. He’s spliced together enough Muzak (r) to turn Lawrence Welk punk and is piping it into the elevator shafts at heavy metal volume. I had to suffer through three solid days of it while devising the program but luckily for you I’ve added a feature that allows you to toggle the schmaltz on and off. Just press S.
There are a few more features I’ve added. If you find you don’t have any more moves left and you’re stuck on some lower floors, you can press F1 and try again from scratch. This is often the best thing to do.
If you make a bonehead move and realize it right away, you can take your move back by pressing F3. Only one move at a time is allowed to be taken back.
F5 will show you the current LOADSTAR SWAT Teamsters, mighty heroes who have gotten all sixteen elevators up to the top four floors. If you can do it, you can add your name to this illustrious list. Thirty is the maximum number of Teamsters allowed. If you want to clear the list, just scratch the file “swat team”.
Press H to see a shorthand version of the rules, or F to switch to the standard font.
At the bottom of the screen at the right the number of the top floors to be retaken is shown. Each elevator you move to one of the top four floors increases this number by .25, so you will need a total of 4 to win.
It’s not important how many moves it takes you to get the top four floors taken, but the program counts your moves anyway. Rousting Calhoon is all that really matters.
All of the keypresses are listed on the screen so you needn’t remember all this. Save your mental energy for the task ahead of you. There are many, many different ways to do it so I haven’t added a ‘solution’ key. I think that it’s a good idea to concentrate on the top floor first, then the floor below that. If you can get those two completely filled, the lowest two floors will be easy.
I never realized how cold it is down here on the lower floors. Now I know how Leona and the Donald felt. Please help me regain my rightful place in the penthouse. Anyone sending me a videotape (VHS only) showing a successful game from start to finish will receive an autographed cassette tape of THE DOGGEREL DAYS OF KNEES CALHOON. Calhoon may be another Hitler, but the guy sure did record some nifty original tunes back in the 60’s and 70’s. If you balk at wasting a whole videotape for a short game sequence, feel free to fill up the tape with any post-1980 movie rated PG-13 or above.
Another way to get Calhoon’s tape is to be one of the first ten LOADSTARites to send me a list of the song titles of all twenty of the songs, in order.
DISCLAIMER: How many times have I harped about copyright infringement against living, breathing and suing songwriters, and here I go putting twenty tunes in one program! Well, my defense is that three measures do not a lawsuit make. Sure, you can get a Knees Calhoon tape by “naming the tunes” but I’ll risk contempt of court charges by denying that the ugliness passed off as music is anything but random fiddling by a demented SONGSMITHer.

Back to 2015. As I remember no one bothered to take the challenge and name the songs. They were all old standards from the 60s and 70s.

Tomorrow is another music program, but without the nifty puzzle. LOADSTAR needed a generic music player and MUSIC STAR was what I came up with.


Monday, August 24, 2015

Route 66

I was still learning my chops with LOADSTAR #80 and this time it was music. The Commodore 64 had a synthesizer chip, called the SID chip, that was quite a bit better than any other music chip around in the 80s and 90s. With headphones a real C-64 sounded great and we had background music for all of our "presenters", as we called our main LOADSTAR menu program. If you've been downloading and running the .d81 files you've heard some of this music and it probably sounded pretty bad. SID music on a true C-64 had a beautiful, full sound. But the same music, on a PC in an emulator, sounds terrible. I can't recommend listening to SID music through an emulator. But I do have some Commodore-64 music I think you'll like.

This is another simple program but it has graphics, music, and some animation so it shows BASIC programmers how to put all those together in the 64K we have. So the Read It gets a little technical. There are two .d81 files to download because I re-did the program on LOADSTAR #182. It's sort of a sequel.


Once upon a time there was a highway that wound from Chicago to LA, more than 2000 miles all the way. And if you planned to motor west, this was the highway that was the best. You could get your kicks on ROUTE 66.
The past is the saddest tense, even when the words are shamefully plagiarized. The days of driving across this wonderful country of ours and actually LIVING it are gone. Now we have the Interstate Highway system, which lets you get from coast to coast with fewer flats, but doesn’t let you meet anyone. With all of the easy off/easy on gas stations and motels, it’s possible to drive across the USA and never even notice that New Mexico is a whole different world from Illinois.
But not so in 1950, when my family drove from New Mexico to LA and back several times. Back then you could scrounge up a couple of your Jack Kerouac/Neal Casady-type buddies and ball that jack from Chi-town to Hollywood, stopping at every podunk town and village that straddled “America’s Main Street”, as ROUTE 66 was called.
Pardon me for waxing nostalgic, something I’ve been doing more and more as I get older and America gets plasticker, but I’m betting that a lot of LOADSTARites remember ROUTE 66 and the days before roadside sign laws. I’m also betting that taking a simulated trip from Chicago to LA on computer will prove to be entertaining enough that not too many people will notice that there’s not a whole lot of interactivity in this program.
It started out as a file with a bunch of my favorite BURMA SHAVE signs. Then I figured a few hi-res landscapes would be nice. Then I thought, hey, you can’t drive cross-country without a radio.
And so I ended up with ROUTE 66, which doesn’t DO anything, but maybe will tweak a forgotten memory. All you have to do is Run It and sit back in your bucket seat and groove. “It should be a red Corvette!” some viewers may say, but I decided that a Packard or a Hudson better fit into my vision of bombing down 66. Easier to draw, too.
Okay. You have your foot on the pedal (CRSR UP/DOWN), your right hand on the radio dial (R) and your left elbow hanging out the window. Fuzz-buster? You don’t need no stinking Fuzz-buster! Radar is what our boys in Korea are using to roust those marauding Chi-Coms! Our government would never use radar on its own citizens!
I wonder how many people have wondered what the hell THE THING! was? It seemed like every ten miles there’d be a big yellow sign warning you not to miss THE THING! Well, for the benefit of those common-sensical sorts who never stopped, I’ll tell you what it was. My mother was too wise to stop when my brothers and I would scream “THE THING! Let’s stop!”, but my daughter forced me to check it out a few years ago.
It’s a giant tourist trap/souvenir shop with a museum of 19th century wagons, farm implements, riding gear, etc. Above each one is a sign that says “In 1890, this wagon was just THE THING for getting to town.” Now, aren’t you glad you never stopped?
What got me on this ROUTE 66 kick was a couple of terrific books (what else?). One is The Verse by the Side of the Road by Frank Rowsome. It’s the history of the Burma Shave company and their signs, and is very entertaining. All 600+ Burma Shave poems are listed. I picked some of my favorites for this program.
The other book is Route 66: The Mother Road by Michael Wallace, St. Martin’s Press, NY 1990. It’s a great coffee table book with plenty of pictures and first person stories about the highway as it was in the 20’s through the 60’s.
Each of the states that Route 66 used to run through has its own “Route 66 Club” but the main one seems to be the ROUTE 66 ASSOCIATION, P.O. Drawer 5323, Oxnard CA 93031. Write them if you’re interested in this wonderful bit of Americana.
What can you say about a road that died? They just don’t pave ’em like that anymore.

ROUTE 66 takes a while to load since it has so many files. If you have SUPER SNAPSHOT you could capture it as 90-block program and cut the setup time drastically. I chose not to use a captured version on LOADSTAR since some readers may want to see how to use music and hi-res pictures at the same time.
Here is a memory map of the program. As usual, I consider the C-64 as having 256 pages, each one 256 bytes long. The numbers refer to the pages.

3                  input any.o
8-77             BASIC program space
78-83           Song 1 - “Woogie”
84-89           Song 2 - “Fingers”
90-99           Song 3 - “Riff”
100-109       Packed Pic 1
110-119       Packed Pic 2
120-129       Packed Pic 3
132-133       Sprites
140-144       Color memory for hi-res
160-192       Bit-map for hi-res
192-195       Font
196-198       Hi-res Scripter
201-202       Unpacker.89
203-207       Songsmith “player.o”
207              Instrument file for music

I ran into a few snags along the way, and you will too if you try to use these utilities together. Watch out for:

(1) When Songsmith music is playing you can’t use the RND command. Why? I don’t know, but it sure is a hassle.
(2) All three songs use the same instrument file. Since the data MUST be on page 207, I would have had to use COPYMEM.O to swap data for the different songs in and out of page 207. It’s blasphemous for a programmer to say this, but there comes a time when one has to say, “Nah, too much trouble.”
(3) Switching between hi-res pics either causes a momentary color glitch or a blank screen. I chose the blank screen and used a TUNNEL AHEAD sign to explain it. This technique is used more often than you realize in the computer field. “It’s not a bug! It’s a feature!”

Accomplished programmers may see my attempts at using LOADSTAR tools as feeble, but if you are starting out in programming, I very much recommend trying something simple. A high sheriff here at Softdisk thought I ought to make the program into an interactive car-racing game. Obviously he doesn’t program and have a monthly deadline.
The pictures were drawn with DOODLE. Because the pictures are mostly color background with little foreground, they packed down very small with “unpacker.89”. If I had had Walt Harned draw the scenery (as I originally planned), I would have had memory problems getting three hi-res pictures in memory at once.
The music was done with SONGSMITH. All three songs are typical guitar riffs I used to play all too often when I was a lounge lizard. It’s fun throwing in notes that would be practically impossible to play (and repeat) on the guitar. The SID chip plays them easily, but unfortunately without the twang.
And finally, my thanks to Bobby Troup, who wrote the song, “Route 66”, and the Rolling Stones, for bringing it to my attention back in 1965.
May the spirit of 66 live forever.



 I asked Walt Harned to do the four background scenes for ROUTE 66 '99, published on LOADSTAR #182. Much better. And here is the Read It from the sequel:

   Back on LOADSTAR #80 there was a mini-travelogue called ROUTE 66 that apologized for not being very "interactive". That was before the age of demos, which brought respectability to programs that look great but don't really do much.
  ROUTE 66 '99 is the same program with a few added features, not the least of which is the artwork of Walt Harned. It's also been LINKed and CRUNCHed into one file which, for all intents and purposes, can't be distinguished from a real European style demo. Purists may insist that demos be written in 100% ML but I disagree. I call this a demo.
   The program is not entirely useless. You can enjoy a few old Burma Shave signs (which merit a large nostalgic article of their own), be reminded of the upcoming Chicage EXPO in Lansing IL on September 25, 1999, listen to some Knees Calhoon tunes, and narrowly miss getting disintegrated by trendy meteorites as you make the trip from Los Angeles to Chi-town. Is it 1955 or is it 1999? It's hard to say.
   If you've never hopped into a '54 Packard and balled that jack from Chicago to LA (or LA to Chicago) then this is your chance. Before Eisenhower's Interstate highway system, Route 66 was [the] way to go. It was two-lane and full of stomach-churning dips, but at least it had classy road signs like those crazy red things from Burma Shave.
  Jack Kerouac immortalized Route 66, which John Steinbeck called "The Mother Road", in his classic stream of consciousness novel, On the Road. With an amphetamine-powered Neal Cassady at the wheel Jack and his beat buddies saw the country the way it was meant to be seen. Back then you drove [through] every little podunk village, not around it. You stayed at "mo-tels" and ate at family-owned hamburger joints and cafes. Sure, you had a flat tire about every 300 miles but that was just a fact of life. You fixed it and tried to make Santa Rosa by midnight. Those were the days.
  I could babble on for hours about the charms of Route 66 and the highway's influence on our mid-century culture, but disk space is running out. It's time to get your kicks on Route 66!
  If you've got a SuperCPU, crank it up. You'll be travelling too fast to read the signs, but there's not a highway patrolman alive who can keep up with you. Eat my dust, coppers!
 And watch out for that meteorite!


   Back here in 2015. I don't think there's any way to get the songs on the radio in the program to sound good through the emulator (even at 100% speed), but here are a couple of songs programmed by Dave Marquis that show off what the C-64 can do. Dave, a Floridian, did about 80% of our music for several years.

 
 And guess what! Tomorrow night I actually have a real, honest-to-gosh puzzle program that's clever (I didn't make it up), well-designed, well-programmed and has just the right amount of solvability. It's a damn good program called ELEVATOR MUSIC. Well, actually the music is pretty horrible, but you can turn it off.