Skip to main content
Home Forums 68kMLA Address mirroring on 128K/512K/Plus — #2
Post #2 by bigmessowires
Source Forum68kMLA
Category68k
Post DateWed, 7 Sep 2011 - 01:04
Original URLhttps://68kmla.org/bb/threads/address-mirroring-on-128k-512k-plus.23825/
Post
Another closely related question is the use of the memory overlay feature during boot-up. According to a few sources I've read, at boot-up an overlay bit is set, which maps a copy of ROM to $000000, and moves RAM to $600000. Later during boot-up, after all the memory tests have been performed, the overlay bit is cleared and the normal address mapping is restored. Here's how it's described in http://www.mac.linux-m68k.org/devel/plushw.php:

First, the processor is held in a wait state while a series of circuits getsthe system ready for operation. The VIA and IWM are initialized, and the

mapping of ROM and RAM are altered temporarily by setting the overlay bit in

VIA data register A. This places the ROM starting at the normal ROM

location $400000, and a duplicate image of the same ROM starting at address

0 (where RAM normally is), while RAM is placed starting at $600000. Under

this mapping, the Macintosh software executes out of the normal ROM

locations above $400000, but the MC68000 can obtain some critical low-memory

vectors from the ROM image it finds at address 0.

Next, a memory test and several other system tests take place. After the

system is fully tested and initialized, the software clears the VIA's

overlay bit, mapping the system RAM back where it belongs, starting at

address 0. Then the disk startup process begins.
However, based on my examination and disassembly of the 128K Mac ROM, this is incorrect. Very early in the boot-up process, the overlay bit is cleared, well before any memory tests are performed. Furthermore, no RAM accesses are ever made while the overlay bit is set, so this whole RAM relocation to $600000 thing might as well never have happened.

Anyone familiar with this process? Could this be something that differs between the 64K and 128K ROM behaviors? I haven't tried disassembling the 64K ROM yet.

mp.ls