<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
 xmlns:atom="http://www.w3.org/2005/Atom"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<channel>
  <title>Reid’s For Fun</title>
  <link>https://www.reids4fun.com</link>
  <atom:link href="https://feeds.feedburner.com/ReidsForFun" rel="self" type="application/rss+xml"/>
  <description>Reid’s For Fun - Latest News</description>
  <language>en-us</language>
  <lastBuildDate>Mon, 06 Apr 2026 21:15:00 -0600</lastBuildDate>
  <image>
    <title>Reid’s For Fun</title>
    <link>https://www.reids4fun.com</link>
    <url>https://www.reids4fun.com/images/r-badge.png</url>
  </image>
<item>
    <title>Can You Keep Up with Lift, My ZX81 Elevator Game</title>
    <link>https://www.reids4fun.com/590/can-you-keep-up-with-lift-my-zx81-elevator-game</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Mon, 06 Apr 2026 21:15:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>retro</category>
     <category>monthly</category>
    <guid>https://www.reids4fun.com/590/can-you-keep-up-with-lift-my-zx81-elevator-game</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/lift-2026-zx81-play-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;ZX81 Lift game intro screen with elevator and floors. Lift, 2026 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;This week I received a new ZX81 book I purchased on eBay called &quot;Timex Sinclair 1000 Programs, Games, and Graphics.&quot; A little graphic program in the back of the book inspired me to create &lt;a href="https://www.reids4fun.com/zx81/lift/play" target="_blank" rel="noopener"&gt;a game called Lift&lt;/a&gt;. Can you catch the items before they fall? Let’s dig in.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Moving around the floors.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Before we dive into the program, let&#39;s talk about the game. As a lift operator, it is your job to move between floors and catch the items that move along it. Simple enough, right?&lt;br&gt;
&lt;br&gt;
Of course, the items move pretty quickly, making the game somewhat challenging. You use the &lt;kbd&gt;1&lt;/kbd&gt;-&lt;kbd&gt;4&lt;/kbd&gt; keys to travel between each floor. Like a hotel, the first floor is at the bottom and the fourth at the top. Fortunately, you don&#39;t need to stop between floors. As a hint, I usually have my fingers on each number ready to react.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/lift-2026-zx81-move-screenshot-by-steven-reid-320x240.png" alt="&quot;Lift in motion. Lift, 2026 by Steven Reid&quot;"&gt;&quot;Lift in motion. Lift, 2026 by Steven Reid&quot;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
For each caught item you get 10 points. Miss an item, and it goes &lt;i&gt;splat&lt;/i&gt;, and the game displays your score. How high can you go?&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; An old idea reused.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The original graphic program, called &quot;Macy,&quot; was a short little elevator simulator. The intent was to show how to move objects on the ZX81 screen. Typing in the program, I liked the clever way it moved the lift between floors. It wasn&#39;t fast, but it did convey the movement quite elegantly.&lt;br&gt;
&lt;br&gt;
Designed for 1K (even though the Timex Sinclair 1000 was sold with 2K of RAM), the graphic program was quite simple. It used a repeating for loop to &lt;code&gt;PLOT&lt;/code&gt; the floors. Although it looked decent, it was slow to watch.&lt;br&gt;
&lt;br&gt;
The movement of the lift was better, using a simple print routine with a variable to shift between floors. Using a simple number input, you could move the elevator between the store&#39;s floors.&lt;br&gt;
&lt;br&gt;
Overall, quite an intriguing simulation. I wanted more. Time to make a game.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Printing instead of plotting.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Throwing out &lt;a href="https://www.reids4fun.com/zx81/lift/list" target="_blank" rel="noopener"&gt;the old code&lt;/a&gt;, I started fresh. The first thing to go was how the floors were created, switching from &lt;code&gt;PLOT&lt;/code&gt; to &lt;code&gt;PRINT AT&lt;/code&gt;. With the new routine, not only could I display the floors faster, but I could use a different graphic as well.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/lift-2026-zx81-play-screenshot-by-steven-reid-320x240.png" alt="&quot;Lift game play. 2026 by Steven Reid&quot;"&gt;&quot;Lift game play. 2026 by Steven Reid&quot;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
With the display done, it was time to add in some movement.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making the game move.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
With the display now done, it was time to add in some motion. I remembered another game using alternating block characters to convey motion. Using the same concept here, I wrote a little display routine for the item. It moves along a randomly chosen floor for you to catch.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/lift-2026-zx81-item-screenshot-by-steven-reid-320x240.png" alt="&quot;Lining up the catch. Lift, 2026 by Steven Reid&quot;"&gt;&quot;Lining up the catch. Lift, 2026 by Steven Reid&quot;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
The item moves smoothly using a very simple array. Using the ZX81’s true/false logic, I used the &lt;code&gt;NOT&lt;/code&gt; command to flip between the two frames of the animation. The code below is a decent approximation of the logic.&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&#160;120&#160;LET&#160;N=NOT&#160;N
&#160;130&#160;PRINT&#160;AT&#160;Q,W;&amp;quot;&#160;&amp;quot;;&amp;quot;/\&amp;quot;&#40;N+1&#41;&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
If you select a floor, the item will pause to allow the elevator to shift between floors. I like it when the items are polite. If you play enough, you may realize you can move the lift at the last possible moment and still win.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Catch it or splat.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
One thing I tried to do with the code is logically organize it. Since I was using 16K of memory, I could be a bit verbose and add in some &lt;code&gt;REM&lt;/code&gt; lines to explain what each routine does. Although they are quite simple, it does help manage the flow of the program. By glancing at the code, it becomes clear how it is laid out.&lt;br&gt;
&lt;br&gt;
Of course, the biggest challenge is catching that item. When you select the right floor, the game adds some points and repeats. If you miss, the item becomes an asterisk and the ending screen is displayed.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/lift-2026-zx81-splat-screenshot-by-steven-reid-320x240.png" alt="&quot;That didn&#39;t end well. Lift, 2026 by Steven Reid&quot;"&gt;&quot;That didn&#39;t end well. Lift, 2026 by Steven Reid&quot;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
It’s simple, but it works. The timing feels just tight enough to keep you paying attention. On a real TS1000, you&#39;ll be fighting the membrane keyboard as well.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A proper intro screen.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
I couldn’t resist adding a small intro screen to set the stage. I added it to the &lt;code&gt;SAVE&lt;/code&gt; routine to make things easier. It’s a small touch, but it helps the program feel more complete right from the start. Plus, it tells you how to play. This avoids the objects from just rolling off the screen to start.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/lift-2026-zx81-intro-screenshot-by-steven-reid-320x240.png" alt="&quot;Lift intro screen&quot;"&gt;&quot;Lift intro screen&quot;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
As a side note, I did use the ZX81 comma to format the text. This avoided adding in additional &lt;code&gt;PRINT&lt;/code&gt; lines.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Same idea, very different game.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
At its core, this is still the same idea I found in that 1982 listing. Although I started by fixing the input routines and speeding up the graphics, the biggest improvement is how much cleaner the program structure became. It didn’t hurt that the game glitched when I was almost finished, forcing me to rewrite it from scratch.&lt;br&gt;
&lt;br&gt;
But between the rewritten structure, updated input handling, and character-based graphics, it feels like a completely different program. Faster, cleaner, and honestly just more fun to play.&lt;br&gt;
&lt;br&gt;
It’s always interesting how far you can take a simple idea with a fresh pass.&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/lift/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/lift/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Building a ZX81 Intro Screen for Wolf, Goat, Cabbage</title>
    <link>https://www.reids4fun.com/589/building-a-zx81-intro-screen-for-wolf-goat-cabbage</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Tue, 31 Mar 2026 23:23:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>retro</category>
     <category>monthly</category>
     <category>puzzle</category>
    <guid>https://www.reids4fun.com/589/building-a-zx81-intro-screen-for-wolf-goat-cabbage</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/wgcs-1982-2024-2026-zx81-intro-by-steven-reid-320x240.png&quot; alt=&quot;ZX81 Wolf Goat Cabbage intro screen with boat, wolf, goat, and cabbage&quot; style=&quot;float:left;margin-right:10px&quot;&gt;When I first converted Wolf, Goat, Cabbage to the ZX81, I wanted to include an intro screen. Sadly, I didn’t get around to it at the time. This month, I finally circled back and &lt;a href="https://www.reids4fun.com/zx81/wgc/play" target="_blank" rel="noopener"&gt;it turned into quite the journey&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Where I ended up.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The final result works. I had a few different ideas in mind, but this one fits the limits of the ZX81’s graphics pretty well. It has a large title, a wolf, a goat, and a very simple cabbage. I’m happy with how it turned out.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/wgcs-1982-2024-2026-zx81-intro-by-steven-reid-320x240.png" alt="“Final ZX81 intro screen”"&gt;“Final ZX81 intro screen”&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Where the journey started.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
