Running the “Reflections on Trusting Trust” Compiler
In October 1983, 40 years ago this week, Ken Thompson chose supply chain security as the topic for his Turing award lecture, although the specific term wasn’t used back then. (The field of computer science was still young and small enough that the ACM conference where Ken spoke was the “Annual Conference on Computers.”) Ken’s lecture was later published in Communications of the ACM under the title “Reflections on Trusting Trust.” It is a classic paper, and a short one (3 pages); if you haven’t read it yet, you should. This post will still be here when you get back.
In the lecture, Ken explains in three steps how to modify a C compiler binary to insert a backdoor when compiling the “login” program, leaving no trace in the source code. In this post, we will run the backdoored compiler using Ken’s actual code. But first, a brief summary of the important parts of the lecture.
Why Is Your NES A TV Station? (That's Weird)
The title doesn’t lie, and the answer is mildly cursed but par for the course. Something I didn’t mention is that this applies to almost all consoles released in the entire decade, and in fact a significant number (like the Colecovision) ONLY had RF out; the NES was one of the first consoles to have composite at all. If I could do it all again I’d mention that. I’d also keep my Casio CZ-1000 instead of throwing it away when I was 25.
How I implemented MegaTextures on real Nintendo 64 hardware
This showcases a demo of megatextures running on n64 hardware. A “megatexture” for the n64 is really just a normal sized textured by modern standards but with that you can do some prebaked scenes that look like they don’t belong on the n64.
Hacking the Book8088 for Better Accuracy
The Book8088 is trying hard to basically be compatible with the original IBM PC, containing some of the same or equivalent chips. It’s natural to want to put it through its paces, and one of the best tests for IBM PC compatibility has to be the 8088MPH demo. If 8088MPH will run we must be operating pretty darn close to the original.
Now, as it turns out, most of the demo does run, albeit in RGBI mode which loses out on all the cool composite artifact color effects. But most notably the famous Kefrens Bars effect does not display - the screen just goes blank. What’s going wrong on the Book8088 vs a real IBM PC 5150?
Architecture and Simulation of the Z1 Computer
This collection shows technical drawings of the Z1 reconstruction. The Z1 built in 1938 was Konrad Zuse’s first computing machine. It was a mechanical machine and was destroyed during World War II. From 1987 to 1989 Zuse reconstructed the Z1 from his memory.
The Z1 consisted of different functional units, e.g. the input unit, the output unit, the memory units, and the addition unit. Each of this unit was built for a specific purpose and all units were connected. With an interactive and freely movable 3D simulation the functionality of the Z1 adder is demonstrated and explained. You can calculate with it by entering numbers and observe how the adder operates with the processes emphasized by color highlighting. The simulation is based on the original patent plans by Konrad Zuse.
Commander Keen's Adaptive Tile Refresh
I have been reading Doom Guy by John Romero. It is an excellent book which I highly recommend. In the ninth chapter, John describes being hit by lightning upon seeing Adaptive Tile Refresh (ATS). That made me realize I never took the time to understand how this crucial piece of tech powers the Commander Keen (CK) series.
At its heart the problem ATS solves is bandwidth. Writing 320x200 nibbles (32 KiB) per frame is too much for the ISA bus. There is no way to maintain a 60Hz framerate while refreshing the whole screen. If we were to run the following code, which simply fills all banks, it would run at 5 frames per seconds.
Mind Grenade Fifty Years On
In 1969, Harry amazed everybody with a little electronic gadget he’d built which, using the primitive digital integrated circuits of the time, generated random music, played it through a speaker, and flashed lights on its front panel. It was precisely what people expected computers to do, based upon portrayals in the movies and on television, and yet it could be held in your hand and was, internally, very simple. He explained how it worked, and I immediately knew I had to have one. Digital electronics was in a great state of flux at the time, with each manufacturer launching their own line of integrated circuits, most incompatible with one another, so there was no point in slavishly reproducing Harry’s design. Starting from the concept, I designed my own gadget from scratch, using Signetics Utilogic diode-transistor small scale integration integrated circuits which were popular at the time but shortly thereafter made obsolete by 7400 series transistor-transistor logic (TTL). The architecture was identical to Harry’s device, but I opted for more with-it and less power-hungry light-emitting diodes (LEDs) for the display instead of the incandescent bulbs he used. I built the electronics assembly on a sheet of perforated board using wire-wrap fabrication (some people look down their noses at wire-wrap today, but it was good enough for the Apollo Guidance Computer and almost every mainframe backplane of the 1960s, and my wire-wrapped electronics works perfectly fifty years later.)
Shoot ’em up in style: the making of Gun Trails on Playdate
Enter Playdate. I had wanted to build a shmup for years, but for various reasons—primarily bad scoping—the efforts always sputtered out. This little yellow device could provide the constraints needed, with the added bonus of a programming challenge to hit consistently high framerates.
The complex history of the Intel i960 RISC processor
The Intel i960 was a remarkable 32-bit processor of the 1990s with a confusing set of versions. Although it is now mostly forgotten (outside the many people who used it as an embedded processor), it has a complex history. It had a shot at being Intel’s flagship processor until x86 overshadowed it. Later, it was the world’s best-selling RISC processor. One variant was a 33-bit processor with a decidedly non-RISC object-oriented instruction set; it became a military standard and was used in the F-22 fighter plane. Another version powered Intel’s short-lived Unix servers. In this blog post, I’ll take a look at the history of the i960, explain its different variants, and examine silicon dies. This chip has a lot of mythology and confusion (especially on Wikipedia), so I’ll try to clear things up.
The Biggest Scandal In Speed Typing History
Barbara Blackburn is often cited as the fastest typist in history. She even appears in the Guinness Book of World Records! She must be legit right? Well, maybe not. I was supposed to make a video about the new typing speed world record, and instead got pulled into a Barbara Blackburn rabbit hole that I can’t seem to escape. TL;DR She’s not that fast.
Memoirs from the old web: The KEYGEN element
The purpose of the <keygen/> element was to allow a web browser to generate a private/public keypair upon submitting a form, in a way that allowed a web browser to be enrolled in a new client certificate.
Of Sun Ray laptops, MIPS and getting root on them
The bottom line is, as we’ll demonstrate in the next few screenshots, this laptop isn’t just a MIPS laptop: it’s three apparently completely independent RISC systems with their own memory, flash and operating system on an internal Ethernet network. All those NIC and switch chips are the internal communication interfaces from the Au1550 to the IXP425 and the AR2316A, but using the IDE bus lines instead of actual twisted pair. That’s not what I was expecting to find in a Sun Ray!
MMC2 Magic - How Punch-Out's Graphics Work
Two boxers. No flicker? How is this possible? The MMC2 Mapper chip: Explained
How to draw too many sprites by making one a background, then how to smoothly animate it by side scrolling.
Inside the amazingly mechanical Bendix Central Air Data Computer
Determining the airspeed and altitude of a fighter plane is harder than you’d expect. At slower speeds, pressure measurements can give the altitude, air speed, and other “air data”. But as planes approach the speed of sound, complicated equations are needed to accurately compute these values. The Bendix Central Air Data Computer (CADC) solved this problem for military planes such as the F-101 and the F-111 fighters, and the B-58 bomber. This electromechanical marvel was crammed full of 1955 technology: gears, cams, synchros, and magnetic amplifiers. In this blog post I look inside the CADC, describe the calculations it performed, and explain how it performed these calculations mechanically.
SF’s Market Street Subway Runs on Reagan-Era Floppy Disks
The use of floppies is hardly some previously unknown fact; for starters, Tumlin explicitly told KQED that his agency has to retain staff with skills honed to what amounts to the programming equivalent of Ancient Babylonian. But Twitter users on Thursday expressed surprise that a city known as a global tech capital would be so reliant on a storage format that lacks the capacity to store a single hi-resolution photograph.
Relay racks extend down a cramped hallway nearly 15 feet deep, where dozens of 4-inch copper filaments clatter up and down like teeth. The speedy “click, clack” sound signifies a smooth running Muni light rail automatic control system, which commands the J-Church, K-Ingleside, L-Taraval, M-Ocean View, N-Judah and T-Third Street trains through the tunnels. The clapping beat signifies the proper alignment of the railway’s 83 axle (controls) and numerous other track switches.
Strange Adventures: a film list
Presenting the list I mentioned earlier in which I highlight a number of worthwhile science-fiction films (also some TV productions) that aren’t the usual Hollywood fare. I’ve spent the past few years watching many of these while searching for more. This isn’t a definitive collection, and it isn’t filled with favourites; I’ve deliberately omitted a number of popular films that would count as such. It’s more a map of my generic tastes, and an answer to a question that isn’t always spoken aloud in discussions I’ve had about SF films but which remains implicit: “Okay, if you dislike all this stuff then what do you like?” I tend to like marginal things, hybrids, edge cases, the tangential, the unusual and the experimental.
Just the stills make for interesting browsing.
TVA Multifunctional Computer
Lotus 1-2-3 For Linux
I’ll cut to the chase; through a combination of unlikely discoveries, crazy hacks and the 90s BBS warez scene I’ve been able to port Lotus 1-2-3 natively to Linux – an operating system that literally didn’t exist when 1-2-3 was released!
Porting Zelda Classic to the Web
I spent the last two months (roughly ~150 hours) porting Zelda Classic to run in a web browser.
I hope my efforts result in Zelda Classic reaching a larger audience. It’s been challenging work, far outside my comfort zone of web development, and I’ve learned a lot about WebAssembly, CMake and multithreading. Along the way, I discovered bugs across multiple projects and did due diligence in fixing (or just reporting) them when I could, and even proposed a change to the HTML spec.
Weird how there’s bugs everywhere one looks.
The digital ranging system that measured the distance to the Apollo spacecraft
The basic idea was to send a radio signal to the spacecraft and determine how long it takes to return. Since the signal traveled at the speed of light, the time delay gives the distance. The main problem is that due to the extreme distance to the spacecraft, a radar-like return pulse would be too weak. The ranging system solved this in two ways. First, a complex transponder on the spacecraft sent back an amplified signal. Second, instead of sending a pulse, the system transmitted a long pseudorandom bit sequence. By correlating this sequence over multiple seconds, a weak signal could be extracted from the noise.
In this blog post I explain this surprisingly-complex ranging system. Generating and correlating pseudorandom sequences was difficult with the transistor circuitry of the 1960s. The ranging codes had to be integrated with Apollo’s “Unified S-Band” communication system, which used high-frequency microwave signals. Onboard the spacecraft, a special frequency-multiplying transponder supported Doppler speed measurements. Finally, communicating with the spacecraft required a complex network of ground stations spanning the globe.