<?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>ZX81 Computer &#8211; Reid’s For Fun</title>
  <link>https://www.reids4fun.com/topic/zx81/feed</link>
  <atom:link href="https://www.reids4fun.com/topic/zx81/feed" rel="self" type="application/rss+xml"/>
  <description>Showcasing monthly programs, a retro look at my my first computer.</description>
  <language>en-us</language>
  <lastBuildDate>Thu, 16 Apr 2026 23:37:00 -0600</lastBuildDate>
  <image>
    <title>ZX81 Computer &#8211; Reid’s For Fun</title>
    <link>https://www.reids4fun.com/topic/zx81/feed</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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;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;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;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;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;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;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;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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;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>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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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.&lt;br&gt;&lt;br&gt;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;/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;/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>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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;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;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;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;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;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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;This is the result.&lt;br&gt;&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;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;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;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;/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;/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;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;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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;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;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;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;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;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&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;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;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;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;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;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;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;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;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;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>
  <item>
    <title>Speeding Up Truchet Tiles on My ZX81 with Machine Code</title>
    <link>https://www.reids4fun.com/580/speeding-up-truchet-tiles-on-my-zx81-with-machine-code</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Sun, 31 Aug 2025 10:34:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>monthly</category>
     <category>retro</category>
     <category>truchet</category>
     <category>assembly</category>
     <category>z80</category>
    <guid>https://www.reids4fun.com/580/speeding-up-truchet-tiles-on-my-zx81-with-machine-code</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/truchet-ml-2025-zx81-starting-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Truchet ML, ZX81 Starting Screenshot, 2025 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Having finished my last Truchet tiles program in BASIC, I wondered how fast it would run in machine code. Soon afterward, &lt;a href="https://www.reids4fun.com/zx81/truchetml/play" target="_blank" rel="noopener"&gt;I gave it a try&lt;/a&gt;, writing a version that runs significantly faster than the BASIC one. Let’s dive in and see how it works.  &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Setting things up.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;Turning Truchet into &lt;a href="https://www.reids4fun.com/zx81/truchetml/asm" target="_blank" rel="noopener"&gt;a machine language program&lt;/a&gt; was straightforward enough. After copying in my standard template, I stuck with the same looping concept I had originally used. The main loop of the program does just that—setting up the display locations and using the &lt;var&gt;BC&lt;/var&gt;  register as the &lt;var&gt;X&lt;/var&gt; and &lt;var&gt;Y&lt;/var&gt; loops.&lt;br&gt;&lt;br&gt;&lt;pre&gt;mainloop&#58;

ld&#160;de,&#40;d_file&#41;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;grab&#160;display&#160;file
inc&#160;de&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;add&#160;one

ld&#160;b,12&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;height&#160;x&#160;2
y_loop&#58;

ld&#160;c,16&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;width&#160;x&#160;2
x_loop&#58;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;With that done, I randomly print a tile—more on that in a bit. The rest of the &lt;var&gt;X&lt;/var&gt; loop looks like this:&lt;br&gt;&lt;br&gt;&lt;pre&gt;push&#160;bc&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;save&#160;loop
call&#160;print_a_tile
pop&#160;bc&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;restore&#160;loop

call&#160;delay

;&#160;done&#160;with&#160;x?
dec&#160;c
jp&#160;nz,x_loop&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Before closing out the &lt;var&gt;Y&lt;/var&gt; loop, I need to shift the display down a row. I could have optimized this a bit to remove the &lt;code&gt;push&lt;/code&gt; and &lt;code&gt;pop&lt;/code&gt;, but it keeps things more readable. Notice that I jump ahead 34. That’s because each tile is 2×2 and I have to move past the end-of-line return character on the first row, plus the row beneath it (33 with return).&lt;br&gt;&lt;br&gt;&lt;pre&gt;push&#160;bc
ld&#160;bc,34&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;jump&#160;ahead
ex&#160;de,hl
add&#160;hl,bc&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;to&#160;next&#160;row
ex&#160;de,hl
pop&#160;bc
;&#160;de&#160;at&#160;start&#160;of&#160;next&#160;row

;&#160;done&#160;with&#160;y?
djnz&#160;y_loop

jp&#160;mainloop&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;start&#160;again!&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/truchet-ml-2025-zx81-starting-screenshot-by-steven-reid-320x240.png" alt="Truchet ML, ZX81 Starting Screenshot, 2025 by Steven Reid"&gt;Truchet ML, ZX81 Starting 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; Printing the tiles.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;With the setup complete, now I need to print the tile. First, I have the tile patterns defined later in the program:&lt;br&gt;&lt;br&gt;&lt;pre&gt;;&#160;Truchet&#160;tile&#160;patterns
tile_1&#58;&#160;db&#160;$06,$00,$00,$06
tile_2&#58;&#160;db&#160;$00,$86,$86,$00&lt;/pre&gt;&lt;br&gt;&lt;br&gt;The &lt;code&gt;print_a_tile&lt;/code&gt; routine uses these locations to decide which tile to print. After setting &lt;var&gt;HL&lt;/var&gt; to point to the first tile, the program calls a simple 8-bit random number generator. I then compare the result with 127 to decide if I’ll print a different tile.&lt;br&gt;&lt;br&gt;&lt;pre&gt;print_a_tile&#58;

