This document describes the CRO (Containers ROms) format, designed to group and describe ROMs for Amstrad CPC computers, all generations.
CRO is based on the Resource Interchange File Format (RIFF) using chunks to organize data.
RIFF is a binary format organized in independent chunks. It does not define the data semantics, only the structure.
A RIFF file consists of:
- a global header
- a sequence of chunks, possibly nested
Unknown chunks can be ignored safely.
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | ASCII "RIFF" |
| 0x04 | 4 | Total file size minus 8 bytes (uint32 LE) |
| 0x08 | 4 | Form Type for application format |
CRO files: Form Type = "CRO ".
| Field | Size | Description |
|---|---|---|
| Chunk ID | 4 | ASCII identifier |
| Chunk Size | 4 | Data size (uint32 LE) |
| Chunk Data | N | Payload |
| Padding | 0 or 1 | Align to even size |
Padding byte added if data size is odd.
CRO files: RIFF with Form Type "CRO "
Describes hierarchical ROM organization.
RIFF
└─ CRO␠
├─ GRRO
│ ├─ GLBL
│ ├─ GNUM
│ ├─ GMSK
│ ├─ ROM␠
│ │ ├─ RID␠
│ │ ├─ RTYP
│ │ ├─ RLOG
│ │ ├─ RPHY
│ │ └─ RDT␠
│ └─ ...
└─ ...
| Chunk ID | Purpose |
|---|---|
GNUM |
Unique group number |
GLBL |
Descriptive group label |
GMSK |
Address mask |
ROM |
ROM description |
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | "GRRO" |
| 0x04 | 4 | Chunk size (uint32 LE) |
| 0x08 | N | Sub-chunks: GNUM + GLBL + GMSK+ ROMs |
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | Unique number of group (uint32 LE, start at 0) |
| Offset | Size | Description |
|---|---|---|
| 0x00 | N | Description ASCII String |
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | Address mask (uint32 little-endian) |
GMSK defines a binary mask applied to the ROM address: effective_address = address & GMSK
This allows emulation of EEPROMs smaller than the available address space (e.g. CPC PLUS 19-bit addressing), by forcing ROM mirroring beyond the physical size.
| Chunk ID | Role |
|---|---|
RID |
ROM identifier |
RTYP |
Logical type |
RLOG |
Logical number |
RPHY |
Physical number |
RDT |
Binary data |
| Offset | Size | Description |
|---|---|---|
| 0x00 | N | ASCII string |
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | Logical type uint32 LE |
Values:
- 0x00000000 : ROM_LOW
- 0x00000001 : ROM_HIGH
- 0x00000002 : ROM_BANKABLE
- 0x00000003 : ROM_MF2
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | Logical selection number (uint32 LE, 0–255) |
| Offset | Size | Description |
|---|---|---|
| 0x00 | 4 | Physical ROM number (uint32 LE) |
| Offset | Size | Description |
|---|---|---|
| 0x00 | N | ROM raw contents |
CRO describes only:
- ROM organization
- intrinsic properties
- logical grouping
Not included:
- hardware ports
- selection registers
- activation/mapping
Interpretation is up to emulation or real hardware.
RIFF allows:
- new chunks to be added without breaking compatibility
- new properties to be introduced
- unrecognized chunks to be ignored
CRO is durable, extensible, and compatible with all CPC architectures.
