Minimigmac v0.1 --------------- Copyright 2011 Ben Herrenschmidt Licenced under the GPL, see COPYING file. ! Warning ! A bunch of stuff aren't quite working yet, the whole thing actually has some stability issues when "hot", see the TODO file and help is welcome :-) This currently requires a 4M minimig to emulate a 2M MacPlus. I will probably try to make it work on a 2M minimig at some point. Build/Install instructions -------------------------- * Build the FPGA using Xilinx tools, project file not included, and put the result in a file named "MIMIGMAC.BIN" on the sd-card. The toplevel module is "minimigmac" in minimigmac. The sim_* modules and the Makefile are for simulation with iverilog. This requires m68k_vpi.vpi amd m68k.v (my VERY CRUDE) VPI module containing Hampa Hug's 68k emulator. It can be found at http://ozlabs.org/~benh/m68k-vpi-0.1.tar.bz2 Or use my prebuilt binaries * Build the PIC code using sdcc (I use piklab as a front-end) and download that to the PIC Or use my prebuild binaries * Get your (legitimate) copy of the MacPlus ROM onto the sd-card in a file named "MIMIGMAC.ROM" * Make a 20M (I used 21M just in case, see below) file to use as a SCSI disk image on the sd-card, name it "MACHD.IMG" Hard disk image notes: ---------------------- Since we don't emulate floppies yet, you need to have a pre-installed hard disk image. This is not a raw filesystem image as used by most Mac emulators out there, but instead needs to be a raw image of a Mac formatted SCSI disk, more specifically a Seagate ST 225N :-) I've built such an image using the "pce" emulator from Hampa Hug, I'll put some instructions below. Eventually, when floppy emulation is implemented, things will be easier to install. The reason for that is that the Macintosh ROM doesn't contain a proper SCSI disk driver. Instead, it uses the low level SCSI Manager routines in "polled" mode at boot to load such a driver from the disk itself. Since I don't have at this point a free driver I can make visible there (by simulating the partition map etc...) we need to make things look good enough for Apple's own driver to work. Unfortunately, Apple's SCSI formatting/partitioning tool only works with "known" disks (well there are versions that work with any disk but not the one I've used so far). Note also that SCSI emulation is incomplete. It works with the driver coming with System 4.2 Finder 5.5, which doesn't do anything but READ6/WRITE6 (not even a GET_CAPACITY or INQUIRY) but you may have problems with other variants. I will fix that eventually. So to create the disk image, first I've downloaded & built PCE which you can find at http://www.hampa.ch/ I've then modified the default MacPlus config file so that its scsi device section looks like: device { # The SCSI ID id = 6 # The drive number. This number is used to identify # a "disk" section. The number itself is meaningless. drive = 128 # The vendor and product strings are returned by # the SCSI Inquiry command. vendor = " SEAGATE" product = " ST225N" } (This is the same vendor/product strings that our PIC code passes to the Macintosh upon INQUIRY commands). I've created a 21MB disk image (in case the disk is a bit more than 20MB though it's probably a bit less, ie, the Apple tool afaik uses a hard wired size from a table) I've then used System 4.2 floppy images to install a MacOS onto that disk image & copied it to my sd-card.