As much as I like the final version, I originally planned to build it using generative AI. Back in 2024, when I was updating the puzzle, I spent a lot of time experimenting with different GenAI tools. I had a clear vision and turned it into a prompt… and the result was a complete failure.&lt;br&gt;
&lt;br&gt;
The problem wasn’t just the tools—it was the ZX81. Its low resolution and black-and-white graphics make it hard to translate modern AI output into something usable. I could generate 8-bit-style images, but the scale was always off. The wolf, goat, and cabbage never matched, and trying to recombine elements didn’t help.&lt;br&gt;
&lt;br&gt;
I still have those attempts, but they’re not worth sharing. The title looked off, and the overall composition just didn’t work. Even revisiting this in 2026 didn’t improve things much. The AI tried, but it couldn’t quite grasp how to work within the ZX81’s character-based graphics.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Building it myself.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
So I went back to basics and built everything by hand. I found a simple online pixel editor and started sketching out the title screen.&lt;br&gt;
&lt;br&gt;
I began with the lettering, roughing out shapes and then refining them until they were readable but still chunky enough to fit the system. From there, I built out the scene: two shores, a river, a boat, and the puzzle elements. I redrew parts several times to get the proportions right and experimented with the ZX81’s checkered and gray characters to add a bit of texture.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Displaying the image.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
As a teenager, I probably would have just used a giant PRINT AT and called it good. In fact, I’ve done exactly that in other programs.&lt;br&gt;
&lt;br&gt;
This time, &lt;a href="https://www.reids4fun.com/zx81/wgc/list" target="_blank" rel="noopener"&gt;I wanted to try something a little different&lt;/a&gt;. I built a simple compressed data structure where each letter represents a graphic, followed by a number that repeats it.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/wgcs-1982-2024-2026-zx81-data-by-steven-reid-320x240.png" alt="“Compressed DATA for screen”"&gt;“Compressed DATA for screen”&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
From there, I wrote a decode routine that walks through the data and renders the screen. It works, but it’s very simplistic and very slow.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/wgcs-1982-2024-2026-zx81-decode-by-steven-reid-320x240.png" alt="“Decode routine”"&gt;“Decode routine”&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Working around the speed.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Since the decode routine is so slow, I took a different approach. Because the screen only needs to be built once, I can generate it and then SAVE the program.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/wgcs-1982-2024-2026-zx81-save-by-steven-reid-320x240.png" alt="“Saving the generated screen”"&gt;“Saving the generated screen”&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
The routine uses FAST to help speed things up, but fair warning—it’s still slow. If you want to see it in action, try RUN 7000. If you remove line 7010 or comment out FAST, you can watch it build the screen step by step. It’s not pretty, but it gets the job done.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; And that is it.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
I enjoyed building the screen and experimenting with the decode routine, but honestly, the teenage approach might have been better. A big PRINT AT block would probably use less memory and be much faster.&lt;br&gt;
&lt;br&gt;
An even better solution would be to poke directly into the display file or use machine code. Maybe that’s a project for another day.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/wgcs-1982-2024-2026-zx81-play-by-steven-reid-320x240.png" alt="“Gameplay screen”"&gt;“Gameplay screen”&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Outside of the new intro screen, not much else has changed. The puzzle plays the same as before. I considered cleaning up the code, but it didn’t feel worth the effort. Adding variables helps readability a bit, but sometimes it’s easier to just strip things down and leave a few comments.&lt;br&gt;
&lt;br&gt;
I’ll leave that part to you—or your code generator—to improve.&lt;br&gt;
&lt;br&gt;
Enjoy!&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/wolf-goat-cabbage/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/wolf-goat-cabbage/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Trap or Gold Is a Simple ZX81 Game of Chance With a Twist</title>
    <link>https://www.reids4fun.com/588/trap-or-gold-is-a-simple-zx81-game-of-chance-with-a-twist</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Sun, 01 Mar 2026 22:39:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>retro</category>
     <category>monthly</category>
     <category>chance</category>
    <guid>https://www.reids4fun.com/588/trap-or-gold-is-a-simple-zx81-game-of-chance-with-a-twist</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-start-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Trap or Gold, Starting screenshot, 2026 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I was pursuing ideas for a simple role-playing or fighting game. The one I landed on was the concept of a single treasure chest. It fit the retro-computing theme perfectly. &lt;a href="https://www.reids4fun.com/zx81/traporgold/play" target="_blank" rel="noopener"&gt;Trap or Gold&lt;/a&gt; is a simple game that doesn&#39;t need fancy graphics, speed, or memory — yet it’s still fun.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; From idea to fun.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Working on the game, I realized that simplicity was its strength. My ideas tend to be grand, graphic-heavy games that don’t always play well on the ZX81. To be honest, they don’t always look great either. Lately, I haven’t had the time to work on larger projects, so the idea of a single treasure chest that you either open — or don’t — felt right. It works.&lt;br&gt;
