NOTES ON A2620 AUTOCONFIGURATION by Dave Haynie OVERVIEW There are two basic autoconfiguration steps that take place on the A2620. The first of these is called ROM Configuration. This is specific only to A2620s, and is handled by the on-board ROMs. This configuration pass controls configuration of the operating system mode, on-board ROM location, and 68000 re-start. ROM Configuration can typically be done only after a full system reset, though there is a way to get the ROM Configuration registers back under CPU control. The second configuration step is called RAM Configuration. This step is handled just like any other autoconfig device, and is only used to autoconfigure the on-board RAM. ROM CONFIGURATION As in all autoconfigurable devices, the ROM Configuration device consists of a number of readable registers and one writable register. Some of the read registers look like normal autoconfiguration registers, while others are special purpose, specific to the A2620. The main difference is in the write register. It exists at BASE+$40 rather than BASE+$48, and everything that's written to it is special purpose A2620 information, rather than a base address. The ROM Configuration device reads as follows: Register D15 D14 D13 D12 00 1 1 1 0 02 0 1 1 RAMSIZ 04 1 0 1 0 06 1 1 1 1 08 1 1 1 1 0A 1 1 1 1 0C OSMODE 1 1 1 0E 1 1 1 1 10 1 1 1 1 12 1 1 1 1 14 1 1 1 1 16 1 1 1 1 18 1 1 1 1 1A 1 1 1 1 1C 1 1 1 1 1E 1 1 1 1 The $00/$02 register pair here is the same as a normal autoconfiguration device; this is explained in the RAM CONFIGURATION section. The main thing of interest to the ROMs here is probably the RAMSIZ bit, which will read 0 for two megs, 1 for four megs. The $04/$06 register pair is also the same as it would be in the normal autoconfiguration device. This is the product code, which is $50 for the A2620 (recall that in standard autoconfig all register pairs other than $00/$02 and the $40/$42 are logically inverted, so this actually READS $AF). Note that an A2630 is product code $51, which reads $AE. The $0C/$0E register pair contains one interesting bit, the OSMODE bit. This bit reads 0 when a preference for UNIX is indicated, 1 when a preference for AmigaOS is indicated. The $08/$0A register pair and all other registers, except for $40/$42, are unused by the ROM Configuration device. The ROM Configuration register at $40/$42 contains a number of interesting bits used by the on-board ROM code. The ROM Configuration register looks like this: Register Name 0 Phantom ROM Lo 1 Phantom ROM Hi 2 ROM Configure 3 JMODE 4 68KMODE - Reset Enable The Phantom ROM Lo and Phantom ROM Hi bits control where the on-board ROM shows up in memory (hence the name ROM Configuration). On a full reset, the ROMs appear overlaying the reset vector so they can take control over the system. When Phantom ROM Lo is written high, the ROMs disappear from low memory. When Phantom ROM Hi is written high, the ROMs disappear from their normal position at $F80000-$F8ffff. Unlike a normal address latch register, the ROM Configuration register can be written to repeatedly. As long as this register is kept 0, the register will stay in autoconfig space. If a 1 is written to the ROM Configure bit, the ROM Configuration device goes away, just like a normally configured autoconfig device. JMODE is another bit related to the mapping of the ROM Configuration device. When the ROM Configuration register is written with the JMODE bit 0 and ROM Configure bit 1, the ROM Configuration register goes away until a full system reset. If instead a 1 is written to the JMODE bit, the ROM Configuration register will still go away, but it can come back on a simple RESET (such as a CPU generated reset). This allows, for example, the ROM software to look at every autoconfig device in the system, reset, and get back the ROM Configuration register. 68KMODE is another special function. Normally this bit is kept at 0. If it's ever written 1, the 68020 goes away, completely, and the 68000 again takes over the system. The 68000 will stay in charge until the ROM configuration register is reset, which is either a full or simple reset, depending on the status of the JMODE bit. Note that all the A2620 RAM also disappears when the 68020 is shut off. The final function indicated isn't really a programmable bit, but it does deserve a mention. Due to the somewhat complicated reset logic on the A2620, a possible feedback path though the reset logic exists after a full reset. In order to avoid any problems this might cause on reset, the pathe between the 68020's reset and the motherboard's reset, used for CPU generated resets, is disabled on a full reset. The first write to the ROM Configuration register enables this path. Thus, the ROM software is required to write to the ROM Configuration register at least once before a CPU-initiated reset will work. RAM CONFIGURATION The RAM Configuration device is a standard Amiga autoconfig device. Providing the NORAM jumper is not in place, this register set will show up as a normal autoconfiguration device as soon as the ROM Configuration register has been written to. With the NORAM jumper in place, this register never gets mapped in. The RAM Configuration device reads as follows: Register D15 D14 D13 D12 00 1 1 1 0 02 0 1 1 RAMSIZ 04 1 0 1 0 06 1 1 1 1 08 1 0 1 1 0A 1 1 1 1 0C 1 1 1 1 0E 1 1 1 1 10 1 1 1 1 12 1 1 0 1 14 1 1 1 1 16 1 1 0 1 18 1 1 1 1 1A 1 1 1 1 1C 1 1 1 1 1E 1 1 1 1 The $00/$02 register pair indicates that this is a standard board type that gets linked into the free pool. If the RAMSIZ bit reads 0, it's a two meg board, if 1, a four meg board. The $04/$06 register pair is the product code, which is $50 for the A2620 (recall that in standard autoconfig all register pairs other than $00/$02 and the $40/$42 are logically inverted, so this actually READS $AF). Note that an A2630 is product code $51, which reads $AE. The $08/$0A register pair indicate that the board doesn't care what memory space it gets (though of course it'll only be put in the 8 meg space) and that it can't be shut up. The other bits in this register are reserved. The $10/$12 and $14/$16 register pairs form the manufacturer code word. The code value here is $0202, which is of course, Commodore. The all the other registers, except for the $48 base address latch, are unused by the ROM Configuration device. The single writeable register at $48 is the standard base address register -- the Amiga's OS writes the base address of this board to that location, and the board is then configured.