Tuesday, May 13, 2014

Adventure of the Week: Escape From Atlantis (1985)

This week, I'm tackling an old TRS-80 text adventure called Escape From Atlantis, one of those archive games with no clear provenance or official publisher.  It's been a bit elusive, mainly because the first source I found years ago was confusing it with Greg Hassett's Atlantis.  I finally tracked down a .CAS tape image online -- trying to load it with CLOAD in Disk Basic reminded me why these games took so much longer to play back in the day, as the tape load itself takes a few minutes!  But at last, we have a title screen:


This version is credited in online sources to Thomas Ally alone, back in 1985 when he was in middle school, but this version also mentions a Shaun Shelton.  It also crashes shortly after starting, but fortunately some technical notes are included with the cassette image -- it won't run with Radio Shack Disk BASIC, only standard Model I Level II BASIC, and the TRS-80 has to be started with MEMORY SIZE? at 32511 to avoid issues with the scrolling routine. 

In a break with my usual pattern, I'm seriously not going to recommend anybody actually play this one, at least not the version I found, as it proved to be broken in some key areas that make the game unfinishable as-is.  There seems to have been a different, more playable version available at some point, as the CASA walkthrough by Dorothy Millard is different in a number of key areas, but I was able to get through this one, albeit with copious amounts of code analysis and genuine cheating to work around broken pathways.  As such, my experience will include a great deal of frustrating code-level head-scratching, as well as the usual...

***** SPOILERS AHEAD! *****

As we start the game up, the title screen gradually gets covered by asterisks, probably to give us something to look at during variable initialization time, and then we're asked to select a difficulty level, from (1) HARD to (6) EASY.  I started with (1) HARD, but had to switch to (6) later on as it seems the main impact of the difficulty switch is the number of moves we are allowed before our lamp runs out.  (Why we need a lamp even when we're outdoors remains a mystery.)



 
We begin in THE SUBMARINE DOCKING BAY (about the only hint that this game is meant to be set in Atlantis, as the rest of the map resembles Anytown USA) where we see an IMMOVABLE DOOR and a LAMP with no POSSIBLE EXITS shown.  We have nothing in inventory (both INV and I work), but we'll start out with the obvious -- we can GET LAMP, since it's right here, and try (and fail) to OPEN DOORMOVE DOOR produces a specific response, clearly written by a 1980s teenager -- "DUH!! CAN'T YOU READ, IT'S IMMOVABLE."  PULL DOOR produces no response at all, though PUSH DOOR informs us that YOU CAN'T PUSH THAT.  But EXAMINE DOOR reveals that ON THE DOOR IS SOME TYPE OF BUTTON, and PUSH BUTTON opens the door and sends us tumbling into a different room.

IT'S TOO DARK TO SEE ANYTHING, of course, so we'll try to LIGHT LAMP... or ON LAMP... hmmmm, no response from the parser.  SWITCH LAMPYOU CAN'T SWIM HERE.  Lighting the lamp before we push the button doesn't seem to work either.  We can apparently safely navigate with no light source, but we're not going to be able to finish the game this way.  Peeking at the available walkthrough is no help, as lighting the lamp isn't mentioned at all.  Looking at the BASIC code suggests that L1=0 indicates the lamp is unlit, but what's the verb?  The implementation is at line 780... ah, we have to RUB LAMP!

Okay, now we can see that we're in a malt shop with a GOLD SUNDAE SPOON * (a treasure, apparently) and a DELICIOUS LOOKING MALT, with exits to the north, south, and west.  GET SPOON doesn't yield any immediate impact on SCORE, so we will probably have to store these somewhere.  We'll try to take the malt, but we can't -- and DRINK MALT produces no response at all from the parser.  If we EXAMINE MALT, we see that THE MALT IS BROWN, AND SMELLS LIKE BURNT ALMONDS.  Isn't that... vague memory bank access delay... cyanide?  Good thing we can't drink it, then!

