A DIY Retrocomputer Programmed In Pure Rust

Can you generate VGA and handle a PS/2 keyboard with a Cortex-M4 in Rust? That’s precisely what [theJPster] wanted to find out with Monotron, a 1980s style home computer programmed in pure Rust.

In order to run embedded Rust without a working operating system, some tools are necessary: an LLVM back-end for generating machine code, a target file for specifying memory sizes and other configs, and a pre-compiled libcore as a substitute for a compiler when running an operating system. Rust takes the place of C running on top of the board support package (BSP) and hardware abstraction layer (HAL), and peripheral access crates (PACs) that specify the hardware and allow the code to be portable across different chips.

The implementation generates a 800 x 600 VGA video signal at 60 Hz, displays text on a 48 character by 36 line display, displays color graphics using color lookup (stored in flash memory), and runs applications that take less than 24 KiB for all data. Monotron also generates 8-bit audio with PWM and sports a synthesizer that uses a three-channel wavetable allowing it to make sounds with square waves, sine waves, sawtooth waves, and create white noise.

So far, the Monotron has been able to work with an Atari joystick, a PS/2 keyboard, and has outputs to VGA, MIDI, SD card, and audio. Next up for the Monotron: writing a programming language (tentatively named Monotronian), adding support for Sega Megadrive pads, displaying sprites, and many more exciting developments.

Continue reading “A DIY Retrocomputer Programmed In Pure Rust”

Extreme Refurbishing: Amiga Edition

The last Amiga personal computer rolled off the assembly line in 1996, well over 20 years ago. Of course, they had their real heyday in the late 80s, so obviously if you have any around now they’ll be in need of a little bit of attention. [Drygol] recently received what looks like a pallet of old Amiga parts and set about building this special one: The Vampiric Amiga A500.

The foundation of this project was a plain A500 with quite a bit of damage. Corrosion and rust abounded inside the case, as well as at least one animal. To start the refurbishment, the first step was to remove the rust from the case and shields by an electrochemical method. From there, he turned his attention to the motherboard and removed all of the chips and started cleaning. Some of the connectors had to be desoldered and bathed in phosphoric acid to remove rust and corrosion, and once everything was put back together it looks almost brand new.

Of course, some other repairs had to be made to the keyboard and [Drygol] put a unique paint job on the exterior of this build (and gave it a name to match), but it’s a perfect working Amiga with original hardware, ready to go for any retrocomputing enthusiast. He’s no stranger around here, either; he did another extreme restoration of an Atari 800 XL about a year ago.

The Monotron, A Rusty Retrocomputer

For many people, a retrocomputer is a classic machine from the past lovingly brought back to working order. But for some, the idea of a retrocomputer is wider than that, encompassing modern hardware that delivers to feel like a device from the past.

The Monotron from [Jonathan Pallant] is one such computer. It’s definitely a retrocomputer such as you might have found in the 1980s, but it’s running on a much more modern Tiva-C TI Launchpad dev board sporting an ARM Cortex M4.

The platform has been created entirely in Rust, and emulates what would have been a rather desirable machine in the early 1980s. With an 800×600 pixel 8-colour VGA display interface, 32k of RAM, and mono 8-bit audio, it already has a few simple demos and games running upon it. [Jonathan Pallant] has given more than one talk on its design and capabilities, we’ve placed one of them as a video below the break. There is even a PCB available which adds all the ports as well as a micro SD card slot for program storage.

We like the Monotron, and we look forward to seeing it develop. It’s an exciting time for retrocomputig with projects such as the RC2014 Z80 machine and the Gigatron TTL RISC processor, but is there space for an emulated one such as this? We hope so.

Continue reading “The Monotron, A Rusty Retrocomputer”

Electrolysis Tank Removes Rust

If you have something rusty, you can get a wire brush and a lot of elbow grease. Or you can let electricity do the work for you in an electrolysis tank. [Miller’s Planet] shows you how to build such a tank, but even better, he explains why it works in a very detailed way.

