Firmware for Mac ROM SIMM programmer
Go to file
Doug Brown 7425af761a Break out code into a HAL, optimize flash operations
This makes the code pretty easily portable to other architectures if someone
wants to make a more modern SIMM programmer. I also was pretty careful to split
responsibilities of the different components and give the existing components
better names. I'm pretty happy with the organization of the code now.

As part of this change I have also heavily optimized the code. In particular,
the read and write cycle routines are very important to the overall performance
of the programmer. In these routines I had to make some tradeoffs of code
performance versus prettiness, but the overall result is much faster
programming.

Some of these performance changes are the result of what I discovered when
I upgraded my AVR compiler. I discovered that it is smarter at looking at 32-bit
variables when I use a union instead of bitwise operations.

I also shaved off more CPU cycles by carefully making a few small tweaks. I
added a bypass for the "program only some chips" mask, because it was adding
unnecessary CPU cycles for a feature that is rarely used. I removed the
verification feature from the write routine, because we can always verify the
data after the write chunk is complete, which is more efficient. I also added
assumptions about the initial/final state of the CS/OE/WE pins, which allowed me
to remove more valuable CPU cycles from the read/write cycle routines.

There are also a few enormous performance optimizations I should have done a
long time ago:

1) The code was only handling one received byte per main loop iteration. Reading
   every byte available cut nearly a minute off of the 8 MB programming time.
2) The code wasn't taking advantage of the faster programming command available
   in the chips used on the 8 MB SIMM.

The end result of all of these optimizations is I have programming time of the
8 MB SIMM down to 3:31 (it used to be 8:43).

Another minor issue I fixed: the Micron SIMM chip identification wasn't working
properly. It was outputting the manufacturer ID again instead of the device ID.
2020-11-27 00:16:35 -08:00
.settings Fixed bug that screwed up reading after doing an electrical test. 2012-03-04 12:03:02 -08:00
drivers Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
hal Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
tests Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
.cproject Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
.gitignore Ignore local settings files. Get project compiling on my computer. 2020-11-27 00:16:35 -08:00
.project OK -- so I separated the actual port code from the external memory controller code. I think this makes more sense. 2011-11-27 00:01:29 -08:00
chip_id.h Added GPL header to all of my source files. 2012-05-25 20:21:04 -07:00
led.h Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
LICENSE.txt Added GPL license text file. 2012-05-25 22:41:15 -07:00
main.c Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
programmer_protocol.h Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
README.md Update README.md 2020-11-26 23:41:14 -08:00
simm_programmer.c Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
simm_programmer.h Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00
SIMMProgrammer-AVRStudio.atsln Added AVR Studio project file for SIMM Programmer firmware 2016-04-25 13:48:59 -07:00
SIMMProgrammer-AVRStudio.cproj Added AVR Studio project file for SIMM Programmer firmware 2016-04-25 13:48:59 -07:00
util.h Break out code into a HAL, optimize flash operations 2020-11-27 00:16:35 -08:00

Description

This project is a bootloader and firmware for a Macintosh ROM SIMM programmer, along with control software for Mac OS X, Windows, and Linux. The ROM SIMM is compatible with the SE/30, all II-series Macs with a 64-pin SIMM socket (should include the IIx, IIcx, IIci, IIfx, and IIsi), and the Quadra 700.

This particular repository contains the main firmware that runs on the programmer board. The current compiler version used with this project is avr-gcc 4.8.2. Using a different version of gcc may result in worse performance due to some very tight optimization performed on this project to decrease programming time.

Downloads

Binary downloads (originally from Google Code) can be found at https://github.com/dougg3/mac-rom-simm-programmer/tree/downloads/downloads

Repositories

The project is spread over a few repositories. Some of them have a wiki.

Repository Repository location Wiki location
Programmer Firmware (AVR microcontroller) https://github.com/dougg3/mac-rom-simm-programmer https://github.com/dougg3/mac-rom-simm-programmer/wiki
Bootloader (AVR microcontroller) https://github.com/dougg3/mac-rom-simm-programmer.bootloader
Programmer Software (Windows/Mac/Linux) https://github.com/dougg3/mac-rom-simm-programmer.software none
Windows Driver (.inf file, not needed on Windows 10) https://github.com/dougg3/mac-rom-simm-programmer.windriver none
Custom QextSerialPort for Programmer Software https://github.com/dougg3/doug-qextserialport-linuxnotifications none
QextSerialPort base https://github.com/qextserialport/qextserialport https://github.com/qextserialport/qextserialport/blob/wiki/Welcome.md
CAD for programmer, along with 2 MB and 8 MB SIMM PCBs https://github.com/dougg3/mac-rom-simm-programmer.cad none
Mac ROM patcher https://github.com/jpluimers/macrompatcher/ (from https://code.google.com/p/macrompatcher) none

Videos

ROM SIMM

What Where
IIci booting from ROM disk https://www.youtube.com/watch?v=SEFcQRmYtBI
Mac IIci Modified (Slower) Startup Chime https://www.youtube.com/watch?v=lyIIRtR3Aw0
Playing with IIci ROM - other death chimes https://www.youtube.com/watch?v=mlmt1AealLo
Mac IIci with a newer Mac's startup chime https://www.youtube.com/watch?v=bRJtMMYCf0E
Mac IIci with Super Mario Bros startup chime! https://www.youtube.com/watch?v=omL7mx0zxvI
Mac IIci Mario Startup Chime Part 2 -- Long! https://www.youtube.com/watch?v=Yen0omvBo2Y
Mac IIci - Another Custom Startup Chime https://www.youtube.com/watch?v=1R4W3mApAio

Regular ROM

Mac IIci ROM hack (custom startup icons): https://www.youtube.com/watch?v=LALaYy7ZLy0

Related articles

Blog posts

Others

Non-related articles