Quick update on Qemu 1.1.0-1

It seems that I’m not the only person getting this error with existing qcow2 images:

Header extension too large

The good news, is that if you have any way to build your own Qemu its a trivial thing to uh “fix”.  Now I haven’t done that much in the way of testing, maybe there is something fundamentally wrong with Qcows created from older versions of Qemu but the error comes from HERE.

You could just comment out the “return -EINVAL;” and Qemu will continue on its merry little way.

Now I’ve tried converting my qcow2’s to other formats with 0.14 but they all have slight errors that wind up preventing OS/2 from booting (I know that 99% of the would wouldn’t care..).

I’m not sure what to make of it, but it looks like to me, that if you really really want this version its best to remove that check so you can keep your old disk images.. try converting them, but.. they may not work `exactly` right.. TEST…!!!

Good news on the QEMU fronts!

First I found this blog post about building Qemu with CLANG instead of GCC, and I didn’t  even run it through google translate, but I had a feeling that it must work because there is simply too much text there for something that doesn’t work… Although it is with the TCG interpreter…

Qemu 1.1.0-1 on OS X 10.6.8 via clang!

And sure enough it works! (well so far I’ve only booted the IBM PS/1 MS-DOS 4.00 image I had handy. But that is good news for me as I’m planning on shifting away from running Windows all the time, and it was annoying having this powerful mac pro, but not being able to run / play with Qemu.

The move the clang would make sense as I under stand it Apple is moving away from GCC at any rate.

Also on the road to a non TGC build of Qemu I did find out the compiler included on the 10.6.3 DVD works while the later IOS update one does not…

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/src/configure –disable-checking –enable-werror –prefix=/Developer/usr/llvm-gcc-4.2 –mandir=/share/man –enable-languages=c,objc,c++,obj-c++ –program-prefix=llvm- –program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ –with-slibdir=/usr/lib –build=i686-apple-darwin10 –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/dst-llvmCore/Developer/usr/local –program-prefix=i686-apple-darwin10- –host=x86_64-apple-darwin10 –target=i686-apple-darwin10 –with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

GCC for update for IOS 5 … which doesn’t build a working Qemu exe

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure –disable-checking –enable-werror –prefix=/usr –mandir=/share/man –enable-languages=c,objc,c++,obj-c++ –program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ –with-slibdir=/usr/lib –build=i686-apple-darwin10 –with-gxx-include-dir=/include/c++/4.2.1 –program-prefix=i686-apple-darwin10- –host=x86_64-apple-darwin10 –target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)

While the one that does come on the 10.6.3 DVD works fine.

Next up for all those of you on Windows or Win32 i386 platforms, rainbow has kindly provided a Win32 build of Qemu, which you can download from his site!  Ive booted MS-DOS on it from within VirtualBOX and it seems to work fine!

One thing I’ve noticed about 1.1.0 is that it cannot read low density 3 1/2″ disks!!!!

Mouse issues with VirtualBOX on OS X

So I’ve been using this old intel mac pro, to run VirtualBOX with a really weird issue.. The moue pointer just doesn’t work in the VM no matter what I’ve done.

Ok, I’ll admit that instead of running in 32bit mode on this mac, I’ve set it up to boot like a PC into the chameleon bootloader to then let me boot OS X in 64bit mode.. Which makes this a great ‘hackintosh’ as its all Apple hardware.  But to get me through the booting and whatnot I’ve been using a USB keyboard/mouse, then once booted up I’ve been using bluetooth Apple keyboard/mouse (yes my desk is a disaster).

Anyways with the USB mouse plugged in, I can only move the mouse by right dragging in the VM.  It doesn’t matter if its relative mouse pointer or not.

But as soon as I unplugged the USB mouse, it works fine… Maybe its because I have two mice??

Also you’d think Apple could have done some softload 64bit firmware for the 2006 Mac Pro 1,1 but… I guess some times you have to take matters into your own hands….

