The SIMH Z80 Simulator

SIMH is a simulator that supports the Z80 CPU. It has great goals and a commendable history. You can find it at http://classiccmp.org/cpmarchives/cpm/mirrors/www.schorn.ch/cpm/intro.php. There are links on that page to the simulator and to a CP/M configuration. You’ll need both, even if you already have CP/M disks / images.

If you’re interested in CDOS, you’ll also need cdos.zip.

If you’ve downloaded the additional CP/M and/or CDOS ZIP file/s, the process for running either of these operating systems is straight forward. This is:
– unZIP the simulator
– unZIP the OS into the same directory
– double-click altairz80.exe
– at the “sim>” prompt, type “do cpm2” or “do cdos”

As with most things, there are pluses and minuses with this simulator.

I’ve mentioned it before but one of the really great pluses is its history. It was created as part of a project to preserve old computers so that we always have access to the technology, techniques and programs of the past. Whilst commonly parroted, the “those who can’t remember the past are condemned to repeat it” phrase is very true. We’ve all seen new people reform organisations by introducing things that had already been tried and failed. We’ve probably all been in situations where we’re new to a job and there’s no corporate memory or filing. Without the experience or history of “what have we already tried?”, we’re likely to make the same mistakes as the last guy.

It’s not just mistakes. Sometimes, understanding how we got to what’s current practice presents opportunities. There may have been things that were discounted as impractical at the time (so now “we do it this way”). What was impractical may no longer be the case, and there may be a whole new future in what was earlier discarded.

I really like that SIMH is part of an effort to preserve that part of history, not just for the Z80 but for other computers of the era such as the PDP-11 and VAX too. It is a strong plus.

Another plus is all the hardware built into the simulator. You can change hardware by issuing commands to the simulator. Pull out a CPU and plug in a different one, use more or less memory chips, change disk controllers, and so on. That is nice.

Whilst we’re on the subject, the configuration is also a minus. There is a lot you can do; but there is also a lot you can get wrong. Devices can be enabled or disabled. Devices have settings. Devices have units. Units have settings. There seem to be registers, names, settings and args for devices and/or units. If you get them right then all goes well. If you know the simulator well then it probably all makes a lot of sense and is pretty intuitive. If you don’t, it is a steep and frustrating learning curve.

The OS downloads I mentioned above come with a “cpm2” and “cdos” file. These are text files with settings in them that configure the simulator in a way that works for the particular operating system. If you use those, all will be straight forward. Before I found those (my fault: the CP/M one is mentioned in the text right after the download link), I struggled to get it to boot any of the disk images I already had. The CDOS images assume standard hardware at standard IO ports so they should boot on anything that has or emulates Cromemco hardware. It wasn’t really an issue with the disk image (like configuring a BIOS or BOOT for CP/M). It was a matter of internal SIMH settings.

With time, I am sure the power and versatility of SIMH would become easy to use. The takeaways here are:
– the developers may want to simplify / standardize settings to make the learning curve easier
– as a new user, start with a known starting point and learn from there

One of the pluses of SIMH is that it does have documentation on the simulator itself and of the devices in it. The developers have gone the extra mile to make it as easy to learn as they can. Another plus is it is open source so you can always look to see exactly what something does. There’s probably also been thousands of hours of effort by many developers that have gone into the program. This means it will typically be a robust and reliable simulator with any bugs that may have existed, long since eradicated.

The other minus for me was the use of IMD files for the disk images. There are pros and cons of that format and there are a lot of good reasons for it. However, I’ve just standardized on raw disk images so it presented some obstacles for me. I don’t have tools to get files on or off IMD files. Nor do I have tools to uncompress them. At one point the CDOS emulation complained about an IMD file that I did happen to have. It was compressed so the disk image was being opened in R/O mode. The images in the OS downloads from the site will all work smoothly.

Some tools are available for IMD files but the ones I found were 16bit executables that wouldn’t run on my x64 Win 10 laptop. Dave Dunfield does provide the source code for his IMDU program (which I needed to uncompress my CDOS IMD file) but as he notes in the source code, “This program is compiled using my own development tools, and will not build under mainstream compilers without significant work.” I can confirm Dave’s statement, having spent 5 hours just getting it to build for win32 with a mainstream compiler. If I’d understood how significant the amount of work was at the outset; I’d have found and installed a VM (probably DOSbox), run the existing IMDU.exe there, and then uninstalled it all afterwards. My win32 build is not available. Dave’s terms, quite reasonably, prohibit me from making derivatives available. Besides, whilst I know the uncompress bit works, nothing else in it has been tested. You’re better off going the VM route.

SIMH does understand raw disk images, in some parts, but the Cromemco disk controller specifically doesn’t. SIMH is open source so I’d considered adding raw disk support. Perhaps I will at some later time.

One of the things I do like about the IMD format (and there are other good points too) is the label. It can get very confusing with raw disk images if they all need to be labelled as “drivea.dsk” at some point. It’s hard to remember where this existing one from three weeks ago came from. (Was this the Fortran disk or the dBase one and, if it’s the dBase one, was it this version or the installed version?). IMDs have labels inside them. You always know which disk it is and so where to return it to.

Another plus with SIMH is it is cross-platform. I have seen it before now and have used it on a linux laptop previously. My biggest issue back then was getting files on and off the disk images. I’ve since solved that with cpmfs for raw images. I recently found an IMD2RAW program that will convert to raw images so I can also use cpmfs to access files in IMDs.

The conclusion for me: I find Udo Munk’s z80sim easier to use and easier to install other operating systems on, so I’m sticking with that. What’s best for you depends on what features or aspects are important for you.

This is part of the CP/M topic.

It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUponDigg thisPin on PinterestEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *