PCMCIA Hardware Registers¶
This page documents the PCMCIA (Personal Computer Memory Card International Association) hardware registers and memory windows exposed by the Amiga 600 and Amiga 1200 (the only Amiga models with a PCMCIA slot). The PCMCIA controller is integrated into the Gayle chip — see gayle.md for the Gayle register definitions.
The card.resource driver (introduced in AmigaOS 3.5) manages the slot and exposes the high-level API; this page documents the hardware layer that card.resource builds on.
PCMCIA memory windows¶
The PCMCIA card slot memory is mapped into the Amiga address space in four windows:
| Window | Address | Size | Purpose |
|---|---|---|---|
COMMON_MEMORY |
$600000 |
4 MB (COMMON_MEM_SIZE = $400000) |
PCMCIA common memory — bulk storage |
ATTRIBUTE_MEMORY |
$A00000 |
128 KB (ATTR_MEM_SIZE = $020000) |
Attribute memory — CIS tuples, configuration registers |
IO_MEMORY |
$A20000 |
128 KB (IO_MEM_SIZE = $020000) |
I/O space — for I/O cards (modems, network, etc.) |
FLASH_ROM |
$A40000 |
— | Flash ROM region (overlaps with gaylehedley register at $A40000) |
The card resource selects which window is active based on the card type and the current access pattern; the attribute window is always readable regardless of card ownership state.
Card status bits (returned by ReadCardStatus())¶
These bit values are returned by card.resource/ReadCardStatus() and reflect the current state of the inserted card. The bit layout matches the lower 7 bits of the Gayle status register.
| Bit | Flag | Meaning |
|---|---|---|
| 6 | CARD_STATUSF_CCDET |
Card-detect changed (card was inserted or removed since last call) |
| 5 | CARD_STATUSF_BVD1 |
Battery voltage detect 1 — battery is low, data at risk |
| 5 | CARD_STATUSF_SC |
Status change (alias of BVD1 in same bit position — see Gayle register 5) |
| 4 | CARD_STATUSF_BVD2 |
Battery voltage detect 2 — battery is low, data at risk |
| 4 | CARD_STATUSF_DA |
Digital audio (alias of BVD2 in same bit position) |
| 3 | CARD_STATUSF_WR |
Write-protect (card is in write-protected state) |
| 2 | CARD_STATUSF_BSY |
Card is busy |
| 2 | CARD_STATUSF_IRQ |
Card is requesting interrupt (alias of BSY in same bit position) |
CardMiscControl() bits¶
Bit flags for the card.resource/CardMiscControl() API.
| Bit | Flag | Meaning |
|---|---|---|
| 7 | CARD_INTF_SETCLR |
Set/clear control: bit 7 = 1 means set, 0 means clear (V39+) |
| 5 | CARD_INTF_BVD1 / CARD_INTF_SC |
Enable BVD1 / status-change interrupt (V39+) |
| 4 | CARD_INTF_BVD2 / CARD_INTF_DA |
Enable BVD2 / digital-audio interrupt (V39+) |
| 3 | CARD_DISABLEF_WP |
Disable write-protect (override the card's WP switch) |
| 2 | CARD_INTF_BSY / CARD_INTF_IRQ |
Enable busy/IRQ interrupt (V39+) |
| 1 | CARD_ENABLEF_DIGAUDIO |
Enable digital audio output |
CardProgramVoltage() values¶
Programming voltage to apply to the card slot.
| Value | Define | Voltage |
|---|---|---|
| 0 | CARD_VOLTAGE_0V |
Set to default (may equal 5 V) |
| 1 | CARD_VOLTAGE_5V |
5 V |
| 2 | CARD_VOLTAGE_12V |
12 V |
These values are passed to card.resource/CardProgramVoltage() to drive the GAYLEB_PROGRAM_5V and GAYLEB_PROGRAM_12V bits in the Gayle control register — see gayle.md.
Memory access speed constants¶
Used with card.resource/CardAccessSpeed() to select PCMCIA memory timing.
| Value | Define | Memory speed |
|---|---|---|
| 0 | CARD_SPEED_250NS |
250 ns (default) |
| 1 | CARD_SPEED_150NS |
150 ns |
| 2 | CARD_SPEED_100NS |
100 ns |
| 3 | CARD_SPEED_720NS |
720 ns |
Mapped to the Gayle control register bits:
CARD_SPEED_250NS EQU 0
CARD_SPEED_150NS EQU GAYLEF_MEMORY_SPEED0
CARD_SPEED_100NS EQU GAYLEF_MEMORY_SPEED1
CARD_SPEED_720NS EQU GAYLEF_MEMORY_SPEED0!GAYLEF_MEMORY_SPEED1
OwnCard() flags (CardHandle.cah_CardFlags)¶
| Bit | Flag | Meaning |
|---|---|---|
| 0 | CARDF_RESETREMOVE |
Reset the machine when the card is removed |
| 1 | CARDF_IFAVAILABLE |
Notify when card becomes available |
| 2 | CARDF_DELAYOWNERSHIP |
Delay ownership transfer until card is fully ready |
| 3 | CARDF_POSTSTATUS |
Post a status change notification |
ReleaseCard() flags¶
| Bit | Flag | Meaning |
|---|---|---|
| 0 | CARDF_REMOVEHANDLE |
Remove the handle from the card-resource list |
Amiga execute-in-place (XIP) tuple¶
The Amiga defines a custom PCMCIA tuple for execute-in-place software (games, etc. on ROM cards).
| Tuple code | Define | Meaning |
|---|---|---|
$91 |
CISTPL_AMIGAXIP |
Amiga XIP tuple |
The tuple body uses struct TP_AmigaXIP:
struct TP_AmigaXIP {
UBYTE TPL_CODE; /* always $91 */
UBYTE TPL_LINK;
UBYTE TP_XIPLOC[4]; /* location of XIP code */
UBYTE TP_XIPFLAGS; /* see XIPFLAGSF_* */
UBYTE TP_XIPRESRV;
};
| Flag bit | Define | Meaning |
|---|---|---|
| 0 | XIPFLAGSF_AUTORUN |
Auto-reset the machine if the XIP card is inserted after DOS has started (so the XIP code runs on next boot). May be ignored on some hardware — users would then need to manually reset. |
Standard PCMCIA tuple codes¶
The card driver also recognizes the standard PC Card tuples:
| Code | Define | Purpose |
|---|---|---|
$00 |
CISTPL_NULL |
Null tuple |
$01 |
CISTPL_DEVICE |
Device information |
$10 |
CISTPL_CHECKSUM |
Checksum verification |
$11 |
CISTPL_LONGLINK_A |
Long link to attribute memory |
$12 |
CISTPL_LONGLINK_C |
Long link to common memory |
$13 |
CISTPL_LINKTARGET |
Link target |
$14 |
CISTPL_NO_LINK |
No-link sentinel |
$15 |
CISTPL_VERS_1 |
Level 1 version |
$16 |
CISTPL_ALTSTR |
Alternate language string |
$17 |
CISTPL_DEVICE_A |
Attribute memory device info |
$18 |
CISTPL_JEDEC_C |
JEDEC info in common memory |
$19 |
CISTPL_JEDEC_A |
JEDEC info in attribute memory |
$40 |
CISTPL_VERS_2 |
Level 2 version |
$41 |
CISTPL_FORMAT |
Data format |
$42 |
CISTPL_GEOMETRY |
Partition geometry |
$43 |
CISTPL_BYTEORDER |
Byte order |
$44 |
CISTPL_DATE |
Card revision date |
$45 |
CISTPL_BATTERY |
Battery replacement date |
$46 |
CISTPL_ORG |
Organization |
$FF |
CISTPL_END |
End-of-list |
Card interface type¶
The card.resource/CardInterface() API distinguishes card interfaces:
| Value | Define | Meaning |
|---|---|---|
| 0 | CARD_INTERFACE_AMIGA_0 |
Standard Amiga PCMCIA interface |
Cross-references¶
gayle.md— Gayle chip register map (the hardware behind PCMCIA)../../library-reference/card-library.md—card.resourcefunction reference (17 functions:BeginCardAccess,OwnCard,CopyTuple,GetCardMap, ...)../register-reference.md— master register index