So I started to look at the SCSI passthru on Basilisk

And personally I’ve never seen the appeal for such things, but apparently for the world of emulation accessing physical media is a big deal. Of course what I didn’t think about was rescuing old machines by re-installing the OS under emulation, or copy protection.

The first thing I looked for was a GPL project that has SCSI disk support and isn’t too complicated.  The Previous project sure fits that bill, scsi.c is not even a thousand likes, and even better it works!

The only two major hurdles I ran into is that the Mac is sending a page request of 0x30 which as far as I can find is not listed anywhere else.  I ended up just making one up as a reply to see if it mattered.

The other is that it’s scatter/gather based, so when it’s going to read or write several contiguous sectors, it’ll blast down up to 256kb worth of data to be read or written to.  The ability to know that a large operation was in progress was already in Previous, it just wasn’t set to loop.  I guess the NeXT isn’t as aggressive, or it’s SG operations are better contained in the SCSI controller.

The final hurdle was in the Apple partitioning software.  I’ve been down this road a long while ago.  But the disktools from A/UX 3.0.1 doesn’t care about vendors and will thankfully format anything.

SCSI disk files

SCSI disk files

So not as exciting as talking to a real SCSI disk, but it’s safer.  I suspect that accessing a raw NT device name ought to work  I can test that on VMWare, but the trick is finding something that can read HFS and prove it’s a good exercise.

Another ‘feature’ I put back in is the ability to disable the math coprocessor on the 68040.  It feels more stable to rely on Apple’s old emulation code, but maybe that’s me.

As always files for this are on sourceforge.

Blinking lights…

I almost cannot believe I’m going to post this, but so many of my machines don’t have LED’s to blink for hard disk activity it is driving me nuts.

Well thankfully, for windows there is a solution:


So what it does, is it’ll poll  \PhysicalDisk(_Total)\% Disk Time every 30ms, and if it’s doing something it’ll blink the icon colour.

Why is this cool?

It’ll even work with RDP.  So your server can be on the other side of the world, and you’ll know what’s going on.

It's cooler than it looks

It’s cooler than it looks


I was looking back at old posts

And I saw my old look at Mach+Lites.  And of course there was a qcow disk image associated with some ancient version of Qemu which I can’t run on Wine on OS X.  So I figured with a bit of fun I’d update the disk image to work with Qemu 1.7.0.

Luckily Qemu 0.15.1 works just fine for it’s qemu-img.  So a quick

qemu-img convert -f qcow -O vmdk mach.img mach.vmdk

and I had my image.  I’m not sure of what the NE2000 parameters that Mach can use to enable the network, but I do recall it was easier to just rebuild Qemu around them.  However this time, I switched to the Mach kernel that utilized Linux device drivers to get a working network.

I updated the hard disk file here.

Screen Shot 2013-12-27 at 12.16.18 AM

For the two or three people who care about BSD evolutionary dead ends.

Upgrading through OS/2; Version 2.0

Well here we go, ‘A better dos then dos, a better windows then windows, better OS/2 than OS/2!’ … The 32bit version of OS/2 had been under development for quite some time, and now it was finally time to ship.. The year was 1992.

I’m going to switch from VirtualBOX to Virtual PC, as the screen redraws were just too slow on VirtualBOX.  Virtual PC cannot boot 1.0, 1.1 & 1.2 however it can run OS/2 1.3.  Thanks to Qemu’s qemu-img tool, I could quickly convert the VirtualBOX hard disk image into something VirtualPC can understand.

qemu-img.exe convert OS21.3.vmdk -O vpc OS2-13.vhd

And to test things, I first booted it on Virtual PC.

Ok, everything looks fine, let’s upgrade!

The OS/2 installer had grown so big, that now it required two diskettes to boot up.

Also back was a graphical splash, the colored OS/2 logo that in a way reminds me of the 4 panes of the windows logo.

And back to the blue on grey installer… Notice 15 diskettes! It’s grown massive!

