Writing A Very Tiny Chess Program

When programming for modern platforms, the restraints are different to those of 30 years ago. Back in the dawn of the microcomputer age, storage and RAM were measured in kilobytes. It simply wasn’t possible to store large amounts of graphical data, and even code had to be pared back at times. [reeabgo] found out some of these limitations first hand, when coding a tiny chess program for the Sinclair ZX81.

[reeabgo]’s project goes by the name ChesSkelet, and is truly tiny. Measuring in at just 377 bytes in its smallest version, the entire program takes up less space than this very article describing it. To achieve these feat requires certain sacrifices, of course. The tiniest edition contains no graphics whatsoever, representing the game state with simple characters and featuring no adornments whatsoever. The full-fat version comes in at 477 bytes and adds quite a lot of functionality. There’s a proper checkerboard, along with move legality checks and pawn promotion.

Unfortunately, advanced chess play isn’t quite possible – castling is not implemented, and the AI doesn’t yet handle check situations properly. Despite this, it’s a solid approximation of the real game, all packed into an impressively small space.

We see plenty of chess hacks around these parts – including the robotic variety.

The Primordial Sinclair ZX Spectrum Emerges From The Cupboard

The Centre for Computing History in Cambridge, UK, receive many donations from which they can enrich their collection and museum displays. Many are interesting but mundane, but the subject of their latest video is far from that. The wire-wrapped prototype board they reveal with a flourish from beneath a folded antistatic mat is no ordinary computer, because it is the prototype Sinclair ZX Spectrum.

It came to the museum from Nine Tiles, a local consultancy firm that had been contracted by Sinclair Research in the early 1980s to produce the BASIC ROM that would run on the replacement for their popular ZX81 home microcomputer. The write-up and the video we’ve placed below the break give some detail on the history of the ROM project, the pressures from Sinclair’s legendary cost-cutting, and the decision to ship with an unfinished ROM version meaning that later peripherals had to carry shadow ROMs with updated routines.

The board itself is a standard wire-wrap protoboard with all the major Spectrum components there in some form.  This is a 16k model, there is no expansion connector, and the layout is back-to-front to that of the final machine. The ULA chip is a pre-production item in a ceramic package, and the keyboard is attached through a D connector. Decent quality key switches make a stark contrast to the rubber keys and membrane that Spectrum owners would later mash to pieces playing Daley Thompson’s Decathlon.

This machine is a remarkable artifact, and we should all be indebted to Nine Tiles for ensuring that it is preserved for those with an interest in computing to study and enjoy. It may not look like much, but that protoboard had a hand in launching a huge number of people’s careers in technology, and we suspect that some of those people will be Hackaday readers. We’ll certainly be dropping in to see it next time we’re in Cambridge.

If you haven’t been to the Centre for Computing History yet, we suggest you take a look at our review from a couple of years ago. And if prototype home computers are your thing, this certainly isn’t the first to grace these pages.

Continue reading “The Primordial Sinclair ZX Spectrum Emerges From The Cupboard”

Homebrew ZX Spectrum title Nohzdyve

Netflix Drops ZX Spectrum Homebrew Title Nohzdyve

The dark, dystopian future is ever-present in the Netflix show Black Mirror, but the latest release in the series, Bandersnatch, presents a decidedly different narrative. Bandersnatch is a branching story that follows the fictional events of a garage-programmer named Stephan who develops the titular game, Bandersnatch, for the Tuckersoft company set in 1980s England. The whole thing plays out as a choose-your-own adventure game fit straight off the Sega CD (albeit with actual full motion video) by allowing watchers to pick what happens next in the story. Not one to miss a cross-promotional opportunity, Netflix also released a playable ZX Spectrum homebrew title, Nohzdyve, developed by a friend of Hackaday, [Matt Westcott].

Keen viewers of Bandersnatch were able to ascertain that the screeching sound at the end of the show when loaded into a ZX Spectrum would display a QR code. That in turn led to a real website for the fake Tuckersoft company (thankfully in HTML). The website itself showcases the fictional company’s software library and upcoming releases, but it also took things a step further. The duality of Bandersnatch is carried over to the website as there are branching paths for those that remove ‘www’ from the URL. Doing so reveals Tuckersoft’s website from an alternate timeline where Bandersnatch was never created, however, a downloadable copy of Nohzdyve in a .tap file is there for the taking.

The Nohzdyve game itself is a vertically scrolling action game that uses the ZX Spectrum’s garish color palette to great effect. Racking up a high score in the game can be done via emulator (for example Speccy) or for the most authentic experience, on real hardware. This may be the best reason to fire up a tape drive in a while, but for those seeking the less-analog approach there is always this gameplay footage from Mr. Tom FTW’s channel:

Continue reading “Netflix Drops ZX Spectrum Homebrew Title Nohzdyve”

Little Emulators Do 8 Bits At A Time

Have you ever wondered how many, for example, Commodore 64s it would take to equal the processing power in your current PC? This site might not really answer that, but it does show that your machine can easily duplicate all the old 8-bit computers from Commodore, Sinclair, Acorn, and others. By our count, there are 86 emulators on the page, although many of those are a host machine running a particular application such as Forth or Digger.

If you are in the US, you might not recognize all the references to the KC85, this was an East German computer based on a Z80 clone. Very few of these were apparently available for personal purchase, but they were very popular in schools and industry. These were made by Robotron, and there are some other Robotron models on the page, too.

Continue reading “Little Emulators Do 8 Bits At A Time”

Electromagnetic Field: Speczilla!

