Showing posts with label ZX Spectrum. Show all posts
Showing posts with label ZX Spectrum. Show all posts

Tuesday, March 24, 2026

Disk Check for the ZX Spectrum +3

Well, not to jump on the agentic coding bandwagon or anything, I've totally jumped on the agentic coding bandwagon and implemented a Disk Check program in z88dk. Its taken me and copilot a couple of weeks, but I now have a functioning Disk Checker.


Copilot (and sometimes Claude, thanks Claude) helped me write almost all of this. I knew very little machine code, but I did know C. Copilot fixed the main bug I had when I was just running the disk routines, namely the crash I couldn't get my head around when trying to communicate to the controller. It was the biggest stumbling block to me getting it done, and it fixed it in about an afternoon of it fiddling with the ASM.

Hopefully now I can fix those two real +3 drives sitting on my shelf.. erm.

Features
  • Motor + drive status – Combined motor control and ST3 status check
  • Drive probe (Read ID) – Probe media and report controller status bytes; decodes ST1/ST2 on failure
  • Recal + seek track 2 – Track-0 recalibrate then seek verification
  • Interactive step seek – Manually step the head track by track
  • Read ID – Read sector ID from track 0 (requires readable disk)
  • Read track data loop – Continuously reads sector data on selected track (J/K to change track)
  • Disk RPM checker – Rotational-speed estimate from repeated ID reads; requires readable sector IDs
  • Run all – Execute all core tests in sequence and display a report card
  • Show report card – Display last run results (PASS / FAIL / NOT RUN per test)
  • Clear stored results – Reset all stored test results
  • Direct-key menu UI – Navigation and hotkeys respond directly; confirmation prompts use ENTER
Main menu

This was an exercise in how these agents work, their limits, my limits, the highlighs and the pitfalls. I let them pretty much have free reign, and had a lot of refactoring to do myself. It taught me a lot about how to work with them, and what I want from them and what I don't. 

But above all, it was really fun bringing the old and new worlds together like this!

Friday, April 2, 2021

Restored £60 ZX Spectrum

Bought on eBay 2019, and restored early last year (2020) sometime, this little zx spectrum's life had been a hard one.

It became even harder when I applied my inexperienced cag-handedness to the situation. Believe me, don't practice soldering on something this age.. it's just too delicate!

It was the first one I'd ever done, and was a huge learning curve. Since it was so long ago, and I have pretty much forgotten everything I had to do to figure out what was wrong with it, I'm recording the bill of work done to it here for posterity.



Model: ZX Spectrum 48k

Board: issue 3B


  • Replaced the ULA with retroleum Nebula
  • All lower memory socketed 
  • Broken traces fixed damaged when I removed the lower ram
  • Two PCB through holes fixed damaged whilst removing the lower ram
  • Recapped
  • Traco 5v switching regulator (can't remember the amps)
  • Composite mod added
  • Replacement face plate
  • Retouched logo

These  ZX Spectrum boards really are a piece of artwork to my mind, and the black caps and black nebula board only add to the beauty.

I hope you agree!








Thursday, April 1, 2021

ZX Spectrum - logo restoration

I thought I'd share my attempt at restoring the white logo on the ZX Spectrum. The ZX speccy logo on the 16k and 48k plastic cases can get very worn and faded over the decades.. it has been over 30 years since the lauch of this little machine after all!


fig. 1 - faded :(
Phil Ruston has a good blog on his method to achieve this type of restoration, but I thought I'd share my own attempt, conceived way before I'd found Phil's blog. 

I had some good results, or at least not bad results, using dryish acrylic paint on tightly rolled up kitchen roll held together with tight rubber bands. This acts like a "stamping" tool, and the paint being slightly dry. 


As you can see, the fading can be uneven and the letters are very small, which are raised on the case. This means the "e" in particular can give lots of trouble with masking the main board from them.

Method


Things you'll need;

  • Paper towel, kitchen roll will do
  • Elastic bands
  • Fine grit sandpaper or fine grit nail file
  • Acrylic paint, white
  • Masking tape
  • Isopropyl alcohol and a toothpick if things go sideways 
  • Steady hands!

Firstly, you need to mask off the logo from the rest of the case with tape. Just squaring off will do the trick, but as close as possible to the logo (fig 2).
fig. 2 - mask off area and sand carefully

Use some very fine grit sandpaper or the nail file and slightly abrade the surface of the logo. This will help the paint stick better. Don't overdo it, or you can damage the logo. Clean off the dust when you're done, and clean the logo with some isopropyl alcohol and allow to dry.

Take the one sheet of kitchen roll paper towel and fold it until half, and keep folding until you can't fold it any more. It should be about 10cm long and about 1x1cm thick, and one end should be rounded (basically, the last fold you make is the "end" of the "stamp"). Bind this in place with an elastic band or some cellotape, so that it doesn't unroll:


Fig. 3 - the "stamp"



I expect that a piece of clean sponge might also do, but I haven't tried it yet.

Next, dab a small amount of acrylic white paint onto a temporary surface. I sometimes use an old plate, but anywhere will do. Take the rolled up paper towel and dab it into the paint. Then, take off all the excess with another paper towel, or onto the surface next to where you spread the paint. The less paint you have on the end of the "stamp" the better. Give it a few seconds to dry (this can take a bit of practice to get the right timing and amount!) 

Fig. 3"Dabbing"
Dab the "stamp" very carefully on the logo. The paint does need to be fairly dry or it runs down the edges of the letters 😖 so if it runs, clean it off and try waiting some more and take more paint off the "stamp". Once you have a good coverage on the letters, allow it to dry for a bit and do another coat in the same manner. The trick is to build up layers of paint until it is fully white.


Fig. 4 first pass
Once in a while the paper towel stamp may get clogged with paint. Discard it and make another (its not like they're expensive!), don't try to take layers off to reveal paper towel underneath as this will mean strands of the paper will reach the none-letter surface and make it white too and you're back to square one!

It's very tricky to get good coverage, and easy to get paint outside and inside the middle of the lettering, so it's likely that you might have to start again if it bleeds into the letters or around the edges. Clean the whole area with the alcohol, wipe clean and try again!

This method is still under review, and I might also try Phil's PVA masking method and the dabbing method - anything is a good way to stop the paint going on to the case!

Good luck 🍀



Update 15th April 2021:

I have had slightly better results using enamel paint rather than acrylic. The viscosity is slightly better, and although the coverage is difficult still due to it being quite runny it gives a better finish. It's a good idea to let the paint dry completely before second coating otherwise the finish is rough.