Playing ZX Spectrum’s Manic Miner On The Arduino Uno

Composite output shield with audio driver and controller inputs for Arduino Uno (Credit: Scott Porter)
Composite output shield with audio driver and controller inputs for Arduino Uno (Credit: Scott Porter)

Although it seems many have moved on to 32-bit MCUs these days for projects, there is still a lot of fun to be had in the 8-bit AVR world, as [Scott Porter] demonstrates with a recent Arduino Uno project featuring his game engine running a port of the Manic Miner game that was originally released in 1983 for the ZX Spectrum. For the video and audio output he created an add-on board for the Uno that creates a composite signal using two resistors, along with an audio driver circuit and control inputs either from the onboard buttons or from a NES controller. Audio can be sent either over the composite output or via the audio jack.

A demonstration of the game is provided in a number of videos on [Scott]’s YouTube account, which shows off a few levels, at 256×256 resolution. It contains all 20 original levels, with a few quality of life upgrades with animation. It also features original music, which may or may not work for you, but music can be turned on or off in the main menu. Compared to the 3.5 MHz Z80 MPU in the ZX Spectrum, the 16 MHz AVR of the Uno is a lot beefier, which raises the hope that a color version like the ZX Spectrum one is also in the future, even if it may require an add-on board with a framebuffer. As [Scott] notes, the weakness of the Uno is that the ZX Spectrum has significantly more RAM, which limits what can be done.

Thanks to [256byteram] for the tip.

Continue reading “Playing ZX Spectrum’s Manic Miner On The Arduino Uno”

A ZX Spectrum Raytracer, In BASIC

[Gabriel Gambetta] knows a few things about ray tracers, being the author of Tiny Raytracer, a raytracer written in just 912 bytes of JavaScript. As a long-time fellow sufferer of the UK-designed ZX Spectrum, could these two love affairs be merged? Could the Tiny Raytracer fit on the ZX Spectrum? In BASIC? The answer is an affirmative, albeit with our beloved speccy’s many limitations.

Ray tracing with only 15 primary colours

The story starts with [Gabriel]’s Computer Graphics From Scratch (CGFS) raytracer algorithms and an existing code base that was ported to the ZX Spectrum’s very limited BASIC dialect, using VSCode for editing, BAS2TAP to generate a tape image file (essentially an audio track) and executed with FUSE. With the toolchain sorted, [Gabriel] adds just enough code to deal with the ray intersection equations of a sphere, and renders a three-sphere scene to a 32×22 pixel colour image, taking a mere 15 minutes of runtime. Fellow sufferers will remember the spectrum had a 32×22 block attribute array (or colour array) with two colour values for foreground and background pixels. Each attribute block contains 8×8 pixels, each of which could be foreground (on) or background (off.) The next stage was then to expand the code to handle pixels as well as blocks, by simply expanding the raytracing to the full 256×176 resolution, and for each block simply determine the two most common colours, and run with those for the whole block. It sort of works, in a very spectrum-esq ‘attribute clash’ kind of fashion.

Continue reading “A ZX Spectrum Raytracer, In BASIC

The Laptop Every British Kid Would Have Wanted For Christmas 1983

How can we convey to a world in which a 64-bit laptop can be a near-throwaway item, just how amazing a miniature laptop version of the 1980s Sinclair ZX Spectrum could have been? perhaps we don’t need to, because here in 2023 there’s a real one for all middle-aged geeks who had the original to drool over.

8-bit home computers were super-exciting for the kids of the day, but they were in no way portable and relied on a TV, frequently the family model in the living room. It’s safe to say that a portable version of one of those home computers, not in an Osborne-style luggable case but in a clamshell palmtop, would have been mind-blowing, so four decades later we’re fascinated by [Airrr17]’s portable Sinclair ZX Spectrum.

At its heart is a dev board using one of the STM32F4 series microcontrollers, and running the Spectrum as an emulator. Alongside that is an LCD, and perhaps what is physically the best part of this, a Spectrum keyboard complete with BASIC keyword decals, made with large-button tactile switches that have we think, printed paper on top. Add in a small lithium-polymer cell and associated electronics in a cute little palmtop case, and it’s about as good a portable Sinclair as we could have imagined. All the details can be found in a GitHub repository, and as if that weren’t enough there’s an assembly video we’ve placed below the break.

Continue reading “The Laptop Every British Kid Would Have Wanted For Christmas 1983”

ZX Spectrum Gets A 3D FPS Engine

The Sony PlayStation and Nintendo 64 are well-known for bringing 3D gaming into the mainstream in a way that preceding consoles just couldn’t. The ZX Spectrum, on the other hand, is known for text adventures and barebones graphics. However, it now has a rudimentary version of a Quake-like engine, as demonstrated by [Modern ZX-Retro Gaming].

As you might expect, the basic ZX Spectrum that sat in front of your dodgy old TV in the 1980s isn’t really up to the task of running a full 3D game. The engine runs at a fairly jerky frame rate on a 3.5 MHz ZX Spectrum, with purely monochrome graphics. However, the game can run more smoothly on 7, 14, and 28MHz ZX Spectrum compatibles. As with many such projects, most of the video you’ll see is of the game running in emulators. Impressively, the game features sound effects, three weapons, and a standard WASD control layout as per modern FPS games.

