1988 · Electronic Arts

Wasteland

This minisite was contributed by air. It’s currently claimed by air who is editing it to reach a Gold tier standard.

The pictures move by exclusive or, so one frame both makes a change and takes it away. The game’s 4,920 messages are packed five bits a letter, and the full credits are one of them, on a poster in Needles.

01 · Pictures

Pictures that move by exclusive or

The title screen moves. A satellite drifts in from the right and turns, a line flashes between it and the top of the picture, and the satellite bursts into rings, while stars twinkle around the planet. The portraits in the picture window move too: the doctor blinks and talks.

ChannelScript entryDelayLast frame

The title and all 75 portraits, drawn and moved by a port of the engine's picture code ($0549 to $06E0) from the game's own bytes: the title's in the Source tab, the portraits' carried in this page. Step runs the tick until the channels step once. The table gives each channel's script entry, the steps before it reads the next one, and the frame it drew last. A box switches a channel's frames off. The port was run beside the engine's own code on the kit's 6502 simulator, the bitmap compared after every tick or every step: 1,088 cases and 5,649,956 ticks on the title and portraits 0, 1, 3, 6 and 8, and 400 steps of every one of the 75 portraits, with no difference. The emulator's screenshots of the title and the Ranger Center show the same pictures. Download GIF saves the picture as an animated GIF, made in the page: it runs from the base frame to the first step after about 15 seconds where the picture looks as it started, so it loops without a jump.

A picture is a header and its frames. The header's first four bytes give its area: first column, first pixel row, last column and last pixel row. Five words follow, each counted from the start of the picture: the base frame, then the scripts of up to four channels, with 0 for a channel the picture does not use. Starting a picture ($0586) draws the base frame over the whole area and puts each channel at the start of its script. Every one of the 75 portraits covers columns 1 to 11 and pixel rows 16 to 99, the top of the picture window, which the engine clears down to row 111 ($12CF). The title covers columns 1 to 32 and pixel rows 8 to 135. Its own header says column 36, and the start-up cuts that to 32 after unpacking it ($8001), which leaves the logo in columns 33 to 36 alone.

A frame is stored column by column. Each block gives a column, a pixel row, and an escape byte, then the bytes that go down that column. At the bottom of the area they carry on at the top of the next column. The escape byte followed by a count and a value makes a run. A block whose column is $FF ends the frame. The base frame is stored over what was there. Every other frame is combined with the screen by exclusive or (XOR). The decoder ($0651) rewrites two of its own instructions to choose between the two ($0648, $064E).

XOR undoes itself: drawing the same frame twice puts back what was there. One frame both makes a change and takes it away. The doctor's channel 1 draws the same four bytes six times in a row, and his mouth opens and closes three times. A byte of 0 would change nothing, so in these frames a 0 ends the block, and the next block says where to carry on.

Each channel follows a script of three-byte entries: a delay and a frame. When its delay runs out, the channel draws the next entry's frame and takes that entry's delay. A $FF where the next entry would be sends the channel back to the start of its script ($05F0 to $0646).

The channels step once in every 512 calls of the animation tick ($05C5), which counts them in $B1 and $B2. The engine calls the tick each time it polls the keyboard ($2534) and 192 times for each step of the text window's scrolling ($2161), so a picture moves while the game waits for a key or prints. On the title that comes to about seven steps a second.

The boxes in the table take a channel's frames out of the picture. The page keeps what each channel has XORed in so far and XORs it out again, which leaves the picture as if that channel had never run. The game has a switch of its own for each channel, $5BFB to $5BFE, which stops a channel where it is ($05EB). The destruction of Base Cochise uses them. Module 4 holds channel 1 still while the picture of the base is shown, then, after the screen shakes, stops channel 0 and lets channel 1 run ($CA27, $CA54).

On the title, channels 1 to 3 make ten stars twinkle by flipping one bit of each. Channel 0's 51 entries are the satellite, and they do not quite cancel out. One run through them, 74 steps, leaves five pixels near the top of the planet a different colour, and the next run changes them back.