Another amazing thing for OS/2 2.0 is the boot manager.  It lets OS/2 boot from extended partitions, and even secondary drives! As long as the boot manager is installed first.  I know some people that bought OS/2 only to manage multi-booting installations.  IBM could have sold this thing as a separate product.  Alas, since we are upgrading our way through OS/2 we have no need for it, so we just keep on upgrading our C drive.

If only there was a FAT to HPFS conversion utility.  But again, please don’t format my C drive!!!

Now we just feed diskettes to the installer..

And now we can reboot into the GUI!

And let the install continue.  I can’t help but think that I’ve done this before..

Unlike last time, I’ll actually have something to migrate..

Well the migration tool gives me a good feeling for finding my OS/2 programs.  Maybe they’ll even run!

Let’s trust the installer…

Now this confuses me, first it said (and quickly) that it migrated my existing printer, then it wants me to add another…?  I just know I’ll get two printers.  Now I feel like Arthur ‘Two Sheds‘ Jackson.

So a reboot at the end, and into the GUI:

Notice how OS/2 2.0 throws the tutorial in your face… All the while the desktop is building in the background so you could ‘multitask’ doing the tutorial while your hardisk is frantically building the desk.. And I see the two printers… sigh.

As you can see Word and Excel are still working.  And unlike a stock OS/2 2.0 installation it’s preserved the 1.x color scheme.

If you’ve never used OS/2 2.0 it comes with FAR more applets then the prior versions.

No doubt IBM was trying to address people like me complaining.  PM Terminal was nice in that it supported Xmodem, Ymodem & Kermit.  Not to mention you can send a ‘break’ easily over a menu.  It’s handy for things like cisco routers.  The seek & scan files is AWESOME really where was this in the world of Windows?  Why was this so … hidden.  Kind of strange that such a great tool was hiding.

Also someone got the memo about games.  You see if people can’t play in your environment they’ll go elsewhere.  After all even in the office it’s not all work.. There is a lot of people that attribute the success of Windows 3.0 to it’s Solitaire.  You see it’s shuffle algorithm is broken, cards tend to ‘clump’.  So as you play and sort, the cards start to appear in a better and more orderly manner.  And people like to win.  I know it’s a cheap thing, but heh the Chess in OS/2 is pretty good, as is the Solitaire.  I don’t know if making them ‘broken’ and letting people win more often would have sold more installs.  It reminds me of “The Story of Mel

In the same way, being ‘good’ and ‘correct’ doesn’t win you spaces in the market place.

Also this is the appearance of Neko for OS/2.  Not to mention a Jigsaw puzzle, one of those annoying number scramble things, and .. Reversi!

OS/2 2.0 finally allowed users to do wallpaper! ..

The downside is that OS/2 relied on it’s own bitmap format that of course was incompatible with the Windows bitmap format.  Nor did it support things like GIF/PCX that were common at the time.

Another thing IBM included was a copy of Windows 3.0 that could run under OS/2 2.0 in either full screen or ‘seamless’ mode.  There was no denying it, but after the launch of Windows 3.0 the avalanche of Windows programs was.. incredible.  And to not support them would mean death.

Some say that OS/2 did such a great job of support Windows that it just encouraged people to not write OS/2 software.

The ‘killer’ feature in OS/2 was this:

That little checkbox, “Separate session” became the #1 feature of OS/2.  You see Windows applications could happily overwrite each other, and memory protection became a big problem for Windows.  The easy way to crash it out was to launch a lot of any application.  Even well behaved applications would eventually bleed the system resources out, and again instabilities would strike.  In Windows 3.0 the USER, GDI & KERNEL modules all shared stack & heap, so exceeding the 64kb stack wasn’t too hard.  Even things like Program Manager and high color icons could do this quite easily.  However with OS/2’s “Win-OS/2 separate session checkbox, it meant that this application would get it’s own copy of Windows running.  Suddenly you could run Word for Windows & Excel for Windows in separate VMs, along with say some game, and the game wouldn’t crash all three out.  And if you were a programmer, it meant your compiler,editor could run outside and protected from the program you were developing.

