A Cycle-Accurate Intel 8088 Core For All Your Retro PC Needs

A problem faced increasingly by retrocomputer enthusiasts everywhere is the supply of chips. Once a piece of silicon goes out of production its demand can be supplied for a time by old stock and second hand parts, but as they become rare so the cost of what can be dubious parts accelerates out of reach. Happily for CPUs at least, there’s a ray of hope in the form of FPGA-based cores which can replace the real thing, and for early PC owners there’s a new one from [Ted Fried]. MCL86 is a cycle accurate Intel 8088 FPGA Core that can be used within an FPGA design or as a standalone in-circuit replacement for a real 8088. It even has a full-speed mode that sacrifices cycle accuracy and can accelerate those 8088 instructions by 400%.

Reading the posts on his blog, it’s clear that this is a capable design, and it’s even been extended with a mode that adds cache RAM to mirror the system memory at the processor’s speed. You can find all the code in a GitHub repository should you be curious enough to investigate for yourself. We’ve pondered in the past where the x86 single board computers are, perhaps it could be projects like this that provide some of them.

Tiny Pinball Machine Also Runs X86 Code

As arcades become more and more rare, plenty of pinball enthusiasts are moving these intricate machines to their home collections in basements, garages, and guest rooms. But if you’re not fortunate enough to live in a home that can support a space-intensive hobby like pinball machines, there are some solutions to that problem. This one, for example, fits on the palm of your hand and also happens to run some impressive software for its size.

The machine isn’t a mechanical pinball machine like its larger cousins, though. Its essentially a 3D printed case made to look like a pinball machine with two screens attached. It does have a working plunger for launching the ball and two buttons on the sides for the approximation of authenticity, but it’s actually running Pinball Fantasies — a pinball simulator designed to run on x86 hardware from the 90s. This sports an ESP32 on the inside, which has just enough computing capability to run an x86 emulator that can load these games in DOS.

The game includes haptic feedback and zips along at 60 frames per second, which really brings the pinball experience to its maximum level given the game’s minuscule size. It’s impressive for fitting a lot into a small space, both from physical and software points-of-view. For more full-sized digital pinball builds, take a look at this one which comes exceptionally close to replicating the real thing.

Continue reading “Tiny Pinball Machine Also Runs X86 Code”

Homebrew An OS From Scratch? Snowdrop Shows How It’s Done

Ever wondered what it would take to roll your own OS? [Sebastian]’s Snowdrop OS might just provide you with some insight into that process, and maybe even some inspiration.

[Sebastian] created Snowdrop completely from scratch, using only x86 assembly language. It’s more than just bare-bones, and boasts a number of useful utilities and programs including a BASIC interpreter and linker (for creating standalone BASIC executables.) That’s not even touching on the useful essentials, like multitasking and a GUI framework. There are even a number of resources specifically for making game development easier. Because as [Sebastian] puts it, what’s a operating system without games?

Interested in giving Snowdrop a try, or peek at the source code? The binaries and sources section has all you need, and the other headings at the top of the page will send you to the various related goodies. If you have a few minutes, we recommend you watch a walkthrough of the various elements and features of Snowdrop in this video tour (embedded after the page break.)

Snowdrop is an ambitious project, but we’re not surprised that [Sebastian] has made it work; we’ve seen his low-level software skills before, with his fantastic efforts around the classic stand-up arcade game, Knights of the Round.

Continue reading “Homebrew An OS From Scratch? Snowdrop Shows How It’s Done”

AVX-512: When The Bits Really Count

For the majority of workloads, fiddling with assembly instructions isn’t worth it. The added complexity and code obfuscation generally outweigh the relatively modest gains. Mainly because compilers have become quite fantastic at generation code and because processors are just so much faster, it is hard to get a meaningful speedup by tweaking a small section of code. That changes when you introduce SIMD instructions and need to decode lots of bitsets fast. Intel’s fancy AVX-512 SIMD instructions can offer some meaningful performance gains with relatively low custom assembly.

Like many software engineers, [Daniel Lemire] had many bitsets (a range of ints/enums encoded into a binary number, each bit corresponding to a different integer or enum). Rather than checking if just a specific flag is present (a bitwise and), [Daniel] wanted to know all the flags in a given bitset. The easiest way would be to iterate through all of them like so:

while (word != 0) {
  result[i] = trailingzeroes(word);
  word = word & (word - 1);
  i++;
}

The naive version of this look is very likely to have a branch misprediction, and either you or the compiler would speed it up by unrolling the loop. However, the AVX-512 instruction set on the latest Intel processors has some handy instructions just for this kind of thing. The instruction is vpcompressd and Intel provides a handy and memorable C/C++ function called _mm512_mask_compressstoreu_epi32.

