Robert Wm. Gomez's

Welcome to Pages of Fun!

This is the personal Web site of Robert Wm. Gomez. I am an artist, musician and nerd living in Chicago, Illinois who has been maintaining this site (in one form or another) since 1996. Enjoy your visit!

Apple ][ Graphic Adventure Part V

Now that my memory issues are seemingly under control, let's take a look at my modifications to the parser. Normally, in these types of graphical adventures the player enters two words in the form of VERB OBJECT. My interface limits the number of verb choices and allows the player to enter a verb with a single keystroke.

In Applesoft you can prompt for user input in two ways. First there is INPUT A$ which will display a question mark on the screen and await user input followed by a RETURN. That user response then fills the variable A$. Similarly there is GET A$ which also displays a question mark but GET will only accept a single keypress as user input. My main problem with both of these is an aesthetic one: that darn question mark.

The solution is to write your own input routine leveraging machine code routines via PEEKs and POKEs. To do this, first I simulate a cursor by placing a flashing underscore character at the bottom of the screen.

101 VTAB 24 : HTAB 1 : CALL -868 : PRINT ":"; : FLASH : PRINT "_"; : NORMAL : GOSUB 55

A lot is going on in this line. The VTAB and HTAB commands position the screen cursor at line 24 and character 1. CALL -868 is a special machine code call that clears that single line of text. Now that we have an empty line we type a colon and then a flashing underscore. The result looks like this:

A flashing cursor

This looks like a user input prompt, but at this point it does nothing. The magic happens at the subroutine which is GOSUB'd at the end of that line.

55 KEY = PEEK (49152) : IF KEY < 128 THEN 55
57 POKE 49168,0 : BUZZ = PEEK (49200) : RETURN

In line 55 we are creating a variable KEY and assigning to it the contents of memory location 49,152 to it ($C000 for you hex-heads). Turns out location 49,152 will read the keyboard and return the ASCII value of the currently pressed key. If that value is a character then we break out of the loop and go to line 56.

Line 56 insures that, if the ASCII value of the key denotes a lowercase key, it is converted to uppercase by shifting the ASCII value. POKE 49168,0 clears the keyboard buffer so that the PEEK in 55 will work next time around and not just register the same value. Finally, that BUZZ = PEEK (49200) bit triggers a speaker click so that the player's keystroke has and audible sound.

When we return to the main game loop we now have a variable KEY which contains an ASCII value of the key pressed. I can then branch the program based on this value. I can also test if it's a RETURN keypress and then toggle text display. Later in my program I can concatenate keypresses into a single string value by returning to that subroutine again and again until a return press is detected. That's how I collect the OBJECT half of the VERB OBJECT pair.

Kill All Normies by Angela Nagle (7/10)

This is a pretty good overview of the roots of (mostly) right-wing Internet subcultures and trolls with a little fair-and-balanced lip service given to SJWs too. I guess the main thesis here is that the Pepe crowd is the direct decedent of 60s left-wing transgressive counter-culture. The most extreme and abusive side of 4chan culture is on display and, as a reader, I was adequately repulsed by it. However, I feel there is a fun, creative side of the trolling culture wars that gets a little lost in her narrative.

Apple ][ Graphic Adventure Part IV

Previously I discussed the overall structure of my soon-to-be hit adventure game. Well, last night was a milestone. I managed to write an Applesoft program so epic that it overwrote the high-resolution graphics page. Compared to other programs I have seen, mine isn't that huge. Around 250 lines isn't that huge, right? Transylvania clocks in at 464 lines.

The Mandibles: A Family, 2029-2047 by Lionel Shriver (8/10)

Apocalyptic dystopia from a libertarian perspective. Biases confirmed! In this story it's not war, plague or environmental catastrophe that brings the end times, it's the devaluation of the U.S. dollar. This is a far more likely scenario than we'd like to think and the author does a great job in showing how it would gradually affect a regular family. In the early parts it feels like a tale of what happens to all the normal people in the world of Atlas Shrugged.

808 (6/10)

Another one of these sub-culture documentaries which follows the formula: Identify sub-culture, show the originators, show the people who "took it to the next level", and finally show how this sub-culture has infiltrated mass culture. This time it's all about music that uses the Roland 808 drum machine. The big takeaway here is that, after an hour an a half, I don't ever want to hear another 808 beat again.

Strummin' Mental Part One by Various Artists (8/10)


The first Strummin' Mental CD compiles thirty or so surfy guitar instrumentals from the early 60s. The aesthetic here is raw, raunchy and fairly lo-fi. Punk rock for the beach blanket bingo set.

Apple ][ Graphic Adventure Part III

The previous post in this series explained how to get Graphics Magician images to display from Applesoft. Now, I'd like to go over the structure of the program listed in Write your Own Adventure Programs. The bulk of the program listing consists of the game data including objects, room descriptions, verbs and state flags. Most of the remaining code is comprised of a series of conditions that check how the player's actions affect the objects in the game world.

Apple ][ Graphic Adventure Part I

Having recently played the Apple ][ game Transylvania and its sequel, I was inspired to mess with the art program which those games used. The Graphics Magician was a huge hit for Penguin Software, but I never actually had a chance to use it when we had an Apple ][. I just remember it being advertised in every computer magazine I had.

Based on a True Story by Norm MacDonald (8/10)

He starts off with a typical comedian's memoir and, after about three pages, Norm gives up and go total autofiction. There's a grain of truth in every chapter, but each quickly descends into madness. It's not just cheap jokes (there's much of that, including the famous "Moth Joke"). Eventually, the fourth wall is broken and it becomes a smart, thrilling story.

Friday by Robert A. Heinlein (4/10)

Even as an audio book, this was a chore to get through. It's a tale of a future with super human artificial persons (the titular Friday), violent city states, and coporatized family structures. Oh, and lots of cringey sex talk. I suspect Heinlein was a swinger who wanted moral justifications for whatever dark seeded perversions he held. Unfortunately, he writes like a seventh grader and also has a seventh-grade boy's understanding of women. So dumb.