And with seamless mode, instead of a separate screen, now your Windows applications could run on the OS/2 desktop.  This kind of partitioning wouldn’t make it’s way to Windows NT until version 3.5 in 1994.

You can only run 12 OS/2 sessions, but you can run WAY more DOS sessions.  I just got bored of clicking and rearranging.  I wouldn’t even think of running 20 MS-DOS prompts on Windows 3.0 ..

And unlike the OS/2 prompts the DOS boxes can go between full screen and windowed mode.  Another great thing is that they support DPMI & VCPI.  So you can run dos extender software.  Another great thing, is that *SOME* hardware calls could be passed down from a VM into your hardware.  It is possible for Doom 1.1 on OS/2 2.0 to work with a soundblaster.


(SET BLASTER=A220 I5 D1 P330 T3 and use the fixpack for OS/2 2.0 … but really it works!)

Sadly DOOM didn’t run in a window, and honestly a picture of doom is.. well.



But why not.  It’s actually running under OS/2.  It’s something that a lot of computers in 1993 had issues running, even in plain MS-DOS.

At this point OS/2 1.0 feels like a tech demo, 1.1 – 1.3 are just toys.  Really you can see the frustration in the IBM/MS alliance as a 32bit OS is what people wanted to make, not the 16bit stuff.  It’s all goes down to the poor design of the 80286 CPU, and too many people selling them as ‘useful’ things.  Even as early as 1992 microkernel/personality people should have really taken notice in OS/2 2.0.  The key to the future was in virtualization, not in personalities.  Or more so, with things like Win-OS/2 paravirtualization, which is specialized kernel assists and drivers enabling the guest OS to bypass typical emulated hardware for IO and transfer raw datablocks in/out for things like video/disks & networks.

As awesome as OS/2 2.0 was, there is one thing you may notice here clearly lacking.


OS/2 2.0 included *NO* networking support at all.  It was expected that people would use separate addons, even going as far to coax support for network cards in the DOS sessions and loading isolated Netware reqestors.  And of course adding these network requestors was widly varied, and there was simply no good universal way to do it.  Microsoft clearly learned the lesson about this with Windows for Workgroups & Windows NT.  It was a real pleasure with Windows 95 & Windows NT 4.0… But it was 1995-1996 by then.

Well, Next stop is OS/2 2.1!

Spot the difference….

Picture A

Picture B

I know, it’s hard they both look identical.  Well they kind of are, Picture A is the installed OS/2 2.0 image that I’ve been playing around with.  It’s a 500MB IDE disk formatted with the HPFS filesystem.  For the heck of it, I used the qemu-img tool to convert it from a qcow2 into a vhd (qemu-img convert 500M.disk -O vpc 500M.vhd) and then tried to boot it up on Virtual PC.  I know in the past it’d fail with some weird error as something on HPFS wouldn’t transfer and it’d be the end.

But it worked!

This is really a great victory for Qemu!

Dead end on the ISA disks.

Well I really thought I was going to make some headway on this.

But the answer was no.

However for the sake of completeness, let me at least document what I did.. The IBMPC hardware is initalized in hw/pc_piix.c

You’ll find this little GEM:

if (pci_enabled) {
PCIDevice *dev;
dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
idebus[0] = qdev_get_child_bus(&dev->qdev, “ide.0”);
idebus[1] = qdev_get_child_bus(&dev->qdev, “ide.1”);
} else {
for(i = 0; i < MAX_IDE_BUS; i++) { ISADevice *dev; dev = isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i], hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]); idebus[i] = qdev_get_child_bus(&dev->qdev, “ide.0”);

So I did the obvious thing and just wrapped it with a ‘pci_enabled=0;’ and a ‘pci_enabled=1’, basically turning off PCI for the IDE initialization so it’d load the isa_ide_init proc. Well that just then crashed Qemu when it was reconciling geometry for the NVRAM. 20 minutes with GDB and I figure that the code has morphed enough that it’s basically expecting 2 IDE controllers, and the ISA thing just isn’t building out what it wants so it’s just a quick fix in hw/pc.c

static void pc_cmos_init_late(void *opaque)

