IOCCC 2018 Best of show, aka PDP-7/PDP-11 emulation in under 4kb!

You read that right.  And yes, here it is running 2.9BSD.  This is nothing short of amazing!

Read about Christopher Mills’s entry here:

And yes, the source has been stylized like a paper tape…

It really works best on a ‘real’ Unix like system.  I’ve run it on Debian 9 & OS X 10.13.14 … It does consume 100% of a CPU core.  But it’ll run a PDP-7 with v0 Unix, PDP-11 with Unix v6, and the aforementioned 2.9BSD. The Linux subsystem for Windows 10 didn’t handle the terminal control so well.

So, yeah kill your CPU and bask in the 4k glory!

BattleTech musings

Now that I have awesome animated GIF technology I can show off one of the greatest things to do in the 1988 BattleTech game, escaping the initial Kurita invasion with a battle mech.  While you can try to beat the 3-4 Jenners, and maybe win, it’s far far far easier to just make a dash for it.

So basically all you have to do is run south, then head west, don’t engage, just jump over rough terrain, and run!  Once outside the wall, you can flee.
Meanwhile back in 2018, people are crying that the new BattleTech is some how stacked, and the AI just cheats.  But the mechanics are pretty darned close to the real table top game, except that if you have been pushed down, you can not only get up on your next turn, but run around and fire.  Grrr…  The story in 2018 is just as laughably bad as it was in 1988, but honestly I didn’t come here for Shakespear, I wanted to see giant robots fight!  I know for many the idea of the table top game is … well outside of what people know, and the idea that you are standing in front of something with a 98% chance to hit, and you not only miss, but manage to explode while doing so is just a slice of life that is the hell that is table top gaming.

And for those who think the new game is rather ‘un-fair’, Just after I stole the Chameleon, guess what happened?

That’s right, a Locust of all things got off a lucky shot to my weak back, and destroyed my mech, and the next shot with a machine gun, killed me as I tried to flee.  How is that for fair?

BattleTech has always been like this.

So yeah, Kids need to GTFO my lawn.

Animated GIF’s from Qemu

I found this one recently… So the first thing is you need Qemu 0.10 or higher (probably not a problem), as it’ll save in ppm format no issues.  Then the fun expect program (Yay Linux subsystem), and of course Imagemagik.

Run Qemu so you can telnet to the command monitor:

i386-softmmu\qemu.exe -L pc-bios -hda c:\temp\127disk.img -monitor telnet:,server,nowait -hdb fat:\temp\dosb

I used this small program