Oh and that reminds me of another tip, when installing Windows XP you’ll be expected to hit F8, which on my keyboard just pauses the currently playing song.. Instead hold down the `fn` key, then press F8.  Which makes me all the more glad I got a real apple keyboard, as finding all these special keys on a windows keyboard… involved.

ircII-4.4 on Xenix

Building this was.. . Involved, but I finally got it to link! Oh happy days! But then disaster struck!

USER Not enough parameters

Not enough parameters? And the worst thing is that I got this error EVERYWHERE… Googling this has become useless as everyone just says google it, so google made all that turn into a negative feedback loop! Or even useful advice like ‘upgrade your client, LOL’, but after going through an hour of `fun` getting this to run on Xenix I wasn’t going to try a new version of the source just yet.

Going through the source, looking for the USER command and where its used and found this:

send_to_server(“USER %s %s %s :%s”, username,
(send_umode && *send_umode) ? send_umode : hostname,
server_list[server].name, realname);

Which looks nice, but according to this as a reference, it doesn’t have enough parameters! So I figured I’d change it to something more like this!

send_to_server(“USER %s 8 * : %s”, username,realname);

this is a bug free client. honest

And as you can see, it works!  Even the version string reports Xenix!

If anyone cares, you can download the binary here.

Installing Xenix on an IBM Aptiva 2176

Yes, $6.98 worth of IBM

So a while back I had scored this IBM Aptiva 2176 for $6.98 .  I had been running OS/2 1.21 on there with great success, but I felt like trying something different.

Something more like Xenix.

The IBM comes with a WDC AC32100H hard disk, 2GB in capacity.  I figured this would be quick and easy to install.

Boy was I WRONG.

First off Xenix has issues with disks bigger than 512MB.  Namely this kind of limitation:

You need to stay within the bounds of 16 heads, 63 
sectors/track, and 1024 cylinders.

And of course the WDC in question is one of these ‘new fangled’ LBA disks.  Booting up on LBA mode it looks like this:
hda: WDC AC32100H, 2014MB w/128kB Cache, LBA, CHS=1023/64/63, DMA

The other mode, is CHS which of course gives us this:
hda: WDC AC32100H, 2014MB w/128kB Cache, CHS=1023/64/63, DMA

So I thought I could just ‘override’ the disk parameters under Xenix, and tell it, that its 1023/16/63.  Sure that worked for formatting but booting? nope!

I pulled up the data sheet and it informs me of this as its native capabilities:

Recommended Setup Parameters
Cylinders 4092
Heads 16
Sectors/Track 63
Landing Zone 4092
WPC 4092
Jumper Setting Information Six Pin Drive

But how to get there?  What was worse, is that doing a probe under MS-DOS I kept on seeing output like this:

But the numbers look good!?

And yet trying to override the geometry with these parameters only lead to disaster.  Clearly what these programs were telling me were conflicting, what I needed was something to just tell me what it sees.  So I thought I’d use Linux.

But not some 8GB download, because that’d take far too long.  No weighing in a just over 2MB is the specialized ‘doom speaker sound‘ distribution. Its UMS DOS based, meaning that you can just unzip it onto a FAT drive, without any formatting/partitioning, and boot from MS-DOS into Linux.  So sure enough this is what I saw:

Drive translation in action

First, yes I have two disks, I’m only interested in the ide0/hda.  but as you can see its translating.  I found the same result for both CHS/LBA.  The only thing I didn’t notice for some reason was an option to turn drive translation OFF in the BIOS. Oops!

There we go!

So now I was able to boot the Xenix install, and it finally saw what it should have seen!

4092 Cylinders, 16 heads, 63 sectors/track!

then tell it that the disk was only 1024 cylinders, as mentioned in the usenet posting, along with changing the landing zone.  I knew it was going to work so I figured I’d make a separate /u filesytem for the heck of it.  Divvy takes me back to doing disklabels on 4.3 BSD

bust out the calculator!

With that all said and done, it was time to reboot, and it booted from the hard disk!  I could then complete the install.  After that was out of the way I noticed that it was not mounting the /u filesystem!