ide_get_bs(hd_table, arg->idebus0);
ide_get_bs(hd_table + 2, arg->idebus1);

So I comment out the second ide_get_bs and lo Qemu doesn’t crash anymore! But the BIOS says there is no hard disks?! So I’m figuring it’s a SeaBIOS issue, so checking their changelog, I see that there is something about not trusting ISA controllers on PCI systems.

So I’ll just have to back out that change, or just hack the thing to re-enable ISA IDE controllers. Luckily this was kind of easy to spot, as someone had left the magical words ‘isapc’ in ata.c

if (!CONFIG_COREBOOT && !pcicount) {
// No PCI devices found – probably a QEMU “-M isapc” machine.
// Try using ISA ports for ATA controllers.
init_controller(0, -1, IRQ_ATA1
init_controller(1, -1, IRQ_ATA2

So all I had to do was ensure that this was called, no matter what (comment out the if, leave the block). Sadly MinGW couldn’t build SeaBIOS so I spent the better part of an hour downloading Slackware 13.37 (which was … less then expected) fighting with it’s frame buffer, then the linker gave me this exciting bit.

cannot move location counter backwards (from 00000000000067e0 to 0000000000000000)

Good grief.

The fix is to apparently use binutils 2.20.51 . Slackware came with 2.21.51 .. Which apparently broke this needed function (again). So I wound up downloading the source from the MinGW project of all things (I know, wth?) having fun with p7zip (it installs a 7za?!) then I could FINALLY build my BIOS. First a generic test to make sure it works, then the modified one.

And into the crash. To verify I at least was doing what I thought, I turned on some debugging in the BIOS, which seamed normal, and then just fired up qemu with this flag:

-monitor telnet:,server,nowait

So I can telnet in, and capture the full device tree. Which you get with…

info qtree

And you can see, the IDE is indeed on the ISA bus.

bus: main-system-bus
type System
dev: hpet, id “”
gpio-in 1
dev-prop: timers = 3
dev-prop: msi = off
mmio fed00000/00000400
dev: i440FX-pcihost, id “”
bus: pci.0
type PCI
dev: PIIX4_PM, id “”
dev-prop: smb_io_base = 45312
bus-prop: addr = 01.3
bus-prop: romfile =
bus-prop: rombar = 1
bus-prop: multifunction = off
bus-prop: command_serr_enable = on
class Bridge, addr 00:01.3, pci id 8086:7113 (sub 1af4:1100)
bus: i2c
type I2C
dev: smbus-eeprom, id “”
bus-prop: address = 87
dev: smbus-eeprom, id “”
bus-prop: address = 86
dev: smbus-eeprom, id “”
bus-prop: address = 85
dev: smbus-eeprom, id “”
bus-prop: address = 84
dev: smbus-eeprom, id “”
bus-prop: address = 83
dev: smbus-eeprom, id “”
bus-prop: address = 82
dev: smbus-eeprom, id “”
bus-prop: address = 81
dev: smbus-eeprom, id “”
bus-prop: address = 80
dev: PIIX3, id “”
bus-prop: addr = 01.0
bus-prop: romfile =
bus-prop: rombar = 1
bus-prop: multifunction = on
bus-prop: command_serr_enable = on
class ISA bridge, addr 00:01.0, pci id 8086:7000 (sub 1af4:1100)
bus: isa.0
type ISA
dev: isa-ide, id “”
dev-prop: iobase = 0x170
dev-prop: iobase2 = 0x376
dev-prop: irq = 15
isa irq 15
bus: ide.0
type IDE
dev: ide-drive, id “”
dev-prop: unit = 0
dev-prop: drive = ide1-cd0
dev-prop: logical_block_size = 512
dev-prop: physical_block_size = 512
dev-prop: min_io_size = 0
dev-prop: opt_io_size = 0
dev-prop: bootindex = -1
dev-prop: discard_granularity = 0
dev-prop: ver = “0.14.0”
dev-prop: serial = “QM00003”
dev: isa-ide, id “”
dev-prop: iobase = 0x1f0
dev-prop: iobase2 = 0x3f6
dev-prop: irq = 14
isa irq 14
bus: ide.0
type IDE
dev: ide-drive, id “”
dev-prop: unit = 0
dev-prop: drive = ide0-hd0
dev-prop: logical_block_size = 512
dev-prop: physical_block_size = 512
dev-prop: min_io_size = 0
dev-prop: opt_io_size = 0
dev-prop: bootindex = -1
dev-prop: discard_granularity = 0
dev-prop: ver = “0.14.0”
dev-prop: serial = “QM00001”
dev: isa-fdc, id “”
dev-prop: driveA = floppy0
dev-prop: driveB =
dev-prop: bootindexA = -1
dev-prop: bootindexB = -1
isa irq 6
dev: port92, id “”
dev: i8042, id “”
isa irqs 1,12
dev: isa-parallel, id “”
dev-prop: index = 0
dev-prop: iobase = 0x378
dev-prop: irq = 7
dev-prop: chardev = parallel0
isa irq 7
dev: isa-serial, id “”
dev-prop: index = 0
dev-prop: iobase = 0x3f8
dev-prop: irq = 4
dev-prop: chardev = serial0
isa irq 4
dev: mc146818rtc, id “”
dev-prop: base_year = 2000
dev: i440FX, id “”
bus-prop: addr = 00.0
bus-prop: romfile =
bus-prop: rombar = 1
bus-prop: multifunction = off
bus-prop: command_serr_enable = on
class Host bridge, addr 00:00.0, pci id 8086:1237 (sub 1af4:1100)
dev: ioapic, id “”
gpio-in 24
mmio fec00000/00001000
dev: fw_cfg, id “”
dev-prop: ctl_iobase = 0x510
dev-prop: data_iobase = 0x511
mmio ffffffff/00000002
mmio ffffffff/00000002
dev: apic, id “”
dev-prop: id = 0
mmio fee00000/00100000

So while it didn’t do what I wanted, this kind of was a good way to see that I could at least enable ISA IDE hard disks on Qemu.

I can only wonder why on earth they are still broken with regards to Netware.

Virtual disks revisted…

Again for Linux/ OSX users, it’s no big deal as they have access to the ‘dd’ command. Well I was installing AT&T SYSVr4 when it hit me that you can somewhat convert physical disks with Virtual PC & Qemu…
linked disk1
In Virtual PC you can create a ‘virtual disk’ that links to a physical volume..
linked disk2

And again, just select a physical slave disk with your legacy OS already installed.

Once the disk is linked, re-run the utility and you can then convert the linked disk into a dynamic disk. Once you have your .vhd, you can use Qemu’s qemu-img tool to convert the disk image into qcow,qcow2 (Qemu) or even VMDK for VMWare. The syntax is pretty simple..

qemu-img convert –f vpc attsysv.vhd –O qcow attsysv.dsk

I’ve tested it with AT&T SYSVr4 & OS/2 1.3! Much to my amazement with the fixpacks, OS/2 1.3 will actually RUN on Virtual PC 2007. It’s a shame that IBM saw the SDK’s for OS/2 as a revenue generation opportunity, as it’s amazing how quick it is (once it’s done initializing….) but I guess that’s a given of any 16bit OS that’s written in assembly….

For the heck of it, here’s a screenshot.

OS/2 1.3 running from a linked disk

OS/2 1.3 running from a linked disk


Fun with Qemu & Large Disks….

I was playing around with NeXTSTEP under a snapshot of qemu and I noticed that my arrow keys were not working correctly. After a few hours of digging about I found the fix was easy enough:
-k en-us
That’s it, just append that to your boot string, and away you go! Another annoyance has been my quest to install AROS onto a P4 computer.. I picked up a new 320GB IDE disk (WD Caviar Blue) .. which the BIOS & AROS promptly refused to acknowledge corectly. Everything was going to hell until I gave up and read the manual. Once again it was simple, there is a jumper setting for ‘older’ OS’s to see only 32gb, and naturally the BIOS is now happier. If only I could say the same of AROS…