Oldskooler Ramblings

the unlikely child born of the home computer wars

8088 Domination

Posted by Trixter on June 17, 2014


A few days ago, I debuted 8088 Domination at @party 2014, which is an official sequel to 8088 Corruption that I made 10 years earlier. Like the former, 8088 Domination displays full-motion color video with audio on a 1981 IBM PC with CGA, a Sound Blaster, and any hard drive — but, unlike the former, Domination uses full graphics mode whereas Corruption used only text mode. This is significant because graphics mode requires 8x more memory and processing, and I had to combine a lot of creative and technical disciplines in order to pull it off.

Here is a capture of 8088 Domination running directly off of my IBM PC 5160; video is the composite CGA output signal, and audio is from a Sound Blaster Pro 2.0.

I am working on a postmortem write-up so you can all learn how I did it, but until then, download the party version at https://www.scene.org/file.php?file=%2Fparties%2F2014%2Fatparty14%2Fdemo_oldschool%2F8088_domination_party_version.zip&fileinfo if you’d like to run it on your own vintage hardware.

PS: A second round of thanks to Great Hierophant, for without whom I wouldn’t have been able to show off my production. He provided the hardware locally that I was unwilling to ship across the country.

15 Responses to “8088 Domination”

  1. marciot42 said

    Wow! That’s awesome! You make we want to buy an old IBM PC on eBay. You might consider doing a companion video that shows the entire PC, like you did for 8808 Corruption. While that would not show the graphic details, it would certainly drive home the fact that it was running on an really old PC.

  2. marciot42 said

    Totally random question: Did the development of your demo use any resources or ideas that conceivably could not have existed in the 1980s? When I see stuff like this, I often wonder why developers of the day so utterly failed to achieve anything close.

    • From a small comment made elsewhere, this seems to be a form of executable image encoding. Dynamic compilation was being done in games like id’s Wolfenstein 3D on 286’s to render a generalised raycast 3D block map, so it seems perfectly reasonable that specialised code might be able to do something very cool on the 8088.

      I don’t know what hard disk, trixter is running, but it’s worth mentioning that the download is about 18MB zipped. Developers from 1983 wouldn’t be so casual to completely fill a hard disk for a game, let alone a tech-demo like this.

    • Trixter said

      Not random at all, and I got asked the same thing 10 years ago when I did 8088 Corruption. For Domination, everything was indeed possible in the 1980s (the encoder was written in TP7, so it even runs on the target hardware itself), although you would have had to wait until 1989 to get a Sound Blaster, and you would have had a lot of trouble digitizing and manipulating video frames and audio data. For Corruption, however, the transcoding process is exhaustive and takes a crazy long time; it would have been impractical on commodity hardware in the 1980s.

  3. idspispopd said

    8088 Domination requires a Sound Blaster which was released in 1989. The same year the Intel 486 was released.

  4. Peter Lund said

    You could actually get a pretty good mono quality sound out of old PCs if you programmed the timer chip right (single shot countdown mode for the timer that controls the loudspeaker and 22kHz for the one that controls interrupts). Some games did that. Or you could use the printer port for sound using a simple R2R resistor circuit. Some games did that.

    An example is this device from 1986:
    http://en.wikipedia.org/wiki/Covox_Speech_Thing

    The AdLib card could also be “forced” into playing back digital sound if you knew what you were doing. It involved starting an oscillator-controlled sound at a known frequency on a channel and then stopping it at the precisely the top and then using the 6-bit volume control to play back sound. The Ad Lib card is from 1987:
    http://en.wikipedia.org/wiki/Ad_Lib,_Inc.

    The Sound Blaster supports DMA so it taxes the CPU and bus a lot less than the Covox and built-in speaker tricks — a quick guess is that they would “steal” about 10% of his CPU budget, so the result would look slightly worse but it should still be possible.

    • Trixter said

      In practice, they steal about 99% of my CPU budget at 22KHz, and 95% of my CPU budget at 16572Hz (uses a divisor of 72 which aligns with DRAM refresh to avoid jitter).

      Without the Sound Blaster performing the transfer in the background via DMA, my next choice would have been an LPT DAC such as Covox Speech Thing, driven at about 8KHz, but even then it would take 80% of my CPU budget. The reason all of these numbers seem high is because the output is driven by interrupts, and there is non-negligible interrupt overhead.

      I first heard the Adlib performing digitized sound output on the Spectrum Holobyte game Stunt Driver and being shocked :)

      • Peter Lund said

        I was totally misremembering the timing overhead — which I realized as soon as I did a back-of-a-napkin check. It’s been a while.

        The 10% was for a 12 MHz 286 and I think it included some time for mixing samples together, too, which you don’t have to do a single sample at a time in the interrupt routine.

  5. Peter Lund said

    There’s also the option of using the serial port — but I think the original UART could only handle 56700 baud and you really want 115200 for this to work. The quality is probably not great, I believe you only really have about 9 different “levels” to choose from. There was an article in DDJ about it roughly 20 years ago.

    (And it would also require interrupt handling from the CPU, so also more expensive than using the Sound Blaster.)

  6. Peter Lund said

    Btw, completely off-topic…

    You wouldn’t happen to have a manual lying around for Copywrite or Disk Explorer from Quaid Software, would you?

    • Trixter said

      A manual, no. The software, sure, but something tells me you already have that.

      • Peter Lund said

        The software is pretty easy to find but it is actually the manuals I’m interested in. I read the Copywrite manual about 25 years ago and I remember that it had a pretty good description of the floppy disk format, the floppy disk controller and all sorts of low-level tricks one could play with them. Since I started backing up my old 3½” diskettes recently, I got curious. That’s all.

  7. Peter Lund said

    :(

    I am way off on the cost of using an interrupt per sound sample.

    But maybe you could interleave most of the sample output with the video decoding, using the same precalculated timing technique? It should work pretty well for brief periods where you disable interrupts and don’t do any (or much) harddisk I/O — and where you maybe even temporarily switch off the DRAM refresh. Then you can switch to interrupt driven samples for the remaining time — for synch up periods, DRAM refresh, and harddisk I/O.

    That should reduce the overhead substantially at the cost of some sound quality (but probably not all that much, especially not if you sort the slices right).

    • Trixter said

      The techniques you just listed are insightful, but not viable when you need to constantly stream from disk; there’s just not enough time and cooperation. However, they are valid for another application… but you’ll have to wait until next year for an example…

  8. Had to reformat my trusty 40mb MFM fujitsu harddisk a few times to find the best interleave value.
    Now it runs smooth without stuttering.

    Even though I’ve read how you did it, I’m still very impressed. Best “tech demo” I’ve seen this year :)

Leave a reply to Peter Lund Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.