&lt;br&gt;
Thinking about the game during a recent run, I realized how much it echoes the programs I wrote as a teenager. Once I figured out random numbers, my first games were usually dice or card games. Those are probably the simplest forms of chance you can create.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-start-screenshot-by-steven-reid-320x240.png" alt="Trap or Gold, Starting screenshot, 2026 by Steven Reid"&gt;Trap or Gold, Starting screenshot, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
What makes Trap or Gold interesting is that it isn’t just about winning or losing money. Most gambling-style games revolve around a single value — money. Here, you’re gambling with two: gold and health. You want gold, but you don’t want to get hurt. That extra layer adds tension and fits nicely with the fantasy theme.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A little strategy.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Adding health makes Trap or Gold feel more like a survival game. Opening the chest offers risk or reward — wealth or pain. &lt;a href="https://www.reids4fun.com/zx81/traporgold/list" target="_blank" rel="noopener"&gt;Under the hood,&lt;/a&gt; the game picks a random number using the line &lt;code&gt;LET R=RND&lt;/code&gt;. The odds don’t change, but you are given a choice: open the chest or not.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-yes-screenshot-by-steven-reid-320x240.png" alt="Trap or Gold, Opening the Chest, 2026 by Steven Reid"&gt;Trap or Gold, Opening the Chest, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
To make this more interesting, I intentionally generate the random number before you open the chest. This gives the player the opportunity to “burn” a number if they feel the chest might be a trap. Rationally, it changes nothing. Emotionally, it feels like control.&lt;br&gt;
&lt;br&gt;
It’s a small trick, but it adds a surprising amount of tension. It turns a simple random number into something that feels personal.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making it a bit more random.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The ZX81 uses a pseudorandom number generator. By default, the sequence is the same each time the machine starts, which makes outcomes predictable. To avoid this, you can use &lt;code&gt;RAND 0&lt;/code&gt; to seed the generator from the &lt;var&gt;FRAMES&lt;/var&gt; counter — a value that updates as the screen refreshes.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-no-screenshot-by-steven-reid-320x240.png" alt="Trap or Gold, Deciding not to open the chest, 2026 by Steven Reid"&gt;Trap or Gold, Deciding not to open the chest, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
On a real ZX81, this works well. The delay between turning on the machine, loading a program, and running it is usually enough to produce different results.&lt;br&gt;
&lt;br&gt;
On an emulator, however, everything happens almost instantly. The machine state is consistent, and the random sequence can repeat each time you start the program. That’s not ideal for a game of chance.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-treasure-screenshot-by-steven-reid-320x240.png" alt="Trap or Gold, Finding treasure, 2026 by Steven Reid"&gt;Trap or Gold, Finding treasure, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
While designing the game, I added a simple title screen that waits for a key press. This gave me an opportunity. I moved the &lt;code&gt;RAND 0&lt;/code&gt; call to after the input. Since human timing is unpredictable, it helps make the results feel truly random.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making the game visually appealing.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
To make the game a bit more interesting visually, I added a simple animation for opening the chest. This is done using a sequence of &lt;code&gt;PRINT&lt;/code&gt; statements. To slow things down, I took advantage of the ZX81’s quirks — using small delays to create the illusion of motion.&lt;br&gt;
&lt;br&gt;
Here’s the code with simplified graphics:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;2500&#160;REM&#160;**OPEN&#160;CHEST**
2510&#160;PRINT
2520&#160;PRINT&#160;AT&#160;9,14;&amp;quot;_____&amp;quot;;AT&#160;10
,14;&amp;quot;&amp;amp;lt;pipe&amp;amp;gt;___&amp;amp;lt;pipe&amp;amp;gt;&amp;quot;
2530&#160;LET&#160;L=SIN&#160;PI**PI
2540&#160;PRINT&#160;AT&#160;9,14;&amp;quot;&amp;amp;lt;pipe&amp;amp;gt;---&amp;amp;lt;pipe&amp;amp;gt;&amp;quot;;AT&#160;10
,14;&amp;quot;&amp;amp;lt;pipe&amp;amp;gt;---&amp;amp;lt;pipe&amp;amp;gt;&amp;quot;
2550&#160;LET&#160;L=SIN&#160;PI**PI
2560&#160;PRINT&#160;AT&#160;9,14;&amp;quot;&amp;amp;lt;pipe&amp;amp;gt;---&amp;amp;lt;pipe&amp;amp;gt;&amp;quot;;AT&#160;10
,14;&amp;quot;&amp;amp;lt;pipe&amp;amp;gt;&#160;&#160;&#160;&amp;amp;lt;pipe&amp;amp;gt;&amp;quot;
2570&#160;LET&#160;L=SIN&#160;PI**PI&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
I use a similar approach for the trap and treasure animations. With just two frames and a simple loop, you can create a flicker effect that works surprisingly well:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;2640&#160;PRINT&#160;AT&#160;21,6;&amp;quot;&#160;&#160;&#160;TRAP/&#160;-&amp;quot;;
D;&amp;quot;&#160;HEALTH&#160;&#160;&#160;&amp;quot;
2650&#160;FOR&#160;P=1&#160;TO&#160;10
2660&#160;PRINT&#160;AT&#160;10,15;&amp;quot;***&amp;quot;
2670&#160;LET&#160;L=SIN&#160;PI
2680&#160;PRINT&#160;AT&#160;10,15;&amp;quot;---&amp;quot;
2690&#160;LET&#160;L=SIN&#160;PI
2700&#160;NEXT&#160;P&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-trap-screenshot-by-steven-reid-320x240.png" alt="Trap or Gold, Finding a trap, 2026 by Steven Reid"&gt;Trap or Gold, Finding a trap, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Open the chest?&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
In the end, Trap or Gold is an adventure wrapped in a game of chance. I enjoyed developing it, and I’m happy with how it turned out. It feels like something I might have written back in the eighties.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/trap-or-gold-2026-zx81-win-screenshot-by-steven-reid-320x240.png" alt="Trap or Gold, Finding enough gold, 2026 by Steven Reid"&gt;Trap or Gold, Finding enough gold, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
I played through it multiple times to capture screenshots, and along the way, I found myself developing strategies — or at least convincing myself that I had one. Trusting instinct, second-guessing outcomes, and hoping for gold instead of traps made each decision feel meaningful.&lt;br&gt;
&lt;br&gt;
As your health drops and your gold creeps toward 100, the tension builds. In the end, it isn’t really about the numbers — it’s about the feeling that maybe, just maybe, this time you’ll get lucky.&lt;br&gt;
&lt;br&gt;
So… do you open the chest?&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/traporgold/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/traporgold/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Bringing My Atari 2600 Joysticks and Paddles Back to Life</title>
    <link>https://www.reids4fun.com/587/bringing-my-atari-2600-joysticks-and-paddles-back-to-life</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Mon, 16 Feb 2026 11:37:00 -0600</pubDate>
     <category>Retro Hardware</category>
     <category>atari</category>
     <category>retro</category>
     <category>controllers</category>
     <category>restoration</category>
    <guid>https://www.reids4fun.com/587/bringing-my-atari-2600-joysticks-and-paddles-back-to-life</guid>
    <description>&lt;img src=&quot;https://live.staticflickr.com/65535/55099566760_e21f09b4c8_k.jpg&quot; alt=&quot;Atari 2600 Controller Restoration, 2026 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I recently got back into retro hardware. My starting point was gaming, as I ordered one of the new Atari 7800s that plays the old cartridges. In my haste to grab a few games, I inadvertently purchased a complete 2600 with controllers. I’ll blame travel and lack of sleep for missing that detail. But it gave me the opportunity to attempt something I’ve never done before: restore the controllers.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Assessing the condition.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The controllers that came with my purchase weren’t in the best shape. Both joysticks were missing their rubber grips. The fire buttons were okay, but not great. Most of the paint had worn away. These were well-used sticks.&lt;br&gt;