West of the malt shop is an auditorium, with nothing obvious going on beyond available exits in the four cardinal directions.  A warehouse north of the auditorium contains a crate, but trying to READ CRATE yields only I WAS NEVER TAUGHT HOW TO READ THAT, and OPEN CRATE produces YOU CANT [sic] DO THAT.

Escape From Atlantis' geography is even more random than the adventure game norm, as directly west of the warehouse is a Japanese Geisha House with A VERY BEUTIFUL [sic] WOMAN.  We can't KISS her... and we'll refrain from going any farther at the moment.  Her place of business is just east of the high school -- as we explore the neighborhood, this location will seem even more inappropriate, trust me -- where we find a WOOD & GLASS TROPHY CASE.  We can't EXAMINE it, or OPEN it, or even BREAK it, at least at this point.

Directly across from the Geisha House by way of the high school is a church, where we can steal a silver cross, as long as we fool the gods with misdirection as we GET SILVER instead of brazenly trying to GET CROSS.  We can try to PRAY but there's no response.

On the street south of the church we spy a folded piece of paper -- but we can't examine or read it?  Ah, we have to UNFOLD PAPER and then READ PAPER to learn that ITS [sic] THE COMBINATION TO A SAFE.  (I'm beginning to suspect that our young BASIC programmers hadn't figured out how to use single quotes within strings, but CAN'T is spelled properly in other cases so this just seems to be a grammatical oversight.)

There's a graveyard west of the street, probably associated with the church, and it's clear that YOU HAVE NOTHING TO DIG WITH if we try, so we'll have to return here later with the proper tools.  South of the graveyard is another section of street, with a manhole and a large dirt pile.

It's tempting to GO MANHOLE, so we do, finding ourselves in a MAZE OF TWISTING PASSAGES.  We find a ladder and a WATCH * treasure here, and we have enough items in inventory to make mapping possible. As it turns out, there are quite a few landmarks available anyway, and the maze's geography is straightforward and fairly consistent -- which is good, because we can't actually DROP anything!  A pool of water lies north of the ladder -- we can't EXAMINE POOL or EXAMINE WATER, but if we try to GO POOL we can't -- "I DON'T LIKE THIS, THERE SEEMS TO BE SOMETHING MOVING ON THE BOTTOM."  The maze consists of just a few rooms, it seems, and semi-wraps around, so if we get lost, heading in any direction for a few moves will bring us back to the ladder.

It's worth exploring a bit, though, as east and south of the ladder is an UNDERGROUND LABORATORY containing a large machine and a dusty sign; I CAN ONLY MAKE OUT THE LETTERS E, T, AND M FROM THE DUSTY SIGN.  The machine features a button, so why not PUSH BUTTON?  This reveals that it's a time machine, and we become dizzy... and are sent back to the very beginning of the game, selecting the difficulty level!  Very funny, Mr. Ally.

Restoring my save state (the game has no built-in save feature, so an emulator is really valuable) I avoid pushing the button, but my lamp goes out suddenly, without warning.  Restoring again, I discover that we can READ WATCH to see that it reports time in terms of the lamp going out, and it appears we'll have to be conservative with our lamp light.

I navigate in the dark for a bit, just for fun, and learn that if we enter the Geisha House in the dark, ALL OF A SUDDEN A BEUTIFUL [sic semper] WOMAN COMES OUT OF THE DARKNESS AND STABS YOU RIGHT IN THE HEART. YOUR [sic] DEAD!!!   So the lamp is going to be a pretty important element here.