The following entry needed to be added to the /etc/default/filesys file:

bdev=/dev/u  cdev=/dev/ru  mountdir=/u \
     desc="The User Filesystem" \
     rcmount=yes \

Now it mounts up like you’d expect! If you plan on making the /u for peoples home directories don’t forget to alter the /etc/default/mkuser file!

I have no idea if this works on a 1TB IDE disk, but I’d imagine if you can somehow get it into the limited geometry Xenix can understand, it should work…. Of course why you’d want to run a Unix that can only address 16mb of ram is beyond me…

Now that it’s booting, the next step will be to get it onto the internet….

How do you plug an RJ45 into an Etherlink II (3c503)

So on the heels of my prior post, someone was asking me, where do you exactly plug in an RJ-45 style cable to something like an Etherlink II?  It had never occured to me that many people today would have no idea what thicknet/thinnet were, or what the magical world of the AUI port is.. Sure there are transceivers still in use, but typically in larger networking equipment, and more so to choose what king of fiber optics to use (single mode? multimode? etc..).

So looking at the back of the card, we see this:

It’s not a joystick port!

Sorry for the poor quality but.. thems the breaks.  So anyways back in the day ethernet revolved around this big bulky cabling lovingly called Thicknet.  And you had to use these ‘vampire’ taps to plug into the cable, and the cable had markings that you could only tap into it a certain points.  So luckily for us, the transceiver component of Thicknet was external, letting us in the future plug in different transceivers for different media types.

Say something like this:

3Com rj45 transceiver

And that is how you can plug a cable into a card that is older than the rj45 ethernet standard!

PC Retro Networking at its finest

When most people think of old PC networking, they think ethernet, and of course most people I know think of the NE2000.  This card from Novel was cloned, and quite popular as time went on.  Its amazing how many variations of this card there was, and there is even a PCI version of this card, the RTL8029AS!

But that is not what this is about, as most OS stuff from the early 1990’s relies on another card, the 3com Etherlink II.

Notably products like IBM TCP/IP 2.0 for OS/2, Lan Manager for OS/2, Windows NT Pre-releases, Xenix, do not ship with NE2000 drivers, but they all support the Etherlink II card.

Now before you start jumping on fleabay, or scrounging around the Etherlink III card is *NOT* the same as the II, nor is it compatible!

My eight bit Etherlink II

Looking at the card, you can see it has *SOME* jumpers, that configure the IO Base, and where to locate its shared memory (or disable it).  But notice there are no jumpers to select the IRQ, the DMA channel!  I went in circles for a while looking for a softset utility for this card, and spent HOURS basically showing up with nothing.  So I figured at this point I’d just download some drives, and see how long it’d take to magically get it working.

On my first attempt, I used the packet driver, so I could load up some QuakeWorld for MS-DOS.  But something amazing happened, it worked on the default settings!  Experimenting more, as I changed IRQ it always worked unless there was a conflict ..  I then tried a Novel Netware client, but it didn’t work.  Also I loaded the lanman client for OS/2 on OS/2 1.21 and it didn’t work ether.  I was perplexed.  Then I found out two important things from an ancient usenet posting:

  • There is no softset program, because the device driver configures the card, and can change any/all of its hardware characteristics
  • Some drivers don’t detect if they should be using the internal transceiver, or an external one, and have to be told.

So I looked at the protocol.ini for lanman OS/2 and sure enough there was this entry, commented out:


And the Netware client just needed the following statement added:


And now I can happily mount NetBEUI shares, mount my NetWare server, and of course use WatTCP programs from DOS without issue!

Donor time!

I was going to load an early Windows NT Preview onto my Aptiva, but then all it would do was crash with a kernel panic of 0x00000032. Then it hit me, the hard disk I have is 2GB and this early version can only handle disks up to 512MB.  So I was looking around where to get a small enough disk, and then I thought what the heck, and took apart a ‘new’ machine I scored last week, an IBM PS/1!