;&#160;get&#160;tile
ld&#160;hl,tile_1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;set&#160;to&#160;1st&#160;tile&#160;data
call&#160;rnd&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;get&#160;which&#160;tile
cp&#160;127&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;compare&#160;to&#160;50%
jp&#160;m,&#160;print_tile&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;first&#160;tile
ld&#160;hl,tile_2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;set&#160;to&#160;2nd&#160;tile&#160;data&lt;/pre&gt;&lt;br&gt;&lt;br&gt;At this point, &lt;var&gt;DE&lt;/var&gt; points at the screen location of the tile, while &lt;var&gt;HL&lt;/var&gt; points at the tile data. This is important since I’m going to use the &lt;code&gt;ldi&lt;/code&gt; instruction to copy the contents at &lt;var&gt;HL&lt;/var&gt; directly to the screen.&lt;br&gt;&lt;br&gt;&lt;pre&gt;print_tile&#58;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;de&#160;=&#160;display&#160;file&#160;location
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;hl&#160;=&#160;tile&#160;pattern&#160;data
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;bc,33&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;next&#160;row

&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;1st&#160;row
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ldi&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;1st&#160;char
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ldi&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;2nd&#160;char&lt;/pre&gt;&lt;br&gt;&lt;br&gt;At this point, half the Truchet tile is displayed. To print the bottom half, I move the display pointer down a line. Before I do that, I save &lt;var&gt;DE&lt;/var&gt; since it’s already pointing to the correct location for the next tile, thanks to how &lt;code&gt;ldi&lt;/code&gt; works. This is also why I set &lt;var&gt;BC&lt;/var&gt; to 33 instead of 31. Here’s the code for the second row:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;push&#160;de&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;save&#160;display&#160;location
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ex&#160;de,hl
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;add&#160;hl,bc&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;move&#160;to&#160;print&#160;tile
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ex&#160;de,hl

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;2nd&#160;row
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ldi&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;1st&#160;char
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ldi&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;print&#160;2nd&#160;char

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;pop&#160;de&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;restore&#160;location
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ret&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/truchet-2025-zx81-screenshot-by-steven-reid-320x240.png" alt="Truchet ML, ZX81 Screenshot, 2025 by Steven Reid"&gt;Truchet ML, 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; It’s so fast!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;With the primary routines complete, running the program uncovered a bit of a problem. It was too fast! Odd to say on the ZX81, I know, but I needed to slow things down a bit. I added my default delay routine, along with a break check, to finish the program. The final version was still faster than the BASIC one and very pleasant to watch.&lt;br&gt;&lt;br&gt;Now that it’s running smoothly, I’ve been thinking about ways to use it. With a less random routine—say, a memory pointer to ROM—I could make this into a scrolling background. That would fit nicely in a shooting or jumping game. Fun 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/truchetml/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/truchetml/asm" target="_blank" rel="noopener"&gt;view the code&lt;/a&gt; if you’d like to see how it works.</description>
</item>
  <item>
    <title>Exploring Truchet Tiles on the ZX81 with BASIC</title>
    <link>https://www.reids4fun.com/579/exploring-truchet-tiles-on-the-zx81-with-basic</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Sun, 13 Jul 2025 23:40:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>retro</category>
     <category>monthly</category>
     <category>truchet</category>
     <category>tiles</category>
    <guid>https://www.reids4fun.com/579/exploring-truchet-tiles-on-the-zx81-with-basic</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/truchet-2025-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Truchet, ZX81 Screenshot, 2025 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Sometimes ideas drop right into your lap. In the case of this month’s program, it was a mix of a post and a video that led me to this &lt;a href="https://www.reids4fun.com/zx81/truchet/play" target="_blank" rel="noopener"&gt;Truchet animation&lt;/a&gt;. A simple concept, but it worked way better on the ZX81 than I expected.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; So those diagonal lines were Truchet tiles.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;I’d read and &lt;a href="https://www.reids4fun.com/553/how-to-create-an-infinite-maze-on-the-zx81" target="_blank" rel="noopener"&gt;written here before&lt;/a&gt; about the single-line “10 PRINT” program. What I didn’t realize was that the diagonal lines used in the Commodore version were actually the Labyrinth variation of &lt;a href="https://en.wikipedia.org/wiki/Truchet_tiles" target="_blank" rel="noopener"&gt;Truchet tiles&lt;/a&gt;. &lt;a href="https://youtu.be/MVQJykMJSH0" target="_blank" rel="noopener"&gt;The video I watched&lt;/a&gt; opened my eyes, and I was intrigued to do something similar—but with my own twist!&lt;br&gt;&lt;br&gt;Since the ZX81 doesn’t natively support user-defined graphics (UDGs), I took a different approach. This is where the BASIC program that was shared sparked an idea. Instead of a single character like before, I decided to use a 2x2 tile. This gave me a bit more flexibility… but only a little. The ZX81’s character set is still pretty limited.&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; I kept the code simple and fast.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;Using the quarter-circle form of Truchet decoration, I landed on using two different tiles. In real life, it would just be a single tile rotated. I thought of a couple different ways to print the design, but ultimately went with the straightforward approach: generate a random number and use a conditional. Here’s the rough code used:&lt;br&gt;&lt;br&gt;&lt;pre&gt;LET&#160;R=INT&#160;&#40;RND*2&#41;
