Skip to content

9MB of RAM on the Backlit Portable

The Macintosh Portable in its original configuration can map up to 9MB of RAM in its 16MB address space. Apple did not recommend this configuration, but third party hardware designers released 8MB RAM expansion cards to give the system 9MB in total.

However if you attempt to use an 8MB card on the model M5126 Backlit Macintosh Portable, you would see the total amount of RAM as 8MB, not 9MB.

The Problem

The backlight driver uses two registers, one read at 0xFC0200 to detect the backlight, and one write at 0xFC0202 to set backlight values.

The backlight upgrade kit for the model M5120 Portable implements this correctly with address decoding for those two addresses.

The model M5126 Portable instead uses the the SLOT_CS0 + A23 and SLOT_CS1 signals from the CPU GLU. SLOT_CS0 and SLOT_CS1 respond to 0xFC0200 and 0xFC0202 respectively, however due to their intended use for Slim Cards they also respond at other addresses depending on the mapping registers.
By default SLOT_CS0 will respond to any access to addresses 0x500000 through 0x8FFFFF. This combined with A23 means that any time 0xFC0200 or 0x800000 through 0x8FFFFF are accessed, the backlight identifier will be placed on the data bus, making the 9th MB of RAM unusable.

Workarounds

Additional Logic

You can disconnect the bodge wire going from A23 to U14H, then put an AND gate in between with A22 and A23 as inputs and connect the output to pin 5 of U14H.

Later boards that do not have this bodge wire would likely have to have the leg or trace cut on pin 5 of U14H, though I do not have one of these boards to test. Then you can connect the output of the AND gate to pin 5 of U14H.

Disconnecting A23-U14H

If you disconnect the bodge wire going from A23 to pin 5 on U14H, and then ground pin 5 on U14H (this is important, don't leave it floating) you can stop the backlight identifier from responding altogether.
This will mean the backlight driver will think that this is a stock M5120 with no backlight and the backlight controls will be unavailable.

Two possible options retain backlight control:

  • Patch the backlight driver to skip the check for the backlight identifier, always assuming the backlight is there.
  • Use an expansion card in the ROM, RAM, or PDS slots that mimics the backlight identifier.

Mapper Registers

You can use the mapper registers in the CPU GLU to reassign that region of memory from SLOT_CS0 to SLOT_CS1. This is undesireable as is however since this will cause writes to that region to write to the backlight, making the brightness change and flicker rapidly.

To do this, you can use the programmer's switch to bring up MicroBug or MacsBug (if installed). Then type sb fc0001 4 0 4 to set the two registers. Restart the computer to allow memory sizing to run again and discover the newly available RAM.