The title is drawn from the start-up's copy, which it unpacks at $8A00. The portraits are packed on the disk, and a directory on track 35 says where each one starts, how many sectors to read and which side holds it ($2790). The unpacker is not kept in memory: each time, the engine reads it from track 35 over the third of the font's four pages, the lower-case letters at $C800, runs it, and reads the font's page back ($0524). A picture number with bit 7 clear is unpacked to $CA00, and with bit 7 set to $E000 ($2631). The doctor, the shop, the library, the Ranger Center and the Grim Reaper ask for $E000, and a fight for $CA00. This page carries each portrait's bytes as the game's own load left them in the buffer, up to the last byte the picture code reads. The load reads whole sectors and the unpacker decodes all of them, so after a picture the buffer holds the start of the next one on the disk, decoded with the wrong table; the picture code never reads it.

02 · Text

Five bits a letter, and an alphabet for every program

Wasteland's messages, from the copyright notice on the title screen to the words on a gravestone, are stored as runs of five-bit codes. Only the menus and a few prompts are plain strings ($1DE1).

A code is a number from 0 to 31. Codes 0 to 29 each pick one entry of a 60-byte alphabet at the start of the text block. Code 30 makes the next letter a capital. Code 31 says that the next code reads the alphabet's second half, entries 30 and up ($28F4). The reader takes the bits from each byte lowest first, five at a time, so a code often starts in one byte and ends in the next ($291D).

The packed-text widget needs JavaScript.

Pick a text block and a message, then play it or step through it a code at a time. The bits are shown in the order the game reads them, bit 0 of each byte first; each group of five is one code. The alphabet below lights the entry each code reads, and the screen fills in as the game draws it. Change the character, the count or the pronoun to see the switches choose. The decoder and the printer are ports of the engine's own routines, checked against the game's code on a 6502 simulator for all 4,920 messages in the 52 blocks: 0 differences.

The engine, the game, the title and start-up, the Ranger Center, the radio, the utilities, four of the location modules, and each of the 42 maps carry a block and an alphabet of their own. Every alphabet is in order of use, so a common letter costs five bits, a rare one ten, and a capital five more. Each block has its own order, though every map's alphabet starts with the space and e. The engine's starts with the code that switches between one and many, because 88 of its item names hold three of them each.

After the alphabet comes a table with one word for every four messages ($1E0E). The word says where that group of four starts. To print the third message of a group, the game decodes the two before it and throws them away, because no table entry says where a message inside a group begins. The table stays a quarter of the size, at the price of up to three wasted messages each time the game prints one.

Alphabet entries below $10 are not letters but orders to the printer ($1F42): a new line, the character's name, a wait for RETURN (space and back-arrow go on too), and the framed text window. Three of them choose between words. {0C}his{0C}her{0C} prints the first word for a man and the second for a woman. {0E}him{0E}her{0E}it{0E} prints the word chosen for the creature the game is describing. {0A}one{0A}many{0A} looks at a count ($2063). The engine's item names use it, so Kni{0A}fe{0A}ves{0A} prints Knife or Knives.

The printer does not draw a letter the moment it arrives. With word wrap on ($1F92), letters collect in a 41-byte line buffer ($F49C) until the line is full or a new line starts. The game then draws the line up to its last space, and the word cut off there moves to the start of the next line ($200C).

The 52 blocks take 142,029 bytes. The 4,920 messages in them hold 201,043 characters, which as plain text with a zero after each message would take 205,963 bytes. Packing saves 63,934 bytes, nearly a third.

03 · Credits

Secret: the credits are a poster on a wall in Needles

The title screen names one person, Alan Pavlish, who wrote the program. The full credits are inside the game, as a film poster on a wall in downtown Needles, and five of the people they name turn up elsewhere in the game: on a gravestone, a wanted poster, a sign, a plaque, and a wall of chalked names.


    

Screens from the emulator, in order. The party was put in each map with the game's own map loader, next to the square, and the button carries the key that was pressed next: K walks south, I north, and RETURN goes on with a message. Under the screens is the message as the map's text block holds it ($514F, $4300), decoded by the port in "Five bits a letter" above.