Starting over, I opt for a lower level of difficulty in case the length of the lamp light is what that controls, and also decide to explore the map differently -- it's fairly large for a TRS-80 BASIC adventure game.  There's a hotel south of the malt shop, with a sign -- ah, this is the DROP * TREASURES * AND SAY SCORE location.  But the DROP verb still isn't working, which concerns me a bit.  The drop verb implementation is at line 370 -- the way the system manages inventory is by keeping a string array, and it stores location information using an array that allows ten slots for each room.  But it doesn't look like the DROP command is even reaching this code, as I add some debug statements to try to figure this out.  Line 170 compares the user's input to a data array of 33 verbs -- and DROP should be verb 6.  But this is really weird -- the data statement at line 1180 only contains a handful of verbs???  Just NOR, SOU, EAS, WES, GET?  Ah, no, the line of code actually contains some embedded backspacing to prevent cheating of exactly the type I'm trying to do!  But it appears that it's not recognizing the DROP verb, no matter what I try to do here.  So I'm going to expose the verb list by replacing this line and see if that helps:
1180 DATA NOR,SOU,EAS,WES,GET,DRO,UNF,CUT,BRE,REA,JUM,WIT,CLI,EXA,GO ,FUC,SWI,OPE,SCO,RUB,SHA,WAT,POU,MOV,DIG,KIC,SAY,PUS,LOO,INV,ENT,HEL,EAT
And... nope, now it's not recognizing any of the verbs.  Maybe it's an early Model I upper/lowercase issue, and we can't tell onscreen if it is typed in upper or lowercase?  Nope, here's the actual bug -- the commands are abbreviated to three characters in line 1180, but the command DRO actually turns up with 4 characters, not three, when read from the DATA statement!  Deleting the extra byte value x01 character in line 1180 seems to fix the problem.  (I also discover that, having peeked at the verb list now, DRINK MALT is not fatal but the less traditional EAT MALT certainly is!)

Okay, back to the adventure!  Dropping the spoon scores us 10 points out of 80, so there must be 8 treasures to find.

West of the treasure store location is THE DOCTORS [sic] OFFICE, empty at the moment.  West again leads us to a greenhouse with a DYING PLANT, which is probably in need of water, though there's none here, which seems rather odd considering this is a greenhouse.

This is definitely an odd little town -- next to the auditorium is a bank with a bank vault, perhaps wisely built right next to the police station further west, where we can steal a gun from the unstaffed office.  West of the police station is a motorcycle shop, with a motorcycle available.

With the vault combination from the folded paper, we can OPEN the bank VAULT -- talk about poor security! -- and LOOK VAULT to liberate a bag of gold coins; we must GET BAG rather than GET COINS.  We'll round up the silver cross and watch again for treasure's sake -- the watch indicates we have 530 moves left until the lamp runs out, confirming my hunch that this is what the difficulty setting controls.  We've got 40 of the possible 80 points now.

Where haven't we been yet?  North of the malt shop is a grocery store with a VERY HEAVY SHOPPING CART.  It's so heavy we can't PUSH it or GET it, and we can't GO CART or EMPTY CART.  So we'll move on for now, heading west to visit... ah, we're back at the warehouse.  So it seems we've mapped out the world, more or less, and we can start breaking down the puzzles.

Can we SWIM in the pool of water down the manhole?  Not until we enter it, apparently, and the game won't let us do so.  Can we ride the motorcycle anywhere?  No, but we can GET MOTORCYCLE and drag it around, even up and down ladders.

Now that DROP is working, let's make sure we've explored the manhole maze thoroughly.  We can RUB SIGN in the underground laboratory to confirm that the newly less-dusty version reads "EXPERIMENTAL TIME MACHINE."  We found that out the hard way earlier.


