This RISC-V CPU Games In Rust From Inside The Game

[Xander Naumenko] has created something truly impressive — a working RISC-V CPU completely contained in a Terraria world. And then for added fun, he wrote the game of pong, playable in real time, from within the game of Terraria. It’s all based on the in-game wiring system, combined with a bit of a hack that uses the faulty lamp mechanic to create a very odd AND gate. In Terraria, the existing logic gates have timing issues that make them a no-go for complicated projects like this one. The faulty lamp is intended to do randomized outputs, by stacking multiple inputs to get a weighted output when a clock signal is applied. The hack is to simply give this device a single input, turning it into a clocked IF gate. Two of them together in series makes a clocked AND gate, and two in parallel make a clocked OR gate.

Why would [Xander] embark on this legendary endeavor? Apparently after over eight thousand hours clocked in game, one gets a bored of killing slimes and building NPC houses. And playing with the game’s wiring system turned on a metaphorical lightbulb, that the system could be used to build interesting systems. A prototype CPU, with a completely custom instruction set came next, and was powerful enough to compute Fibonacci. But that obviously wasn’t enough. Come back after the break for the rest of the story and the impressive video demonstration.

Continue reading “This RISC-V CPU Games In Rust From Inside The Game”

GLASNOST Is A Computer That Makes Transparency A Priority

We live in a world where most of us take the transistor for granted. Within arm’s length of most people reading this, there are likely over ten billion of them sending electrons in every direction. But the transistor was not the first technology to come around to make the computer a possibility, but if you go to the lengths of building something with an alternative, like this vacuum tube computer, you may appreciate them just a tiny bit more.

This vacuum tube computer is called GLASNOST, which according to its creator [Paul] means “glass, no semiconductors” with the idea that the working parts of the computer (besides the passive components) are transparent glass tubes, unlike their opaque silicon-based alternatives. It boasts a graphical display on an oscilloscope, 4096 words of memory, and a custom four-bit architecture based only on NOT, NOR, and OR gates which are simpler to create with the bulky tubes.

The project is still a work in progress but already [Paul] has the core memory figured out and the computer modeled in a logic simulator. The next steps are currently being worked through which includes getting the logic gates to function in the real world. We eagerly await the next steps of this novel computer and, if you want to see one that was built recently and not in the distant past of the 1950s, take a look at the Electron Tube New Automatic Computer that was completed just a few years ago.

At Last, A Beagle V In The Wild

The RISC-V ISA specification contains the recipe for everything from the humblest of microcontrollers to the most accomplished of high-end application processors, but it’s fair to say that at our end of the market it’s mostly been something for the lower end. There are plenty of inexpensive small RISC-V microcontrollers, but so far not much powerful enough for example to run a Linux-based operating system.

It’s a situation that’s slowly changing though, and it looks as though things may have taken a turn for the better as a new BeagleBoard has appeared using a RISC-V chip. The BeagleV-Ahead has a BeagleBone form factor and packs an Alibaba T-Head TH1520 SoC, a 2GHz quad-core part with a GPU and DSP components on-board. They link to a selection of distributors, from which one can seemingly be bought for about $170.

It’s a departure from the ARM chips that have until now powered the BeagleBoard line, but its appearance shouldn’t come as a surprise to seasoned Beagle watchers as they announced their RISC-V developments back in 2021. We’re guessing they too had to contend with the chip shortage which hit other players such as Raspberry Pi, so we’re pleased to see a product on the market. In particular though we’re pleased to see one on a BeagleBoard. because unlike a random no-name single board computer they’re a manufacturer who supports their products.

There’s a page with a good choice of operating systems for the board, and we hope that this means they provide kernel support for this SoC. This is the real benefit of buying a BeagleBoard or a Raspberry Pi, because cheap competitors will typically support only one kernel version compared with their years of support. So while this board is by no means cheap, we’re hoping it heralds a new wave of powerful RISC-V computers. Something to look forward to indeed.

Jenny’s Daily Drivers: Slackware 15

As a recent emigre from the Ubuntu Linux distribution to Manjaro, I’ve had the chance to survey the field as I chose a new distro, and I realised that there’s a whole world of operating systems out there that we all know about, but which few of us really know. Hence this is the start of what I hope will be a long-running series, in which I try different operating systems in my everyday life as a Hackaday writer, to find out about them and then to see whether they can deliver on the promise of giving me a stable platform on which to earn a living.

For that they need an internet connection and a web browser up-to-date enough to author Hackaday stories, as well as a decent graphics package. In addition to using the OS every day though, I’ll also be taking a look at what makes it different from all the others, what its direction and history is, and how user-friendly it is as an experience. Historical systems such as CP/M are probably out of the question as are extremely esoteric ones such as the famous TempleOS, but this still leaves plenty of choice for an operating system tourist. Join me then, as I try all the operating systems.

A Distro From The 1990s, Today

A desktop mini tower PC with monitor showing the Slackware boot screen
The Hackaday test PC gets its first outing.

