Posts

Hacking the Book8088 for Better Accuracy

Image
The Book8088 is an interesting little machine. It is essentially a 1980's computer in a laptop form factor. With apologies to Sergey Kiselev , whom the manufacturers of the Book8088 did a little dirty , I couldn't resist ordering one myself to tinker with.  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.  Looking at the specs of the Book8088, there's good reason to be optimistic.  The machine supports a real 8088 CPU.  Even better, there's a socketed CRTC chip, so the complex CRTC abuse the demo performs doesn't need to be emulated in any fashion. My Book8088 came with an NEC V20 CPU.  This CPU is a lot faster than the 8088, we'll need to replace it: Additionally, the CRTC c

A Test Suite for the Intel 8088

Image
In a previous article, I revealed one of the secrets to MartyPC 's accuracy, hardware validation . To summarize, it is a method of using a microcontroller to run an instruction on a real 8088 CPU at the same time as the emulator executes the same an instruction, and then comparing the resulting cycle states (and optionally registers) for consistency. Once again, credit goes to phix and his VirtualXT emulator for pioneering this basic idea.  The downside to this method is that it is quite slow, and requires going out and buying a Raspberry Pi or an Arduino, ordering some vintage chips off eBay, then either breadboarding up a CPU or ordering a custom PCB and soldering it together, not to mention the the effort of integrating client communication and test logic into your emulator.  All this presents a barrier to entry that makes this method probably only suitable for an especially dedicated few.  Compounding things, it's not really practical to validate instructions that frequent

The 8088MPH CPU Test

Image
Much has been written about the PC demo 8088MPH .  If you haven't seen this demo yet, take a moment to watch it.  If you're familiar at all with the IBM PC, you will immediately understand why this demo is so impressive.  If not, consider that the IBM PC was a very limited, business oriented machine not designed for fancy graphics, and its optional CGA graphics adapter was best known for producing 4 garish neon colors at maximum. 8088MPH has become something of a PC emulator accuracy litmus test in the ensuing years since its release, and the gauntlet begins before the demo even shows a single effect. 8088MPH performs a CPU speed test when it starts, and if your CPU fails to complete it in exactly the same time as an 8088 CPU at 4.77Mhz should, you are greeted with this: 8088MPH CPU Test from DOSBox-X 0.83.24, @240 cycles/ms Whereas if you pass, you are greeted with a brief pat on the back before the demo begins automatically: MartyPC 0.1.4 passing the test The 8088MPH CPU test