I'm feeling like a dead end is approaching, and that whole command bug situation is making me nervous, so I take a peek at the walkthrough at CASA to see if I'm on the right track -- and discover that it appears to be for a significantly different build of this game!  At the very least, m attempts to JUMP DIRTPILE with the motorcycle are coming to naught.  Line 470 of the code suggests that this should work, with several variations, but it doesn't seem to be recognized, though the JUMP verb is available.  So we'll cheat by breaking out, forcing location variable LC = 13, and continuing.  (Looking at the code some more, it looks like the intended use is to JUMP DIRT followed by WITH MOTORCYCLE, as two separate commands in sequence.  But this doesn't actually work -- a flag that's meant to be set by the first command doesn't stay set, so the WITH portion never does anything useful.)

On the other side of the dirt pile is a gas station, where we can acquire a gas can.  East of the gas station is a library, where we can READ an old scientific MANUAL to learn about the theories behind time travel.  Interesting.  We can SHAKE CAN (I would not have guessed this without a hint in the .CAS file's accompanying README) to reveal a SPANISH DOUBLOON *.  So that's five treasures.

Can we do something new with the time machine now?  It doesn't force us to restart the game, at least, now that we've read the manual.  We can't exit the area after the button is pressed, as we've moved from the lab to a WET & SLIMY UNDERWATER CAVE.  There doesn't seem to be anything to do here, though we can PUSH BUTTON to return to the lab, in our own time.

Time for a little more cheating, I fear -- it looks like the only object we haven't seen yet is a crowbar, meant to be found in room 23.  This is the bottom of the pool, which the code won't let us reach -- any time we try to enter the pool, it just prevents us from doing so, and there appears to be no logic or condition that will allow it.  So we'll break out, set LC = 23, continue, grab the crowbar, and then return to LC = 21.  I'm beginning to suspect this version of the code was being "improved upon" by Shaun Shelton or some other unnamed accomplice from Tom Ally's original, but never quite got finished!

With the ill-gotten crowbar, we can OPEN CRATE in the warehouse to reveal a canteen.  Can we GET WATER at the pool of water?  Nope, nor can we FILL CANTEEN.  We've visited all the possible locations, it seems.  Can we BREAK CASE now that we have the crowbar?  BREAK WOOD?  Nope, but BREAK GLASS is fatal as the trophy case shatters and cuts us to ribbons.

What do we need for digging?  A SHOVEL, apparently.  I wonder where that comes from?  I'm in do-whatever-it-takes-to-finish-this-game mode now, so I'm happy to comb through the code and find out that watering the plant should reveal the shovel at line 820.  But how do we fill the canteen?  Ohhhh, we don't have to -- it's already full, or at least the code lets us simply WATER PLANT and FOR YOUR GOODNESS A SHOVEL SUDDENLY APPEARS.  This is the downside of getting stuck early and peeking at things -- the walkthrough for the more playable version requires that we FILL CANTEEN, and the code here clearly doesn't have a FILL verb, so I made a bad assumption that this puzzle even existed.

Now we can dig in the underwater cave in the past to find some DIAMONDS *, and in the graveyard in the present to find a buried casket.  We can OPEN CASKET -- and are strangled by the occupant!  Can we WEAR CROSS?  We can't, but carrying it would traditionally work against vampires, and it seems to keep this corpse quiescent long enough for us to examine it and take a valuable NECKLACE *.  We can't CLOSE CASKET, so we'll just head out of here now.

Since we've got the hood open on the game's actual code, let's follow up on a few apparent red herrings -- it appears that we can't do anything with the grocery cart, we can't use the gun anywhere, and while we can employ a verb starting with CHR$(102) at the Geisha House, we just get stabbed in the back during the festivities, though the verb does produce a humorous response if employed elsewhere.

Okay, we have seven of the eight treasures now.  What could the last one be?  There's still that trophy case -- and a CUT verb -- and we have some DIAMONDS * now.  And yes!  We can CUT GLASS to discover a JEWELED TROPHY *.  This school district must have quite the intramural athletics budget!  And now we have eight treasures stored, and victory -- of a somewhat disreputable sort -- is ours!



We are, if not A FIRST CLASS ADVENTURER, a first class cheater at least.  But I make no apologies, as this version of the game seems to be broken in several key areas -- as far as I can tell from reading and tweaking the code, we simply can't reach the bottom of the pool, or jump the dirt pile with the motorcycle, or drop treasures to score as required.  So given that the version of Escape From Atlantis I tracked down was otherwise unfinishable without a little BASIC skulduggery.  I'll just call the operating environment part of the puzzle, and venture onward.

1 comment:

  1. CHR$(102) is a lowercase F, if you have a lowercase character-set chipset installed, and an uppercase F (achieved by holding down SHIFT when you press F, maybe?) on a bare-bones TRS-80 model one.

    Hmmm ... now what verbs do I know of that start with "F" that you might be tempted to use at a Geisha house....

    ReplyDelete