The IBM PS/1 was kind of a disappointment as it cannot run OS/2!  Can you believe it, IBM made a machine that can’t run their flagship Operating System??  As far as I can tell the heart of the matter is that the IDE controller doesn’t live at the default port/irq that any other PC uses, so OS/2 or any other protected mode OS can’t detect it.  I only have 2MB of ram, so loading OS/2 2.0 is out of the question.  So for the sake of the experiment, I took the disk out of this poor IBM PS/1 2121 and put it ‘on’ the Aptiva.

Pentium 150Mhz, 32MB of ram, and an 80MB disk!

First I really wondered if the 80MB disk would be big enough, but surprisingly after a format, and installation of IBM DOS 4.00 (its what the PS/1 runs in ROM and really really likes!) and using the network to bootstrap the files, it happily fit with the SDK in 40MB! (it adds another 20MB for swap…).

Its amazing just how large OSs have gotten over the years, but yeah at the same time, this version of NT is not ready for prime time that is for sure!

So I load it up, and notice two things… One its insanely slow, and secondarily I can’t figure out how to configure the network card. So for some reason I just tried to start up the server/workstation, and do a net view and…

Early Windows NT preview with networking

It worked!

The best part was loading up the October 1991 Windows NT Preview, and it just magically worked, after starting the server/client services!

SIMH 3.9-0 released!

And among the changes …


  • added *nix READLINE support (Mark Pizzolato)
  • fixed handling of DO with no arguments (Dave Bryan)
  • fixed “SHOW DEVICE” with only one enabled unit (Dave Bryan)
  • clarified some help messages (Mark Pizzolato)
  • added “SHOW SHOW” and “SHOW <dev> SHOW” commands (Mark Pizzolato)
  • fixed bug in deposit stride for numeric input (John Dundas)


  • added support for BREAK key on Windows (Mark Pizzolato)


  • major revision (Dave Hittner and Mark Pizzolato)
  • fixed array overrun which caused SEGFAULT on hosts with many devices which libpcap can access.
  • fixed duplicate MAC address detection to work reliably on switch connected LANs


  • made telnet option negotiation more reliable, VAX simulator now works with PuTTY as console (Mark Pizzolato)


  • fixed bugs in MPY, DIV introduced in 3.8-1 (from Theo Engel)
  • fixed bugs in double precision, normalization, SC (from Adrian Wise)
  • fixed XR behavior (from Adrian Wise)

hp2100 all peripherals (Dave Bryan):

  • Changed I/O signal handlers for newly revised signal model
  • Deprecated DEVNO modifier in favor of SC

hp2100_cpu.c (Dave Bryan):

  • Minor speedup in “is_mapped”
  • Added casts to cpu_mod, dmasio, dmapio, cpu_reset, dma_reset
  • Fixed I/O return status bug for DMA cycles
  • Failed I/O cycles now stop on failing instruction
  • Revised DMA for new multi-card paradigm
  • Consolidated DMA reset routines
  • DMA channels renamed from 0,1 to 1,2 to match documentation
  • Changed I/O instructions, handlers, and DMA for revised signal model
  • Changed I/O dispatch table to use DIB pointers
  • Removed DMA latency counter
  • Fixed DMA requests to enable stealing every cycle
  • Fixed DMA priority for channel 1 over channel 2
  • Corrected comments for “cpu_set_idle”


  • Changed declarations for VMS compiler

hp2100_cpu0.c (Dave Bryan):

  • Removed DS note regarding PIF card (is now implemented)

hp2100_cpu4.c (Dave Bryan):

  • Added OPSIZE casts to fp_accum calls in .FPWR/.TPWR

hp2100_cpu5.c (Dave Bryan):

  • Added sign extension for dim count in “cpu_ema_resolve”
  • Eliminated unused variable in “cpu_ema_vset”

hp2100_cpu6.c (Dave Bryan):

  • DMA channels renamed from 0,1 to 1,2 to match documentation

