ACA1221LC Registers

From IndividualComputers
Jump to: navigation, search

ACA1221LC is an accelerator for the A1200 computer. It is also compatible with the ACA500 and ACA500plus. Key features are:

  • processor: MC68EC020-16 or MC68EC020-25 (QFP package)
  • two clock ports
  • 16 MBytes 32-bit fast RAM (up to 11.9 MBytes usable as fastmem)
  • 1MB Maprom option, RAM-disk option
  • variable clock speed, including synchronous operation
  • autoconfig with 512 bytes flash ROM
  • IDE speeder for A1200-IDE
  • prepared for use in A2000

Contents

jumper settings

  • set the "MapROM" jumper in order to activate "MapROM" from a cold-start: The physical ROM will be copied to RAM and MapROM bit will be set.
  • set the "unprotect" jumper to disable the autoconfig-ROM, enable writing to the Autoconfig-flash and revert to a very safe memory config

Memory configurations

The ACA1221LC supports a total of seven different memory configurations. It will always start with memory configuration #1 on a power-cycle.

# Z2-Start Z2-end CIA/Gayle area Trapdoor-start Trapdoor-end Total mem comment
0 n/a n/a n/a n/a n/a 0k
1 $20.0000 $9f.ffff $a8.0000-$be.ffff $c0.0000 $d7.ffff 11200k
2 $20.0000 $9f.ffff $a8.0000-$be.ffff $c0.0000 $d7.ffff 11200k Shuffle
3 $20.0000 $9f.ffff $a8.0000-$be.ffff $c0.0000 $d7.ffff 11200k IDE-speeder
4 $20.0000 $be.ffff n/a (linked with Z2) $c0.0000 $db.ffff 11968k
5 $28.0000 $be.ffff n/a (linked with Z2) $c0.0000 $db.ffff 11456k
6 $40.0000 $be.ffff n/a (linked with Z2) $c0.0000 $db.ffff 9920k
7 $48.0000 $be.ffff n/a (linked with Z2) $c0.0000 $db.ffff 9408k

Please note that the CIA/Gayle area will only be activated if an A1200 computer has been identified as the host computer. If the host system is not an A1200, the CIA/Gayle area is kept free, so accesses are visible on the main board bus, and operation with the ACA500plus is possible. It is recommended to check other system components before adding this chunk of memory. One example would be identification of the Lisa chip.

An additional 32k of memory is always available between $de.8000 and $de.ffff. This can be used for trampoline-code that switches between memory configurations, as it will never be mapped away and it will never change locations. Further, this memory area will also be available before the OS is up and running. If you need memory without a malloc() for ACA1221LC-specific software, this is your space, as no other program or the OS will be aware of it - it's unlikely that anything gets in your way.

All memory configurations can be set on all target computers. However, configurations 4-7 will overlay the PCMCIA ad IDE registers of A600/A1200 computers, so they should be avoided for those machines. Configurations 4-7 are mainly meant for use in A2000 computers in conjunction with the ACA2000. Configurations 1+3 are meant for use in A600/A1200 computers.

Memory config#2 gives access to physical memory areas that are not visible otherwise. It is mainly meant to give write access to the MapROM area, but also allows access to memory areas that can't be used as Fastmem at all - here's where a RAM disk or other fast storage space could be put. During "shuffle", the Z2 memory area is changed according to this table:

you access you get (A1200) you get (A2000)
$20.0000-$27.ffff Ram disk Ram-mirror
$28.0000-$3e.ffff Ram-mirror Ram-mirror
$3f.0000-$3f.ffff Ram disk Ram disk
$40.0000-$57.ffff Ram-mirror Ram-mirror
$58.0000-$5b.ffff Ram disk Ram-mirror
$5c.0000-$5e.7fff Ram disk Ram disk
$5e.8000-$5e.ffff Trampoline mirror Trampoline mirror
$5f.0000-$5f.ffff Ram disk Ram disk
$60.0000-$67.ffff lower 512k MapROM lower 512k MapROM
$68.0000-$77.ffff Ram disk Ram disk
$78.0000-$7f.ffff upper 512k MapROM upper 512k MapROM
$80.0000-$9f.ffff Ram disk Ram disk
$a0.0000-$a7.ffff PCMCIA registers Ram-mirror
$a8.0000-$be.ffff Ram-mirror Ram-mirror