set timeout -60
set capture 1
spawn telnet localhost
expect “(qemu)”
send “brake 1000\r”;
expect “(qemu)”
while { 1 == 1 } {
set fstring [format %04s $capture]
send “screendump /temp/$fstring.ppm\r”;
expect “(qemu)”
incr capture
sleep 3

and then to convert it into an animated gif:

d:\ImageMagick-7.0.7-18-Q16>convert -loop 0 -delay 100 \temp\*.ppm \temp\GHZ.gif

and behold:

Isn’t that great?

Qemu now supports the HPPA in softmmu mode!

I’ve worked on machines with HP-UX, but never owned one.  Well Qemu now has system emulation thanks to Richard Henderson! You can find information over at:

Being the unfair person I am, I thought I’d try NeXTSTEP to see how far it gets.

Processor   Speed            State           Coprocessor State  Cache Size
---------  --------   ---------------------  -----------------  ----------
0      250 MHz    Active                 Functional            0 KB

Available memory: 512 MB
Good memory required: 16 MB

Primary boot path: FWSCSI.6.0
Alternate boot path: LAN.
Console path: SERIAL_1.9600.8.none
Keyboard path: PS2

Available boot devices:
1. DVD/CD [lsi 00:00.0 2:0 Drive QEMU QEMU CD-ROM 2.5+]
2. lsi 00:00.0 0:0 Drive QEMU QEMU HARDDISK 2.5+

Booting from lsi 00:00.0 0:0 Drive QEMU QEMU HARDDISK 2.5+

Boot IO Dependent Code (IODC) revision 153

HARD Booted.
Can't determine I/O subsystem type

NEXTSTEP boot v3.3.4.17
524288 memory

NEXTSTEP will start up in 10 seconds, or you can:
Type -v and press Return to start up NEXTSTEP with diagnostic messages
Type ? and press Return to learn about advanced startup options
Type any other character to stop NEXTSTEP from starting up automatically


And amazingly the bootloader works, although that is about it. Trying to boot up OpenBSD gets about this far:
PDC_CHASSIS: Initialize (3), CHASSIS  cec0
>> OpenBSD/hppa CDBOOT 0.2
booting dk0a:/bsd.rd: 2703360+851960+2675712+547840=0x8631f0

SeaBIOS: Unimplemented PDC_CACHE function 1 8ddad0 1 1 1

I found on Windows though that the Debian 8 CD’s work the best, as the earlier ones lock up after loading a kernel, and the later one doesn’t fully initialize.  I’ve been using this one: debian-8.0-hppa-NETINST-1.iso  Serial console interaction is the way to go, so I ran Qemu like this:

qemu-system-hppa.exe -L . -serial telnet:,server,wait -boot d -cdrom debian-8.0-hppa-NETINST-1.iso -hda Deiban8HPPA.vmdk

So this way I can get get the install kicked off.  Although I should probably have just downloaded debian-8.0-hppa-CD-1.iso

Linux on HPPA

Otherwise, yeah, it’s Linux, on HPPA

And for anyone who is interested, the only version of HP-UX I have hanging around, HP-UX 10.20 [HP9000 S700] gives me the following:

HP-UX 10.20 on Qemu

Booting my PowerMAC G5 from SSD

Grandpa’s G5

In my last trip to the United States, I scored yet another PowerMac G5, a model 7,2 which is one that is capable of running OS X 10.2.7 for the G5.  It was the proverbial dream come true, used by an elderly man to keep track of photos in iPhoto, which he used maybe a handful of times a year.

Needless to say, he wasn’t too pleased that his copy of Snow Leopard didn’t work on the machine, and he dumped the G5 for a much quieter MacBook.

At any rate, it also included an Apple Studio Display.  I found another Cinema Display in the used hardware market for $25, which even though the display works the screen was damaged at some point and shows scratches on the surface when the display is a solid colour.

At any rate, the machine was deadly slow to boot, I upgraded the RAM from 256MB to 1.2GB, and replaced the ancient disk for a SAMSUNG SSD PM830 2.5 256GB flash drive.  Now it’ll boot up in under 30 seconds from the graphics initialization.

That makes this the only machine I have capable of running MacOS 9, although in emulation under OS X 10.2.  I have the Jaguar DVD set, but Classic mode was removed in 10.5.  It was the ending of the PowerPC era, just as 10.6 was the last version to ship with Rosetta.

Its a fun machine from the era of the introduction of personal 64bit RISC computing to the home user, although too bad the full industry didn’t catch up until later, just as 32bit desktop computing had a few stumbles out of the gates.

My crappy CVS archive of old crap is now online via pserver!

So yeah HOURS of fun.  Even though the database is only a few gigabytes, it took a while to rebuild everything as ‘cvs pserver’ package for Debian runs in a chroot of /var/lib/cvsd which doesn’t play nice when your archives are all created in /var/lib/cvs .. The cvs-web VM doesn’t seem to care, but the logon process for anonymous sure does.

Anyways the following archives are online:

  • 32v
  • binutils
  • cblood
  • Corridor8
  • CSRG
  • darwin0
  • darwinstep
  • djgppv1
  • dmsdos
  • doom
  • dynamips
  • frontvm
  • gas
  • gcc1x
  • gcc2x
  • gcc130-x68000
  • gdb
  • linux001
  • linux
  • lites
  • mach
  • MacMiNT
  • MiNT
  • net2
  • nextstep33examples
  • pgp
  • plan9next
  • qemu
  • quake1
  • quake2
  • research
  • rsaref
  • sbbs
  • simh
  • TekWar
  • tme
  • truecrypt
  • uae
  • winnt
  • WitchavenII
  • Witchaven
  • xinu
  • xnu

Say you are interested in Research Unix v6, you logon to the CVS server:

cvs login

And in the case of research & CSRG there is multiple modules (directories) and it’s probably best to list them to see which one you want.

$ cvs ls

Which in this case I tried to keep it somewhat sane with each found distro with some initials when there was more than one… As always its easier to look through the web interface (for me) and then decide which one to checkout.

And then you can checkout v6

cvs checkout researchv6

Of if you wanted the Emacs that was in Research Unix v9:

cvs checkout researchv9/cmd/emacs

Ok, that’s great, but how about something that has all kinds of source overlaid in varous branches, like my doom repository?  First login, and then check out the default repository:

cvs login
cvs checkout doom

Now we can run this quick thing I threw together to get each of the branches.

cvs log -h | grep -P ‘^\t’ | awk ‘{print $1}’ | sort|uniq| sed -e ‘s/://g’

And now this will tell us there is the following branches:


So, let’s say I want to look at the Jaguar port, with the branch name of jagdoom:

cvs checkout -r jagdoom doom

You will get errors about not having write permission into the CVS repository to set your current tag level, but that is fine, because you don’t have permission.  And now if you check the directory it’s at the Jaguar port level, as the 68000 based assembly is now in the directory:

$ ls doom/*gas
doom/decomp.gas doom/music.gas doom/p_sight.gas doom/r_phase3.gas doom/r_phase7.gas
doom/dspbase.gas doom/p_base.gas doom/p_slide.gas doom/r_phase4.gas doom/r_phase8.gas
doom/eeprom.gas doom/p_move.gas doom/r_phase1.gas doom/r_phase5.gas doom/r_phase9.gas
doom/gpubase.gas doom/p_shoot.gas doom/r_phase2.gas doom/r_phase6.gas doom/sfx.gas

I don’t think many will care, but well for those who do, here you go.  Anyways the web browsing from should be working just fine.  Although I did move a bunch of stuff around, so people who like to deep link, I guess you are kinda screwed.

Darwin 0.3 & 1.0 on Qemu

Darwin 0.3 PowerPC

Interestingly enough a lot of the same weirdness of missing bits I saw on the x86, is also on the PowerPC.

There is no nice installer, the CD image actually boots MacOS 8.6 which currently won’t run on Qemu.  However Darwin 1.0 uses MacOS 9, which will.  There is not install program for Darwin, rather you need a secondary disk, that is partitioned so the volume manager will pick it up, and then you restore a backup onto the target disk.  Naturally the restore program from 0.3 won’t work, but the 1.0 will under the G4 Cube MacOS 9 CD-ROM install.

Also I couldn’t figure out the boot parameters so I used Steve Troughton Smith’s BootX loader to get the OS booted.

qemu-system-ppc.exe -L pc-bios -drive file=..\darwin03.qcow2,index=0,format=qcow2,media=disk -drive file=BootX_custom.dmg,index=2,format=raw,media=disk -prom-env “boot-device=ide1:2,\BootX” -prom-env “boot-args=-v rd=hd0 debug=0xffe kdp=2” -prom-env “boot-file=ide0:8,\mach_kernel” -M g3beige

It’s a little convoluted but it does work.

I put together a binary package for Qemu on sourceforge here: Darwin03-PowerPC_qemu-2.11_04_22_2018.7z

Currently there is no networking, I’m guessing I need drivers from OS X 1.x but Ive had really bad luck with the mouse to try to open a terminal window to see if the new sungem NIC is functional at all.

Mac OS X Server 1.0 installs on Qemu

OS X Server 1.2 on qemu single user mode

That’s right, the ADB is usable enough now to type and move the mouse, meaning that OS X Server can now be installed within Qemu!

It’s incredibly slow, and the mouse is incredibly jumpy, but it’s actually running!

Basically, like A/UX, you boot up into MacOS to partition the drive.

qemu-system-ppc-screamer.exe -L pc-bios -m 256 -M mac99 -prom-env “boot-args=-v” -prom-env “auto-boot?=true” -prom-env “vga-ndrv?=true” -hda 2GB.vmdk -cdrom “Mac OS X Server 1.2, MOSX_Booter.iso” -sdl -device usb-mouse -device adb-keyboard -boot d

OS X Server 1.2 MacOS 9 Create OS X Server partition

And then kick off the installer:

OS X Server 1.2 MacOS 9 Start Install

Which really isn’t much to do, other than tagging the partition, and prepping the machine to reboot.

It’s OK

Qemu doesn’t emulate the NVRAM, so it’ll complete with this ‘non fatal’ ‘fatal error’

After that, boot into the OS X Server kernel, and continue the install:

qemu-system-ppc.exe -L pc-bios -prom-env “boot-args=-v rd=sd0″ -drive file=2GB.vmdk,index=1,format=vmdk,media=disk -M g3beige -cpu g3 -drive file=”Mac OS X Server 1.2, MOSX_Booter.iso”,index=0,format=raw,media=cdrom -prom-env “boot-device=cd:9,\\:tbxi” -m 256 -net none

OS X Server 1.2 installing text mode

It will then format the disk, and copy over the base operating system.  After that it’s time to shutdown, and reboot the VM.  I couldn’t figure out a pure hard disk boot, but again using the CD-ROM, you can just tell it to pull the root from the hard disk.

qemu-system-ppc.exe -L pc-bios -prom-env “boot-args=-v rd=hd0″ -drive file=2GB.vmdk,index=1,format=vmdk,media=disk -M g3beige -cpu g3 -drive file=”Mac OS X Server 1.2, MOSX_Booter.iso”,index=0,format=raw,media=cdrom -prom-env “boot-device=cd:9,\\:tbxi” -m 256 -net none

OS X Server 1.2 installing

And after this, it’ll want to reboot again.  Launch it up and now we get the initial setup

Setup Assistant

And with that out of the way, we can logon!

And after a while, it’ll load up the desktop

OS X Server 1.2 Desktop

As mentioned above, the mouse is incredibly jittery.  Doing anything graphical is very difficult. But here we are, running OS X/Rhapsody for the PowerPC!

That’s all!

Because the mouse is VERY jumpy at the moment, Im going to make some pre-configured disk images available because running the disk tool under OS 9 is a major pain.  The first image has only been partitioned, while the second has completed the ‘text mode setup’, aka a minimal install.

And that’s it for now!

Japan get’s all the neat looking SONY PC’s AKA the trouble with early SSDs

Is it a Rumba? or a PC?  It’s a SONY!


So while cruising the junk market in Hong Kong I found this little ‘roomba’ looking machine.  Looks pretty neat, and because it has video & crashing issues I was able to get this thing for $500 HKD or about $75.  I mostly felt bad for the guy as the disk had died in the thing, and he had spent the money to get a SSD into this thing, and had been nice enough to upgrade the Windows 7 to Windows 8, and onward to Windows 10 for me, all legit.

But to start the adventure what the heck is this thing?  Naturally SONY has several things that look like model numbers.  Normally I’d just flip it on it’s back and reveal..

SONY VGX-TP3G underside

A model of PCG-2G2P.  However looking at it’s side I find…

SONY VGX-TP3G side view

That this thing is also a VGX-TP3G.  Way to complicate things SONY!

So searching SONY seems kind of funny as it bounces me to America first for some reason, then tells me to go to the APAC site.


I don’t know why these kinds of ‘main corp, but not really main corp’ companies drive me crazy.  And wouldn’t you know it, no manuals, and the downloads are only for the SONY applications built in for BlueRay playback that aren’t on the SD.

And then I find this fun support article, 00188888.

Dear Valued Customers,

Please be informed that Sony’s support has ended for VAIO computers which were shipped with the following Microsoft Windows operating systems preinstalled:

•        Windows 95
•        Windows 98
•        Windows 98 SE
•        Windows ME
•        Windows 2000
•        Windows XP
•        Windows Vista

As of March 1, 2018, we will no longer provide drivers and software for download for these computers.

That’s right!  Even though they already offer no drivers, BIOS updates or anything they will kill all downloads for all the older machines in less than 2 weeks.  Great.  So avoid any old SONY salvage guys.

So I decide I’m going to wipe the machine, and re-install Windows with the x64 variant, and I also wanted it in English.  The OS installs just fine, and everything looks good.  Even though this is a 10 year old machine, I thought I’d try something simple, like compiling a Linux kernel, and that is when I saw the weirdest thing. While unzipping the archive, the disk usage hit 100%, but there was no blinking on the disk LED (this machine is so old, it has one of those things!), and in the task manager, no program was using the disk at all.

So a quick search led me to this article, 3083595.

Task Manager might show 100% disk utilization on Windows 10 devices with Message Signaled Interrupt (MSI) mode enabled

Task Manager shows the disk to be at 100% utilization despite a light or no workload, and the system may experience lag or become unresponsive. In addition, the system event log contains numerous events with Event ID 129, which represent resets of the disk controller.

While device resets can be caused by a varying number of factors, we are aware of issues with some Advanced Host Controller Interface PCI-Express(AHCI PCIe) models that causes these symptoms in Windows 10 when running with the inbox StorAHCI.sys driver. Due to a firmware bug, the Solid-state drive (SSD) does not properly complete input/output when Message Signaled Interrupt (MSI) mode is enabled. As a result, the Windows storage stack attempts to reset the device after waiting on unresponsive reads or writes for a period of time.

Well isn’t that interesting!  So it turns out that a firmware update could solve this, but I’ll be damned if I can find one.  So the solution was to turn off MSI, and it works.  Although the disk is certainly slower, but I guess not softlocking from disk errors is a good thing though.

I loaded up Kerbal Space Program, but it’s ancient Intel® Core™2 Duo Processor T8300 & NVIDIA® GeForce® 8400M GT GPU really show their age.  But it does run, so that is nice.  It runs Edge & YouTube just fine, and handles all the general media stuff I wanted so that’s a win for me.

so here we go again.

Docker is going nuts after I had to reboot for some ‘critical’ update for something else.

Looks like it’s going crazy regarding ARP:

07:27:18.632243 ARP, Request who-has tell, length 28
07:27:18.632275 ARP, Reply is-at 02:42:ac:11:00:02, length 28

Of course the weird thing is that doesn’t need to talk to at all.

I keep getting this on the db server:

2018-04-11 9:11:30 139923730724608 [Warning] Aborted connection 4226 to db: ‘virtuall_wp152’ user: ‘root’ host: ‘’ (Got timeout reading communication packets)

which of course is up the entire time.  restarting either the web server or the db server puts me up for seconds at a time.

So while I move stuff around, and get ready for a re-install of my base OS, as I can’t seem to figure out why the bridge has freaked out, if you can read this, then the container thing is actually working.  And at least on the surface, moving container persistent storage, along with a DNS update looks pretty quick.