When deciding where to start on this road, there was an obvious choice. Slackware was the first Linux-based distribution I tried back in 1995, I’m not sure which version it was , but it came to me via a magazine coverdisk. It was by no means the first OS that captured my attention as I’d been an Amiga user for quite a few years at that point, but at the moment I can’t start with AmigaOS as I don’t have nay up-to-date Amiga-compatible hardware.

July 2023 also marks the 30th anniversary for the distro making it the oldest one still in active development, so this seems the perfect month to start this series with the descendant of my first Linux distro. Slackware 15 comes as a 3.8 GB ISO file download for 64-bit computers, and my target for the distro was an old desktop PC with an AMD processor and a big-enough spinning rust hard disk which had been a high-end gaming system a little over ten years ago. Not the powerhouse it once was, but it cost me nothing and it’s adequate for my needs. Installed on a USB Flash drive the Slackware installer booted, and I was ready to go. Continue reading “Jenny’s Daily Drivers: Slackware 15”

Clock Runs Computer In Slow-Motion

At the heart of all computers is a clock, a dedicated timepiece ensuring that all of the parts of the computer are synchronized and can work together to execute the instructions that the computer receives. Clock speeds for most modern off-the-shelf computers and smartphones operate around a billion cycles per second, and even clocks that tick at a human-dizzying speed of a million times per second have been around since at least the 1970s. But there’s no reason a computer can’t run at a much slower speed, as [Greg] demonstrates in this video where he slows down a 6502 processor to a single clock cycle per second.

To reduce the clock speed from the megahertz range down to a single hertz or single clock cycle per second, [Greg] is using the pendulum from an actual clock. He attaches a small magnet to the bottom of the pendulum which is counted by a sensor as it swings past. Feeding that pulse into a monostable conditioner yields a clock signal which is usable for one of his 6502-based computers, and at this extremely slow rate, it’s possible to see the operation of a lot of the computers’ inner workings a step at a time. In fact, he optimized the computer’s operation as this slow speed let him see some inefficiencies in the program he was running.

It helps if your processor is static, of course. Older CPUs with dynamic storage for registers and some with limited-range PLLs would not work with this technique. The 8080A, for example, required a clock of at least 500 kHz.

Not only can this computer use a pendulum clock as the basis for its internal clock, but [Greg] also rigged up a mechanism to use a heartbeat. Getting in a little bit of exercise to increase his heart rate first will noticeably increase the computer’s speed. And, if you’re looking to get a deeper glimpse into the inner workings of a computer, we’d recommend looking at one which forgoes transistors in favor of relays.

Continue reading “Clock Runs Computer In Slow-Motion”

Retro-Inspired Computer Case Hosts Mechanical Keyboard

During the time in the 1980s when the personal computer was gaining steam as a household fixture, plenty of models shipped with the keyboard built in to the machine itself. This helped reduce costs, lower the physical footprint of the device, and arguably improved aesthetics. But as technology progressed, this type of design fell by the wayside as computers became more modular and configurable. That’s not to say there aren’t any benefits to building a computer like this, though. [jit] is here to show off this Amiga-inspired computer with its own modern built-in mechanical keyboard.

Like the Raspberry Pi 400 which is built into its own case, modern computers like this are extremely portable, relatively simple, and space-efficient. But [jit] did not like the uninspired design of the Pi so he was looking to make some improvements. Starting with the keyboard, it boasts a 60% size board with mechanical keys which are backlit by LEDs. Inside the machine is a Odroid XU4 which has a little bit more power (and is often easier to find) than a comparable Raspberry Pi. The case is 3D printed and includes ventilation and support for the addition of various cooling fans, I/O ports, status LEDs, and switches for the computer inside.

Additionally, some modification of the Odroid itself was needed in order to move the various switches to the case, and the build also includes a somewhat customized power supply internally as well. It’s a well-rounded build that captures the spirit of the old computer cases, but takes advantage of a lot of modern technology at the same time. If you want to go all-out with a build like this, though, take a look at this retro-inspired case (with keyboard included) that manages to get most of a Framework laptop inside.

Continue reading “Retro-Inspired Computer Case Hosts Mechanical Keyboard”

Ecological System Dynamics For Computing

Some of you may remember that the ship’s computer on Star Trek: Voyager contained bioneural gel packs. Researchers have taken us one step closer to a biocomputing future with a study on the potential of ecological systems for computing.

Neural networks are a big deal in the world of machine learning, and it turns out that ecological dynamics exhibit many of the same properties. Reservoir Computing (RC) is a special type of Recurrent Neural Network (RNN) that feeds inputs into a fixed-dynamics reservoir black box with training only occurring on the outputs, drastically reducing the computational requirements of the system. With some research now embodying these reservoirs into physical objects like robot arms, the researchers wanted to see if biological systems could be used as computing resources.

Using both simulated and real bacterial populations (Tetrahymena thermophila) to respond to temperature stimuli, the researchers showed that ecological system dynamics has the “necessary conditions for computing (e.g. synchronized dynamics in response to the same input sequences) and can make near-future predictions of empirical time series.” Performance is currently lower than other forms of RC, but the researchers believe this will open up an exciting new area of research.

If you’re interested in some other experiments in biocomputing, checkout these RNA-based logic gates, this DNA-based calculator, or this fourteen-legged state machine.