The function generates an array of integers and you can use the infamous popcnt instruction to get the number of ones. Some early benchmark testing shows the AVX-512 version uses 45% fewer cycles. You might be wondering, doesn’t the processor downclock when wide 512-bite registers are used? Yes. But even with the downclocking, the SIMD version is still 33% faster. The code is up on Github if you want to try it yourself.

Arduino IDE Creates Bootable X86 Floppy Disks

Arguably the biggest advantage of the Arduino ecosystem is how easy it is to get your code running. Type a few lines into the IDE, hit the button, and in a few seconds you’re seeing an LED blink or some text get echoed back over the serial port. But what if that same ease of use didn’t have to be limited to microcontrollers? What if you could use the Arduino IDE to create computer software?

That’s exactly what boot2duino, a project developed by [Jean THOMAS] hopes to accomplish. As you might have guessed from the name, the code you write in the Arduino is turned into a bootable floppy disk image that you can stick into an old PC. After a few seconds of beeping and grinding your “Hello World” should pop up on the monitor, and you’ve got yourself the world’s biggest Arduino.

A minimal x86 Arduino sketch.

Now to be clear, this isn’t some kind of minimal Linux environment that boots up and runs a compiled C program. [Jean] has created an Arduino core that provides basic functionality on x86 hardware. Your code has full control over the computer, and there’s no operating system overhead to contend with. As demonstrated in a series of videos, programs written with boot2duino can display text, read from the keyboard, and play tones over the PC’s speaker.

The documentation for boot2duino says the project serves no practical purpose, but we’re not so sure. While the feature set is minimal, the low overhead means you could theoretically press truly ancient PCs into service. There’s certainly an appeal to being able to write your code on a modern OS and effortlessly deploy it on a retrocomputer, from somewhat modernized versions of early computer games to more practical applications. If any readers end up exploring this concept a bit further, be sure to let us know how it goes.

Continue reading “Arduino IDE Creates Bootable X86 Floppy Disks”

the SoM module used to power a Dell Mini 1210, in an extended SODIMM form-factor

When Dell Built A Netbook With An X86 System-on-Module

Just like with pre-touchscreen cellphones having fancy innovative features that everyone’s forgotten about, there’s areas that laptop manufacturers used to venture in but no longer dare touch. On Twitter, [Kiwa] talks a fascinating attempt by Dell to make laptops with user-replaceable CPU+RAM modules. In 2008, Dell released the Inspiron Mini 1210, with its CPU, chipset and RAM soldered to a separate board in an “extended SODIMM” form-factor – not unlike the Raspberry Pi Compute Modules pre-CM4! Apparently, different versions of such “processor cards” existed for their Inspiron Mini lineup, with varying amounts of RAM and CPU horsepower. With replacement CPU+RAM modules still being sold online, that makes these Dell netbooks to be, to our knowledge, the only x86 netbooks with upgradable CPUs.

You could try and get yourself one of these laptops or replacement CPU modules nowadays, if you like tinkering with old tech – and don’t mind having a subpar experience on even Linux, thanks to the Poulsbo chipset’s notorious lack of openness. Sadly, Dell has thoroughly abandoned the concept of x86 system-on-module cards, and laptops have been getting less modular as we go – we haven’t been getting socketed CPUs since the third generation of mobile Intel boards, and even RAM is soldered to the motherboard more and more often. In theory, the “CPU daughterboard” approach could improve manufacturing yields and costs, making it possible to use a simpler large board for the motherboard and only have the CPU board be high-layer-count. However, we can only guess that this wasn’t profitable enough overall, even with all the theoretical upsides. Or, perhaps, Google-style, someone axed this project internally because of certain metrics unmet.

If you think about it, a laptop motherboard is a single-board computer; however, that’s clearly not enough for our goals of upgradability and repairability. If you’re looking to have your own way and upgrade your laptop regardless of manufacturer’s intentions, here’s an old yet impressive story about replacing the soldered-in CPU on the original Asus EEE, and a more recent story about upgrading soldered-in RAM in a Dell XPS ultrabook. And if you’re looking for retrocomputing goodness, following [Kiwa] on Twitter is a must – last seen liveblogging restoration and renovation of a Kaypro someone threw out on the curb.

The Linux X86 Journey To Main()

Have you ever had a program crash before your main function executes? it is rare, but it can happen. When it does, you need to understand what happens behind the scenes between the time the operating system starts your program and your first line of code in main executes. Luckily [Patrick Horgan] has a tutorial about the subject that’s very detailed. It doesn’t cover statically linked libraries but, as he points out, if you understand what he does cover, that’s easy to figure out on your own.

The operating system, it turns out, knows nothing about main. It does, however, know about a symbol called _start. Your runtime library provides this. That code contains some stack manipulation and eventually calls __libc_start_main which is also provided by the library. Continue reading “The Linux X86 Journey To Main()”