All other memory areas remain the same, so you can still access chip ram, trapdoor memory, chip registers, Kickstart and the 32k trampoline area. It is recommended to switch off multitasking/IRQs before switching to this memory configuration. Do not touch the mirrors!

Registers

The ACA1221LC uses autoconfig, Vendor ID 4626 ($1212) and product ID 24 ($18). It is expected that the ACA1221LC is the first autoconfig device, and it will only work if it is mapped to $e9.0000 by the Amiga Kickstart. The 64k autoconfig space is divided into 16 4k-areas:

Overview

mem address description
$e9.0000 to $e9.0fff Autoconfig nibbles
$e9.1000 to $e9.1fff 32 bytes memory window. This window is fully read/writable, and you can access with any bus width (8-, 16- and 32-bit-wide). This 32-byte area is mirrored 128 times. It is recommended to only use the first 32 bytes.
$e9.2000 to $e9.2fff "trigger area". Writing to any location of this area can be considered "pressing enter". Only byte-wide write operations are recommended, as any higher width will also trigger a command twice (word-write) or even four times (longword-write). See further down for passing a command sequence. Reading this area will return the 0-terminated string "Found A1200. ". This can be used to compare against $e9.8000.
$e9.3000 to $e9.3fff status area of the card. Writing to this area has no effect. Reading this area returns the current status of the card in a single byte, which is mirrored 4096 times. See further down for a bit-by-bit description.
$e9.4000 to $e9.4fff Reading returns bytes 0-255 of flash data, mirrored 16 times. Writing does nothing.
$e9.5000 to $e9.5fff Reading returns bytes 256-511 of flash data, mirrored 16 times. Writing does nothing.
$e9.6000 to $e6.ffff Reading returns bytes 0-255 of ROM data, writing does nothing.
$e9.7000 to $e7.ffff Reading returns bytes 256-511 of ROM data, writing does nothing.
$e9.8000 to $e9.8fff Reading this area will return the 0-terminated string "Found A1200. " if the ACA1221LC has identified an A1200 as the host computer. Compare 16 bytes of this area against $e9.2000 to find out if the host machine is an A1200 and the IDE accelerator can be switched on. Writing to this area does nothing. In case the ACA1221LC is operated on the ACA500, ACA500plus or ACA2000, this area will return random data.
$e9.9000 to $e9.ffff Reading returns 0 if an A1200 has been found as the host computer. In case the ACA1221LC is operated on the ACA500, ACA500plus or ACA2000, this area will return random data. Writing does nothing.

The autoconfig nibbles point to ROM vector $4f00. This will let you use continuous read access from $e9.4f00 up to $e9.50ff. The same idea can be applied to the ROM area: If you start reading at $e9.6f00, you can use a continuous 512-byte ROM.

Status byte

bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
JP-Protect JP-MapROM MapROM MCFG2 MCFG1 MCFG0 Speed1 Speed0
  • JP-Protect will be 1 if the "unprotect" jumper is closed, otherwise 0
  • JP-MapROM will be 0 if the "MapROM" jumper is closed, otherwise 1
  • MapROM shows the current status of the 1MB MapROM option: 1=enabled
  • MCFG2 to MCFG0 bits will reflect the current memory configuration that has been set by the user.
  • Speed1 and Speed0 will show the current clock speed as set by the user.

Passing a command

In order to execute a command on the ACA1221LC, write it to the memory area in $e91000, then execute it by writing any value into the trigger-area, then read the result code in the memory area.

