SIMH is a computer emulator – mostly for computers from the 60′s and 70′s – PDP’s of all sorts, a VAX or two, and a bunch of others I’m not very familiar with. A number of pre-compiled binaries are available if you don’t want to build it yourself. Retro-computing at its finest.
Back in 2002 I did this: SIMH + VMS on a 500MHz/640MB PowerPC iBook w/OS X . (I still have the machine. Just used it today to create a disk image for this project. For some reason, its CD-RW drive is better at reading some CD’s than my newer Macs and their DVD-RW drives.)
So, now I’m wondering how fast the current version will run on my MacBook Air with its 2 GHz Core i7. (And other devices running OS X). Or even an iPad!
Some links of interest:
- There are instructions here: Simh Tips: VAX Emulation On Mac OS X
- And pre-compiled binaries here: SIMH for Mac OS X (And there’s also a version up on darwinports )
- And someone even got SIMH running on a spare iPhone (though they built it ON a jailbroken iPhone) (SIMH on an iPhone would never make it into the App Store for various reasons.)
- And on an iPAQ (A small PDA from HP running Windows Mobile)
- This one is Linux but goes into a lot of detail and can be applied to doing it with OS X: VAX/VMS on Linux using SIMH
Actually doing it:
Step 1. Build SIMH 3.8-1 on Mac OS X w/gcc ( aka “make vax” in a terminal window. And after modifying several header files per the ‘Simh Tips’ page at hoffmanlabs.com above.) – Done.
Step 2. Get a VMS/VAX install disk image. (See my original document for instructions on creating the disk image) – Done.
Step 3. Create a blank disk container to put the OS on (this makes one the size of an RA81) – Done
dd if=/dev/zero of=ra81.dsk bs=1048576 count=435
Step 4. Boot SIMH from the install disk image and install VMS (I created an .ini file to make it easier. The SIMH Linux ref above has an example and much details for the install for those who’ve never installed VMS on a VAX. )
My .ini file (based on info from above sources)
; Load CPU microcode
LOAD -r ka655x.BIN
; Attach non-volatile RAM to a file
ATTACH nvr nvram.bin
; Max Memory size depends on the version of SIMH. Affects speed.
SET CPU 64M
SET DZ LINES=8
ATTACH -a DZ 12000
SET RQ0 RA81
SET RQ2 cdrom
ATTACH RQ0 RA81.dsk
ATTACH -r RQ2 vaxvms073.img
; ethernet (run w/sudo for this to actually work)
set xq mac=08-00-2B-C0-A7-78
; Not needed? Doesn’t work
; attach xq en1
; uncomment to enable auto-boot
;dep bdr 0
; Go to console on halt
set cpu conhalt
SET CPU IDLE
; Now start the emulator
SIMH maxes out the CPU on my MacBook (It goes up to 170F+ and the fan spins up to 6000+rpm (ouch!). That’s when the battery in the MacBook is charging. It runs a little cooler otherwise. Or maybe it’s the SET CPU=IDLE command?)
Copy VMS from the CD image to the disk you plan to use for the system disk (making sure to change the drive names if they are different (oops!)
backup dua2:[0,0]vms073.b/save dua0:/image
Ctrl-E back to the console and boot from the new system disk (and then install the rest of VMS from the CD image ). I installed just the basics – no DECWindows. And I’ll need to find a programming language or two elsewhere.
Step 5. Get a hobbyist license for VMS (Join DECUServe first) (Check the forums there for SIMH topics) so I can legally install/use it. – To Do.
Step 6. Convert the Makefile to an XCode project so I can build it in XCode. – Done
Hmm… xcode will suck in the whole thing quite happily but that is only the start. I need to learn how to configure an Xcode project to build multiple targets.(XCode can build projects that use makefiles but I wanted a “better” way.
Or I could find something to convert a Unix makefile to an Xcode project. Like ConvertMake. Sort of.
- That version is shareware (it’ll only build a 4 target project file, which means I can’t use it for all of SIMH and am stuck with modifying the makefile to have only a couple emulators (I picked the ones needed to build a VAX))
- It builds ProjectBuilder project files and the current version of XCode (3.2), or any recent version that I would have, isn’t able to import ProjectBuilder projects.
Unfortunately, although Google says there’s a newer version, I couldn’t find it (mostly dead links or reviews pointing to dead links) and the SourceForge project has no source/images.
So I (to make a LONG story short) eventually installed OS X 10.4.11 on an Intel based Mac mini and the version of XCode that came with it ( 2.2.1) had no problem converting the ProjectBuilder project to XCode. But, of course, that version of Xcode isn’t quite compatible with the current version so now I have to convert it.
Okay, after much tinkering I have an Xcode 3.2 project that will let me build 4 SIMH cpu types (pdp10, pdp11, vax780, and vax). The vax one seems to work though I’m sure an Xcode/gcc “expert” could create a better one. (An ambitious person could take the project file and “easily” add the other cpu types.)
Had several issues:
a. ConvertMake used the wrong linker flags (It had to do with the OS type. I ran make and used the console output from that to fix it.
b. pdp11_tq.c, pdp11_ts.c, and vax_symcm.c had fprintf format problems. Easy fix. Should probably do a diff.
I don’t have an installable “package” for this — for my purposes it’s unnecessary. Maybe if I get bored this summer…
Step 7. Add the simhtools distribution to Xcode. – To Do.
Step X. iPad version? (The console and network access are going to be an issue.) – To Do. Maybe.