The tank uses a sodium carbonate electrolyte — just water and washing powder. In the reaction, free electrons from the electrolyte displace the oxygen from the rusted metal piece. A glass container, a steel rod, and a power supply make up the rest.

Continue reading “Electrolysis Tank Removes Rust”

Faux Aircon Units, Made Entirely From 2D Cuts

2D design and part fabrication doesn’t limit one to a 2D finished product, and that’s well-demonstrated in these Faux Aircon Units [Martin Raynsford] created to help flesh out the cyberpunk-themed Null Sector at the recent 2018 Electromagnetic Field hacker camp in the UK. Null Sector is composed primarily of shipping containers and creative lighting and props, and these fake air conditioner units helped add to the utilitarian ambiance while also having the pleasant side effect of covering up the occasional shipping container logo. Adding to the effect was that the fan blades can spin freely in stray air currents; that plus a convincing rust effect made them a success.

Fan hubs, showing spots for fan blades to be glued. With the exception of embedded bearings, the entire hub (like the rest of the unit) is made from laser-cut MDF.

The units are made almost entirely from laser-cut MDF. The fan blades are cut from the waste pieces left over from the tri-pronged holes, and really showing off the “making 3D assemblies out of 2D materials” aspect are the fan hubs which are (with the exception of bearings) made from laser-cut pieces; a close-up of the hubs is shown here.

Capping off the project is some paint and the rusted appearance. How did [Martin] get such a convincing rust effect? By using real rust, as it turns out. Some cyanoacrylate glue force-cured with misted water for texture, followed by iron powder, then vinegar and hydrogen peroxide with a dash of salt provided the convincing effect. He was kind enough to document the fake rust process on his blog, complete with photos of each stage.

Null Sector showcased a range of creativity; it’s where this unusual headdress was spotted, a device that also showed off the benefits of careful assembly and design.

The rust language logo being branded onto a microcontroller housing

Pun Intended: Bare Metal Attracts Rust

Programming languages tend to polarize, and Rust is by far no exception. Whether it will stick around and grow as an alternative for the lower levels or not — time will tell. In the meantime, if you’re curious about the language and its low-level abilities yourself, [phil-opp] has written a series of blog posts on building your own little bare metal kernel in Rust.

Starting from the basics, [phil-opp] describes in detail the set-up and build process to create a standalone executable that won’t be linked against the Rust standard library. From here he proceeds to build a simple operating system kernel that prints a good old Hello World via VGA output — QEMU emulation included. And of course, there is a GitHub repository with all of the source code.

[phil-opp] has been working on this for a while already, and he is currently writing the second edition of the series. Some content is therefore still missing, but you may find more of it in his first edition. And in case you know absolutely nothing about Rust in the first place, let’s just take a step back and start with the basics. After all, we might see more of it in the future.

The rust language logo being branded onto a microcontroller housing

Baremetal Rust On The Horizon

Rust Programming Langauge has grown by leaps and bounds since it was announced in 2010 by Mozilla. It has since become a very popular language owing to features such as memory safety and its ownership system. And now, news has arrived of an Embedded Devices Working Group for Rust aiming at improving support for microcontrollers.

Rust is quite similar to C++ in terms of syntax, however Rust does not allow for null or dangling pointers which makes for more reliable code in the hands of a newbie. With this new initiative, embedded development across different microcontroller architectures could see a more consistent and standardized experience which will result in code portability out of the box. The proposed improvements include IDE and CLI tools for development and setup code generation. There is also talk of RTOS implementations and protocol stack integration which would take community involvement to a whole new level.

This is something to be really excited about because Rust has the potential to be an alternative to C++ for embedded development as rust code runs with a very minimal runtime. Before Arduino many were afraid of the outcome of a simple piece of code but with rust, it would be possible to write memory-safe code without a significant performance hit. With a little community support, Rust could be a more efficient alternative. We have seen some Rust based efforts on ARM controllers and have covered the basics of Rust programming in the past if you want to get started. Good times ahead for hardware hackers.