If you’re wondering about the confusing visuals, there’s a simple explanation. Yes, the UI and weapons are straight out of Doom. However, the game is running on a true 3D engine, with 3D enemies, not sprites. It’s inspired by the full 3D engine pioneered by Quake, hence the designation.

Files are available for those wishing to try it out at home. We do see a fair bit of the ZX Spectrum around these parts. Video after the break.

Continue reading “ZX Spectrum Gets A 3D FPS Engine”

A ZX Spectrum with a Microdrive emulator plugged into its expansion port

A Modern Replacement For The ZX Spectrum’s Odd Tape Storage System

Unless you were lucky enough to be able to afford a floppy disk drive, you probably used cassette tapes to store programs and data if you used pretty much any home computer in the 1980s. ZX Spectrum users, however, had another option in the form of the Microdrive. This was a rather unusual continuous-loop mini-tape cartridge that could store around 100 kB and load it at lightning speed, all at a much lower price point than a floppy drive. The low price came at the cost of poor durability however, and after four decades it’s becoming harder and harder to find cartridges that work reliably. [Derek Fountain] therefore set out to make a modern Microdrive emulator that stores data on SD cards.

Several projects already exist to replace Microdrives, but they typically also need the ZX Interface 1, a serial/network expansion module that’s becoming equally hard to find. Hence [Derek]’s choice to make his emulator a completely standalone system that directly plugs into the Spectrum’s expansion port.

A 3D-printed box with a PCB inside holding three Raspberry Pi Picos and an SD cardThe system is housed in a 3D-printed enclosure that holds two PCBs. Three Raspberry Pi Picos run the show inside: one to hold the ZX Interface 1’s ROM image and interface with the Spectrum’s bus, another to simulate the Microdrive, and a third to run the user interface and communicate with the SD card. The user can choose between eight tape images stored in .MDR format by using two pushbuttons and a rotary encoder, with a small OLED display showing the machine’s configuration.

While you might think that three dual-core 133 MHz ARM CPUs would run circles around the Spectrum’s Z80, it actually took quite a bit of work to get everyting running properly in real time. The 3.5 MHz bus clock rate gave the second Pico precious little time to fetch the required bytes out of its flash memory. Its RAM was fast enough for that, but too small to hold all eight tape images at the same time. In the end, [Derek] settled on using a separate 8 MB SPI DRAM chip that could easily keep up the data rate, with the Pi just using its GPIO ports to shuttle the data around.

All source code and extensive documentation are available on Derek’s excellent blog post and GitHub page. Be sure to also check out [Jenny]’s detailed review and teardown if you’d like to know more about the weird and wonderful Microdrive system.

Thanks for the tip, [Andrew]! Continue reading “A Modern Replacement For The ZX Spectrum’s Odd Tape Storage System”

A Pico-Based ZX Spectrum Emulator

The ZX Spectrum was a popular computer of the 8-bit era. Now, it’s possible to emulate this machine on a microcontroller so cheap that it’s literally been given away on the front cover of magazines. Yes, we’re talking about the Pico ZX Spectrum project.

The project consists of all the necessary code to emulate a ZX Spectrum upon the hardware of the RP2040 microcontroller that makes up the Raspberry Pi Pico. The community has then taken this code and run with it, using it as the basis for all manner of different ZX Spectrum builds. If so desired, you can go barebones and use the Pico to run a ZX Spectrum off a breadboard with HDMI video output. Alternatively, you can build something like the PicoZX from [Bobricius]. The handheld computer features a PCB-based housing, along with an LCD and an integrated keyboard. Other configurations support features like USB keyboards, VGA outputs, and working sound output.

It’s great to see a classic 8-bit computer reimagined in all kinds of new tribute form factors. The Spectrum was always beloved for its neat all-in-one design, and there are several modern remixes that riff on that theme. The fact that they can all be powered by a cheap single-board microcontroller is all the more astounding. Video after the break.

Continue reading “A Pico-Based ZX Spectrum Emulator”

Recreating The ZX Spectrum Unboxing Experience By Manufacturing A New Boxed One

Why scour the internet for a rare-as-hen’s-teeth new in box ZX Spectrum computer when you can instead order up some parts, assemble a basically all new ZX Spectrum along with the box, instruction manuals and more?

That seems to have been the reasoning behind [Lost Retro Tapes] when they decided to do exactly that. Along with the announcement of the completion on Reddit, the website details the BOM and sourcing the components.

For the mainboard, an existing, redrawn ZX Spectrum 48 Issue 3B PCB was found and ordered from PCBWay. As a UK-based entity, many of the other components were sourced from retro computing shops around the UK, but with all but the LM1889N IC being available for new or with currently produced alternative, it should be viable to source them locally.

Perhaps most impressive was the creation of the box (unfortunately not detailed on the website at this point), and having the manuals (system and BASIC) professionally printed and bound. Along with a few other bits and pieces, including a tape recorder and fresh Horizons tape, the total price tag came to around £412.

Thanks to [Lee Hodgson] for the tip.