Tuesday, June 4, 2002

Not multimedia. Hardly even media.

Speaking of emulators, my friend Mark periodically gets the urge to write emulators for hardware that came out when I was in diapers, or not born yet. (That's probably not his metric, but it's true anyway.) Last year he wrote a cool PDP-1 emulator that could run the original
Space War (1962) [scroll down].

Today he whipped up an emulator for the CHIP-8 virtual machine that ran on the COSMAC ELF (1976). His emulator has so many cycles to spare, he can easily dump PPM's to disk in the inner loop, which is
how he made the animated gif.

Insert obligatory "write a web server for it" comments here.


  1. Mark VandeWetteringJune 5, 2002 at 1:26 AM

    I recommend coding up these simple virtual machines to anyone who
    likes to have a fun, tractable little programming chore. I keep thinking it would be fun to go ahead and code up an emulator for the Atari 2600, which has a considerably more complicated sound and video architecture. This would be much more complicated, in that it requires precise timing to make the video display work properly.
    Ultimately, I have a wacky mad scientist goal in mind. Lately I've been concerned that I no longer have the deep understanding of the underlying architecture of the machines I have been programming. It would be nice to have a machine which you could understand really at the hardware level: from instruction set to device registers. It seems rather obvious however that hardware will continue to get more and more complicated. My solution: create a virtual machine which is powerful enough to get work done with, and then write a portable emulator for that virtual machine. As Moore's law takes over, your
    virtual machine will automatically become faster, but the underlying
    architecture should remain the same.
    Ultimately it is even possible to implement such a virtual machine in hardware using FPGA technology. Reasonable piplined 32 bit processors are already being implemented in FPGAs by people cleverer
    than I, and I have gone back to reading Hennessy and Patterson's computer architecture book and books on VHDL for fun.

  2. Speaking of ob web server comments - someone seems to have recently written a web server in Postscript. As he admits up front it has to run off inetd (which takes care of the networking), but this nonetheless feels sick & twisted..

  3. While reviewing webserver applications for use on my webpage (I settled on the
    very excellent thttpd by Jef Poskanzer)
    I ran accross many functional or half functional web servers. Among
    the more useful is
    micro_httpd, also by Jef Poskanzer. You'll also
    find links to web servers written in awk, a shell script, or a shell script
    with the help of dd. Enjoy!