Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://feeds.feedburner.com/ReidsForFun

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <rss version="2.0"
  3. xmlns:atom="http://www.w3.org/2005/Atom"
  4. xmlns:dc="http://purl.org/dc/elements/1.1/"
  5. >
  6. <channel>
  7.  <title>Reid’s For Fun</title>
  8.  <link>https://www.reids4fun.com</link>
  9.  <atom:link href="https://feeds.feedburner.com/ReidsForFun" rel="self" type="application/rss+xml"/>
  10.  <description>Reid’s For Fun - Latest News</description>
  11.  <language>en-us</language>
  12.  <lastBuildDate>Sun, 10 Mar 2024 11:42:00 -0600</lastBuildDate>
  13.  <image>
  14.    <title>Reid’s For Fun</title>
  15.    <link>https://www.reids4fun.com</link>
  16.    <url>https://www.reids4fun.com/images/r-badge.png</url>
  17.  </image>
  18. <item>
  19.    <title>Crafting Black Hole Graphics on the ZX81</title>
  20.    <link>https://www.reids4fun.com/561/crafting-black-hole-graphics-on-the-zx81</link>
  21.    <dc:creator>Steven Reid</dc:creator>
  22.    <pubDate>Sun, 10 Mar 2024 11:17:00 -0600</pubDate>
  23.     <category>ZX81 Computer</category>
  24.     <category>monthly</category>
  25.     <category>zx81</category>
  26.     <category>retro</category>
  27.     <category>basic</category>
  28.     <category>daric</category>
  29.    <guid>https://www.reids4fun.com/561/crafting-black-hole-graphics-on-the-zx81</guid>
  30.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/blkhole-2023-zx81-screenshot-3-by-steven-reid-320x240.png&quot; alt=&quot;Black Hole, ZX81 Screenshot 3, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I had forgotten about this Black Hole program until I ran across it while cleaning up some directories. It is a conversion, not an original, program that was shared on one of my BASIC forums. It doesn’t look quite as good as the original, but it was interesting &lt;a href="https://www.reids4fun.com/zp/blkhole" target="_blank" rel="noopener"&gt;to see what the ZX81 could do with its simplistic graphics&lt;/a&gt;.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Having some BASIC fun.&lt;/strong&gt;&lt;br&gt;
  31. &lt;br&gt;
  32. “Black Hole,” by Dusty W. Murray, intrigued me because it already produced black and white output. Although, in the original version, the background is black. It creates a simple swirling pattern that resembles a black hole, and generated quite a lot of participation on the group at the time.&lt;br&gt;
  33. &lt;br&gt;
  34. My first attempt, however, was not for the ZX81. I decided to try this in Daryl Dudey&#39;s Daric BASIC first, and it worked well.&lt;br&gt;
  35. &lt;br&gt;
  36. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/memberpics/admin/blkhole-2023-daric-screenshot-by-steven-reid.png" alt="Black Hole, Daric Screenshot, 2023 by Steven Reid"&gt;Black Hole, Daric Screenshot, 2023 by Steven Reid&lt;/div&gt;
  37. &lt;br&gt;
  38. &lt;br&gt;
  39. Here is the Daric BASIC code for those interested. I added the range command, and the images look much nicer! This version will generate images until you press &lt;kbd&gt;q&lt;/kbd&gt;.&lt;br&gt;
  40. &lt;br&gt;
  41. &lt;pre&gt;rem&#160;**Black&#160;Hole**by&#160;Dusty&#160;W.&#160;Murray**
  42. rem&#160;**Converted&#160;to&#160;Daric&#160;by&#160;Steven&#160;Reid,&#160;3/19/2023**
  43. Def&#160;Range&#58;float&#40;v&#58;Float,&#160;minimal&#58;Float,&#160;maximal&#58;Float&#41;
  44. if&#160;v&amp;amp;lt;minimal&#160;then&#160;v&#160;=&#160;minimal
  45. if&#160;v&amp;amp;gt;maximal&#160;then&#160;v&#160;=&#160;maximal
  46. return&#160;v
  47. End&#160;Def
  48. Mode&#160;800,600,Windowed
  49. SetBg&#160;0,&#160;0,&#160;8
  50. SetFg&#160;255,255,255
  51. w&#160;=&#160;ScreenWidth&#40;&#41;
  52. h&#160;=&#160;ScreenHeight&#40;&#41;
  53. mw&#160;=&#160;int&#40;w/2&#41;
  54. mh&#160;=&#160;int&#40;h/2&#41;
  55. mr&#160;=&#160;mw&#160;*&#160;2
  56. Repeat
  57. Cls
  58. ads&#160;=&#160;0.005
  59. rds&#160;=&#160;0.5
  60. r&#160;=&#160;5.0
  61. rd&#160;=&#160;0.0
  62. a&#160;=&#160;0.0
  63. ad&#160;=&#160;ads
  64. For&#160;t&#160;=&#160;0&#160;To&#160;1999*31
  65. ch&#160;=&#160;Rnd&#40;5&#41;
  66. if&#160;ch&#160;=&#160;0&#160;then&#160;rd&#160;=&#160;rds
  67. if&#160;ch&#160;=&#160;1&#160;then&#160;rd&#160;=&#160;-rds&#160;*&#160;0.991
  68. if&#160;ch&#160;=&#160;2&#160;then&#160;ad&#160;=&#160;ads
  69. if&#160;ch&#160;=&#160;3&#160;then&#160;ad&#160;=&#160;-ads
  70. r&#160;=&#160;r&#160;+&#160;rd
  71. r&#160;=&#160;Range&#40;r,&#160;10,&#160;mr&#41;
  72. a&#160;=&#160;a&#160;+&#160;ad
  73. if&#160;a&amp;amp;lt;0&#160;then&#160;a=a+2*pi
  74. if&#160;a&amp;amp;gt;2*pi&#160;then&#160;a=a-2*pi
  75. ar&#160;=&#160;r&#160;/&#160;50
  76. x=&#160;int&#160;&#40;Sin&#40;a+ar&#41;*r&#41;&#160;+&#160;mw
  77. y=&#160;int&#160;&#40;Cos&#40;a+ar&#41;*r&#41;&#160;+&#160;mh
  78. Plot&#160;x,y
  79. Next
  80. key&#160;=&#160;GetKey&#40;&#41;&#160;&#58;&#160;rem&#160;Wait&#160;for&#160;a&#160;key
  81. Until&#160;key=113&#160;&#58;&#160;rem&#160;Quit&#160;on&#160;&amp;quot;q&amp;quot;&#160;being&#160;entered&lt;/pre&gt;&lt;br&gt;
  82. &lt;br&gt;
  83. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Giving the ZX81 a try.&lt;/strong&gt;&lt;br&gt;
  84. &lt;br&gt;
  85. Given that the ZX81 has pretty good math, &lt;a href="https://www.reids4fun.com/zl/blkhole" target="_blank" rel="noopener"&gt;converting this to ZX81 BASIC wasn’t too hard&lt;/a&gt;. I started with my Daric version and added in line numbers. Most of the statements were already on separate lines, making it easy to convert.&lt;br&gt;
  86. &lt;br&gt;
  87. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/blkhole-2023-zx81-screenshot-1-by-steven-reid-320x240.png" alt="Black Hole, ZX81 Screenshot 1, 2023 by Steven Reid"&gt;Black Hole, ZX81 Screenshot 1, 2023 by Steven Reid&lt;/div&gt;
  88. &lt;br&gt;
  89. &lt;br&gt;
  90. I did inline the &lt;code&gt;Range&lt;/code&gt; function as the ZX81 doesn&#39;t have a mechanism to do that. The final code looks similar to the original, with a few more comments to make things obvious. I also broke out the loop into two parts. This was so I could use the &lt;code&gt;FAST&lt;/code&gt; command to speed it up a bit. After each iteration, I &lt;code&gt;PAUSE&lt;/code&gt; for a bit so you can see the image progression.&lt;br&gt;
  91. &lt;br&gt;
  92. You’ll also notice the function boundaries are quite a bit lower than the original. This is due to speed as well as the smaller screen size. I also created a PI2 variable that equals 2×π (2*PI in Sinclair BASIC). This reduces the overhead of multiplication where possible.&lt;br&gt;
  93. &lt;br&gt;
  94. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making adjustments&lt;/strong&gt;&lt;br&gt;
  95. &lt;br&gt;
  96. Coming back to any program, you often see things you missed. In my case, I saw a minor bug in the range code that needed fixing. In doing so, I took another look at the math. The ZX81 version didn’t quite look as nice as the original, and I wanted to see if I could improve it.&lt;br&gt;
  97. &lt;br&gt;
  98. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/blkhole-2023-zx81-screenshot-2-by-steven-reid-320x240.png" alt="Black Hole, ZX81 Screenshot 2, 2023 by Steven Reid"&gt;Black Hole, ZX81 Screenshot 2, 2023 by Steven Reid&lt;/div&gt;
  99. &lt;br&gt;
  100. &lt;br&gt;
  101. Using the Daric version for testing, I reverted the variables and started adjusting each individually. This helped me determine what each one did. My goal was to shrink down the output to fit the ZX81’s smaller screen.&lt;br&gt;
  102. &lt;br&gt;
  103. To make it a bit easier to adjust, I refactored my ZX81 program to move the variables into their own subroutine. I also found that adjusting the division factoring when setting the AR variable made the most difference. Thus, I turned that into the RS variable to make it easier to adjust.&lt;br&gt;
  104. &lt;br&gt;
  105. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/blkhole-2023-zx81-screenshot-3-by-steven-reid-320x240.png" alt="Black Hole, ZX81 Screenshot 3, 2023 by Steven Reid"&gt;Black Hole, ZX81 Screenshot 3, 2023 by Steven Reid&lt;/div&gt;
  106. &lt;br&gt;
  107. &lt;br&gt;
  108. As a side effect of the changes, I found that I didn’t need as many iterations. The program tended to move out of the screen boundaries after about 5 or so iterations, but a few would go longer. I chose 10 as a compromise.&lt;br&gt;
  109. &lt;br&gt;
  110. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Out the other side.&lt;/strong&gt;&lt;br&gt;
  111. &lt;br&gt;
  112. Black Hole isn’t perfect on the ZX81, but it still generated some interesting images. I’m sure I could improve it to make better-looking black holes. But for a super slow ancient computer, it still generated interesting pictures.&lt;br&gt;
  113. &lt;br&gt;
  114. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/blkhole-2023-zx81-screenshot-4-by-steven-reid-320x240.png" alt="Black Hole, ZX81 Screenshot 4, 2023 by Steven Reid"&gt;Black Hole, ZX81 Screenshot 4, 2023 by Steven Reid&lt;/div&gt;
  115. &lt;br&gt;
  116. &lt;br&gt;
  117. If you want more of ZX81 screensaver, it is a pretty easy modification. Comment out the &lt;code&gt;FAST&lt;/code&gt; on line 60 and adjust the &lt;code&gt;PAUSE&lt;/code&gt; on line 280 to 5000. You can also comment out the &lt;code&gt;PAUSE&lt;/code&gt; on line 260 if you desire. This will give you a continuous display that can be quite fun to watch.&lt;br&gt;
  118. &lt;br&gt;
  119. In the end, the most fun was programming in a different BASIC dialect other than Sinclair. I hadn’t done that since Amiga BASIC back in the earlier 90’s. The code is quite similar to that and probably would work well on the Amiga. That would be a fun trip down memory lane, but I leave it for another day. For now, you can enjoy the ZX81 version.</description>
  120. </item>
  121.  <item>
  122.    <title>ZX81 Aquarium Makeover—Revamping Kimmie Fish in Assembly</title>
  123.    <link>https://www.reids4fun.com/560/zx81-aquarium-makeoverrevamping-kimmie-fish-in-assembly</link>
  124.    <dc:creator>Steven Reid</dc:creator>
  125.    <pubDate>Sun, 18 Feb 2024 11:44:00 -0600</pubDate>
  126.     <category>ZX81 Computer</category>
  127.     <category>zx81</category>
  128.     <category>retro</category>
  129.     <category>monthly</category>
  130.    <guid>https://www.reids4fun.com/560/zx81-aquarium-makeoverrevamping-kimmie-fish-in-assembly</guid>
  131.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/aquarium-2024-zx81-screenshot-1-by-steven-reid-320x240.png&quot; alt=&quot;Aquarium Screenshot 1, 2024 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;While on vacation, I spent some relaxing time converting my Kimmie Fish BASIC program into &lt;a href="https://www.reids4fun.com/zp/aquarium" target="_blank" rel="noopener"&gt;something a bit more interesting&lt;/a&gt;. In addition to the normal speed improvements, I wanted to give it an aquarium like feeling with bubbles and depth. No color here, this is all stock ZX81 graphics. Only thing needed is the requisite 16K memory pack.&lt;br&gt;
  132. &lt;br&gt;
  133. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A fine screen saver indeed.&lt;/strong&gt;&lt;br&gt;
  134. &lt;br&gt;
  135. Before digging into the display, let&#39;s look a bit at what all Aquarium does. There is a bit of subtlety to the program that you might not notice at first glance. For example, the fish start off at full speed. After that, their speed will vary to make the visuals a bit more random. The speed difference isn’t huge but is noticeable.&lt;br&gt;
  136. &lt;br&gt;
  137. The bubbles range not just in size but speed as well. The little bubbles tend to move slowly. The larger bubbles tend to move quickly. In relation to each, they also take on some variability in speed. This keeps the screen moving and avoids becoming repetitive.&lt;br&gt;
  138. &lt;br&gt;
  139. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/aquarium-2024-zx81-screenshot-1-by-steven-reid-320x240.png" alt="Aquarium Screenshot 1, 2024 by Steven Reid"&gt;Aquarium Screenshot 1, 2024 by Steven Reid&lt;/div&gt;
  140. &lt;br&gt;
  141. &lt;br&gt;
  142. Although it may not be obvious at first, there is also depth in the scene. The tiny bubbles are in the back. The Kimmie fish are in the middle, overwriting any small bubbles. The large bubbles are in front and will overlap the fish. it doesn’t happen often, but is noticeable when it does.&lt;br&gt;
  143. &lt;br&gt;
  144. You can actually break out of the program by pressing the &lt;kbd&gt;SPACE&lt;/kbd&gt; key as normal. Each run of the program will generate different water and sand graphics. Sharing with friends, they liked the overall effect and I do as well.&lt;br&gt;
  145. &lt;br&gt;
  146. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; From simple to complex.&lt;/strong&gt;&lt;br&gt;
  147. &lt;br&gt;
  148. Converting &lt;a href="https://www.reids4fun.com/559/how-i-made-a-kimmie-fish-swim-on-the-zx81" target="_blank" rel="noopener"&gt;original BASIC version&lt;/a&gt; wasn’t really an option. That version used string manipulation to determine what would display not he screen. That didn’t make sense here. Plus I had a lot more flexibility here due to the speed gains.&lt;br&gt;
  149. &lt;br&gt;
  150. The main loop is actually straight forward (below), but &lt;a href="https://www.reids4fun.com/za/aquarium" target="_blank" rel="noopener"&gt;the code is more complex&lt;/a&gt; than I expected it would be.&lt;br&gt;
  151. &lt;br&gt;
  152. &lt;pre&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;call&#160;initialize
  153. main_loop&#58;
  154. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;call&#160;move_back_bubbles
  155. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;call&#160;move_fish
  156. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;call&#160;move_front_bubbles
  157. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;call&#160;copy_to_screen
  158. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jr&#160;main_loop&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;rinse&#160;and&#160;repeat&lt;/pre&gt;&lt;br&gt;
  159. &lt;br&gt;
  160. Reading above, you get an idea of how I managed the death.  Each element is printed back to front, overwriting the previous graphics. This provided a sense of depth without a lot of trickery. The display is done in a buffer that is copied to the screen when done to avoid flickering. To keep the frame rate somewhat consistent, I used the frame counter for the delay. it’s not perfect but works.&lt;br&gt;
  161. &lt;br&gt;
  162. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making fish move.&lt;/strong&gt;&lt;br&gt;
  163. &lt;br&gt;
  164. To deal with the movement of the fish, I decided to treat them as sprites. The BASIC program used strings, but I have a lot more control here. I don’t actually do any string slicing. Instead, the routine that prints the character into the buffer checks if either the &lt;var&gt;X&lt;/var&gt; or &lt;var&gt;Y&lt;/var&gt; coordinates are out of range. If they are, it returns without printing anything.&lt;br&gt;
  165. &lt;br&gt;
  166. By doing the bounds check, I could allow the X position to move outside of the screen until the fish was completely off screen. To avoid having to clear the buffer, the sprite has spaces to print over the end of the fish. This has the advantage of speeding up the program with minimal memory impact.&lt;br&gt;
  167. &lt;br&gt;
  168. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/aquarium-2024-zx81-screenshot-2-by-steven-reid-320x240.png" alt="Aquarium Screenshot 2, 2024 by Steven Reid"&gt;Aquarium Screenshot 2, 2024 by Steven Reid&lt;/div&gt;
  169. &lt;br&gt;
  170. &lt;br&gt;
  171. Once the fish is off screen, I do a quick call to reposition it (see below). It is a bit brute force as it just calls a random value and then checks if the fish is on the other fish. I could have allowed them to overlap, but decided I didn’t like the way the graphics displayed doing that.&lt;br&gt;
  172. &lt;br&gt;
  173. &lt;pre&gt;get_fish_row&#58;
  174. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;b,buffer_size-2
  175. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;call&#160;rnd&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;from&#160;1&#160;to&#160;buffer_size-2
  176. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;dec&#160;a&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;make&#160;from&#160;0&#160;to&#160;buffer_size-3
  177. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;b,a&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;save&#160;new&#160;pos
  178. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;check&#160;if&#160;other+2&#160;&amp;amp;lt;&#160;top&#160;&#40;top&amp;amp;gt;e+2&#160;or&#160;e+2&#160;&amp;amp;lt;&#160;top&#41;
  179. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;a,e
  180. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;add&#160;a,2
  181. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;d,a
  182. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;cp&#160;b
  183. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jr&#160;c,good_to_go
  184. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;check&#160;if&#160;top+2&#160;&amp;amp;lt;&#160;othertop
  185. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;a,b
  186. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;add&#160;a,2
  187. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;cp&#160;e
  188. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jr&#160;nc,get_fish_row
  189. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;we&#160;are&#160;good!
  190. good_to_go&#58;
  191. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;a,b&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;restore&#160;position
  192. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ret&lt;/pre&gt;&lt;br&gt;
  193. &lt;br&gt;
  194. Funny enough, this was probably the hardest part to get right. I had to futz with tests a few times to makes sure they were working correctly. Funny how simple things can be hard.&lt;br&gt;
  195. &lt;br&gt;
  196. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Adding speed.&lt;/strong&gt;&lt;br&gt;
  197. &lt;br&gt;
  198. The bubbles, much like the fish, are stored in an array. To mimic speed, I actually use two bytes to determine if the bubble moves. The first byte is the speed. The second is the sub-position.&lt;br&gt;
  199. &lt;br&gt;
  200. To move the bubble, I first add the speed to the sub-position. If the sub-position rolls (sets the carry flag), I move the bubble. Otherwise, the program saves the sub-position and keeps going. I used the same logic for the fish as well. This allows a more organic movement. You can view this on &lt;a href="https://youtu.be/Mj_cOD53Bv4" target="_blank" rel="noopener"&gt;YouTube&lt;/a&gt; as well.&lt;br&gt;
  201. &lt;br&gt;
  202. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/aquarium-2024-zx81-movie-by-steven-reid-320x240.gif" alt="Aquarium, Video, 2024 by Steven Reid"&gt;Aquarium, Video, 2024 by Steven Reid&lt;/div&gt;
  203. &lt;br&gt;
  204. &lt;br&gt;
  205. This is different from how I managed speed in my &lt;a href="https://www.reids4fun.com/543/zx81-digital-rain-a-retro-display-of-the-matrix-code" target="_blank" rel="noopener"&gt;ZX81 Rain&lt;/a&gt; program. In that one, I had a frame counter that I would increment. When that counter reached the speed, it would reset to zero and move the drop. This version doesn’t require reseting the variable.&lt;br&gt;
  206. &lt;br&gt;
  207. One thing I realized afterwards is that I update the fish frame each print. This makes the slower fish look like they are swimming against a current. Reviewing the code, it wouldn’t have been a hard change to make either. Consider it a bug to correct in a future version.&lt;br&gt;
  208. &lt;br&gt;
  209. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Improving and final thoughts.&lt;/strong&gt;&lt;br&gt;
  210. &lt;br&gt;
  211. Although I love the look of the aquarium, it could be more. My original idea was to add in different backdrop objects like rocks, plants or figures. I also thought about moving the water a bit with a pump at the top. As the program progressed, I felt those elements weren’t needed.&lt;br&gt;
  212. &lt;br&gt;
  213. The fish code isn’t very optimized. My original goal was to add different fish types. The sprites would then be picked when adding the fish. The problem is I didn’t like the graphics I came up with. The whole left/right fish thing could be done completely different. End in the end, it was easier calculating them in separate code blocks.&lt;br&gt;
  214. &lt;br&gt;
  215. The final result is pleasing and I’m happy with what I put together. The code is readable and should be easy enough to adjust in the future.&lt;br&gt;
  216. &lt;br&gt;
  217. </description>
  218. </item>
  219.  <item>
  220.    <title>How I Made a Kimmie Fish Swim on the ZX81</title>
  221.    <link>https://www.reids4fun.com/559/how-i-made-a-kimmie-fish-swim-on-the-zx81</link>
  222.    <dc:creator>Steven Reid</dc:creator>
  223.    <pubDate>Tue, 30 Jan 2024 15:55:00 -0600</pubDate>
  224.     <category>ZX81 Computer</category>
  225.     <category>zx81</category>
  226.     <category>retro</category>
  227.     <category>monthly</category>
  228.    <guid>https://www.reids4fun.com/559/how-i-made-a-kimmie-fish-swim-on-the-zx81</guid>
  229.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/kimmie-fish-2023-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Kimmie Fish, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;Reading posts in the BASIC group I follow, I was I was inspired to write my own version of the kimmie fish animation for the ZX81 computer. It was such a cute animation that I had to see if I &lt;a href="https://www.reids4fun.com/zp/kimmie" target="_blank" rel="noopener"&gt;could replicate it&lt;/a&gt;. Although not quite the same as the original, the spirt is there.&lt;br&gt;
  230. &lt;br&gt;
  231. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Getting started.&lt;/strong&gt;&lt;br&gt;
  232. &lt;br&gt;
  233. Although the original version was written using BASIC, it was using commands not available on the ZX81. That usually isn&#39;t too big an issue as I can convert most. But in this case, it used graphic commands and a line generator. Although possible to replicate, it would make the animation extremely slow. Fortunately, there was a solution.&lt;br&gt;
  234. &lt;br&gt;
  235. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/kimmie-fish-2024-sprite-frames-by-steven-reid-320x240.png" alt="Kimmie Fish, Sprite Frames, 2023 by Steven Reid"&gt;Kimmie Fish, Sprite Frames, 2023 by Steven Reid&lt;/div&gt;
  236. &lt;br&gt;
  237. &lt;br&gt;
  238. I realized that I could replace the line drawing routines with character graphics. Not only would it be faster, but it would simplify the program. I whipped up some sprites and got to work building the program.&lt;br&gt;
  239. &lt;br&gt;
  240. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/kimmie-fish-2023-zx81-screenshot-by-steven-reid-320x240.png" alt="Kimmie Fish, 2023 by Steven Reid"&gt;Kimmie Fish, 2023 by Steven Reid&lt;/div&gt;
  241. &lt;br&gt;
  242. &lt;br&gt;
  243. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Coding it up.&lt;/strong&gt;&lt;br&gt;
  244. &lt;br&gt;
  245. &lt;a href="https://www.reids4fun.com/zl/kimmie" target="_blank" rel="noopener"&gt;The code&lt;/a&gt; was pretty straight forward. I started with a &lt;code&gt;GOSUB&lt;/code&gt; to setup the screen and variable. I built a routine to for the aquarium—something not in the original. Having programed a number of animations in ZX81 BASIC, I decided to use a string array. More on that in a bit.&lt;br&gt;
  246. &lt;br&gt;
  247. In actuality, I had two arrays. One for the fish moving right, and one left. The advantage of that was each fish prints over itself so I could avoid a double buffer. This kept the routine reasonably fast. But it had another advantage.&lt;br&gt;
  248. &lt;br&gt;
  249. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/kimmie-fish-2023-zx81-screenshot2-by-steven-reid-320x240.png" alt="Kimmie Fish, 2023 by Steven Reid"&gt;Kimmie Fish, 2023 by Steven Reid&lt;/div&gt;
  250. &lt;br&gt;
  251. &lt;br&gt;
  252. The problem I had to deal with was the fish swimming off screen. This was the advantage of using a string array. As the kimmie fish reached an edge, I would only print the part of the array that was visible. Although straightforward, it took time and testing to work out the math. Here is the routine.&lt;br&gt;
  253. &lt;br&gt;
  254. &lt;pre&gt;&#160;30&#160;REM&#160;**MAIN&#160;LOOP
  255. &#160;&#160;40&#160;LET&#160;LS=&#40;-D+1&#160;AND&#160;D&amp;amp;lt;0&#41;+&#40;1
  256. AND&#160;D&amp;amp;gt;=0&#41;
  257. &#160;&#160;50&#160;LET&#160;LE=&#40;6+&#40;26-D&#41;&#160;AND&#160;D&amp;amp;gt;25&#41;+
  258. &#40;6&#160;AND&#160;D&amp;amp;lt;26&#41;
  259. &#160;&#160;60&#160;LET&#160;DX=&#40;0&#160;AND&#160;D&amp;amp;lt;0&#41;+&#40;D&#160;AND&#160;D
  260. &amp;amp;gt;=0&#41;
  261. &#160;&#160;70&#160;LET&#160;RS=&#40;-B+1&#160;AND&#160;B&amp;amp;lt;0&#41;+&#40;1
  262. AND&#160;B&amp;amp;gt;=0&#41;
  263. &#160;&#160;80&#160;LET&#160;RE=&#40;6+&#40;26-B&#41;&#160;AND&#160;B&amp;amp;gt;25&#41;+
  264. &#40;6&#160;AND&#160;B&amp;amp;lt;26&#41;
  265. &#160;&#160;90&#160;LET&#160;BX=&#40;0&#160;AND&#160;B&amp;amp;lt;0&#41;+&#40;B&#160;AND&#160;B
  266. &amp;amp;gt;=0&#41;
  267. &#160;100&#160;PRINT&#160;AT&#160;A,BX;R$&#40;R,1,RS&#160;TO&#160;
  268. RE&#41;;AT&#160;A+1,BX;R$&#40;R,2,RS&#160;TO&#160;RE&#41;;
  269. AT&#160;A+2,BX;R$&#40;R,3,RS&#160;TO&#160;RE&#41;
  270. &#160;110&#160;PRINT&#160;AT&#160;C,DX;L$&#40;L,1,LS&#160;TO&#160;
  271. LE&#41;;AT&#160;C+1,DX;L$&#40;L,2,LS&#160;TO&#160;LE&#41;;
  272. AT&#160;C+2,DX;L$&#40;L,3,LS&#160;TO&#160;LE&#41;&lt;/pre&gt;&lt;br&gt;
  273. &lt;br&gt;
  274. Although it looks complex, it is actually straight forward logic. The variables &lt;var&gt;LS&lt;/var&gt; and &lt;var&gt;LE&lt;/var&gt;, for example, stand for left start and left end. They are the calculated positions within the string array. Since the sprite doesn’t move at the edges, the &lt;var&gt;DX&lt;/var&gt; variable is used to stop moving it. The other variables determine position and which frame to display.&lt;br&gt;
  275. &lt;br&gt;
  276. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Putting it all together.&lt;/strong&gt;&lt;br&gt;
  277. &lt;br&gt;
  278. The final result is a decent little screen saver for the ZX81. I’m proud of the routine that moves the fish off the screen. In the past I brute forced that with an if statement. This program version is a bit more creative, although I suspect much slower.&lt;br&gt;
  279. &lt;br&gt;
  280. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/kimmie-fish-2023-zx81-gif-by-steven-reid-320x240.gif" alt="Kimmie Fish, Video, 2023 by Steven Reid"&gt;Kimmie Fish, Video, 2023 by Steven Reid&lt;/div&gt;
  281. &lt;br&gt;
  282. &lt;br&gt;
  283. One thing I didn’t like was that the animation felt a bit jerky at times. The display  I rewrote the routine using a string array for the screen. This acted as a sort of double buffer. Although the print felt smoother, it was much slower. I ended up abandoning that solution for the original.&lt;br&gt;
  284. &lt;br&gt;
  285. Now, although the BASIC version is nice. I kept thinking about all the ways I could make it better. Not only would assembly be faster, but I could enhance the overall look quite a bit. I’ll share how that came out in a future article. Until then, you can also view the animation on &lt;a href="https://youtu.be/Z4ZVzvcjsPU" target="_blank" rel="noopener"&gt;YouTube&lt;/a&gt;.</description>
  286. </item>
  287.  <item>
  288.    <title>Retro Festivities Abound in Creating a Christmas Scene on the ZX81</title>
  289.    <link>https://www.reids4fun.com/558/retro-festivities-abound-in-creating-a-christmas-scene-on-the-zx81</link>
  290.    <dc:creator>Steven Reid</dc:creator>
  291.    <pubDate>Fri, 29 Dec 2023 22:48:00 -0600</pubDate>
  292.     <category>ZX81 Computer</category>
  293.     <category>monthly</category>
  294.     <category>zx81</category>
  295.     <category>retro</category>
  296.     <category>christmas</category>
  297.    <guid>https://www.reids4fun.com/558/retro-festivities-abound-in-creating-a-christmas-scene-on-the-zx81</guid>
  298.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/christmas-tree-2023-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Christmas Tree, ZX81 Screenshot, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;For December, I decided to embrace the Christmas spirit. Inspired by group posts, I created a &lt;a href="https://www.reids4fun.com/zp/xmastree" target="_blank" rel="noopener"&gt;Christmas tree and snow scene&lt;/a&gt;. It needed a little flair, so I added an animated message to the scene. Very retro program for my ZX81.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Generating Christmas spirt.&lt;/strong&gt;&lt;br&gt;
  299. &lt;br&gt;
  300. Fitting the mood, I started with the tree. Based on a routine posted for the tree compilation a few years ago, I modified it to work on the ZX81. The ZX81 can&#39;t execute multiple commands on a single line. This required me to expand the routine a bit and center it on the page. Done, right?&lt;br&gt;
  301. &lt;br&gt;
  302. Well, not quite. I liked an idea from another post that used varying snowflake sizes. I refactored the program into logical sections and added a new routine to display the snowfall. It&#39;s similar to how I’ve generated stars in other programs. In this case, I used &lt;code&gt;RND&lt;/code&gt; and a string to print the flakes.&lt;br&gt;
  303. &lt;br&gt;
  304. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/christmas-tree-2023-zx81-screenshot-by-steven-reid-320x240.png" alt="Christmas Tree, ZX81 Screenshot, 2023 by Steven Reid"&gt;Christmas Tree, ZX81 Screenshot, 2023 by Steven Reid&lt;/div&gt;
  305. &lt;br&gt;
  306. &lt;br&gt;
  307. With that look done, I then worked on the message. Again, it’s much like other animations I’d done as a teenager. I went through a few iterations until I settled on the final message. The message is in inverted characters with rotating stars. Simple enough to make using a pair of print statements.&lt;br&gt;
  308. &lt;br&gt;
  309. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Comments and structure.&lt;/strong&gt;&lt;br&gt;
  310. &lt;br&gt;
  311. For some reason, I decided to &lt;a href="https://www.reids4fun.com/zl/xmastree" target="_blank" rel="noopener"&gt;focus on program structure&lt;/a&gt;. Something that is very different than most of my programs. I have built programs with aesthetics before, but rarely. I was in the mood.&lt;br&gt;
  312. &lt;br&gt;
  313. After getting the tree to work, I moved the routine to a subroutine. The initial section of the program consists of a list of routine calls using &lt;code&gt;GOSUB&lt;/code&gt;. I reordered things a bit, first printing the screen, then the snow, followed by the tree, and finally the message.&lt;br&gt;
  314. &lt;br&gt;
  315. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/christmas-tree-2023-zx81-animation-by-steven-reid-320x240.gif" alt="Christmas Tree, ZX81 Animation, 2023 by Steven Reid"&gt;Christmas Tree, ZX81 Animation, 2023 by Steven Reid&lt;/div&gt;
  316. &lt;br&gt;
  317. &lt;br&gt;
  318. There is one I don’t call directly. That one saves the program so that it will run when loaded. I used &lt;code&gt;RUN 70&lt;/code&gt; to start the saved program. Once the message loop finishes, the program restarts with another &lt;code&gt;RUN&lt;/code&gt;. It looks repetitive, but I don’t have many options in ZX81 BASIC.&lt;br&gt;
  319. &lt;br&gt;
  320. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Merry belated Christmas.&lt;/strong&gt;&lt;br&gt;
  321. &lt;br&gt;
  322. And with that, I&#39;ve conveyed my message. It’s late as I was busy spending time with the family and doing other things. Better late than never. I still like the look, but I would have liked to animate the snow a bit. The ZX81 would be pretty slow with that. It gives me something to work on next year.</description>
  323. </item>
  324.  <item>
  325.    <title>Using Generative AI to Create Lunar Equestrian Dreams</title>
  326.    <link>https://www.reids4fun.com/557/using-generative-ai-to-create-lunar-equestrian-dreams</link>
  327.    <dc:creator>Steven Reid</dc:creator>
  328.    <pubDate>Sun, 17 Dec 2023 09:30:00 -0600</pubDate>
  329.     <category>Mind the Gap</category>
  330.     <category>genai</category>
  331.     <category>images</category>
  332.     <category>nightcafe</category>
  333.     <category>art</category>
  334.    <guid>https://www.reids4fun.com/557/using-generative-ai-to-create-lunar-equestrian-dreams</guid>
  335.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/memberpics/admin/JcIIzDM4C8u0tfWtEj3T--1--r7vf9.jpg&quot; alt=&quot;Moon horse. AI Generated image, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;Funny enough, I&#39;m still having a surplus of fun creating AI art. Between challenges and random ideas, it&#39;s been quite a year. I love reading articles and seeing what other creative minds come up with. Reading &quot;&lt;a href="https://medium.com/generative-ai/this-free-open-source-ai-image-generator-is-challenging-midjourney-ac49ed11e56b" target="_blank" rel="noopener"&gt;This AI Tool Combines Stable Diffusion&#39;s Level of Control and Midjourney&#39;s Image Quality — It&#39;s Called Distillery&lt;/a&gt;,&quot; by Jim Clyde Monge, I was intrigued by some of his images and thought I&#39;d give it a whirl with my own whimsical prompt.&lt;br&gt;
  336. &lt;br&gt;
  337. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Moon horse.&lt;/strong&gt;&lt;br&gt;
  338. &lt;br&gt;
  339. Outlandish? Unoriginal? Perhaps, but whimsical enough for me to give it a go. Naturally, with my plethora of NightCafe credits burning a hole in my digital pocket, it seemed the perfect testing ground. My prompt was simple: &quot;an image of an astronaut riding a horse on the moon.&quot; I normally have a few go-to modifiers that I find bring images to life, but for this experiment, I decided to stick with the original prompt.&lt;br&gt;
  340. &lt;br&gt;
  341. The outlandish prompt, which I’m sure isn’t imaginative nor unique, was whimsical enough to give it a go. Of course, seeing I have a plethora of credits on NightCafe, it seemed best to try it out there. I used a simple prompt: ”an image of an astronaut riding a horse on the moon.” This doesn&#39;t include my normal modifiers that I find makes better images that are more interesting.&lt;br&gt;
  342. &lt;br&gt;
  343. My rationale for excluding my modifiers was twofold. First off, I wanted to see if Stable Diffusion would get close to what Distillery&#39;s output was doing. Second, I wanted to allow the AI model more freedom in choice. The randomness of the algorithms can create some imaginative images. The prompt could be shortened further as you don’t need to tell Stable Diffusion to generate an image—you can just describe what you want. Of course, I still dabbled with different AI models to see what worked best with my lunar equestrian vision.&lt;br&gt;
  344. &lt;br&gt;
  345. &lt;a href="https://creator.nightcafe.studio/creation/JcIIzDM4C8u0tfWtEj3T" target="_blank" rel="noopener"&gt;&lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/memberpics/admin/JcIIzDM4C8u0tfWtEj3T--1--r7vf9.jpg" alt="Moon horse. AI Generated image, 2023 by Steven Reid"&gt;Moon horse. AI Generated image, 2023 by Steven Reid&lt;/div&gt;&lt;/a&gt;&lt;br&gt;
  346. &lt;br&gt;
  347. The final image stole the show. It went beyond my bare-bones prompt, adding a sprinkle of magic without straying into the realm of extra limbs (thank goodness). The monochromatic palette resonated perfectly with the stark emptiness of space, and while the abundance of moons might raise an eyebrow or two about equine respiration, that&#39;s a conundrum for another day.</description>
  348. </item>
  349.  <item>
  350.    <title>ZX81 Prototype: Echoes from the Tower of Love</title>
  351.    <link>https://www.reids4fun.com/556/zx81-prototype-echoes-from-the-tower-of-love</link>
  352.    <dc:creator>Steven Reid</dc:creator>
  353.    <pubDate>Mon, 04 Dec 2023 22:33:00 -0600</pubDate>
  354.     <category>ZX81 Computer</category>
  355.     <category>zx81</category>
  356.     <category>retro</category>
  357.     <category>monthly</category>
  358.     <category>late</category>
  359.    <guid>https://www.reids4fun.com/556/zx81-prototype-echoes-from-the-tower-of-love</guid>
  360.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/tower-of-love-chapter-1-1984-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Tower of Love, Chapter 1, Opening Screenshot, 1984 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I&#39;ve talked about Tower of Love before, but that was a much different version of the game. That version was all about the intro screen and my initial attempt at the story. I even showed another design I had made. To my surprise, I had &lt;a href="https://www.reids4fun.com/zp/t1" target="_blank" rel="noopener"&gt;a third version of the adventure that I started&lt;/a&gt;. Time to share!&lt;br&gt;
  361. &lt;br&gt;
  362. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A little bit of story.&lt;/strong&gt;&lt;br&gt;
  363. &lt;br&gt;
  364. &lt;a href="https://www.reids4fun.com/336/tower-of-love-was-an-ambitious-idea-that-failed" target="_blank" rel="noopener"&gt;Unlike the first article I shared&lt;/a&gt;, the intro of this game starts with a map. But this is not the same map as that one. I actually found the printout of the map attached to the program. I was surprised and didn’t realize it was for Tower of Love until I read the title. Even better, it had some story.&lt;br&gt;
  365. &lt;br&gt;
  366. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/tower-of-love-chapter-1-1984-zx81-screenshot-by-steven-reid-320x240.png" alt="Tower of Love, Chapter 1, Opening Screenshot, 1984 by Steven Reid"&gt;Tower of Love, Chapter 1, Opening Screenshot, 1984 by Steven Reid&lt;/div&gt;
  367. &lt;br&gt;
  368. &lt;br&gt;
  369. Okay, it isn’t a ton of story. At least not by modern standards. Given the ZX81 had such limited memory, that shouldn’t surprising. This program with a map and two paragraphs of text weighs in at 2KB or an 1/8 of the available memory. That doesn’t give me much for additional text, graphics or even game mechanics. For that reason alone, I suspect that is why this game didn’t get much further.&lt;br&gt;
  370. &lt;br&gt;
  371. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; The Story continues.&lt;/strong&gt;&lt;br&gt;
  372. &lt;br&gt;
  373. The story itself isn’t bad. I did clean up the text a bit to fit properly on the screens. The story sets up the map and is open ended. I often wonder what I had planned next. Would I let the player wander that map? Would there be directions and rooms? i really don’t know.&lt;br&gt;
  374. &lt;br&gt;
  375. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/tower-of-love-chapter-1-1984-zx81-screenshot-2-by-steven-reid-320x240.png" alt="Tower of Love, Chapter 1, Second Screenshot, 1984 by Steven Reid"&gt;Tower of Love, Chapter 1, Second Screenshot, 1984 by Steven Reid&lt;/div&gt;
  376. &lt;br&gt;
  377. &lt;br&gt;
  378. I do like the way the text is presented. Each paragraph fits into the bottom underneath the map. Gives kind of an adventure vibe with text. I give the player time to read and press a button. Sadly, since this is only a couple of paragraphs it repeats pretty quickly.&lt;br&gt;
  379. &lt;br&gt;
  380. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; The map and more.&lt;/strong&gt;&lt;br&gt;
  381. &lt;br&gt;
  382. I decided to look through my old notebook and actually found the original map. This helped me &lt;a href="https://www.reids4fun.com/zl/t1" target="_blank" rel="noopener"&gt;type in the map&lt;/a&gt;. It is a long &lt;code&gt;PRINT&lt;/code&gt; statement and was a bit of a hassle to line up. Sadly, I couldn’t find any additional notes about the map and how it is used in the game.&lt;br&gt;
  383. &lt;br&gt;
  384. &lt;a href="https://flic.kr/p/2pgLPJb" target="_blank" rel="noopener"&gt;&lt;img src="https://live.staticflickr.com/65535/53343391130_d9707b0b2d_h.jpg" alt="[Image]"&gt;&lt;/a&gt;&lt;a href="https://flic.kr/p/2pgLPJb" target="_blank" rel="noopener"&gt;Tower of Love Map&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;
  385. &lt;br&gt;
  386. The minimal nature works for this program. I do think scrolling the text would be more interesting. There are a couple of ways to do that in BASIC, but if I decided to improve I’d probably use machine code. I have a lot of routines to compress text and print it to the screen. The only problem is would this be a text adventure or something else?&lt;br&gt;
  387. &lt;br&gt;
  388. Overall it was a pretty fun little program. Not quite the full screen treatment of the original version. But it works.</description>
  389. </item>
  390.  <item>
  391.    <title>Beyond the Atari: A Pitfall! Simulator for the ZX81</title>
  392.    <link>https://www.reids4fun.com/555/beyond-the-atari-a-pitfall-simulator-for-the-zx81</link>
  393.    <dc:creator>Steven Reid</dc:creator>
  394.    <pubDate>Sun, 22 Oct 2023 10:41:00 -0600</pubDate>
  395.     <category>ZX81 Computer</category>
  396.     <category>pitfall</category>
  397.     <category>gaming.retro</category>
  398.     <category>monthly</category>
  399.     <category>zx81</category>
  400.     <category>lsfr</category>
  401.    <guid>https://www.reids4fun.com/555/beyond-the-atari-a-pitfall-simulator-for-the-zx81</guid>
  402.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/pitfall-sims-2023-zx81-start-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Pitfall! Simulator, ZX81 Screenshot of the Starting Room, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;While contemplating what ZX81 program to write about this month, I completely forgot that I had created a &lt;a href="https://www.reids4fun.com/zp/pitfallsim" target="_blank" rel="noopener"&gt;&lt;cite&gt;Pitfall!&lt;/cite&gt; Simulator&lt;/a&gt;. It began as a fun project to occupy my time during winter break. My initial goal was to recreate David Crane&#39;s LSFR (Linear Feedback Shift Register) in Z80. However, after learning more about its functionality, I took the project much further than I had originally intended.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A Trip Down Memory Lane.&lt;/strong&gt;&lt;br&gt;
  403. &lt;br&gt;
  404. &lt;cite&gt;Pitfall!&lt;/cite&gt; is a fun game that I enjoyed as a child, although I preferred the sequel, &lt;cite&gt;Pitfall II&lt;/cite&gt;. The original game&#39;s linear progression felt underwhelming, and the jump timing was finicky. However, it was still a remarkable game that showcased the capabilities of the Atari VCS. It featured action, numerous changing rooms, and a sense of exploration. I particularly enjoyed figuring out how to best avoid those pesky logs, even though they slowed me down. Additionally, I appreciate that this is a game that my wife, who is not much of a gamer, also played. It is a shared piece of nostalgia for both of us.&lt;br&gt;
  405. &lt;br&gt;
  406. Fun fact, I actually considered creating a &lt;cite&gt;Pitfall!&lt;/cite&gt;-like game for the ZX81. I even went so far as to design the rooms and character graphics. However, I knew that working in BASIC, it would not be fast enough. Additionally, I did not understand how the original game was actually built. For my version, I was generating static rooms of content. I quickly realized, even at the age of 14, that I would run out of memory and abandoned the idea.&lt;br&gt;
  407. &lt;br&gt;
  408. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Playing with the LSFR. &lt;/strong&gt;&lt;br&gt;
  409. &lt;br&gt;
  410. It should come as no surprise, then, that when I came across an &lt;a href="https://evoniuk.github.io/posts/pitfall.html" target="_blank" rel="noopener"&gt;article about &lt;cite&gt;Pitfall!&lt;/cite&gt;&lt;/a&gt;, I was intrigued. The article discussed how David Crane managed to fit 255 rooms into &lt;cite&gt;Pitfall!&lt;/cite&gt;. I thought it would be a fun programming challenge to get the LSFR working on the ZX81.&lt;br&gt;
  411. &lt;br&gt;
  412. Since the article shared the original LSFR code, I used it as the basis for my version. I had to learn a little 6502 code to get the right bitwise operators, but I soon had a working version in z80 assembly. Below is the original LSFR for moving right.&lt;br&gt;
  413. &lt;br&gt;
  414. &lt;pre&gt;;&#160;+++
  415. ;&#160;PITFALL!&#160;LFSR&#160;-&#160;move&#160;right!
  416. ;&#160;&#160;&#160;&#160;&#160;&#160;&#160;room&#39;&#160;=&#160;room&#160;&amp;amp;lt;&amp;amp;lt;&#160;1&#160;&#124;&#160;&#40;bit3&#160;+&#160;bit4&#160;+&#160;bit5&#160;+&#160;bit7&#41;
  417. ;&#160;input&#58;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;d&#160;-&#160;holds&#160;the&#160;current&#160;room&#160;details
  418. ;&#160;output&#58;&#160;&#160;&#160;&#160;&#160;&#160;&#160;a&#160;-&#160;holds&#160;the&#160;new&#160;room&#160;details
  419. move_right&#58;
  420. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;a,d&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;load&#160;a&#160;with&#160;room
  421. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sla&#160;a&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;could&#160;also&#160;be&#160;add&#160;a,a
  422. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;xor&#160;a,d&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;XOR&#160;with&#160;room
  423. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sla&#160;a
  424. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;xor&#160;a,d
  425. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sla&#160;a
  426. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sla&#160;a
  427. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;xor&#160;a,d
  428. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sla&#160;a
  429. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;rl&#160;d&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;rotate&#160;carry&#160;into&#160;room
  430. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ld&#160;a,d&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;and&#160;make&#160;a&#160;the&#160;new&#160;room
  431. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ret
  432. ;&#160;end&#160;move&#160;right
  433. ;&#160;---&lt;/pre&gt;&lt;br&gt;
  434. &lt;br&gt;
  435. The simulator version is a lot more complex as I had to deal with the player being underground. That version uses a loop and has to check for walls. There is also a move left version that reverses the LSFR &lt;a href="https://www.reids4fun.com/za/pitfallsim" target="_blank" rel="noopener"&gt;in that code&lt;/a&gt;.&lt;br&gt;
  436. &lt;br&gt;
  437. Since the LSFR routine alone isn’t very useful, I added a print routine to show what is on each screen. Adding a little bit of logic, based on the rules set forth in the article, I had a working version of the opening sections.&lt;br&gt;
  438. &lt;br&gt;
  439. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/pitfall-rooms-2023-zx81-screenshot-by-steven-reid-320x240.png" alt="&lt;cite&gt;Pitfall!&lt;/cite&gt; Rooms, ZX81 Screenshot of the first 21 rooms, 2023 by Steven Reid"&gt;&lt;cite&gt;Pitfall!&lt;/cite&gt; Rooms, ZX81 Screenshot of the first 21 rooms, 2023 by Steven Reid&lt;/div&gt;
  440. &lt;br&gt;
  441. &lt;br&gt;
  442. Sorry if the picture is a bit esoteric. The first is the room value in decimal. Next is the tree pattern. Then, the hazard (i.e. holes, tar pits, crocs, etc.) with wall or treasure (i.e. G is gold). Last is any objects such as logs, snake, or fire. This is the first 21 rooms moving right. And yes, moving left works as well.&lt;br&gt;
  443. &lt;br&gt;
  444. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Making Something a Bit More Interesting.&lt;/strong&gt;&lt;br&gt;
  445. &lt;br&gt;
  446. After getting the code working, I wanted to make it something you could actually move through. My intention was not to create a game, but to simply get the look and feel of each room working. I called it a &lt;cite&gt;Pitfall!&lt;/cite&gt; Simulator because that is what it is. It simulates the game&#39;s screen generations, including the ladders and underground corridors.&lt;br&gt;
  447. &lt;br&gt;
  448. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/pitfall-sims-2023-zx81-start-screenshot-by-steven-reid-320x240.png" alt="Pitfall! Simulator, ZX81 Screenshot of the Starting Room, 2023 by Steven Reid"&gt;Pitfall! Simulator, ZX81 Screenshot of the Starting Room, 2023 by Steven Reid&lt;/div&gt;
  449. &lt;br&gt;
  450. &lt;br&gt;
  451. It was also at this point that I realized the rules posted in the article were not 100% accurate, as things were not matching up. Digging around, I found &lt;a href="https://meatfighter.com/pitfall/" target="_blank" rel="noopener"&gt;a more complete version&lt;/a&gt;. Combining those, I soon had a working simulator for &lt;cite&gt;Pitfall!&lt;/cite&gt;.  The code logic was pretty complex now and I made no effort to optimize it.&lt;br&gt;
  452. &lt;br&gt;
  453. To make sure things were working, I used a map link from the original article to verify that the simulator. Funny enough, I found some discrepancies there as well. I ended up finding &lt;a href="https://www.youtube.com/watch?v=pslbO6Fddhw" target="_blank" rel="noopener"&gt;actual footage of the rooms&lt;/a&gt; to validate the routines.&lt;br&gt;
  454. &lt;br&gt;
  455. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/pitfall-sims-2023-zx81-crocs-screenshot-by-steven-reid-320x240.png" alt="Pitfall! Simulator, ZX81 Screenshot of the Crocodile Hazard Room, 2023 by Steven Reid"&gt;Pitfall! Simulator, ZX81 Screenshot of the Crocodile Hazard Room, 2023 by Steven Reid&lt;/div&gt;
  456. &lt;br&gt;
  457. &lt;br&gt;
  458. This program is meant as an easy way to traverse the map, but without all the game play. However, if you do go underground, it does block your movement. This makes it easy to test out different paths and see what works. Obviously, the golden path to beat the game in under 20 minutes has long since been discovered. But you might find it fun to try out different paths without a timer or skill getting in the way.&lt;br&gt;
  459. &lt;br&gt;
  460. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/pitfall-sims-2023-zx81-wrong-way-screenshot-by-steven-reid-320x240.png" alt="Pitfall! Simulator, ZX81 Screenshot of Going the Wrong Way, 2023 by Steven Reid"&gt;Pitfall! Simulator, ZX81 Screenshot of Going the Wrong Way, 2023 by Steven Reid&lt;/div&gt;
  461. &lt;br&gt;
  462. &lt;br&gt;
  463. All that was left at this point was adding in all the visual elements. It was a bit of a chore adding in all the hazards as they tended to overlap other elements. Although the player doesn’t really move in the simulator, I did have to simulate location, specifically which side of the map you are on based on direction of entry.&lt;br&gt;
  464. &lt;br&gt;
  465. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Is there more?&lt;/strong&gt;&lt;br&gt;
  466. &lt;br&gt;
  467. Could I have made this into a game? Sure. Will I? Probably not. &lt;cite&gt;Pitfall!&lt;/cite&gt; was an iconic game, and trying to convert it to the ZX81 would require so many compromises that it would not be worth it. I would have to significantly reduce the motion and screen size, and even then, trying to achieve a full screen with smooth motion would be difficult. There are games that already emulate it to some extent, and I would not be adding much.&lt;br&gt;
  468. &lt;br&gt;
  469. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/pitfall-sims-2023-zx81-gold-screenshot-by-steven-reid-320x240.png" alt="Pitfall! Simulator, ZX81 Screenshot of the Gold Loot Room, 2023 by Steven Reid"&gt;Pitfall! Simulator, ZX81 Screenshot of the Gold Loot Room, 2023 by Steven Reid&lt;/div&gt;
  470. &lt;br&gt;
  471. &lt;br&gt;
  472. Instead, I am sharing this for what it is: a realistic &lt;cite&gt;Pitfall!&lt;/cite&gt; simulator. It is accurate to the game—perhaps the most accurate so far given what I have seen out there. Additionally, converting the LSFR to the Z80 might inspire others to do something with it. Heck, I might even find a use for it myself.</description>
  473. </item>
  474.  <item>
  475.    <title>A Trip Down Memory Lane: Recreating “I Was Here” in ZX81 BASIC</title>
  476.    <link>https://www.reids4fun.com/554/a-trip-down-memory-lane-recreating-i-was-here-in-zx81-basic</link>
  477.    <dc:creator>Steven Reid</dc:creator>
  478.    <pubDate>Sun, 17 Sep 2023 08:39:00 -0600</pubDate>
  479.     <category>ZX81 Computer</category>
  480.     <category>zx81</category>
  481.     <category>retro</category>
  482.     <category>basic</category>
  483.     <category>monthly</category>
  484.     <category>programming</category>
  485.    <guid>https://www.reids4fun.com/554/a-trip-down-memory-lane-recreating-i-was-here-in-zx81-basic</guid>
  486.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/here-2023-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Here, ZX81 screenshot, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;A recently posted meme reminded me of the silly things we did on computers. In the early eighties, most computers came with BASIC as their default OS. A common starting point was a s simple “hello world” program. But almost as often, someone wrote something a bit more personal. This is &lt;a href="https://www.reids4fun.com/zp/here" target="_blank" rel="noopener"&gt;my tribute program&lt;/a&gt; to the “I was here” concept of those days.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; A retro trip in time.&lt;/strong&gt;&lt;br&gt;
  487. &lt;br&gt;
  488. This started with a meme. Humor is often a common bond amongst society and the tech culture isn’t any different. A member of a BASIC group I follow on Facebook posted the meme below. To be honest, it took a minute for me to grasp the full context.&lt;br&gt;
  489. &lt;br&gt;
  490. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/memberpics/admin/woz_ere_meme.jpg" alt="“Mark woz ere” programming meme."&gt;“Mark woz ere” programming meme.&lt;/div&gt;
  491. &lt;br&gt;
  492. &lt;br&gt;
  493. For those not familiar with BASIC, the pride the bear feels adding a space is misplaced. It did nothing to the program. In most BASIC dialects, PRINT will add a newline after displaying the text. Thus, what the bears changed is, well, invisible. Think of it as an inside joke. That I got.&lt;br&gt;
  494. &lt;br&gt;
  495. What was a bit more obtuse was the whole context. I hadn’t thought about how people would approach computers in the eighties. For many, BASIC or any sort of programming was foreign. To use a computer, you usually bought software. But all these home computers let you write software too. There was an entire cottage industry writing books to help you get the most from your computer.&lt;br&gt;
  496. &lt;br&gt;
  497. Of course, getting your most from an 8-bit computer wasn&#39;t easy. Besides slower processors and graphics, the BASIC implementation weren&#39;t aways the greatest. Memory was also very tight, think kilobytes instead of gigabytes. The world shifts quite a bit with that in mind. This simple meme conjured up the whole idea of digital graffiti for me. Bored kids walking up to computers would type in this simple program. For many consumers, breaking out of the loop would have been a monumental task. These computers were not easy to use.&lt;br&gt;
  498. &lt;br&gt;
  499. What threw me off was the way the spelling of the words. I could forgive &quot;woz&quot; as slang for “was.” Plus it invoked a bit of the Apple flavor of the time. The “ere” seemed weird though, until it dawned on me. The subtle meaning is that the proud bear should have corrected the spelling. Sigh. Perhaps it being late at night and having spent a day in higher thought finally caused my mind to shut down.&lt;br&gt;
  500. &lt;br&gt;
  501. In any case, meme’s aren’t all meant to have singular meanings. They mean what they want to you and if you get something different from it, that’s perfectly okay.&lt;br&gt;
  502. &lt;br&gt;
  503. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Taking the less worn path.&lt;/strong&gt;&lt;br&gt;
  504. &lt;br&gt;
  505. Reading through the comments, it reminded me of my childhood. Growing up in the military, I didn’t always have access to shops where computers were out for testing. The PX where were did sell computers, but I rarely saw them running. They were usually IBM clones, expensive and for business. The common home computers weren&#39;t there. Instead, they had typewriters of all shapes and sizes. It wasn’t uncommon for me to walk up to them and start typing.&lt;br&gt;
  506. &lt;br&gt;
  507. Although on occasion I did put my name in what I typed, it was usually something more akin to a poem or song. “Now is the time for the world to begin again,” and such nonsense. I often do the same today when creating filler text. But the concept, if not the execution, was the same. Unlike the computer graffiti, those words didn’t repeat.&lt;br&gt;
  508. &lt;br&gt;
  509. I did have older friends and learned that there were computers at the Junior High. My friend Edmund would share his printouts of pictures with me. After seeing them I would rush home and recreate them on a old typewriter my dad found for me. Hooked on the on the idea of using computers, I couldn’t wait to try them out myself.&lt;br&gt;
  510. &lt;br&gt;
  511. That next school year, I did finally get a chance in the 6th grade. My school had an old PDP of some sort with teletype machines connected to them. Not waiting around, I joined the computer club and spent my free time learning BASIC. My programs weren’t great, but they worked. I was able to build pictures that I could save to disk and print out whenever I wanted. It was a start.&lt;br&gt;
  512. &lt;br&gt;
  513. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Building something new.&lt;/strong&gt;&lt;br&gt;
  514. &lt;br&gt;
  515. Less than a year later, my Dad bought me a ZX81 computer. I took over the family’s tiny black and white TV so I could program on it. This really got me programming. Yes, some of the first programs were about the same as the meme: simple and boring. Often the first thing you learned on a new computer was how to write “hello world” that would print forever. I had a computer that I could do that with.&lt;br&gt;
  516. &lt;br&gt;
  517. Now one of the comments in the group gave an example where he printed the “I was here” in a sine wave pattern. I’d done this a few times in the past on my own ZX81, a common troupe of the era. But it struck me. What if I made it a joke?&lt;br&gt;
  518. &lt;br&gt;
  519. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/here-2023-zx81-screenshot-by-steven-reid-320x240.png" alt="Here, ZX81 screenshot, 2023 by Steven Reid"&gt;Here, ZX81 screenshot, 2023 by Steven Reid&lt;/div&gt;
  520. &lt;br&gt;
  521. &lt;br&gt;
  522. Never passing up the opportunity to program, I got to work converting his example into ZX81 BASIC. The code was very straight forward. After some trial and error, I had the guts of the program working. One oddity of the ZX81 is that it doesn’t automatically scroll when you hit the bottom of the screen. Thus, it was the first thing I had to adjust during conversion. The other was to accommodate for the different screen width and BASIC syntax. The concept, otherwise, it is the same.&lt;br&gt;
  523. &lt;br&gt;
  524. Except it isn’t. I made &lt;a href="https://www.reids4fun.com/zl/here" target="_blank" rel="noopener"&gt;a subtle change to the code&lt;/a&gt;. The joke was to change the phrase to “you were here” in the middle of the wave. It was my way of pulling the audience into the program. Read into it what you will. I promptly shared to the group and got a few likes. Worth it.&lt;br&gt;
  525. &lt;br&gt;
  526. Could it better, I’m sure of it. But in the end, it was a short and simple program to burn an evening. Enjoy it, or not. I was here.</description>
  527. </item>
  528.  <item>
  529.    <title>How to Create an Infinite Maze on the ZX81</title>
  530.    <link>https://www.reids4fun.com/553/how-to-create-an-infinite-maze-on-the-zx81</link>
  531.    <dc:creator>Steven Reid</dc:creator>
  532.    <pubDate>Tue, 22 Aug 2023 23:37:00 -0600</pubDate>
  533.     <category>ZX81 Computer</category>
  534.     <category>zx81</category>
  535.     <category>monthly</category>
  536.     <category>retro</category>
  537.    <guid>https://www.reids4fun.com/553/how-to-create-an-infinite-maze-on-the-zx81</guid>
  538.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/zx81/infmaze-2023-zx81-screenshot-by-steven-reid-320x240.png&quot; alt=&quot;Infinite Maze, ZX81 Screenshot, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;I saw the Commodore 64 maze generator for years, but ignored it on my ZX81 for different reasons. For one, the characters needed didn’t exist on the ZX81 keyboard. The other was the lack of automatic scroll. Undeterred this month, &lt;a href="https://www.reids4fun.com/zp/infmaze" target="_blank" rel="noopener"&gt;I created my own version in Sinclair BASIC&lt;/a&gt;. I’m quite happy with the results, even if not quite the same.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Not quite 10 PRINT.&lt;/strong&gt;&lt;br&gt;
  539. &lt;br&gt;
  540. I’d run across the &lt;a href="https://10print.org" target="_blank" rel="noopener"&gt;10 PRINT&lt;/a&gt; maze generator some time back. Using unique symbols from the Commodore 64, it forms an endless maze on the screen. To be fair, it works because the screen always has an opening below it, making it more of an infinite runner. But the concept is compact and easy to understand.&lt;br&gt;
  541. &lt;br&gt;
  542. [quote=10 PRINT for the Commodore 64 Computer]10 PRINT CHR$(205.5+RND(1)); : GOTO 10[/quote]&lt;br&gt;
  543. &lt;br&gt;
  544. The ZX81 has a couple challenges that prevents it from emulating the one-liner. The first, and biggest issue, is that the ZX81 doesn’t support invite scroll. Go to far down on the screen and you get a screen full error. You can use &lt;code&gt;CONT&lt;/code&gt; to continue if you like. But that doesn’t follow the spirt of the original program.&lt;br&gt;
  545. &lt;br&gt;
  546. The other issue is that the original program is two lines of code. The C64 allows you to concatenate many lines by using the colon separator. I’ve wondered if there was a way around that, but haven’t found a way. Even if I did—as noted above, the characters used by the C64 aren’t available on the ZX81. I have lost my attempt to emulate the simplicity of 10 PRINT. That doesn’t mean I shouldn’t try.&lt;br&gt;
  547. &lt;br&gt;
  548. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; My infinite maze.&lt;/strong&gt;&lt;br&gt;
  549. &lt;br&gt;
  550. By not using a one-liner concept, there were more options to make something similar. I landed on using the two diagonal block characters (&lt;code&gt;CHR$&lt;/code&gt; 6 and 134). There are two ways to print the random characters. The first would be to use the &lt;code&gt;CHR$&lt;/code&gt; command along with some math. This takes advantage of the the second character being an inverse of the first. All you need to do is add 128 to it—or not.&lt;br&gt;
  551. &lt;br&gt;
  552. &lt;pre&gt;PRINT&#160;CHR$&#160;&#40;6+128*INT&#160;&#40;RND*2&#41;&#41;&lt;/pre&gt;&lt;br&gt;
  553. &lt;br&gt;
  554. The other way is to use a string slice with the random number selecting an index of the string. This was my first thought and is the &lt;a href="https://www.reids4fun.com/zl/infmaze" target="_blank" rel="noopener"&gt;routine I used in the program itself&lt;/a&gt;. I think this version is more flexible in that it doesn’t assuming anything about the characters. Thus, you could swap them out with other characters to get different effects.&lt;br&gt;
  555. &lt;br&gt;
  556. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Printing and scrolling.&lt;/strong&gt;&lt;br&gt;
  557. &lt;br&gt;
  558. That along didn’t yield the results I wanted as the characters are too compact. This prevents you from using the results as a maze. To compensate, I added  single space to the line to give it a bit of breathing room. This works well, but has a side effect of lining up the next line exactly below it.&lt;br&gt;
  559. &lt;br&gt;
  560. To make it more maze like, I added in a test to ensure every other line printed a leading space or a trailing one. Those tests created a nice pattern effect, like the C64 version but not exactly the same.&lt;br&gt;
  561. &lt;br&gt;
  562. &lt;div class="text-center"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto" src="https://www.reids4fun.com/images/zx81/infmaze-2023-zx81-screenshot-by-steven-reid-320x240.png" alt="Infinite Maze, ZX81 Screenshot, 2023 by Steven Reid"&gt;Infinite Maze, ZX81 Screenshot, 2023 by Steven Reid&lt;/div&gt;
  563. &lt;br&gt;
  564. &lt;br&gt;
  565. To make a never-ending maze, I added the &lt;code&gt;SCROLL&lt;/code&gt; command to the program. This moves the display up from the bottom. Using a &lt;code&gt;FOR&lt;/code&gt; loop, I controlled the number of characters printed on the line. I then did a &lt;code&gt;NOT&lt;/code&gt; on &lt;var&gt;A&lt;/var&gt; to adjust the space location and printed the next line.&lt;br&gt;
  566. &lt;br&gt;
  567. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Mostly done.&lt;/strong&gt;&lt;br&gt;
  568. &lt;br&gt;
  569. This worked well and generated the maze I was looking for. I like the omit look, even if it took more than a few extra lines of code to work. The screen is quick and creates a random and pretty picture. That said, we could optimize the code further.&lt;br&gt;
  570. &lt;br&gt;
  571. Futzing with the routine I found you could drop the &lt;code&gt;AT&lt;/code&gt; function by moving &lt;code&gt;SCROLL&lt;/code&gt; up. This will use the next line at the bottom of the display. Since I still need the loop, though, It didn’t make a huge difference. It might be a tiny bit faster, but not enough to notice in testing.&lt;br&gt;
  572. &lt;br&gt;
  573. [quote=Leonardo da Vinci]Simplicity is the ultimate sophistication.[/quote]&lt;br&gt;
  574. &lt;br&gt;
  575. Leaving the program as is, feel free to try to improve it further. Besides minimizing the code, you might also be able to write a 1K version. I’m not sure you could fit a full screen in, but you could get close. There are also hardware and software ways to expand the ZX81 character set to get closer to the C64 version.&lt;br&gt;
  576. &lt;br&gt;
  577. For such a simple program, there are many different ways to expand and foster the code. Give it a go and share your successes.</description>
  578. </item>
  579.  <item>
  580.    <title>Audio.com Review: A New Home for My Music</title>
  581.    <link>https://www.reids4fun.com/552/audiocom-review-a-new-home-for-my-music</link>
  582.    <dc:creator>Steven Reid</dc:creator>
  583.    <pubDate>Sun, 23 Jul 2023 09:54:00 -0600</pubDate>
  584.     <category>Music</category>
  585.     <category>music</category>
  586.     <category>audio</category>
  587.     <category>community</category>
  588.    <guid>https://www.reids4fun.com/552/audiocom-review-a-new-home-for-my-music</guid>
  589.    <description>&lt;img src=&quot;https://www.reids4fun.com/images/memberpics/admin/vPCB3HLvRyy5ietzVNfW--1--9zxdu.jpg&quot; alt=&quot;Picture of Sound Waves, generated with Stable Diffusion, 2023 by Steven Reid&quot; style=&quot;float:left;margin-right:10px&quot;&gt;It’s been some time since I moved my music over to Myspace after the reboot of Acid Planet. I’ve never been happy with it and have looked for alternatives on and off again. I ran across another offering called Audio.com and decided to &lt;a href="https://audio.com/steven-reid/" target="_blank" rel="noopener"&gt;give it a try&lt;/a&gt;.&lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Looking for alternatives.&lt;/strong&gt;&lt;br&gt;
  590. &lt;br&gt;
  591. Acid Planet was my first foray into the music community. It was nice as Acid Pro could publish to the platform without any hassles. Besides being a site for free samples, I could also join contests and listen to others offerings. Although still around, I never signed up for the revamped version. It was time to move on.&lt;br&gt;
  592. &lt;br&gt;
  593. Given that Myspace had also rebooted around that time, I started there. It was now focused on music and had a slick, if clunky, interface. Overtime it too became stale and never quite worked right in Safari. Plus, all I seemed to get were spam follows.&lt;br&gt;
  594. &lt;br&gt;
  595. This led me to continue to look for alternatives. I had been a SoundCloud user for some time, even using it to house some of my ZX81 audio. I liked that you could follow artists and listen to stations. I could share music there but the community wasn’t for me. They pushed subscriptions and, as a long aging hobby, wasn’t where I wanted to spend my time.&lt;br&gt;
  596. &lt;br&gt;
  597. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Digging into free alternatives.&lt;/strong&gt;&lt;br&gt;
  598. &lt;br&gt;
  599. Disheartened, I began looking for music players I could integrate into my own site. I found a decent one and built out a test program. Although it worked well, I had a few issues with the playback. It became one of those beats projects I never completed.&lt;br&gt;
  600. &lt;br&gt;
  601. So when I ran across Audio.com, it intrigued me. It seems to be community driven, although lacks the forms I liked in Acid Planet. It suggests other creators and has a good search feature. The player is nice and seems to work well in my browser of choice. As a bonus, it integrates with Audacity if I ever get back into editing music.&lt;br&gt;
  602. &lt;br&gt;
  603. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Diving in.&lt;/strong&gt;&lt;br&gt;
  604. &lt;br&gt;
  605. Although my choice was to publish using my own player, the look and feel of a third party site is intriguing. Much like I use Flickr to host photos, I want to use Audio in much the same way for songs. I decided to sign up.&lt;br&gt;
  606. &lt;br&gt;
  607. Adding songs was pretty straight forward. You drag and drop them into the site and it builds waveforms for them. I had to go searching to find my music I had archived on my Mac mini. Once I had what I wanted, I dragged it there. This is where I ran into some minor issues.&lt;br&gt;
  608. &lt;br&gt;
  609. Seems, some of the songs wouldn’t upload. They showed success, but the waveforms weren’t created and I couldn’t listen to the song. After futzing around for a bit, I found you have to be patient with the uploads. I ended up deleting the broken uploads and adding them again.&lt;br&gt;
  610. &lt;br&gt;
  611. The next step was to add art work and tags. That worked well and you can share each song or a collection of songs. The sharing feature is actually quite nice. I created a few collections and added songs into them. Then realized I had a problem. The songs were out of order.&lt;br&gt;
  612. &lt;br&gt;
  613. Yes, it may not matter to some, but I did want to add them in order of creation. I found an easy fix. Audio members the order that you add a song. To fix the collection, I cleared it and added each song in the correct order.&lt;br&gt;
  614. &lt;br&gt;
  615. &lt;strong&gt;&lt;span style="color:gray;font-size:1.2em"&gt;#&lt;/span&gt; Almost done.&lt;/strong&gt;&lt;br&gt;
  616. &lt;br&gt;
  617. With that complete, I now have a new home for my music. You can enjoy my songs from &lt;a href="https://audio.com/steven-reid/collections/eclectic-vibes" target="_blank" rel="noopener"&gt;elective Vibes&lt;/a&gt; or wacky video music from &lt;a href="https://audio.com/steven-reid/collections/fly-me-to-the-moon" target="_blank" rel="noopener"&gt;“Fly me to the moon.”&lt;/a&gt; These are the same tracks I shared on Myspace and will be updating links to the new site as I find them.&lt;br&gt;
  618. &lt;br&gt;
  619. &lt;iframe src=&quot;https://audio.com/embed/collection/1772150151033320?theme=image&quot; style=&quot;border-radius: 6px; border: none; height: 204px; width: 204px;&quot;&gt;&lt;/iframe&gt;</description>
  620. </item>
  621.    </channel>
  622. </rss>

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//feeds.feedburner.com/ReidsForFun

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda