ESP32 Powers Single-PCB ZX Spectrum Emulator

When word first got out that the Chinese board houses were experimenting with full color silkscreens, many in our community thought it would be a boon for PCB art. Others believed it would be akin to cheating by removing the inherent limitations of the medium. That’s not a debate that will be solved today, but here we have an example of a project that’s not only making practical application of the technology, but one that arguably couldn’t exist in its current form without it: a single-PCB ZX Spectrum emulator developed by [atomic14].

There basics here are, well, they’re pretty basic. You’ve got an ESP32-S3, a TFT display, a micro SD slot, and the handful of passives necessary to tie them all together. What makes this project stand out is the keyboard, which has been integrated directly into the PCB thanks to the fourteen pins on the ESP32-S3 that can be used as touch sensor input channels. There are issues with detecting simultaneous keypresses, but overall it seems to work pretty well.

Continue reading “ESP32 Powers Single-PCB ZX Spectrum Emulator”

The ZX Spectrum Takes To The Airwaves Again

A perk of writing for Hackaday comes in the vast breadth of experience represented by our fellow writers. Through our colleague [Voja Antonić] for example we’ve gained an unparalleled insight into the cutting edge of 8-bit computing in 1980s Yugoslavia, of his Galaksija home computer, and of software being broadcast over [Zoran Modli]’s Ventilator 202 radio show.

We’re strongly reminded of this by hearing of the Slovenian Radio Študent broadcasting the classic Slovenian ZX Spectrum text adventure game Kontrabant 2, at the behest of the  Slovenian Computer History Museum. It’s been four decades and a lot of turbulent history, but once again 8-bit code will be heard on FM in Europe.

Some of our younger readers may never have experienced the joy of loading software from cassette, but in those days it represented a slow alternative to the eye-wateringly expensive floppy drives of the day. The software was represented as a serial bitstream translated into tones and recorded on a standard cassette recorder which was standard consumer electronics back then, and when played back through a speaker it was an ear-splitting sound with something in common with that of a modem handshake from a decade or more later. This could easily be transmitted over a radio station, and a few broadcasters tried experimental technology shows doing just that.

We haven’t heard from any listeners who managed to catch the game and run it on their Spectrum, but we hope that Slovenia’s retrocomputing community were out in force even if Audacity and a n emulator replaced the original hardware. Given that more than one hacker camp in our community has sported radio stations whether legal or not, it would be nice to hear the dulcet tones of 8-bit software on the airwaves again.

Meanwhile if cassettes are too cheap for you, feast your eyes on Sir Clive’s budget storage solution.

Thanks [Stephen Walters].

Pi Pico Gets A ZX Spectrum Emulator

The Pi Pico is a capable microcontroller that can do all kinds of fun and/or useful things. In the former vein, [antirez] has ported a ZX Spectrum emulator to the Pi Pico.

ZX2040, as it is known, is a port of [Andre Weissflog’s] existing ZX spectrum emulator. It’s designed for use on the compact embedded Pi Pico platform, using ST77xx TFT displays. To that end, it has a UI optimized for small, low resolution screens and minimal buttons. After all, very few Pi Picos come with a full QWERTY keyboard attached.

Certain hacks are necessary to make it all work; the chip is overclocked to get things humming fast enough. The emulator also runs upscaling or downscaling in realtime as needed. This allows the emulator to run with a variety of displays, almost none of which are a direct match for the ZX Spectrum’s original resolution of 256×192 pixels.

Code is on Github for the curious, including a great run down from [antirez] on everything that makes it tick. If you want to play ZX Spectrum games on a keychain, you’d do well to start here. There are other projects to emulate it on the Pico, too! Video after the break.

Continue reading “Pi Pico Gets A ZX Spectrum Emulator”

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One With The Transmitting Typewriter

Image by [SrBlonde] via Hackaday.IO
Okay, so we’re opening with more than just a keyboard, and that’s fine. In fact, it’s more than fine, it’s probably the cutest lil’ ZX Spectrum you’ll see today.

[SrBlonde]’s wonderful micro Spectrum project has only the essential inputs, which makes for an interesting-looking keyboard for sure. Inside you’ll find an Orange Pi Zero 2 board loaded with Batocera so [SrBlonde] can play all their favorite childhood games on the 5″ IPS display.

Something else that’s interesting is that the switches are a mix of blues and blacks — clickies and linears. I can’t figure out how they’re distributed based on the numbers in the components list, but I could see using clickies on the alphas and linears everywhere else (or vice versa). At any rate, it’s a great project, and you can grab the STL files from Thingiverse if you’re so inclined.

Continue reading “Keebin’ With Kristina: The One With The Transmitting Typewriter”

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”