hp2100_cpu7.c (Dave Bryan):

  • Corrected “opsize” parameter type in vis_abs

hp2100_defs.h (Dave Bryan):

  • Added hp_setsc, hp_showsc functions to support SC modifier
  • DMA channels renamed from 0,1 to 1,2 to match documentation
  • Revised I/O signal enum values for concurrent signals
  • Revised I/O macros for new signal handling
  • Added DA and DC device select code assignments

hp2100_di.c, hp2100_di.h (Dave Bryan):

  • Implemented 12821A HP-IB Disc Interface

hp2100_di_da.c (Dave Bryan):

  • Implemented 7906H/20H/25H ICD disc drives

hp2100_dp.c (Dave Bryan):

  • Added CNTLR_TYPE cast to dp_settype

hp2100_ds.c (Dave Bryan):

  • Rewritten to use the MAC/ICD disc controller library
  • ioIOO now notifies controller service of parameter output
  • Corrected SRQ generation and FIFO under/overrun detection
  • Corrected Clear command to conform to the hardware
  • Fixed Request Status to return Unit Unavailable if illegal
  • Seek and Cold Load Read now Seek Check if seek in progress
  • Remodeled command wait for seek completion
  • Corrected status returns for disabled drive, auto-seek beyond drive limits, Request Sector Address and Wakeup with invalid or offline unit
  • Address verification reenabled if auto-seek during
  • Read Without Verify

hp2100_fp1.c (Dave Bryan):

  • Added missing precision on constant “one” in fp_trun
  • Completed the comments for divide; no code changes

hp2100_ipl.c (Dave Bryan):

  • Added CARD_INDEX casts to dib.card_index
  • A failed STC may now be retried
  • Consolidated reporting of consecutive CRS signals
  • Revised for new multi-card paradigm

hp2100_lps.c (Dave Bryan):

  • Revised detection of CLC at last DMA cycle
  • Corrected 12566B (DIAG mode) jumper settings

hp2100_ms.c (Dave Bryan):

  • Added CNTLR_TYPE cast to ms_settype

hp2100_mt.c (Dave Bryan):

  • Removed redundant MTAB_VUN from “format” MTAB entry
  • Fixed command scanning error in mtcio ioIOO handler

hp2100_stddev.c (Dave Bryan):

  • Add TBG as a logical name for the CLK device

hp2100_sys.c (Dave Bryan):

  • Deprecated DEVNO in favor of SC
  • Added hp_setsc, hp_showsc functions to support SC modifier
  • Added DA and dummy DC devices
  • DMA channels renamed from 0,1 to 1,2 to match documentation
  • Changed DIB access for revised signal model

hp_disclib.c, hp_disclib.h (Dave Bryan)

  • Created MAC/ICD disc controller library


  • fixed read stacker operation in column binary mode
  • fixed punch stacker operation (Van Snyder)


  • fixed TT_GET_MODE test to use TTUF_MODE_x (Michael Bloom)
  • revised to use clock coscheduling

id_tt.c, id_ttc.p:

  • revised to use clock coscheduling


  • added clock coscheduling routine


  • reverted multiple tape indicator implementation
  • fixed EOT indicator test not to clear indicator (Van Snyder)
  • fixed divide not to clear word marks in quotient (Van Snyder)
  • revised divide algorithm (Van Snyder)


  • reverted multiple tape indicator implementation
  • fixed END indicator test not to clear indicator (Van Snyder)
  • fixed backspace over tapemark not to set EOR (Van Snyder)
  • added no rewind option (Van Snyder)


  • fixed misuse of & instead of && in decode (Peter Schorn)


  • fixed misuse of & instead of && in Ea_ch (Michael Bloom)


  • fixed unitialized variable in tty output service (Michael Bloom)


  • revised to use clock coscheduling


  • fixed priority of PIRQ vs IO; added INT_INTERNALn


  • fixed Qbus interrupts to treat all IO devices (except clock) as BR4
  • fixed order of int_internal (Jordi Guillaumes i Pons)


  • fixed bug in updating mem addr extension (Peter Schorn)


  • fixed bug in read header (Walter F Mueller)


  • added debug support


  • added RD32 support