It is a golden rule of the journalist’s art, that we report the news, we don’t make it. But just occasionally we find ourselves in the odd position of being in the right place such that one of our throwaway comments or actions has the unintended consequence of seeding a story. This is one of those moments, so it’s a rare case of use of the first person in a daily piece as your scribe instead of Hackaday’s usual second person.

At the SHA2017 hacker camp in the Netherlands, [Matt “Gasman” Westcott] gave his presentation on composing a chiptune from an audience suggestion. Afterwards my Tweet about never having seen a Sinclair Spectrum as large as the one on the presentation screen grew a life of its own and became the idea for a project, which in turn at Electromagnetic Field 2018 was exhibited as a giant-sized fully working Sinclair ZX Spectrum.

Since much of the work was performed in Oxford Hackspace I saw Matt’s progression, his first experiments with foam rubber keys, then as he refined his two-wire switch mechanism. Early experiments hooking a row of them up to a real Spectrum motherboard weren’t the success he’d hoped for, so he moved to the FUSE emulator on a Raspberry Pi. A huge effort and needlework learning curve plus a lot of help from OxHack’s textile specialists and buying his local furniture store’s entire stock of foam allowed him to perfect a facsimile of the classic Spectrum’s case and blue rubber keys, while its lettering and iconic BASIC keywords were vinyl-cut at rLab in Reading. A Milton Keynes Makerspace member provided transport to the camp where it was united with a huge TV in a gazebo, completing the trio of local spaces.

At the camp, though it suffered a few technical hitches along the way it was rather a success. There were two techniques, kneeling down and pressing keys with the palm of your hand, or dancing on them in socked feet for complex manoeuvres. The trademark single-key-press BASIC keywords took a little while to re-learn though, there was a time when those were instinctive.

We’d normally wrap a piece like this one up with a link or two. To other projects perhaps, or other hacks from the same person. But in this case we have neither another home computer on this scale, nor any hacks from [Matt], as he’s well known in the European arm of our community for something completely different. As [Gasman] he’s a chiptune artist par excellence, as you can see if you watch his set from the 2014 Electromagnetic Field.

Crowdfunding: !Sinclair !ZX Vega To Lose The Sinclair Name

It’s not a good time to be a backer of the crowdfunded Sinclair ZX Vega retro console. After raising a record sum on Indiegogo, a long series of broken promises and missed dates, and a final loss of patience from the crowdfunding site, it has emerged that the owner of the Sinclair and ZX brands is to withdraw the right to use them from the console.

The Vega itself should have been a reasonable proposition, a slick handheld running the FUSE Spectrum emulator rather than Z80 hardware, and from Retro Computers Limited, a company that boasted a 25% ownership from Sinclair Research and thus Sir Clive himself. The sorry tale of its mishandling will probably in time provide enough information for a fascinating book or documentary in itself, but one thing that has come to light in the BBC’s reporting is the fate of those Sinclair brands. They famously passed to Amstrad in the 1980s, a move that gave us the Spectrum +2 and +3 with decent keyboards and built-in tape and disk drives, but long after the last Spectrum had rolled off the production line they passed with Amstrad’s set-top-box business to the satellite broadcaster Sky, who are now responsible for pulling the plug.

This is a general news story as much as a hardware story as there is little by way of a hack to be found beyond the realisation that you could almost certainly roll your own with a Raspberry Pi, a copy of FUSE, and a 3D-printed case. But it’s a fitting follow-up to our previous reporting, and unless something unexpected happens in the Retro Computers boardroom it’s probably the last we’ll hear of the product. In an unexpected twist though they are reported to have shipped a few Vegas to backers in recent days, and we’ll leave the final word to the BBC’s quote from [David Whitchurch-Bennett], one of those recipients.

“The buttons are absolutely awful, You have to press so hard and they intermittently stop working unless you apply so much pressure.”

From where we’re sitting, remembering the dubious quality of some of the keyboards on original Spectrum products, we think that it might have more in common with the original than anyone is willing to admit.

The Electric Vehicles Of EMF Camp: A Sinclair C5, (Almost) As It Should Have Been

Most Hackaday readers will have heard of [Clive Sinclair], the British inventor and serial entrepreneur whose name appeared on some of the most fondly-recalled 8-bit home computers. If you aren’t either a Sinclair enthusiast or a Brit of a Certain Age though, you may not also be aware that he dabbled for a while in the world of electric vehicles. In early 1985 he launched the C5, a sleek three-wheeler designed to take advantage of new laws governing electrically assisted bicycles.

The C5 was a commercial failure because it placed the rider in a vulnerable position almost at road level, but in the decades since its launch it has become something of a cult item. [Rob] fell for the C5 when he had a ride in one belonging to a friend, and decided he had to have one of his own. The story of his upgrading it and the mishaps that befell it along the way are the subject of his most recent blog post, and it’s not a tale that’s over by any means.

The C5 was flawed not only in its riding position, the trademark Sinclair economy in manufacture manifested itself in a minimalist motor drive to one rear wheel only, and a front wheel braking system that saw bicycle calipers unleashed on a plastic wheel rim. The latter was sorted with an upgrade to a disc brake, but the former required a bit more work. A first-generation motor and gearbox had an unusual plywood housing, and the C5 even made it peripherally into our review of EMF Camp 2016, but it didn’t quite have the power to start the machine without pedaling. Something with more grunt was called for, and it came in the form of a better gearbox which once fitted allowed the machine to power its way to the Tindie Cambridge meetup back in April. Your scribe had a ride, but all was not well. After a hard manual pedal back across Cambridge to the Makespace it was revealed that the much-vaunted Lotus chassis had lived up to the Sinclair reputation for under-engineering, and bent. Repairs are under way for the upcoming EMF Camp 2018, where we hope we’ll even see it entering the Hacky Racers competition.