&lt;br&gt;
On the positive side, I tested both and they worked well. That gave me hope.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXc1P" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099470739_bd958b9fb4_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXc1P" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
The paddles, on the other hand, looked decent aside from a minor scratch on one of the labels. Unlike the joysticks, however, they worked horribly. I remember the paddles always being a bit fiddly—but not this bad. Trying out Warlords, neither paddle moved smoothly, making the game nearly impossible to play.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWWQFK" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099402353_98f4e7a9ab_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWWQFK" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
After watching a few restoration videos and finding replacement grips on eBay, I felt confident enough to tackle the project.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXc1i" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099470709_194221a621_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXc1i" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Taking apart the joysticks.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
I started with the joysticks. The first order of business was to disassemble them so I could wash the cases. Although not horrible, the cases and cables were grimy.&lt;br&gt;
&lt;br&gt;
This turned out to be the easiest part. A few screws later, I had both joysticks broken down.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWVMhR" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099195821_e8341b6eb1_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWVMhR" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWVMi2" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099195831_a1af0e3311_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWVMi2" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
One thing I noticed while taking them apart was a plastic rim that the sticks come into contact with. On both controllers, the lip around the inner hole had broken. This was most likely from pushing the stick too hard in one direction—something not unusual if you’ve played Atari 2600 games. You can see the damage more clearly below.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXFyX" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099566795_99d346bd00_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXFyX" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
Since I removed the cords from their shells, I took a picture of the connector layout so I would know the order when reattaching them.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWWQGS" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099402418_e62f60ef90_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWWQGS" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
This turned into a lesson. Although they came apart easily, I ran into connection issues after reassembly. If anything, don’t bother disconnecting the wires unless you absolutely need to. I could have easily cleaned everything with the boards still attached.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Joystick cleaning incoming.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
With them torn down, I cleaned each one with simple soap and water. I used a cloth to clean the cords and a toothbrush to get into the tighter spaces. Overall, it went really well. I ended up with two nice, clean sticks.&lt;br&gt;
&lt;br&gt;
One thing I noticed was that each joystick had a number written on it. I was careful not to rub this off to preserve a little character. I’m sure millions of these were made and these are probably just inspection numbers, but to me it gives them some uniqueness.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXbZr" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099470659_070c75c33e_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXbZr" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
The boards themselves were in good shape. I checked the contacts and the dome switches were all fine. I decided not to do anything further with them.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Tackling the paddles.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
While those dried, I worked on tearing down the paddles. This required a bit more effort, as they have a few more parts to them. Sadly, I didn’t grab a full teardown photo, but you can find videos online that walk through it.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWVMfG" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099195696_d6d0b7dc43_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWVMfG" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
Beyond cleaning, I also needed to refurbish the potentiometers. This meant carefully opening them up so I could access the internal contacts.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWWQFu" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099402338_560e774665_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWWQFu" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
My next step was to clean the gunk out of them. I used cotton swabs and isopropyl alcohol to remove the grime from inside. There was quite a bit of buildup from years of friction and dust.&lt;br&gt;
&lt;br&gt;
Once done, I focused on the cases, cleaning them the same way I did the joysticks with simple soap, water, and elbow grease. With that complete, I reassembled everything.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making the joysticks look new.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
With everything back together, there was one final thing to do. The paint on the joysticks had completely worn off.&lt;br&gt;
&lt;br&gt;
I pulled out my wife’s acrylic paints and went to work finding a match. To my surprise, she had a set of acrylic paint markers. I found a bright orange that worked perfectly. After shaking them up, I got to work—and they turned out great.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXFy6" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099566745_18d07c12df_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXFy6" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXFy1" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099566740_52fc698cdd_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXFy1" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A few problems before wrapping up.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
As a first restoration project, I’m really happy with how everything turned out. They look fantastic, which was my primary concern. The paddles worked extremely well—better than I expected.&lt;br&gt;
&lt;br&gt;
The joysticks, however, were a bit of an issue.&lt;br&gt;
&lt;br&gt;
During reassembly, I discovered the internal connections are fairly fragile. They didn’t grip firmly when reattached. I ended up taking them apart multiple times trying to improve the connection. One attempt at crimping even broke a lead, so I decided not to push it further.&lt;br&gt;
&lt;br&gt;
Lesson learned: if you don’t need to disconnect something, don’t.&lt;br&gt;
&lt;br&gt;
Regardless, I’m extremely pleased with the restoration. They look good, work well, and fit nicely in my collection.&lt;br&gt;
&lt;br&gt;
&lt;a href="https://flic.kr/p/2rWXFym" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/55099566760_a07be540bb_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2rWXFym" target="_blank" rel="noopener"&gt;Atari 2600 Controller Restoration&lt;/a&gt; by &lt;a href="https://www.flickr.com/photos/safepit/" target="_blank" rel="noopener"&gt;Steven Reid&lt;/a&gt;, on Flickr&lt;br&gt;
&lt;br&gt;
Hopefully the next hardware project goes just as well.</description>
</item>
  <item>
    <title>Are You Fast Enough to Beat My ZX81 Duck, Duck, Goose Game?</title>
    <link>https://www.reids4fun.com/586/are-you-fast-enough-to-beat-my-zx81-duck-duck-goose-game</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Fri, 30 Jan 2026 22:14:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>games</category>
     <category>monthly</category>
     <category>retro</category>
     <category>reaction</category>
    <guid>https://www.reids4fun.com/586/are-you-fast-enough-to-beat-my-zx81-duck-duck-goose-game</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/ddg-2026-zx81-start-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Duck Duck Goose Start Screen, ZX81 Screenshot, 2026 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;Every once in a while, a small, silly idea turns into a surprisingly fun little project. That’s exactly what happened with my latest ZX81 experiment, &lt;a href="https://www.reids4fun.com/zx81/ddg/play" target="_blank" rel="noopener"&gt;a reaction-based game&lt;/a&gt; inspired by the old nursery rhyme: Duck, Duck, Goose.The rhyme always felt like a game waiting to happen. Someone walks around, calmly tapping heads, saying “duck… duck… duck…” and then suddenly — goose! Everything changes in an instant. That moment of surprise is perfect for a computer game, especially on a machine like the ZX81 where timing and simplicity are part of the charm.&lt;br&gt;
&lt;br&gt;
I started with the story in my head: the computer steps through the ducks, and at some random point it shouts goose. Your job is simple — react fast enough and hit the right key before it’s too late.&lt;br&gt;
&lt;br&gt;
Simple idea. Tricky execution.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; From rhyme to reaction.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
At first, I built it in the most obvious way. The program runs through the ducks, waits, and when it hits goose you press a key to win. While testing, I immediately found a problem. I could beat it every single time by just holding the winning key down.&lt;br&gt;
&lt;br&gt;
Not being any fun, I added a check to make sure you weren’t already pressing the key. Although it helped a little, it didn’t fix the problem. I could still cheat by holding the key, letting the program pause before the reaction window, and then hitting it again to win. &lt;br&gt;
&lt;br&gt;
Back to the drawing board.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making it harder to cheat.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The real fix turned out to be simple and much more interesting: don’t tell the player which key will win.&lt;br&gt;
&lt;br&gt;
Instead of waiting for one predictable input, the program now picks a random key when goose happens. That means you can’t camp on a button anymore — you actually have to react, see what’s being asked, and respond in time.&lt;br&gt;
&lt;br&gt;
The side effect?&lt;br&gt;
&lt;br&gt;
It’s harder. Sometimes really hard.&lt;br&gt;
&lt;br&gt;
But that’s what made it fun.&lt;br&gt;
&lt;br&gt;
Suddenly Duck, Duck, Goose stopped being a timing trick and turned into a proper reaction test. You have to be fast enough to win. I adjusted the timing a bit to ensure the game felt fair, yet challenging. On a ZX81, that kind of tension feels great. The machine isn’t rushing you with graphics or sound; it’s just quietly waiting to see if you’re quicker than it is.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/ddg-2026-zx81-win-screenshot-by-steven-reid-320x240.png" alt="Duck Duck Goose Win Screen, ZX81 Screenshot, 2026 by Steven Reid"&gt;Duck Duck Goose Win Screen, ZX81 Screenshot, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Programming a game.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Under the hood &lt;a href="https://www.reids4fun.com/zx81/ddg/list" target="_blank" rel="noopener"&gt;Duck, Duck, Goose&lt;/a&gt; is classic ZX81 BASIC. The program flow is as follows:&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;&lt;li&gt;It steps through the ducks.&lt;/li&gt;&lt;li&gt;Randomly decides when goose appears.&lt;/li&gt;&lt;li&gt;Chooses a random winning key.&lt;/li&gt;&lt;li&gt;Opens a short reaction window.&lt;/li&gt;&lt;li&gt;Checks if the correct key is pressed in time.&lt;/li&gt;&lt;li&gt;Then decides your fate.&lt;br&gt;
&lt;br&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;br&gt;
Nothing fancy,  just timing, randomness, and keeping the player honest. Because of the randomness, I used &lt;code&gt;SCROLL&lt;/code&gt; to avoid filling up the display.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Can you beat it?&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Of course, the real question isn’t how it works — it’s whether you’re fast enough. No save states. No rewinds. Just you, the ZX81, and a surprise goose waiting to ruin your day.&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;&lt;li&gt;Sometimes you’ll win.&lt;/li&gt;&lt;li&gt;Sometimes you’ll swear you pressed the key in time.&lt;/li&gt;&lt;li&gt;And sometimes the goose just gets you.&lt;br&gt;
&lt;br&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;br&gt;
Which feels pretty accurate to the playground version, honestly.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/ddg-2026-zx81-lose-screenshot-by-steven-reid-320x240.png" alt="Duck Duck Goose Lose Screen, ZX81 Screenshot, 2026 by Steven Reid"&gt;Duck Duck Goose Lose Screen, ZX81 Screenshot, 2026 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Final thoughts.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
I like projects like this. They start with something small — a nursery rhyme, a silly idea — and turn into a little experiment in game design. Even on a 40-year-old machine, you still run into modern problems like cheating, fairness, and player feedback.&lt;br&gt;
&lt;br&gt;
Duck, Duck, Goose ended up being more than a joke program. It’s a tiny reaction challenge wrapped in a bit of childhood nostalgia, running on hardware that still surprises me with what it can do.&lt;br&gt;
&lt;br&gt;
So… are you fast enough to beat it?&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/ddg/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/ddg/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>My Retro Computing Binge, Falling Back in Love With Hardware</title>
    <link>https://www.reids4fun.com/585/my-retro-computing-binge-falling-back-in-love-with-hardware</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Sat, 17 Jan 2026 09:53:00 -0600</pubDate>
     <category>Retro Hardware</category>
     <category>retro-computing</category>
     <category>zx81</category>
     <category>commodore</category>
     <category>atari</category>
     <category>vintage-hardware</category>
     <category>8-bit</category>
     <category>classic-gaming</category>
    <guid>https://www.reids4fun.com/585/my-retro-computing-binge-falling-back-in-love-with-hardware</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/topics/hardware.jpg&quot; alt=&quot;Retro Hardware&quot; style=&quot;float:left;margin-right:10px&quot;&gt;Lately I’ve been on a binge — a retro computing hardware binge. It started last year when I went searching for a working Timex Sinclair 1000. The idea was simple. Set it up and run my own programs on real hardware again. What began as a hunt for one machine quickly turned into something bigger.I have fond memories of programming my ZX81, and the thought of seeing my code run on real hardware stuck with me more than I expected. I’m not there yet. The Timex Sinclair is still sitting in its box in my office. But that’s the part I’m working toward. I want to plug things in, load my programs, and watch them behave the way they did when I was a kid. Showing them off to my parents and anyone else who wandered into the room.&lt;br&gt;
