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”

CPU Showdown For Pancakes

If you ask people how they rate as a driver, most of them will say they are better than average. At first, that seems improbable until you realize one thing: people judge themselves by different criteria. So Sally thinks she’s a good driver because she goes fast. Tom’s never had a wreck. Alice never gets lost. You can see the same effect with CPUs. Some are faster or have more memory bandwidth or more instruction issues per cycle. But [Andrew] and [Scharon] at Tom’s Hardware wanted to do the real test of a CPU. How well can it cook pancakes? If you want to know, see the video below.

While your CPU might be great for playing video games, it has a surprisingly small cooking surface, so the guys needed a very small pan. The pan had grooves in it, so they slathered it with thermal grease. We doubt that’s food-grade grease, either. Continue reading “CPU Showdown For Pancakes”

The Legacy Of The Floppy Still Looms Over Windows

We no longer use floppy disks on the vast majority of computers, but a recent Old New Thing blog post from Microsoft sheds light on one of their possible unexpected legacies. It seems Windows disk cache items expire after two seconds, and as the post explains this has its origin in the development of MS-DOS 2.0.

Disks, especially floppy disks, are slow compared to computer memory. A disk cache is a piece of memory into which the operating system puts frequently loaded items to speed up access and avoid its having to repeatedly access the disk. They have an expiry time to ensure that the cache doesn’t become clogged with data that hasn’t been needed for a while.

IBM PC floppy drives didn’t implement any form of notification for a disk eject, so it became quite possible for a disk to be ejected while the operating system still believed cached data from it to be valid. Thus a pair of Microsoft engineers tried their hardest to swap floppy discs as fast as they could, and it was discovered to be an impossible task in under two seconds. This became the cache expiry time for a Microsoft OS, and thus we’re told the floppy’s legacy lives on as more than just the ‘save’ icon.

As this is being written the Internet is abuzz with a viral Tweet about railroad gauges having an origin in the width of a Roman horse, that rail historians are debunking with a reference to the coal tramways of [George Stephenson’s] Northern England. It’s thus sometimes dangerous to take simple soundbite origin stories at face value, but since in this case our source is Microsoft themselves we think we can take it as being close to the horse’s mouth. Even if it isn’t a Roman horse.

IBM floppy drive image: Michael Holley [Public domain].

Dual Screen Laptop Is A Slick DIY Build

Laptops are great for portable productivity, but ergonomically they can leave something to be desired. They tend to force the user to look down, creating neck strain over extended periods. Rather than invest in expensive massages, [DIY Perks] decided what he really wanted was a dual screen laptop. So he built one! (Video embedded below.)

The build stats with a replacement laptop screen sourced from eBay, a nice full-HD IPS unit with a matching Embedded DisplayPort driver to enable the screen to be driven with the laptop’s existing HDMI port. To power the display, a USB-C Power Delivery board is used, in combination with a high-quality USB-PD compliant battery pack. This provides the 12 V required to run the screen.

To integrate the screen into the laptop, a set of 3D-printed hinges are used to create a folding mechanism, along with a brushed aluminium backing plate. Finished with a set of 3D-printed bezels, the final result is quite attractive from the front, looking almost stock at a glance.

It’s a build that may prove enticing to serious laptop professionals, particularly those that are willing to trade-off productivity against a little added bulk. We’ve seen other great work from [DIY Perks] before too, like these versatile LED panel lights. Video after the break.

Continue reading “Dual Screen Laptop Is A Slick DIY Build”

Windows 3.1 Screensavers, Now On Twitter

Back in the early dawn of the GUI age, cathode ray tubes were the dominant display technology for the personal computer. In order to avoid burn-in of static display elements, screensavers were devised to help prevent this problem. Out of love for the software of yesteryear, [Greg Kennedy] has put together a bot that posts Windows 3.1 screensavers on Twitter.

A Perl script runs the show in this case. Screensavers are packed into “units”, which are loaded by the script. A basic Windows 3.1 environment is then configured, and loaded into a specially patched DOSBOX that allows automated demo recording in a headless environment. Once up and running, video is recorded of the desktop and subsequent triggering of the screensaver. After a couple of minutes, the recording is stopped, and FFMPEG is used to transcode the video into a Twitter-suitable format. It’s then a simple job of Tweeting the video using the standard API.

It’s a fun project that makes sharing old screensavers easy. Be sure to check out the Twitter feed @dot_scr. If you’re addicted to the vintage aesthetic, try this Apple ][ screensaver hack on your Linux boxen. Video after the break.

Continue reading “Windows 3.1 Screensavers, Now On Twitter”

An Arduino Enhances This 7400 CPU

How quickly could you make an entire computer from 74 series logic, from scratch? [Richard Grafton had only 30 days until the UK’s Retro Computer Festival and set out to design and build his Cambridge-1 computer in that time. The result is a machine spread across several breadboards, with neatly placed wiring and unexpectedly an Arduino Micro sitting in the corner. Isn’t the little Italian board a cheat? Not so, he says, because instead of being part of the computer itself it serves as a program loader to make putting software onto the machine from a PC as easy as possible.

The machine itself is simple enough, a 4-bit design with 8-bit data and address busses. There are only 16 instructions, and the clock speed is a relatively pedestrian 40Hz. This does, however, allow the many blinkenlights to show the machine’s state in a more visible manner. There’s a video which we’ve placed below the break, and if you have further questions you might like to look at the GitHub repository.

We like the Cambridge-1, and we see no problem with the Arduino being part of it. It doesn’t take away from the 74-driven nature of the machine. Instead, it enhances the usefulness of the device by facilitating coding on it. We’ve had huge quantities of TTL computers here over the years so it’s difficult to pick one to send you towards, however you may want to consider the 7400 as the original in the series.

Continue reading “An Arduino Enhances This 7400 CPU”

Upping The Story-Telling Game With Dialog And The Å-Machine

During the decades since Infocom released their interactive story game Zork to world-wide acclaim for microcomputers, the genre of interactive fiction (IF) is still immensely popular, with a surprising number of modern IF works targeting Infocom’s original Z-Machine runtime for 8-bit micocomputers. We’ve seen a number of improved runtimes and languages for the platform over the years, with [Linus Åkesson]’s Dialog language a newcomer.

Covering the technical details about the language in this thread at IntFiction, the interesting aspect about this language is that while it has a compiler that compiles it to Z-code for the Z-Machine, [Linus] has also implemented a new runtime, called the ‘Å-Machine‘, since ‘Å’ follows ‘Z’ in the alphabet (if you’re Swedish, that is). This runtime should allow for larger stories and other features that make better use of more resources, while still allowing smaller stories to work on old hardware. Unfortunately the only Å-Machine implementation at this point is written in JavaScript, which is not known to work particularly well on Commodore 64 or even Amiga 500 systems.

As for Dialog itself, its documentation provides a detailed overview of the language’s capabilities, which claims to be inspired by both Inform 7 and Prolog. Its goals are to be easy to follow, with a minimal number of language concepts, and high performance. As the documentation notes, many Z-Machine based stories exist today that are unplayable on vintage hardware due to lack of optimization.

We covered Zork and the Z-Machine a while ago in some detail. We think it’s great to see that there’s still so much interest in the platform. Maybe someone will write an Å-Machine implementation for a Commodore or MSX system one of these days to see how it compares to Infocom’s Z-Machine. Here’s to another few decades of the Zork-legacy.