Skip to main content

Posts

Showing posts from November, 2020

Homebrew game - the worst bug ever

Exhibit A. (6502 assembly code) Have you seen it yet?  This took me two sessions to find, God knows how many hours.  The frustrating problem with this bug is that it caused memory to be corrupted elsewhere, memory that happened to be a part of the program. So the symptoms made no sense.  The game would crash after losing the first life, during setup for the next life. Once I'd found the place where the crash was happening, it was a routine that had already worked properly once. What was going wrong when it ran the second time? After pausing the emulator just before the crash and opening the monitor to examine the memory, I could see that my code at that particular spot was now corrupt. But that corruption could have happened at any time after initialising the game. No clue as to the culprit.  I eventually started returning from the game at various points and using the monitor to check whether the corruption had happened yet. Eventually a pattern in the corruption its...

Magnetic fridge poetry in C for retrocomputers (RC2014, ZX Spectrum)

F ollowing a house move I reinstalled these fridge magnets and found myself organising them by type (noun, verb, adjective etc). Naturally thoughts turn to writing a program to pick the words at random. As this involves a lot of string handling, it's a perfect candidate for using C and I've been looking for an excuse to try C for my RC2014 and possibly other 8-bit computers too. I found the z88dk to be perfect, very easy to get up and running, a nice workflow with the zcc command and cpm target. Here's the very satisfying result after a little work. It occurred to me that the same program should build for other targets that the z88dk supports ( which is many ) In fact it wasn't that simple. I had to change the code a bit to allow it to run on a Spectrum. But one bonus is that you can choose to build with a proportional font option, which looks really nice on the Speccy and suits this program well. One of the issues I had was getting something random to seed the rnd func...

Knitwear Designer for the BBC Micro, project part 1

 K nitwear Designer from Database Publications, written by Kendall Down. Some time ago I discovered and bought this software. It allows you to design a jumper or other knitwear; give it some sizes and your knitting gauge, and it gives you a knitting pattern. I believe it works on the Electron as well as BBC and Master, but I don't have a disc drive for the Electron. In the following pictures I'm using it on a model B+.  The disc worked, the only issue was that it sends its output to the printer.  If you're knitting the garment then you really do want the pattern on paper.  Frustratingly I gave away a Centronics dot matrix printer just a couple of years ago, slimming down for a house move. It's not the kind of thing I really want to give space to again. Is it possible to connect a modern printer to a BBC via RS232?  I'm not sure.  If it's possible to save the output as a text file and recall it and read it off the screen, then I suppose that might work. ...

ZX81 reversible internal 16k upgrade

T his post is an upvote for Tynemouth Software's  ZX81 reversible Internal 16K RAM upgrade . Their instructions are easy enough for even me to follow and don't involve cutting tracks. This is the ZX81 I've had out on display and used whenever I wanted to. It's an issue 1 and was probably a kit judging by some very untidy assembly. It has a ZX8-CCB  composite video mod and an external keyboard fitted. On board it has two 1k x 4-bit chips.  The ZX81 originally came with 1k on board. Thanks to a trick with compressing the display in ram, that was enough to type and run a small program but you soon felt the limitations. Back in the early 80s, the solution was a 16k ram pack which plugged into the back[1] and this is the way I've been using this particular machine. These ram packs are notorious for 'ram pack wobble'. Even if fastened into place, you can still randomly find your work disappearing. This is a very reliable solution using a more modern 32k chip (half...