WhoCredited forWhereWhat the square says
Ken St. Andredesign, mapsMap 1, Quartz: a grave at column 27, row 24The gravestone is inscribed: Ken St. Andre, 4/28/47--4/28/87.
Nishan HossepianmapsMap 13, Sleeper Base, level 2: six wallsA sign on the wall here reads: "Wanted for crimes against computer software, Nishan Hossepian, $5000 Dead or Alive."
Bill DuganmapsMap 33, Needles downtown: column 7, row 27A sign just inside the entrance says "Bill Dugan, Representative, Temple of Blood."
Bill Dugan, Chris ChristensenmapsMap 34, Needles police station: a wall at column 24, row 13Chalked on the wall: Dugan, B -- Rad overdose / Christensen, C -- Anthrax / Gonif, T -- Cirrhosis
Stance NixonmapsMap 38, the Mushroom Cloud temple in Las Vegas: a wall at column 1, row 12This is a poster of a man in T-shirt and shorts typing at a computer. The plaque under the picture reads STANCE THE GREAT MAP MAKER.

Every message of the 52 text blocks, 4,920 in all, decoded and searched for the names on the poster. The squares come from the maps' records: each of these messages is shown by the squares named, in the map as it loads. Each map opens on the Maps tab.

The poster is one square of wall, at column 20, row 25 of map 33. Walking into it shows a message and turns the square into the next of four, so each bump shows the next poster: The Radheads! coming soon, the credits, Humongous and the Mutants! next week, and Mario, Luigi and the Fireballs! next month, then the first again.

The PC version hides its credits the same way. Kip told the Wasteland Ranger HQ-Grid's Underground (16 February 2002) to walk into a wall in south Needles up to 4 times as there are 4 cycling messages.

The credits give 26 credits to 20 people, under programming, design, maps, graphics, general help, and playtest and development, and end "Rated PG-13. Coming soon to a theatre near you." Apart from the title's own lines, which name Electronic Arts, Interplay Productions, and Alan Pavlish, no other text in the game credits anyone.

The poster lists Ken St. Andre under design, beside Michael A. Stackpole, and again under maps. The two dates on his gravestone are forty years apart to the day.

04 · A wall that talks

Secret: the walls under the Temple of Blood spell a sentence, one word a bump

The chamber under the Temple of Blood is a sea of blood ringed by 120 squares of mossy wall. Walk into one of them again and again, and it says a sentence a word at a time.

Every square of the ring starts as blocking square 3, which shows Moss covered walls rise into the darkness above. and becomes blocking square 4 when it is bumped ($3D8B). Squares 4 to 10 each show a word and hand over to the next ($3D8E-$3DA2, $918F). So eight bumps on one square read the moss, then You've, got, your, balls, to, the, wall., and leave it as blocking square 0, which shows the moss and changes no more. Each of the 120 squares keeps its own place in the sentence. The credits poster in Needles works the same way, but goes round again where the wall stops.

Ranger Wrank found it, and told the HQ-Grid's Underground (17 February 1999) to swim out to the wall and run into it a couple of times, the game will give you a message. The ring is the edge of map 28 on the Maps tab.

05 · Faran Brygo's computer

Secret: the computer in Faran Brygo's hideout is running Wasteland 2

A table in Faran Brygo's hideout in Las Vegas holds a computer: You see an Apple //e on the table. The screen says Wasteland 2. You shiver with anticipation. A game called Wasteland 2 came out in 2014, 26 years later.

The table is a blocking square at column 1, row 18 of map 39, and walking into it shows the message without changing anything ($3D32). Two squares along, at column 3, another table holds a note: You are about 40% through the game. ($3D34).

The fans' notes are about the machine. Posts from Snake Squeezins in September 2002, gathered on the HQ-Grid's Underground, point out that the computer is an Apple //e in the Commodore version as in the Apple's, and an IBM AT on the PC. J. Compton called the Commodore's totally wrong, and L. Mazzei put it down to the C64 version being based on the Apple // version.