Join 3,572 readers in helping fund MetaFilter (Hide)


PC Jr - or - Honey, I Shrunk The Bits
January 22, 2014 1:04 PM   Subscribe

Fancy a $25 PC XT clone? With full Hercules graphics compatibility, peripheral support, and able to run MS-DOS and Windows 3.0? All you need is a Raspberry Pi, a C compiler, and 8086tiny, the world's smallest full PC emulator. Clocking in at around 25k of source code, this marvel of modern science is yours to do with as you will. But wait, there's more - you get the full BIOS code _and_ binary thrown in! (Also runs on just about anything 32-bit, if you don't fancy a Pi). If that's too big for comfort, a 4043 byte Obfuscated C version, winner of the 2013 ioccc championship, is also available.
posted by Devonian (36 comments total) 22 users marked this as a favorite

 
hrmm. Not what it says on the tin?

Does it have that awesome diagnostic and cartridge basic? I demand Jr be taken off!
posted by symbioid at 1:20 PM on January 22 [5 favorites]


Still - it's pretty rad :)
posted by symbioid at 1:21 PM on January 22


Full Hercules graphics compatibility

It could run CGA emulators and play early Lucasfilm games!
posted by yoHighness at 1:22 PM on January 22 [4 favorites]


This is enormous fun. I'm sure I won't be able to get it slow enough to run Gravity Wars or Sopwith (which it won't because of the CGA), though.
posted by scruss at 1:58 PM on January 22 [2 favorites]


You guys I can't figure out how to take off from Meigs Field help
posted by RobotVoodooPower at 2:00 PM on January 22 [10 favorites]


Whoa, I forgot that Windows 3.1 required at least a 286. This is awesome. Totally tubular, you might say.
posted by XMLicious at 2:04 PM on January 22


What? No game port?
posted by ckape at 2:04 PM on January 22


I am duly reminded by the FPP title of the PCjr I had (and modified with extra memory and floppy drive) way back at the dawn of time. Things are so different now.
posted by aught at 2:05 PM on January 22 [3 favorites]


I was kind of hoping this would be a Raspberry Pi in a 3d-printed case resembling the original XT, scaled down so that the floppy slot was SD-sized.
posted by ckape at 2:09 PM on January 22 [14 favorites]


This is undoubtedly a fun project, but it was born from an attempt to write a tiny emulator rather than a particularly good one. Aren't there already much better (qemu based?) ways to run X86 code on a pi?
posted by samworm at 2:11 PM on January 22


ckape: I was kind of hoping this would be a Raspberry Pi in a 3d-printed case resembling the original XT, scaled down so that the floppy slot was SD-sized.

That would be awesome.

8086tiny is powerful enough to run software like AutoCAD, Windows 3.0 ...

Wait, what? AutoCAD? Wow, AutoCAD is older than I realized.
posted by filthy light thief at 2:21 PM on January 22 [1 favorite]


AutoCAD is older than I realized.

Yep, I remember looking at one of their early demos where the drawing started with the solar system and you could zoom in and read a plaque on the leg of the lunar lander ... MIND BLOWN
posted by RobotVoodooPower at 2:39 PM on January 22 [3 favorites]


I'm still waiting until someone comes up with a PowerPC G3 Mac emulator that runs MacOS 9 and Cubase VST (which is deliberately fragile and temperamental, because copy protection), so I can load up my old music projects from about 10 years ago.

Bonus points if it's entirely coded in JavaScript and runs in the browser.
posted by acb at 3:20 PM on January 22 [1 favorite]


And the hell of it is that it probably would run faster on my current computer than the original did.

Unless they're deliberately throttling it.
posted by Chocolate Pickle at 3:22 PM on January 22


I was kind of hoping this would be a Raspberry Pi in a 3d-printed case resembling the original XT, scaled down so that the floppy slot was SD-sized.

Shut up and take my money.
posted by BigHeartedGuy at 3:30 PM on January 22 [10 favorites]


I was kind of hoping this would be a Raspberry Pi in a 3d-printed case resembling the original XT, scaled down so that the floppy slot was SD-sized.
That would be awesome.


I'm just imagining opening it up and drilling the holes so you could install an internal hard drive.
posted by srboisvert at 3:40 PM on January 22


Yeah, it's not fair that the Mini Mac has all the glory.
posted by RobotVoodooPower at 3:47 PM on January 22 [3 favorites]


I'm just imagining opening it up and drilling the holes so you could install an internal hard drive.

Which presumably would translate to Blu-Tacking a de-cased USB flash drive to the top of the case.
posted by acb at 3:47 PM on January 22


Can I play Decathlon on it? Because then I will put one of these in every room of my house.

I was kind of hoping this would be a Raspberry Pi in a 3d-printed case resembling the original XT, scaled down so that the floppy slot was SD-sized.

Oh dear -- I have a pile of Raspberry Pi's and a 3D printer in my lab. And here I thought I was going to get something productive done tomorrow. Maybe I can line up an LED with the slot for the 10MB hard drive activity light...
posted by range at 3:55 PM on January 22 [6 favorites]


brings back fond memories of downloading Flightmare from the local BBS. Man was that game hard.
posted by smoothvirus at 4:22 PM on January 22


range: "... Maybe I can line up an LED with the slot for the 10MB hard drive activity light..."

range, [clears throat] ♫ Have I ever told you you're my heeeroooooo... ♪
posted by BigHeartedGuy at 4:25 PM on January 22


I took a class on AutoCad in a summer camp program at a local junior college when I was like 10 or 11 (and I'm 40 now). It was already a well-established tool then, so yeah it's damn old.

I've been thinking about getting a Pi as a first computer for my son, as a kind of father and son project. Thanks for this post!
posted by saulgoodman at 4:48 PM on January 22


Yes but where do I insert my 5.25" floppy of Star Trek The Kobayashi Alternative?
posted by Dr. Zira at 5:04 PM on January 22 [2 favorites]


I'm still waiting until someone comes up with a PowerPC G3 Mac emulator that runs MacOS 9 and Cubase VST (which is deliberately fragile and temperamental, because copy protection), so I can load up my old music projects from about 10 years ago.

I realize i'm probably missing the point, but blue and white g3s are so cheap now that they get zero bids at $50 on ebay. Why not just buy one for super cheap at a local pc recycling shop?

I myself am considering doing something similar so i can keep using my MOTU 2408 which doesn't support 64 bit OSes, or anything newer than XP on the windows side.
posted by emptythought at 5:12 PM on January 22 [1 favorite]


brings back fond memories of downloading Flightmare from the local BBS. Man was that game hard.

Maraudering beatnicks? That sounds almost as bad as hipsters.
The controls are many, and the survivors few.
Heh heh.
posted by XMLicious at 5:28 PM on January 22


I have some Hercules-based code I wrote in the mid-80s. Might be a little fun to run that again.
posted by DarkForest at 5:40 PM on January 22


I'm still waiting until someone comes up with a PowerPC G3 Mac emulator that runs MacOS 9 and Cubase VST

I'm pretty sure you could do this with SheepShaver, provided you have the correct ROM image.
posted by LogicalDash at 5:46 PM on January 22


LAN connection will be throttled to 2400 baud so you'll appreciate the four color gif that may or may be a vagina that you spent hours downloading from the adult section of a BBS.

Mind you, this is the twenty first century version of the "we walked uphill in the snow both ways to get to the one room schoolhouse" speech.
posted by dr_dank at 6:09 PM on January 22


> Fancy a $25 PC XT clone?

Meh. There's a real PC XT clone, complete with keyboard, homemade trackball and 12" amber monitor, somewhere in my basement, that you can have for $24. Plus shipping.

But yeah, this is cool, sort of.
posted by Artful Codger at 7:26 PM on January 22 [3 favorites]


But does it have the infrared keyboard? I had a friend with a PCjr and I was always envious of the infrared keyboard.

More seriously... an 8086 and peripherals emulator in 4kB is crazy impressive.
posted by hattifattener at 8:06 PM on January 22 [1 favorite]


This emulator is actually cheating. While all the code is crammed into 4 kbytes, the lookup tables that are required for x86 instruction decoding is hidden away in the BIOS.

(Of course, even including the BIOS it still clocks in at under 16 kbyte, so still impressive)
posted by ymgve at 9:50 PM on January 22


brings back fond memories of downloading Flightmare from the local BBS. Man was that game hard.

That was one of the very first PC games I loved. Also, the first case I can remember of having to reconcile enjoyment of a creative work with distaste for the creator's beliefs, when the game told me "VOTE FOR REAGAN IN '84".

Also, looking at the video, yeah "MARAUDERING BEATNICKS"? Didn't notice that at the time, but in my defense I was like ten years old. I just needed an excuse to shoot at things.
posted by neckro23 at 11:27 PM on January 22


Game-oriented PC emulation is ruled by DOSBox (or its emulation engine in the case of Boxer), and DOSBox has never made an attempt to be a cycle-accurate emulator (unlike, say, WinUAE for the Amiga 500). This is a problem for very old games that rely on the specific speed and timings of PC or XT hardware.

With that in mind, I welcome any new entrants in this space, especially well-documented cross-platform ones. Another interesting emulator of recent times is PCem, but its documentation is so nonexistent that getting going with it is extremely difficult, especially since you have to go ROM hunting for some specific hardware support.

I don't know jack about how emulation works, so I'll try to take some time to really go through the source code of this thing.
posted by jklaiho at 11:38 PM on January 22


Not to say that 8086tiny would be particularly game-oriented, just that a codebase this small and apparently written with clarity ("fully commented" is not something you see said about emulator source code that often) in mind can probably be extended pretty easily.
posted by jklaiho at 11:51 PM on January 22


If it is 4kb or 16kb "fully commented" they could probably fit it into... hmm, I'm old but I can't remember anything with less RAM than that. 4kb is about a page of text!
posted by bystander at 2:57 AM on January 23


  8086 and peripherals emulator in 4kB is crazy impressive

What's really beautiful is that Adrian got it all into 4043 bytes, which is precisely 8086 nybbles. Sweet, and well deserving of the IOCCC award.
posted by scruss at 5:23 AM on January 23 [1 favorite]


« Older "In August 2013, a bunch of performers in adult en...   |   Aided and abetted by Domenico ... Newer »


This thread has been archived and is closed to new comments