Skip to main content

Posts

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 itself gave a clue
Recent posts

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.  If that&

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

Making a good Spectrum +2A from two duff ones

I 've had two black Spectrum +2As boxed up for many years. I think both may have been car boot sale finds at a time when I was using a grey +2. One has never worked properly, one did. I used it a bit, had it repaired at some point (it has the repairer's sticky label on the bottom, I remember taking it there, but I don't remember what the fault was or what he did.) When I plugged them both in recently, the latter one worked for a little while but then developed vertical stripes. I've written a separate post about checking out and working on the power supplies . As one of the cases was mint, and the other broken, I decided to take the best from both and hopefully end up with at least one working board in the good case. (and possibly a second working board, or at least spare components.) One board already had the memory chips socketed. The other had them soldered directly to the board, and I think these were the suspect set, but the best-working board generally. I

Repairing two black Spectrum +2A power supplies

I 've had a project going to make a perfectly-working and perfect-looking Spectrum +2 from two non-working ones. One (a car boot find from many years ago) has never worked, the other I bought and used quite a bit in the 90s. When switching it on again recently it ran fine for a little while and then vertical stripes appeared. I'll write separately about getting a working board from these two and putting it in the best case of the two. Because of that new vertical stripe problem, I checked out both PSUs, which have +5v, +12V and -12V. (Though the -12V is only used for the serial out I think). Both measured fine except for the -12V. On delving deeper I found some disturbing things. In both cases it appeared that this fuse had blown. It turns out that although this one looked blown at first glance, someone has soldered wire across it. I don't know whether this is fusewire of the appropriate rating. That's connected to a low-resistance, high wattage resistor

Updating an Amiga power supply

This is the finished project. As well as being the size and shape of a house brick, it used to be the same weight as one too. It ran hot, and it's risky to depend on a supply that's decades old. I'm sure that the credit goes to Neil at Retro Man Cave . I'm pretty sure I saw this upgrade in one of his videos and then discussed it with him, although I can't find the exact video now. Ms Mad Lemon has also done the same thing , so credit to her too. I have three Amiga PSUs and they're all different shapes and sizes. This is my largest one, and it's the one that is the right size for the Mean Well power supply which is recommended for this project. Further below is a shot showing the part number. It happens to have +5v, -12v and +12v out ,which is exactly what the Amiga needs. It also fits this case snugly. Almost as if it were designed for this job! I bought the new supply a year ago, but couldn't get into that plastic case. The screws are a