A command is always 1-byte (the first byte), and it may have up to 31 parameter bytes. If your command has less than 31 parameter bytes, it is recommended to fill the rest of the memory area with $00. Available commands:

  • $01: show version of the ACA1221LC card as result code in clear text, 0-terminated
  • $02: get card's warranty ID (=serial number), colour of the board and CPU mask set (0-terminated string)
  • $03: set memory cononfiguration. One parameter byte with the lower 3 bits valid is expected. Result code is "OK".
  • $04: set temporary CPU speed until next cold boot. One parameter byte contains the selected speed in bits 0 and 1. Result code is "OK".
  • $05: Activate Maprom. One parameter byte with the activation bit in LSB is required: Bit0=1 means "activate MapROM", Bit0=0 means "deactivate MapROM". Result code is "OK". When MapROM is activated, writes to the MapROM area in memory configuration #2 are inhibited: They stay within the ACA1221LC (host computer won't see these accesses), but have no effect on memory contents.
  • $06: Erase 512 bytes flash. Parameter bytes must be 0-terminated string "I AM SURE" and "unprotect" jumper must be set. Erasing means to set all 512 bytes to $ff. If the "I AM SURE"-string is not found, the result code will be "NO EFFECT". If the unprotect jumper is not set, you'll get "Error: Write protected.".

The $07 command (and all other unspecified commands) will show the version number of the ACA1221LC card in clear text, 0-terminated. This is identical to the $01 command.

Result codes: After execution of a command, a result code can be read in the memory area. The result code is clear text, ascii, 0-terminated.

Exact clock rates and clock switching

The base frequency of the ACA1221LC is 80MHz. Three of the four possible CPU clock rates are derived from this clock by whole-number division. Memory will always run at this main frequency, regardless of the CPU clock.

Use the $04 command to set CPU speeds. One parameter byte that can be $00, $01, $02 or $03 must follow.

  • Speed $00 sets the divider to 4; the resulting CPU speed is 20.0MHz
  • Speed $01 sets the divider to 3; the resulting CPU speed is 26.7MHz
  • Speed $02 deactivates the divider and uses the host computer's clock; the resulting CPU speed is 14.31818MHz for NTSC or 14.18758MHz for PAL
  • Speed $03 sets the divider to 2; the resulting CPU speed is 40.0MHz

For safety reasons, the ACA1221LC will always start from a power-up with speed setting $00=20.0MHz. The speed will not be changed on a reset.

Speed changes are glitch-free, meaning that you can switch from any speed stepping to any other speed stepping at any time. CPU mask E13G is known to work reliably at 40.0MHz, down to a minimum voltage of 4.95V on the 5V rail. CPU mask D76E will also work at 40MHz, but is more piccy about voltage: The 5V rail must have at least 5.05V measured behind the input coil of the Amiga. D76E will require forced air cooling at 40MHz and should be switched back to 26.7MHz after 30 minutes. Software should read the mask revision information from the warranty ID string and output this information if the user attempts so switch to 40MHz.

writing to flash

Writing to flash is automatically inhibited when the "unprotect" jumper is removed. If the jumper is closed, five changes are being made:

  • The MapROM jumper cannot be set for mechanical reasons: Both jumpers can't be closed at the same time, because they share one pin.
  • The Autoconfig ROM Diag Vector is disabled, so the computer won't attempt to use the flash contents on a cold-start. This is very useful if the flash contents are garbled and would keep the computer from starting.
  • Byte-wise transparent writing to flash is possible in $e9.4000 and $e9.5000. It is recommended to verify written data, as writing is only possible if the byte in question has been $ff before. Single bytes cannot be set to $ff. Only the whole 512-byte area can be erased at a time.
  • The Erase-Flash command $06 is enabled
  • Memory in $20.0000 to $9f.ffff is disabled, regardless of the chosen memory config. This can be used to create a memory config for an A2000 computer that requires the whole 8MB-Z2-area to be available.

IDE speeder

The IDE speeder will be activated by setting memory config #3. This will only have an effect if an A1200 computer has been identified as the host. The speedup is only activated for reading, not for writing. Activation means to switch to PIO mode 4. This can only be reached with very fast harddrives and with solid state media such as CF cards or SSDs. Note that most (if not all) CF cards do not have any cache or pre-fetch buffers like rotating-disk media has. You will therefore not get the full performance that you may expect from PIO mode 4: While the average CF card tops out between 4.0MB/s and 4.5MB/s, a harddisk with cache and multiblock-transfer capability will get you more than 7MBytes/s. Should you get checksum errors on your harddisk, it most likely means that the media is not capable of PIO mode 4. Use short cables, proper grounding and a good power supply to ensure turbo-IDE stability.

Personal tools
Namespaces

Variants
Actions
Navigation
Icomp
Print/export
Administration