IF&#160;R=0&#160;THEN&#160;PRINT&#160;AT&#160;X,Y;”/&#160;“;AT&#160;X+1,Y;”&#160;/”;
IF&#160;R=1&#160;THEN&#160;PRINT&#160;AT&#160;X,Y;”&#160;&amp;quot;;AT&#160;X+1,Y;”\&#160;“;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;I used the ZX81’s graphics characters instead of the slashes, but you get the idea. The &lt;a href="https://www.reids4fun.com/zx81/truchet/list" target="_blank" rel="noopener"&gt;rest of the program&lt;/a&gt; is a loop that fills the display with tiles. I would’ve preferred more circular graphics, but had to work with what was available. To my surprise, the patterns looked really good.&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/truchet-2025-zx81-screenshot-by-steven-reid-320x240.png" alt="Truchet, ZX81 Screenshot, 2025 by Steven Reid"&gt;Truchet, 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; Why those last two lines had to go.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;Unlike some of my previous programs that scrolled the display, this one redraws the entire screen with new random tiles each time through the loop. The result is an ever-changing pattern, an idea I borrowed from the example I saw. I hadn’t tried that before, and it worked well with the simplicity of the design.&lt;br&gt;&lt;br&gt;The two blank lines at the bottom of the screen bugged me. There is a way to remove them, but I usually don’t bother. This time, though, filling the screen felt important. I considered poking the display memory with tile characters, but discarded that idea—it would have required math that would slow things down.&lt;br&gt;&lt;br&gt;Fortunately, there’s another way.&lt;br&gt;&lt;br&gt;On the ZX81, there’s a system variable that controls how many lines are reserved at the bottom of the screen. Setting that variable to zero with &lt;code&gt;POKE 16418,0&lt;/code&gt; effectively expands the vertical display by two lines. I hardly ever use this trick in BASIC since it can cause issues with scrolling. But in this case, scrolling wasn’t a problem.&lt;br&gt;&lt;br&gt;This solution was elegant: the only change I had to make was adjusting the &lt;code&gt;FOR&lt;/code&gt; loop range. I ran a few tests to see if breaking out of the program would crash the system. It didn’t—and I decided it was worth using. This trick has been around since I was a teenager and shows up in a few of my old books.&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Wrapping up with more tile ideas.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;And with that, I had a very simple tile program. I did try a few other designs just to see what worked. It’s not overly hard to add more tiles—I even made a version with four—but the ZX81’s limited character set didn’t play nicely with most of them. Feel free to try your own variations!&lt;br&gt;&lt;br&gt;As mentioned earlier, I could’ve also used an array to avoid the &lt;code&gt;IF&lt;/code&gt; conditionals. I didn’t go that route, but I’ll leave it as a challenge for someone else.&lt;br&gt;&lt;br&gt;Now, something I might do is convert this into a machine language version. Not only would it run faster, but I could use it inside a larger, more complex game. Interestingly, I learned after the fact that a few strategy games have used these same quarter-circle Truchet tiles. The patterns also seem like they’d make great backgrounds for other games.&lt;br&gt;&lt;br&gt;I’ll end this one with more ideas running through my head. Let me know what you’d like to see me build next!&lt;br&gt;&lt;br&gt;Want to try it out? &lt;a href="https://www.reids4fun.com/zx81/truchet/play" target="_blank" rel="noopener"&gt;You can run the program&lt;/a&gt;, or &lt;a href="https://www.reids4fun.com/zx81/truchet/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>Recreating Font Art on the ZX81—With Some Limits</title>
    <link>https://www.reids4fun.com/578/recreating-font-art-on-the-zx81with-some-limits</link>
    <dc:creator>Steven Reid</dc:creator>
    <pubDate>Sun, 29 Jun 2025 11:06:00 -0600</pubDate>
     <category>ZX81 Computer</category>
     <category>zx81</category>
     <category>monthly</category>
     <category>retro</category>
     <category>fonts</category>
     <category>ascii</category>
     <category>art</category>
    <guid>https://www.reids4fun.com/578/recreating-font-art-on-the-zx81with-some-limits</guid>
    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/funfonts-2025-3-d-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Fun Fonts: 3-D, 2025 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;It’s funny how a random video can spark an idea. One moment I’m watching someone play around with ASCII art, and the next I’m thinking, “Hey, I could make something like that on the ZX81.” That little spark turned into a weekend project: &lt;a href="https://www.reids4fun.com/zx81/funfonts/play" target="_blank" rel="noopener"&gt;a simple banner program&lt;/a&gt; using different fonts. How fun!&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; The Idea&lt;/strong&gt;&lt;br&gt;&lt;br&gt;I have fond memories of creating art using typewriters and characters. We had a typewriter in our house when I was around 8 or 9, and I remember spending hours just typing on it. Once I got into D&amp;D, I used it extensively to write up character sheets and campaign ideas. But I also used it to generate doodles and art—TIE Fighters and cartoons were a staple.&lt;br&gt;&lt;br&gt;It should be no surprise that some of my first computer programs were character art. I still have a Medusa head lying around somewhere from the PDP my school had. Terminals and consoles notoriously lacked graphics—or at least support from most programs for them. As such, ASCII art became a common way to create doodles and fun images.&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Fast Forward&lt;/strong&gt;&lt;br&gt;&lt;br&gt;In the ’90s, there was a resurgence—or perhaps an organization—of online ASCII art creation. During this time, entire fonts were created using basic characters and symbols. I came across a great example of these &lt;a href="https://patorjk.com/software/taag/#p=about&amp;f=BlurVision%20ASCII&amp;t=ZX81" target="_blank" rel="noopener"&gt;FIGlet Fonts&lt;/a&gt;, which got me thinking about using them in a 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/funfonts-2025-3-d-zx81-screenshot-by-steven-reid-320x240.png" alt="Fun Fonts: 3-D, 2025 by Steven Reid"&gt;Fun Fonts: 3-D, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;&lt;br&gt;The ZX81, with its blocky characters, was ripe for this kind of art—especially if you wanted to do anything visually interesting. Sadly, it lacks many of the standard characters that FIGlet fonts use, such as the backslash and apostrophe. Even the hash symbol (often called pound) and the exclamation mark are absent from the ZX81’s character set. Sad times.&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making Do&lt;/strong&gt;&lt;br&gt;&lt;br&gt;Not to be deterred, I decided to give a few of the fonts a try. &lt;a href="https://www.reids4fun.com/zx81/funfonts/list" target="_blank" rel="noopener"&gt;Creating a simple font display program&lt;/a&gt;, I was able to recreate a few using “ZX81” as the sample text. Some fit nicely on screen, but others required scrolling to get the full effect. To save space, I only reproduced the letters and numbers needed. Maybe a full-font program will be a future project.&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/funfonts-2025-alligator2-zx81-screenshot-by-steven-reid-320x240.png" alt="Fun Fonts: Alligator 2, 2025 by Steven Reid"&gt;Fun Fonts: Alligator 2, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;&lt;br&gt;I tried to use fonts with characters already available. For a few, I adjusted the characters where needed—for example, swapping out the hash symbol for the literal pound symbol. I think the fonts worked pretty well and look decent overall. A few spacing issues popped up since the ZX81’s pixels are more square than rectangular. I adjusted a few fonts to make the letters cleaner.&lt;br&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; All Done&lt;/strong&gt;&lt;br&gt;&lt;br&gt;The program itself is modular. You could easily add more examples or swap in different display techniques. I used string slicing for much of the display. The effect is slow in BASIC—so slow that I moved from printing each line individually to using a buffer technique to avoid jarring lag during rendering.&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/funfonts-2025-usa-flag-zx81-screenshot-by-steven-reid-320x240.png" alt="Fun Fonts: USA Flag, 2025 by Steven Reid"&gt;Fun Fonts: USA Flag, 2025 by Steven Reid&lt;/div&gt;
&lt;br&gt;&lt;br&gt;A more practical use for this program might be as an intro screen for a game. That said, I’d probably redo it in assembly for better speed. Having a complete font set could be fun for a banner program, but memory constraints would be a challenge. Alternatively, you could use the ZX81’s graphic symbols to make something even more visually compelling.&lt;br&gt;&lt;br&gt;What ideas do you have?</description>
</item>
  
	</channel>
</rss>