pdp11_tq.c: (Mark Pizzolato)

  • set UNIT_SXC flag when a tape mark is encountered during forward motion read operations
  • fixed logic which clears UNIT_SXC to check command modifier
  • added CMF_WR flag to tq_cmf entry for OP_WTM
  • made non-immediate rewind positioning operations take 2 seconds
  • added UNIT_IDLE flag to tq units.
  • fixed debug output of tape file positions when they are 64b
  • added more debug output after positioning operations
  • added textual display of the command being performed
  • fixed comments about register addresses


  • fixed t_addr printouts for 64b big-endian systems (Mark Pizzolato)


  • fixed t_addr printouts for 64b big-endian systems (Mark Pizzolato)

pdp11_vh.c: (Mark Pizzolato)

  • fixed SET VH LINES=n to correctly adjust the number of lines available to be 8, 16, 24, or 32.
  • fixed performance issue avoiding redundant polling

pdp11_xq.c: (Mark Pizzolato)

  • Fixed missing information from save/restore which caused operations to not complete correctly after a restore until the OS reset the controller.
  • Added address conflict check during attach.
  • Fixed loopback processing to correctly handle forward packets.
  • Fixed interrupt dispatch issue which caused delivered packets (in and out) to sometimes not interrupt the CPU after processing.
  • Fixed the SCP visibile SA registers to always display the ROM mac address, even after it is changed by SET XQ MAC=.
  • Added changes so that the Console DELQA diagnostic (>>>TEST 82) will succeed.
  • Added DELQA-T (aka DELQA Plus) device emulation support.
  • Added dropped frame statistics to record when the receiver discards received packets due to the receiver being disabled, or due to the XQ device’s packet receive queue being full.
  • Fixed bug in receive processing when we’re not polling. This could cause receive processing to never be activated again if we don’t read all available packets via eth_read each time we get the opportunity.
  • Added the ability to Coalesce received packet interrupts. This is enabled by SET XQ POLL=DELAY=nnn where nnn is a number of microseconds to delay the triggering of an interrupt when a packet is received.
  • Added SET XQ POLL=DISABLE (aka SET XQ POLL=0) to operate without polling for packet read completion.
  • Changed the sanity and id timer mechanisms to use a separate timer unit so that transmit and recieve activities can be dealt with by the normal xq_svc routine.
  • Dynamically determine the timer polling rate based on the calibrated tmr_poll and clk_tps values of the simulator.
  • Enabled the SET XQ POLL to be meaningful if the simulator currently doesn’t support idling.
  • Changed xq_debug_setup to use sim_debug instead of printf so that all debug output goes to the same place.
  • Restored the call to xq_svc after all successful calls to eth_write to allow receive processing to happen before the next event service time. This must have been inadvertently commented out while other things were being tested.

pdp11_xu.c: (Mark Pizzolato)

  • Added SHOW XU FILTERS modifier (Dave Hittner)
  • Corrected SELFTEST command, enabling use by VMS 3.7, VMS 4.7, and Ultrix 1.1 (Dave Hittner)
  • Added address conflict check during attach.
  • Added loopback processing support
  • Fixed the fact that no broadcast packets were received by the DEUNA
  • Fixed transmitted packets to have the correct source MAC address.
  • Fixed incorrect address filter setting calling eth_filter().


  • added clock coscheduling
  • revised TTI to use clock coscheduling and to fix perpetual CAF bug


  • revised to use clock coscheduling


  • added clock coscheduling

