The Z80 Is Dead. Long Live The Free Z80!

It’s with a tinge of sadness that we and many others reported on the recent move by Zilog to end-of-life the original Z80 8-bit microprocessor. This was the part that gave so many engineers and programmers their first introduction to a computer of their own. Even though now outdated its presence has been a constant over the decades. Zilog will continue to sell a Z80 derivative in the form of their eZ80, but that’s not the only place the core can be found on silicon. [Rejunity] is bringing us an open-source z80 core on real hardware, thanks of course to the TinyTapeout ASIC project. The classic core will occupy two tiles on the upcoming TinyTapeout 7. While perhaps it’s not quite the same as a real 40-pin DIP in your hands, like all of the open-source custom silicon world, it’s as yet early days.

The core in question is derived from the TV80 open-source core, which we would be very interested to compare when fabricated at TinyTapeout’s 130nm process with an original chip from a much larger 1970s process. While It’s true that this project is more of an interesting demonstration of TinyTapeout than a practical everyday Z80, it does at least serve as a reminder that there may be a future point in which a run of open-source real Z80s or other chips might become possible.

This isn’t the first time we’ve featured a TinyTapeout project.

Train A GPT-2 LLM, Using Only Pure C Code

[Andrej Karpathy] recently released llm.c, a project that focuses on LLM training in pure C, once again showing that working with these tools isn’t necessarily reliant on sprawling development environments. GPT-2 may be older but is perfectly relevant, being the granddaddy of modern LLMs (large language models) with a clear heritage to more modern offerings.

LLMs are fantastically good at communicating despite not actually knowing what they are saying, and training them usually relies on PyTorch deep learning library, itself written in Python. llm.c takes a simpler approach by implementing the neural network training algorithm for GPT-2 directly. The result is highly focused and surprisingly short: about a thousand lines of C in a single file. It is a highly elegant process that does the same thing the bigger, clunkier methods accomplish. It can run entirely on a CPU, or it can take advantage of GPU acceleration, where available.

This isn’t the first time [Andrej Karpathy] has bent his considerable skills and understanding towards boiling down these sorts of concepts into bare-bones implementations. We previously covered a project of his that is the “hello world” of GPT, a tiny model that predicts the next bit in a given sequence and offers low-level insight into just how GPT (generative pre-trained transformer) models work.

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”

Wine In Beverage Cans Had A Rotten Egg Problem, Until Now

Aluminum beverage cans are used for all kinds of drinks, but when it comes to wine there are some glitches. Chief among them is the fact that canned wine occasionally smelled like rotten eggs. Thankfully, researchers have figured out why that happens, and how to stop it. How was this determined? As the image above hints at, lots and lots of samples and testing.

What causes this, and why don’t other beverages have this problem? Testing revealed that the single most important factor was the presence of molecular sulfur dioxide (SO2), a compound commonly used in winemaking as an antioxidant and antimicrobial.

It turns out that the thin plastic lining on the inside of beverage cans doesn’t fully stop molecular SO2 from reacting with the surrounding aluminum, creating hydrogen sulfide (H2S) in the process. H2S has a very noticeable rotten egg smell, even in low concentrations.

Researchers discovered that if a canned beverage contained more than 0.5 ppm of molecular SO2, a noticeable increase in hydrogen sulfide was likely to be present within four to eight months. The problem is that since most wines aim for around 0.5 ppm of SO2, the average can on wine sitting on a shelf will have a problem sooner rather than later. The more SO2 in the wine (reds tend to contain less, whites more), the worse the problem.

Simply increasing the thickness of the plastic liner is an imperfect solution since it increases manufacturing costs as well as waste. So, researchers believe the right move is to use a more durable liner formulation combined with a lower SO2 concentration than winemakers are usually comfortable with. Unlike bottles, cans can be hermetically sealed which should offset the increased oxidation risk of using a lower concentration of SO2. The result should be wine as a canned beverage, with a shelf life of at least 8 months.

The research is published here and gives a great look at just how one approaches this kind of scientific problem, as well as highlighting just how interesting the humble aluminum beverage can really is.

An RGB LED clock that resembles a color blindness test.