&lt;br&gt;
Once that idea settled in, I started looking for ways to make it real. That’s where modern retro hardware and a certain familiar name pulled me in.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; I blame Commodore.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Well, probably not really. But it did kick-start things again. LEGO didn’t help either with their Atari and Nintendo sets. Seeing the new hardware Commodore had, I was very tempted to get one. It looked like my old C64 from my teenage years, but didn’t require me to figure out how to connect it to a modern TV — one of the reasons my Timex Sinclair was still in the box.&lt;br&gt;
&lt;br&gt;
I was still working on finding the parts needed to get that other hardware running. I still have all my ZX81 tapes from when I was a kid. I bought a new cassette deck a few years back to play them into my Mac, replacing the bulky boom box I had been using. Loading those old programs from cassette was what started my ZX81 blogging. The high-pitched squeal of a program loading from tape was music to my ears. I wanted to find a way to recapture that moment.&lt;br&gt;
&lt;br&gt;
First, I needed a way to connect it to a modern TV. I started looking for ways to convert old RF signals into HDMI. I found a few devices, now on order, to see if they work. Yes, I could do a composite modification, but my problem had grown — I had other machines I wanted to experiment with too.&lt;br&gt;
&lt;br&gt;
With those thoughts still in my head, I finally pulled the trigger on a new Commodore. It arrived this week, but I’m traveling, so my experimentation will have to wait a little longer.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; More retro goodness with Atari.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Another console pushed me back toward the Atari VCS. I had bought a modern version of the VCS housed inside a joystick a few years back. It was fun to play the old games, but it lacked the nostalgia of the original hardware. I missed having physical cartridges to shove into the deck.&lt;br&gt;
&lt;br&gt;
My original Atari was long gone, given away years ago. But a new FPGA version had shown up on the market that not only let you use original games, but also worked with modern TVs. I added it to my wish list months ago and, after the new year, finally pulled the trigger. I chose the modern 7800 mainly because I liked the more compact shell.&lt;br&gt;
&lt;br&gt;
At the same time, I picked up a handful of untested games off eBay. They all arrived together, which led me down a small rabbit hole of plugging in the console, lightly cleaning the carts, and giving each game a try. It had been over thirty years since I last held an Atari cartridge, and it immediately transported me back to being a teenager in my parents’ basement, trying out the latest Activision release. I was hooked.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Being young again.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Perhaps the thrill of getting that first cart to load helped, but I had a fun few hours. Just like I remembered, the games didn’t always fit right. I had to finagle a few to get them to open their dust doors. I made sure they engaged well, just like I would as a child. The 7800 console was easy to set up, and the wireless joystick was a real quality-of-life upgrade.&lt;br&gt;
&lt;br&gt;
A big win was that almost all the games worked, with only one giving me trouble. I’ll work on cleaning it later. At that moment, it didn’t matter — I was having fun. I loaded up Donkey Kong and immediately started playing. More than forty years later, I still knew how to start the game and work through the levels.&lt;br&gt;
&lt;br&gt;
After shaking off the rust, I was able to get the ladder timing right again and work my way through the first level. The timing of the jumps took a moment to return. I kept jumping too early and landing on barrels. As the rust fell away, I finally cleared the stage.&lt;br&gt;
&lt;br&gt;
The second took more effort. I never had a single pattern, so remembering how to clear the bricks and evade the fireballs took longer. Muscle memory kicked in and, after a few playthroughs, the gameplay came back. It was like the decades melted away, and I started enjoying each game as I tested it.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; More nostalgia ahead.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Not content with just the few games I had, I ordered some more, not realizing the lot also included an original Atari. Apparently, you really should look at all the pictures when ordering off eBay. In any case, I soon had another set of games to try out. Included, to my delight, was Asteroids.&lt;br&gt;
&lt;br&gt;
This may sound silly, but I love the original 2600 version. Yes, the sprites are simple and flicker, but I still remembered how to play. I selected game 17 — I prefer the fast flip instead of warping — and proceeded to play. Being one of the earliest games I remember, I have fond memories of sitting in my room playing Asteroids. Like my younger days, I quickly racked up points and flipped the score. The first time I did that, I remember running to tell my parents.&lt;br&gt;
&lt;br&gt;
The Atari console itself looked good but needed some cleaning. Once I get my composite connector, I’ll see if it still works. I also need to fix the controllers — they were missing the rubber covers. I ordered a pair that arrived this week while I was traveling. The paddles work, but they’re a bit wonky at times. I’ll see if I can clean them up as well.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A new idea formed.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
With all this modern-retro fun, a bigger idea started to form. I wanted to collect a few different computers from the eighties. I fondly remember going to each of my friends’ houses and trying different machines. Everyone had something different. It was great fun to try each other’s games and see how they all worked.&lt;br&gt;
&lt;br&gt;
I programmed on an Atari 800 at school, and my best friend owned an Atari 800XL. I learned on an Apple ][ in high school. I owned a Commodore 64, 64C, 128, and Amiga over the years. All of those are now long gone and high on my list to acquire and display. Each one adds to the memories I’ve collected along the way.&lt;br&gt;
&lt;br&gt;
I hope to mount them behind me in my office as a reminder of where it all started. Not as museum pieces, but as working machines with stories still left in them. In the next article, I’ll start cleaning, restoring, and figuring out how to actually display this growing collection and, of course, see which of these old friends still power on.</description>
</item>
  <item>
    <title>Building a Flip-Style Digital Clock on the ZX81</title>
    <link>https://www.reids4fun.com/584/building-a-flip-style-digital-clock-on-the-zx81</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Mon, 22 Dec 2025 20:28:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>retro</category>
     <category>monthly</category>
     <category>clock</category>
     <category>font</category>
    <guid>https://www.reids4fun.com/584/building-a-flip-style-digital-clock-on-the-zx81</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/flipclk-2025-zx81-running-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Flip-style digital clock running on the ZX81, 2025 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I’d been thinking about writing a better clock program for the ZX81 for some time but never acted on it. That is, until yesterday when I saw a flip-style digital clock program on the C64. The result is a sort of &lt;a href="https://www.reids4fun.com/zx81/flipclk/play" target="_blank" rel="noopener"&gt;digital flip clock program&lt;/a&gt; for the ZX81 that ended up being quite a fun journey.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Programming a clock without a clock.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
First off, I should note that the ZX81 doesn’t have a clock. It does have a crystal oscillator in the ULA chip, but don’t expect miracles. It works, but it will drift. The irony isn’t lost on me that Timex sold a number of these in the US and these things don’t keep on ticking. Marketing aside, you aren’t going to get a great clock.&lt;br&gt;
&lt;br&gt;
Thus, the way to do this is by counting frames, which the ZX81 makes easy through a system variable. This isn’t a new concept and is used by other games as well. But that was where my brain was stuck, as I don’t use it much in BASIC. I decided to focus my attention there. At this point, I started to build a very basic digital clock with a few input statements. The prototype worked, but it was boring.&lt;br&gt;
&lt;br&gt;
One thing I did early on was to make sure the clock worked on both the PAL and NTSC versions. The ZX81 has a system variable I could read to adjust the frames per second. As a note, the clocks are highly imprecise, so you might need to nudge it a bit. I originally had some routines built in to do that manually. They proved too slow and I decided to drop them from the final version.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Sprucing up the clock.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The goal was to build a more interesting clock with larger digits. This required a lot of trial and error to see what worked fast enough. Given the frame counter only gives me about 4–5 seconds, I needed a fast print routine. The first version required breaking apart digits and printing each number using simple print routines. This worked, but wasn’t very fast.&lt;br&gt;
&lt;br&gt;
My next version used arrays to hold strings. There are multiple ways to do this. You can use flat arrays and split them, which is easy to enter but proved slower. Or you can create a multidimensional array and print each row of the digit. This was marginally faster, so I stuck with it.&lt;br&gt;
&lt;br&gt;
As a note, during development I displayed the seconds. Although this worked, it tended to skip seconds—something I adjusted for in the routine. It still looked awkward, so I dropped it later. I also played around with blinking colons, leaving that in the final version to give some visual feedback that things were working.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/flipclk-2025-zx81-running-screenshot-by-steven-reid-320x240.png" alt="Flip Clock, Running, ZX81 Screenshot, 2025 by Steven Reid"&gt;Flip Clock, Running, ZX81 Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
The final version made a couple of minor changes. I didn’t like the slow incremental printing, so I built the display in another variable and printed it all at once. This still drags a bit, but looks smoother. To keep things as fast as possible, I don’t print anything until the minute changes.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Setting the clock.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Although INPUT worked in the prototype, I wanted a better user experience. To accomplish that, I ended up using the print routine itself to let the user enter digits to set the time. When done, you use the D key and, if the time is valid, the clock starts.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/flipclk-2025-zx81-setting-screenshot-by-steven-reid-320x240.png" alt="Flip Clock, Setting, ZX81 Screenshot, 2025 by Steven Reid"&gt;Flip Clock, Setting, ZX81 Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
This is actually a pretty slick program, but it also shows how slow the print routine is. It takes almost a second to display the digits. Be patient! I really like it, but I do wish the display was a bit faster. If I were to make any changes, I’d probably move the digit display into machine code. The goal was to keep this in BASIC, and this is probably as good as it gets.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A lot of work.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href="https://www.reids4fun.com/zx81/flipclk/list" target="_blank" rel="noopener"&gt;Although a simple program&lt;/a&gt;, I spent a lot of time building and testing different versions. I ran through probably sixteen iterations as I tried different ways of accomplishing the same thing. I used GenAI to help research ideas, but I spent much of the time explaining the ZX81’s constraints.&lt;br&gt;
&lt;br&gt;
If I were to make changes, I’d reduce the character size and try to speed up the display. Adding an alarm would be cool. There are sound cards out there that would be neat to use. I also found a project during my research that used an external clock. That would be a fun project for another day.&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/flipclk/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/flipclk/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Experimenting with Binary Space Partitioning on the ZX81</title>
    <link>https://www.reids4fun.com/583/experimenting-with-binary-space-partitioning-on-the-zx81</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Fri, 28 Nov 2025 20:11:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>monthly</category>
     <category>retro</category>
     <category>maps</category>
     <category>math</category>
    <guid>https://www.reids4fun.com/583/experimenting-with-binary-space-partitioning-on-the-zx81</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/rooms-2025-zx81-building-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Rooms, Building, ZX81 Screenshot, 2025 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I thought I’d try something a bit different this month. I’d been looking at different ways to build maps for years but never really did much with them. After watching a video on binary partitioning, I decided to see if I could build &lt;a href="https://www.reids4fun.com/zx81/rooms/play" target="_blank" rel="noopener"&gt;a simple map builder&lt;/a&gt; on the ZX81.  &lt;br&gt;
&lt;br&gt;
This is the result.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Watching It Run.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Rooms started as a way to build a map of rooms. Simple enough. But as I worked on the program, I added a few debugging lines to help me watch what it was doing. This made the demo a bit more interesting to watch. I could have easily run it in &lt;code&gt;FAST&lt;/code&gt; mode and printed the final output, but where’s the fun in that?&lt;br&gt;
&lt;br&gt;
In a departure from what I normally do, I left the debugging routines in the version I’m sharing. It may not be obvious at first, but there are two debugging routines. The first shows vertical (&lt;var&gt;SV&lt;/var&gt;) and horizontal (&lt;var&gt;SH&lt;/var&gt;) splits for each room.&lt;br&gt;
&lt;br&gt;
The second is after Rooms clears the screen and displays room numbers. For each room, it prints its screen position, width, and height. Following that, the rooms are drawn on the screen. More on that later.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/rooms-2025-zx81-building-screenshot-by-steven-reid-320x240.png" alt="Rooms, Building, ZX81 Screenshot, 2025 by Steven Reid"&gt;Rooms, Building, ZX81 Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Getting Ready.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
With the premise complete, let’s &lt;a href="https://www.reids4fun.com/zx81/rooms/list" target="_blank" rel="noopener"&gt;dive into the program&lt;/a&gt;. The general idea is that you start with a room and divide it. That division could be vertical or horizontal. Easy, right? Not quite. First, you need a little math—and a data structure.&lt;br&gt;
&lt;br&gt;
To keep things simple, I used an array to hold the rooms. I start with a single room. The routine looks like this:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;1000&#160;REM&#160;**INIT
1010&#160;LET&#160;NR=1
1020&#160;LET&#160;NM=10
1030&#160;LET&#160;RM=5
1040&#160;DIM&#160;R&#40;NM,4&#41;
1050&#160;LET&#160;R&#40;1,1&#41;=0
1060&#160;LET&#160;R&#40;1,2&#41;=0
1070&#160;LET&#160;R&#40;1,3&#41;=63
1080&#160;LET&#160;R&#40;1,4&#41;=43&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
The variable &lt;var&gt;NR&lt;/var&gt; tracks the number of rooms. &lt;var&gt;R&lt;/var&gt; holds each room’s position and dimensions. Two constants give me flexibility in adjusting the map creation. The &lt;var&gt;NM&lt;/var&gt; variable holds the maximum number of rooms to create. The &lt;var&gt;RM&lt;/var&gt; variable contains the minimum room size. With that in place, I can start building the map.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Building Rooms.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The next step is to walk through each room and try to split it. Using a &lt;code&gt;FOR&lt;/code&gt; loop, I pick a split direction. I used a little trick to do that in a single line:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;2060&#160;GOSUB&#160;3000+100*INT&#160;&#40;RND*2&#41;&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
This lets me jump to one of two routines—vertical split or horizontal split—without extra conditionals.&lt;br&gt;
&lt;br&gt;
The general algorithm:&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;&lt;li&gt;Divide the room randomly.&lt;/li&gt;&lt;li&gt;Calculate the new room’s screen coordinates.&lt;/li&gt;&lt;li&gt;Adjust the original room’s width and height.&lt;/li&gt;&lt;li&gt;Calculate the new room’s width and height.&lt;br&gt;
&lt;br&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;br&gt;
After the split, the main routine performs two checks:&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;&lt;li&gt;Is each room big enough?&lt;/li&gt;&lt;li&gt;Are we still below the room limit?&lt;br&gt;
&lt;br&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;br&gt;
If either fails, it skips the update and moves on. If both pass, the original room is updated, &lt;var&gt;NR&lt;/var&gt; increases, and the new room is inserted at the end of the array.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/rooms-2025-zx81-finding-screenshot-by-steven-reid-320x240.png" alt="Rooms, Finding, ZX81 Screenshot, 2025 by Steven Reid"&gt;Rooms, Finding, ZX81 Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Building a Map.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
There’s a larger loop that keeps dividing rooms until we reach our target count. Ten seemed like a good start. Inside this loop, the program prints out the rooms created so far and then draws them to the screen.&lt;br&gt;
&lt;br&gt;
I originally planned to turn off debugging and just show the final rooms, but I ended up liking the look, so it stayed.&lt;br&gt;
&lt;br&gt;
You may notice that rooms print in a strange order. That’s because new rooms are appended to the array and aren’t always next to the room that generated them. I could have created a tree structure, linking parent to child. I didn’t need that for this demo, but maybe in the future.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/rooms-2025-zx81-final-screenshot-by-steven-reid-320x240.png" alt="Rooms, Final, ZX81 Screenshot, 2025 by Steven Reid"&gt;Rooms, Final, ZX81 Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; What’s Next.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The rooms generated here work fine, but they could use more variety. For the next version, I plan to add connections and vary the room sizes. That should give the map more personality—especially for dungeons or caves.&lt;br&gt;
&lt;br&gt;
I’ll likely convert the whole thing to machine code as well, since speed becomes an issue as complexity grows.&lt;br&gt;
&lt;br&gt;
Once I have the core engine working, the real challenge begins: what do I use it for? I have some old game ideas from my teenage years that would fit nicely. I had monsters and such built out in earlier projects, but everything was quite static. This system would give me a proper world to drop them into.&lt;br&gt;
&lt;br&gt;
Looking forward to sharing more as it grows.&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/rooms/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/rooms/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Drawing a Twisted Cylinder on the ZX81</title>
    <link>https://www.reids4fun.com/582/drawing-a-twisted-cylinder-on-the-zx81</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Fri, 31 Oct 2025 23:09:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>retro</category>
     <category>zx81</category>
     <category>monthly</category>
     <category>math</category>
    <guid>https://www.reids4fun.com/582/drawing-a-twisted-cylinder-on-the-zx81</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/cylinder-2025-zx81-screenshot1-by-steven-reid-320x240.png&quot; alt=&quot;Cylinder, ZX81 Screenshot #1 by Steven Reid, 2025&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I wrote this back in August and I’m finally getting around to publishing it. It was first shared in my BASIC group, but the ZX81 lacks a lot of the functionality needed for it to run well. Undeterred, I hacked at &lt;a href="https://www.reids4fun.com/zx81/cylinder/play" target="_blank" rel="noopener"&gt;the program&lt;/a&gt; to not only display the twisted cylinder, but also add a bit of randomness to the demo.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Needing a line.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The first hurdle to overcome was adding a line-drawing routine. Fortunately, I’ve done this a few times in other programs, so I grabbed the routine from my old drawing program. With that in place, I could replicate the math of the original program and see how it behaved.&lt;br&gt;
&lt;br&gt;
I got to work &lt;a href="https://www.reids4fun.com/zx81/cylinder/list" target="_blank" rel="noopener"&gt;formatting the program&lt;/a&gt;. As a teenager I usually didn’t bother, but these days I try to make things a bit more logical. It’s easy enough to use a &lt;code&gt;GOSUB&lt;/code&gt; to organize logic. Doesn’t hurt to add a comment or two using &lt;code&gt;REM&lt;/code&gt; either. The result is a program that’s a little easier to read.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/cylinder-2025-zx81-screenshot1-by-steven-reid-320x240.png" alt="Cylinder, ZX81 Screenshot #1 by Steven Reid, 2025"&gt;Cylinder, ZX81 Screenshot #1 by Steven Reid, 2025&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Plotting is so hard.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Although I couldn’t do much about the slowness of the program, I could fix another issue I ran into. The ZX81 plots from the bottom-left corner, which caused the cylinder to appear inverted. Not quite what I planned.&lt;br&gt;
&lt;br&gt;
To get around that, I inverted the plots. Fortunately, that only required a bit of math. Instead of &lt;code&gt;LET X1=X1/4.4&lt;/code&gt; I did this: &lt;code&gt;LET X1=64-X1/4.4&lt;/code&gt;. Not too difficult, but it looks a lot better. I also mirrored the Y-axis, although I probably didn’t need to.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/cylinder-2025-zx81-screenshot2-by-steven-reid-320x240.png" alt="Cylinder, ZX81 Screenshot #2 by Steven Reid, 2025"&gt;Cylinder, ZX81 Screenshot #2 by Steven Reid, 2025&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
This got me to the point where I could test. Although the program worked, it was too big for the screen. To size the cylinder properly, I scaled down the plot points. Thus, the &lt;code&gt;/4.4&lt;/code&gt; in the code above. It fixed the display and kept the cylinder on screen.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Adding a bit more interest.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Although the program looked decent, it was a bit dull. To spice things up, I added some randomness to the cylinder’s shape. This ensures that each new cylinder looks a bit different, turning the program into something closer to a screen saver.&lt;br&gt;
&lt;br&gt;
To make the cylinder more interesting, I added a touch of randomness to a few variables:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;1000&#160;REM&#160;**SET&#160;VARS**
1010&#160;LET&#160;D=1.95
1020&#160;LET&#160;S=PI/10
1030&#160;RAND&#160;0
1040&#160;LET&#160;UR=30+RND*70
1050&#160;LET&#160;LR=40+RND*60&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
The &lt;var&gt;UR&lt;/var&gt; and &lt;var&gt;LR&lt;/var&gt; determine the twist of the cylinder and make it easier to see on screen.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/cylinder-2025-zx81-screenshot3-by-steven-reid-320x240.png" alt="Cylinder, ZX81 Screenshot #3 by Steven Reid, 2025"&gt;Cylinder, ZX81 Screenshot #3 by Steven Reid, 2025&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
And with that, I wrap up this month&#39;s program.&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/cylinder/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/cylinder/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Fun with DATA — Building a Blocky World Map on the ZX81</title>
    <link>https://www.reids4fun.com/581/fun-with-data-building-a-blocky-world-map-on-the-zx81</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Sun, 28 Sep 2025 11:09:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>retro</category>
     <category>monthly</category>
    <guid>https://www.reids4fun.com/581/fun-with-data-building-a-blocky-world-map-on-the-zx81</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/world-2025-zx81-done-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;World, Map Done, ZX81  Screenshot, 2025 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I’d seen a few different BASIC programs that print out a map of the world. Generally blocky, they still looked decent, but much of the data was too big for the ZX81—until I ran across a C64 version based on a Spectrum program. Examples in hand, &lt;a href="https://www.reids4fun.com/zx81/world/play" target="_blank" rel="noopener"&gt;I built a version for the ZX81&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Beginnings.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
When I first saw the Commodore 64 version of the block world map, I got the thought that it might fit on the ZX81 screen. I realized why when I dug into the listing. It was based on a Sinclair Spectrum program by Luboš Janku&#39;s which shares the same screen size as the ZX81. I was intrigued as other versions tended to be for larger resolutions.&lt;br&gt;
&lt;br&gt;
On the positive side, the program was relatively short. Most of the length was in the &lt;code&gt;DATA&lt;/code&gt; routines toward the end. I originally thought the program would be a series of data points that would be plotted. While converting, I realized it was instead a compressed screen image. Although not quite what I was looking for, it offered a challenge: how would I deal with the ZX81 BASIC not having &lt;code&gt;DATA&lt;/code&gt; and &lt;code&gt;READ&lt;/code&gt; commands?&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/world-2025-zx81-expanding-screenshot-by-steven-reid-320x240.png" alt="World, Map Expanding, ZX81  Screenshot, 2025 by Steven Reid"&gt;World, Map Expanding, ZX81  Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Approaching the lack of data—strings.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The lack of &lt;code&gt;DATA&lt;/code&gt; is a long standing problem for the ZX81, even back in the eighties. Many of my books offered tips for converting other programs. The easiest, and partially the way I dealt with it, was to use strings.&lt;br&gt;
&lt;br&gt;
Strings are a good choice overall. They offer flexibility since there are different ways to read the data out of them. The challenge is often understanding how the program will read and use the data. With a string, you can either read it in parts using slicing or as a whole. If you’re feeling particularly ambitious, you can even create string arrays. Although, that might waste a good amount of memory since all the string arrays have to be the same size.&lt;br&gt;
&lt;br&gt;
The problem with strings is you basically store the data twice. Once in the program itself, and a second time when the data is read and loaded into the variable. This isn’t a huge problem on machines with more memory, but with the ZX81 it can be a challenge.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Inputing into your variables.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
To get around that, another way to handle data is to read it directly into variables. A text adventure interpreter I used to play with from a book used this trick. Basically, it had a loader program where it read the data through a series of &lt;code&gt;INPUT&lt;/code&gt; commands. The data was stored directly in the variables for the program.&lt;br&gt;
&lt;br&gt;
In addition to saving memory, it also meant you couldn’t list the program and see what the data was. A good choice if you are obfuscating your program. Just don’t forget where you placed your notes—it makes it hard to share anything other than the binary.&lt;br&gt;
&lt;br&gt;
One other word of caution: you have to remember never to &lt;code&gt;RUN&lt;/code&gt; or &lt;code&gt;CLEAR&lt;/code&gt; your program. Doing so erases the variables. On the positive side, using &lt;code&gt;SAVE&lt;/code&gt; on the ZX81 always stores the variables as well. Thus, this was often a good choice for large games that needed to save on memory.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Peeking around the program.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Another way you can approach this problem is to store the code in a &lt;code&gt;REM&lt;/code&gt; statement and use &lt;code&gt;PEEK&lt;/code&gt; to read the data. I used this approach in an early version of Gem Quest where each &lt;code&gt;REM&lt;/code&gt; held the tile graphics. It’s a bit trickier since you need to calculate the memory location. However, it has the advantage of saving memory and retaining the ability to list the program.&lt;br&gt;
&lt;br&gt;
The disadvantage to this method is that you have to get each entry one byte at a time. This isn’t particularly fast. I was using some compiled BASIC with MCODER to get around the problem. You could also use a small machine language routine to speed things up. But if you’re going to do that, you might as well just write the whole thing in assembly. Kind of defeats the purpose.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Reading strings.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
The original program had data strings that were variable in length. It would read a line of data each time into a string array. Since the program was relatively small, I decided to just concatenate each of the data lines together into &lt;var&gt;D$&lt;/var&gt;. Example below without the inverted characters:  &lt;br&gt;
&lt;br&gt;
&lt;pre&gt;1000&#160;REM&#160;**DATA**
1010&#160;LET&#160;D$=&amp;quot;EEEDDNPPLCIBJBCIH.&amp;quot;
1020&#160;LET&#160;D$=D$+&amp;quot;DGEADABPPKBBCJBP
EMAEE.&amp;quot;&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
The data itself is a compressed screen image. The structure is straightforward: a number displays a series of spaces, a letter displays a graphic block, and an inverted letter displays a number of inverted spaces. I’ve used similar compression routines myself, and this isn’t a bad approach. For the most part, I didn’t want to change the data. However, I did add a period to the end of each data string so the read would work.&lt;br&gt;
&lt;br&gt;
To mimic the read, I wrote a small routine that basically copies each character into a new string, &lt;var&gt;A$&lt;/var&gt;. I used a string index in variable &lt;var&gt;L&lt;/var&gt; to know what to read next. That string would then be decompressed and displayed on screen. It isn’t super fast, but it works well enough:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&#160;500&#160;REM&#160;**READ**
&#160;510&#160;LET&#160;A$=&amp;quot;&amp;quot;
&#160;520&#160;IF&#160;D$&#40;L&#41;=&amp;quot;.&amp;quot;&#160;THEN&#160;GOTO&#160;560
&#160;530&#160;LET&#160;A$=A$+D$&#40;L&#41;
&#160;540&#160;LET&#160;L=L+1
&#160;550&#160;GOTO&#160;520
&#160;560&#160;LET&#160;L=L+1
&#160;570&#160;RETURN&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Running the program.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
After tweaking the print routine, &lt;a href="https://www.reids4fun.com/zx81/world/list" target="_blank" rel="noopener"&gt;the final program&lt;/a&gt; generated a decent world map. I think it looks pretty good on the ZX81, even if a bit slow. The program will pause for a bit before clearing the screen and starting over.&lt;br&gt;
&lt;br&gt;
&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/world-2025-zx81-done-screenshot-by-steven-reid-320x240.png" alt="World, Map Done, ZX81  Screenshot, 2025 by Steven Reid"&gt;World, Map Done, ZX81  Screenshot, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Other thoughts.&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
There are a multitude of ways to approach the &lt;code&gt;DATA&lt;/code&gt; command. Specific to this one, a better method would have been to place each line of the program as a string pointing to &lt;var&gt;A$&lt;/var&gt;. Instead of tracking the string position, I would have tracked which line it was on. In this case, &lt;var&gt;F&lt;/var&gt; from the &lt;code&gt;FOR&lt;/code&gt; loop could be used to calculate which line to read from. Thus, the program would have looked like this:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;500&#160;REM&#160;**ALT&#160;READ**
510&#160;&#160;GOTO&#160;10*F+990
1000&#160;REM&#160;**ALT&#160;DATA**
1010&#160;LET&#160;A$=&amp;quot;EEEDDNPPLCIBJBCIH&amp;quot;
1015&#160;RETURN
1020&#160;LET&#160;A$=&amp;quot;DGEADABPPKBBCJBPEMA
EE&amp;quot;
1025&#160;RETURN&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
This is much tighter, faster, and more memory efficient. Sadly, I thought of this after I understood how the program worked. Same goes for the compression algorithm. Now that I understand how it works, I’d probably tighten up the code a bit. In fact, I could probably remove the outer &lt;code&gt;FOR&lt;/code&gt; loop and skip the &lt;code&gt;READ&lt;/code&gt; altogether.&lt;br&gt;
&lt;br&gt;
Overall, this was a fun program to convert and dissect. There is no right or wrong in programming as there are always trade-offs and compromises. I look forward to seeing the different ways people solve the same problems. Until next time!&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
&lt;br&gt;
Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/world/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/world/list" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
    </channel>
</rss>