Linux Device Drivers In Only A Few Years

[Johannes 4GNU_Linux] has been filming a video series on how to write Linux device drivers for a couple of years now, but luckily, you won’t need that long to watch them or to create your own driver. He’s added some recent videos to the series, like the one below, but might want to rewind a few years and start at the beginning.

If you build your own hardware for Linux, you’ll probably eventually want to write a driver which runs as a privileged program. While there are many things you can do in user space, for the ultimate control and performance, you can’t beat a driver.

One problem, though, is that drivers can really crash your system in a big way. In the old days, it was common to have a dedicated system for driver development. Today, for many drivers, you can get away with running a virtual machine that you can crash and reload without much trouble.

The videos cover diverse topics like interrupts, completions, polling, and threads. He even uses a Raspberry Pi, which will be very useful for many embedded projects. Of course, the trend these days is to have one driver — like the USB driver — and have it provide user-space access so that everyone doesn’t have to write their own drivers. But, as usual, that only goes so far.

We aren’t sure how many more videos there will be, but if you make it through the first 31, maybe more will be waiting for you. It has been a while since we looked at SPI drivers in Linux. As an example of why you might want to roll your own, consider a custom FPGA driver.

Continue reading “Linux Device Drivers In Only A Few Years”

Retrotechtacular: Better Living Through A-Bombs

Usually, if you are listening to people debate about nuclear issues, it is one of two topics: how to deal with nuclear weapon stockpiles or if we want nuclear power plants in our backyard. But there was a time when the US and the USSR had more peaceful plans for nuclear bombs. While peaceful plans for nuclear bombs might sound like an oxymoron, there was somewhat of a craze for all things nuclear at some point, and it wasn’t clear that nuclear power and explosives wouldn’t take over many industries as the transistor did, or the vacuum tube before it.

You may have heard about Project (or Operation) Plowshare, the US effort to find a peaceful use for all those atom bombs. The Atomic Energy Commission video below touts the benefits “for all nations.” What benefits? Mostly moving earth, including widening the Panama Canal or creating a new canal, cutting highways through mountains, assisting mining and natural gas production, and creating an artificial harbor. There was also talk of using atomic blasts to create new materials and, of course, furthering the study of the atom.

Continue reading “Retrotechtacular: Better Living Through A-Bombs”

Reverse-Engineering Helps Typesetting Machine Punch Paper Tape Again

[Scott M. Baker] wants a paper tape punch for his retrocomputer collection. That’s fine with us, we don’t judge. In fact,  these electromechanical peripherals from the past have a lot going for them, especially the noise. But alas, such things are a little hard to come by these days, and rolling one from scratch would be a difficult proposition indeed. What to do?

Luckily, we live in the future, and eBay holds all sorts of wonders, including these typesetter keyboards from the 1970s, which [Scott] promptly reverse-engineered. We’ll get to the details in a minute, but first, can we just take a moment to think about the workflow these things were part of? These aren’t terminals — they lack any kind of IO apart from the punched paper tape they spewed out. The operator’s job was to punch in copy without any kind of feedback that they were hitting the right keys, and just sent the paper tap record of the session off to the typesetting machines. And you think your job sucks.

To give this thing an interface, [Scott] first had to revive the power supply, whose capacitors had seen sunnier days. With that out of the way, he set about understanding the CPU-less machine by analyzing its 7400-series logic, as well as planning how to make the native 6-bit output into a more manageable 8-bit. Thankfully, the tape punch already had solenoids for the top two bits, but finding a way to drive them wasn’t trivial.

The solution was to bypass a buffer so that the bits for the desired character can be set with a Raspberry Pi and an ATF22V10 programmable logic device. That’s enough to force the punch to do its thing; actually getting it to talk to something else, perhaps even [Scott]’s Heathkit H-8 computer.

Continue reading “Reverse-Engineering Helps Typesetting Machine Punch Paper Tape Again”

DisplayPort: A Better Video Interface

Over the years, we’ve seen a good number of interfaces used for computer monitors, TVs, LCD panels and other all-things-display purposes. We’ve lived through VGA and the large variety of analog interfaces that preceded it, then DVI, HDMI, and at some point, we’ve started getting devices with DisplayPort support. So you might think it’s more of the same. However, I’d like to tell you that you probably should pay more attention to DisplayPort – it’s an interface powerful in a way that we haven’t seen before.

By [Belkin+Abisys], CC BY-SA 3.0
The DisplayPort (shortened as DP) interface was explicitly designed to be a successor to VGA and DVI, originating from the VESA group – an organization created by multiple computer-display-related players in technology space, which has previously brought us a number of smaller-scale computer display standards like EDID, DDC and the well-known VESA mount. Nevertheless, despite the smaller scale of previous standards, DisplayPort has since become a hit in computer display space for a number of reasons, and is more ubiquitous than you might realize.