RGB LED HexaClock Doesn’t Actually Light Up The Night

Who says a clock can’t be both useful and beautiful? That seems to be the big idea behind the lovely little HexaClock from [Bulduper]. And boy, is it both.

Probably the most important part of this well-illuminated clock is the light sensor, which allows it to adjust the brightness automatically. If you’re not into that, well, there’s a really nice web app that’ll let you program the dickens out of it.

The brains of this thing is an ESP8266 on a custom PCB which controls the 127 individually addressable RGB LEDs. The clock may look large, but the big printed parts just fit on the bed of a Prusa i3. [Bulduper] used ABS because the LED strip and the PCB might get a little warm; they didn’t want to risk using PLA and having it turn into a Salvador Dali clock (although that could be cool).

Speaking of heat, make sure to use 18 AWG or thicker wires as [Bulduper] advises. LEDs may be efficient, but this clock uses lots of them! If you want to build one of these to bathe your wall in useful light, everything you need is available on GitHub. Watch HexaClock do its thing in the brief demo and walk-through video after the break.

If this is a little too bright for your tastes, check out this synesthesia clock.

Continue reading “RGB LED HexaClock Doesn’t Actually Light Up The Night”

3D Printed Adapter Helps You Eat Chicken Nuggets On The Highway

So often, we see 3D printers used to create some nifty little tool for a tricky little job. Maybe it’s to lock cams together for a timing belt change, or to work as a jig for soldering some complex device. However, some hacks are even simpler than that. [maker_guy] realized that eating nuggets in the car could be easier than ever with a little printed adapter.

The print is simple. It’s a round caddy for the nugget sauces given out by Chick-fil-A restaurants. Why round? Because it lets the nugget sauce sit neatly in your car’s cupholder at an accessible height. Put the sauce tub in the adapter, peel it open, and you can dip to your heart’s content.

So simple, yet a game changer all the same.

No more delicately balancing Zesty Buffalo by the gearstick while you try and chow down. Nor will your seat covers be tainted with Honey Mustard!

“Not a hack!” you scream. “It’s frivolous nonsense!” To that I say, are you a nugget eater or not? I myself partake, and I can absolutely see the value in this. You see, us journalists work hard. We’re often stuck eating substandard food in our cars on the way from one thing to another, like so many others in busy professions. If a smart little 3D-printed adapter can make mealtime easier and save some mess, I’m calling that a win.

You should never be afraid to use your creativity to make tools to improve your life. Parts are on Thingiverse if you need to print your own. Mod it to suit McDonald’s product if you need. Heck, print in black and it’d look like a stock part of the car!

You don’t have to like this simple adapter, but you can’t deny its utility! Share your own nifty little adapter ideas in the comments.

Welcome Back, Voyager

In what is probably the longest-distance tech support operation in history, the Voyager mission team succeeded in hacking their way around some defective memory and convincing their space probe to send sensor data back to earth again. And for the record, Voyager is a 46-year old system at a distance of now 24 billion kilometers, 22.5 light-hours, from the earth.

While the time delay that distance implies must have made for quite a tense couple days of waiting between sending the patch and finding out if it worked, the age of the computers onboard probably actually helped, in a strange way. Because the code is old-school machine language, one absolutely has to know all the memory addresses where each subroutine starts and ends. You don’t call a function like do_something(); but rather by loading an address in memory and jumping to it.

This means that the ground crew, in principle, knows where every instruction lives. If they also knew where all of the busted memory cells were, it would be a “simple” programming exercise to jump around the bad bits, and re-write all of the subroutine calls accordingly if larger chunks had to be moved. By “simple”, I of course mean “incredibly high stakes, and you’d better make sure you’ve got it right the first time.”

In a way, it’s a fantastic testament to simpler systems that they were able to patch their code around the memory holes. Think about trying to do this with a modern operating system that uses address space layout randomization, for instance. Of course, the purpose there is to make hacking directly on the memory harder, and that’s the opposite of what you’d want in a space probe.

Nonetheless, it’s a testament to careful work and clever software hacking that they managed to get Voyager back online. May she send for another 46 years!