pdp8_fpp.c: (Rick Murphy)

  • many bug fixes; now functional


  • revised to use clock coscheduling and to fix perpetual CAF bug


  • revised to use clock cosheduling


  • added link to FPP


  • fixed SDLC to clear AC (Dave Gesswein)


  • fixed bug in scan function decode (Peter Schorn)


  • revised idle design (Mark Pizzolato)
  • fixed bug in SET CPU IDLE
  • fixed failure to clear PSL<tp> in BPT, XFC


  • revised idle design Mark Pizzolato)
  • added VEC_QMODE test in interrupt handler


  • fixed integer overflow bug in EMODx (Camiel Vanderhoeven)
  • fixed POLYx normalizing before add mask bug (Camiel Vanderhoeven)
  • fixed missing arguments in 32b floating add (Mark Pizzolato)

vax_octa.c (Camiel Vanderhoeven)

  • fixed integer overflow bug in EMODH
  • fixed POLYH normalizing before add mask bug


  • revised to use clock coscheduling


  • fixed t_addr printouts for 64b big-endian systems (Mark Pizzolato)


  • added power clear call to boot routine (Mark Pizzolato)


  • added AUTORESTART switch support (Mark Pizzolato)


  • added REBOOT support (Mark Pizzolato)
  • revised to use clock coscheduling


  • moved all Qbus devices to BR4; deleted RP definitions


As always you can download it from the homepage, or from sourceforge.

Transferring data into CP/M with SIMH

This has been an exersize in insnaity..

So for some strange reason I wanted to load up Zork into SIMH‘s less featured (and much simpler) altair 8080 emulator.  The catch is the disk format which for the life of me I couldn’t get to work in any of the CP/M disk access tools.

The Altair z80 emulator as part of the same SIMH package includes a far more complicated setup, but out of the box it CANNOT read the disk image from the 8080 emulator.  After digging around it seems that one of the ‘approved’ methods of getting stuff into CP/M was to load it into memory, and just save the block (provided it fits in the 64k, more on that later).  The syntax really is quite simple:

load zork1.com 100

And that’ll load it up at the normal program entry point (just like an MS-DOS COM file!)..

Except it doesn’t want to work.


but of course it works on the z80.

No problems here!

Which is great but the z80 can’t read the 8080’s disks..!  So after digging through the source code, I find this small gem that the z8080 has been changed to use a much larger disk size!

#define MAX_TRACKS 254 /* number of tracks,
original Altair has 77 tracks only */

So yes, by changing that to 77 I can now boot off the 8080’s boot disk on the z80!  Of course it also means that I’m unable to ‘see’ the hardisk in the z80, or any of the other great peripherals as no doubt the altair CP/M disk hasn’t been configured for all of these fine things.  I also tried only altering one of the disks on the z80 for 77 tracks, but once more again it seems that CP/M has an everything/nothing type idea for a disk controller.

But the load command works on the monitor, and the Altair CP/M can handle two disks, so its enough for me to format the B: drive ( a copy of the CP/M disks) and work with that.

Once you’ve loaded a program into memory, you toggle back to CP/M and run the ‘save’ command which then dumps how many pages back to disk.

For example, the program STAT is 5,248 bytes in size. 5248/256 = 20.5. Thus, the save command would be:


Pretty simple, right?  But what happens if you have a file greater than memory?  Well first I thought I could compress it, and I’d forgotten just how many old compression programs there were for CP/M, crunch, arc, zoo, zip … Finding MS-DOS equivalents wasn’t too bad (thanks for dosbox!) but I couldn’t get the 84kb data file into the memory limit, so I figure’d I’d just split the file into something on  a 256 byte boundary.  Loading them into RAM wasn’t too hard, as saving them out.. but how do you join them together on CP/M?  I found PLENTY of utils to split files, but nothing on putting them back together!

On MS-DOS you can just do a copy /B file1+file2 bigfile

But I couldn’t find out how to do this on CP/M until I looked further into the PIP command, CP/M’s answer to copy.

To join a binary file it goes something like this:

>PIP sd.com=sd.001[OV],sd.002[OV],sd.003[OV]

So with all that work, I was now able to create a zork1.dsk that the 8080 emulator is capable of playing!

Zork1 finally loaded on the SIMH Altair 8080

And for the curious, here is Zork1, in the old Altair 77 track format.