You could put it this way: DisplayPort has all the capabilities of interfaces like HDMI, but implemented in a better way, without legacy cruft, and with a number of features that take advantage of the DisplayPort’s sturdier architecture. As a result of this, DisplayPort isn’t just in external monitors, but also laptop internal displays, USB-C port display support, docking stations, and Thunderbolt of all flavors. If you own a display-capable docking station for your laptop, be it classic style multi-pin dock or USB-C, DisplayPort is highly likely to be involved, and even your smartphone might just support DisplayPort over USB-C these days. Continue reading “DisplayPort: A Better Video Interface”

The Demoscene, Now An Irreplaceable Piece Of Cultural Heritage

Break out your tuxedo or your evening gown, we’re going to take in some highbrow culture. A night at the opera perhaps, some Tchaikovsky from the symphony orchestra, or maybe a bit of Shakespeare? No, we’re going to a demo party, because the demoscene is the latest art form to be accepted as officially a part of the national cultural heritage of the Netherlands. This builds on successes adding the scene to the cultural heritage registers of Finland, Germany, and Poland, and should provide a boost to other bids in countries such as Switzerland and eventual UNESCO world acceptance.

It’s all very cool that one of our wider community’s art forms is at last being taken seriously rather than being dismissed by the establishment, because along with greater recognition comes other benefits. Sadly we don’t expect any cities to shell out for a demo auditorium next to the shiny new opera house any time soon, but we can see that it could be used to the benefit of for example a hackerspace chasing grants. meanwhile, feast your eyes on a bit of cultural heritage courtesy of the Dutch Centre For Intangible Cultural Heritage (Dutch language, English translation).

Not sure what the demo scene is? We’ve taken you to a demoparty before.

Header image: People Celebrating Evoke 2019 – Foto Darya Gulyamova

A small B/W TV showing a Pong-like game being played on a Soviet-era game console

Soviet-Era Pong Console Is Easy To Repair

Many early home video game consoles were developed by American and Japanese companies: think Nintendo, Commodore, and Atari. But on the other side of the Iron Curtain, which was still very much in place in the 1980s, an entirely separate industry was built on names like Tesla and Elektronika. As a resident of the republic of Georgia, [Thomas] over at Workshop Nation has built up a sizeable collection of such Soviet-era hardware. A while back, he stumbled upon an Elektronika Video Sport 3, a 1990-vintage Pong-like video game console made in the USSR, and made a delightful video that shows him bringing it back to life.

A circuit board from an Elektronika game consoleLike its Western counterparts, the Video Sport 3 is built around a dedicated chip, in this case a K145IK17. This is a Soviet clone of the GI AY-3-8500 that powered nearly every TV Pong console in the West, allowing it to run several variations of Pong as well as a simple target shooting game. Interestingly, the Video Sport 3 also has a “test” mode in which it outputs a test signal to help you adjust your TV settings — quite useful in the days of analog CRTs. It also came with a comprehensive user manual, as well as full schematics to help you repair it in case anything breaks.

[Thomas]’s device didn’t immediately work, which is why he opened it up and tried to find any errors. The main board he found inside was a beautifully hand-made, single-layer board with around a dozen chips and lots of discrete components. Nothing seemed obviously broken, but [Thomas] decided to replace a few electrolytic capacitors as a precaution. This turned out to be enough to get the console working again — dodgy caps truly are a universal problem with older hardware.

A small Elektronika black-and-white TV that [Thomas] found earlier forms a perfect complement to the Video Sport 3. Together, they give us a glimpse into what a typical video game setup may have looked like in an early 1990s Soviet home. In fact, the Eastern Bloc supplied a reasonably wide selection of home computers, although not many people could actually buy them. Some truly bizarre machines were also produced for professional users.

Continue reading “Soviet-Era Pong Console Is Easy To Repair”

MicroLisp: Lisp For Microcontrollers Now Has Lisp-Based ARM Assembler

In a way it feels somewhat silly to market a version of Lisp as targeting resource-constrained platforms, considering the systems it ran on back in the 1960s, but as time goes on, what would have given 1970s Big Iron a run for its money is now a sub-$5 microcontroller that you can run uLisp (MicroLisp) on. This particular project now even has an ARM assembler that is written in Lisp whose source code (GitHub) fits on a mere two A4-sized pages.

ULisp currently supports five platforms, being AVR-nano (ATmega328 and similar low-cost AVRs), AVR, ARM, ESP (8266 and 32), as well as RISC-V. The purpose of this assembler is to execute native ARM instructions when running on an ARM board, since uLisp itself runs a Lisp interpreter on the platform. When executed natively like this, a considerable speed-up of the task can be expected, as illustrated by a number of ARM assembler examples in the documentation.

Running a Fibonacci sequence that takes 24.6 seconds with the Lisp version on an Adafruit Metro M4 is reduced to a mere 61 ms when ARM assembly is used instead. This shouldn’t be too shocking, since this assembler essentially bypasses the Lisp runtime, coming closer to what would be the performance of firmware written in e.g. C. However, it also demonstrates that with this ARM assembler it is possible to have your Lisp and still get native performance when you want it, all using Lisp code.