Overview
CDT (Cass Data Tape) files are tape images for Amstrad CPC that store programs sequentially, like real cassette tapes. DevCPC can automatically generate CDT files alongside DSK images.What is a CDT?
CDT is the standard format for Amstrad CPC cassette tapes. Unlike DSK (random access), CDT stores files sequentially:- Sequential loading - Files load in order
- Tape-like behavior - Mimics real cassette tapes
- Authentic experience - True-to-original loading
- Variable size - Only uses space needed
Configuration
Add to yourdevcpc.conf:
Important: File Order
The order inCDT_FILES is critical - files are recorded and loaded sequentially:
File Types Supported
| Type | Extension | Description | CPC Load Command |
|---|---|---|---|
| BASIC | .bas | Tokenized BASIC | RUN" |
| Binary | .bin | Machine code | RUN"FILE" |
| Screen | .scn | Full screens | RUN"SCREEN" |
| Raw | .txt, etc | Data files | Direct read |
CDT Creation Process
Duringdevcpc build, if CDT is configured:
Step 1: Read Map File
DevCPC reads${PROJECT_NAME}.map to get:
- File type (BASIC, binary, screen, raw)
- Load address
- Execute address
Step 2: Validate Files
Checks that all files inCDT_FILES:
- Exist in
obj/directory - Are registered in map file
- Have valid metadata
Step 3: Create Empty CDT
Initializes the tape image:Step 4: Add Files in Order
Adds each file sequentially: BASIC/ASCII files:Step 5: Show Catalog
Displays tape structure:Build Output Example
Loading from CDT
From CPC (464)
From CPC (664/6128)
Models with disk drives need to switch to tape:devcpc run --cdt.
CDT vs DSK Comparison
| Feature | CDT (Tape) | DSK (Disk) |
|---|---|---|
| Access | Sequential | Random |
| Speed | Slow (~1-5 min) | Fast (~instant) |
| Load command | RUN" | RUN"FILE" |
| File order | Critical | Doesn’t matter |
| Size | Variable | Fixed (178KB) |
| Authenticity | High (retro) | Moderate |
| Use case | Demos, nostalgia | Development, games |
| Hardware | All CPCs | 664/6128/M4 |
When to Use CDT
✅ Use CDT for:- Authentic retro experience
- Demos and presentations
- Type-in programs
- Competitions requiring tape
- CPC 464 (tape-only model)
- Fast development cycle
- Random file access
- Multiple programs
- Frequent updates
Running CDT Files
Automatic Mode
RUN_MODE="auto" in config:
- If CDT exists and is configured → uses CDT
- Otherwise → uses DSK
Force CDT
RUN_MODE.
Force DSK
RUN_MODE.
Execution Modes
Configure indevcpc.conf:
| Mode | Behavior | Override |
|---|---|---|
auto | CDT if configured, else DSK | --dsk / --cdt |
dsk | Always DSK | --cdt |
cdt | Always CDT | --dsk |
Complete Example
Project Configuration
File Structure
Build and Run
Loading Sequence
What happens on CPC:- User types:
RUN" - Tape starts playing
- Loads intro.bas → runs animation
- Loads title.scn → shows title (from intro.bas)
- Loads loader.bas → sets up memory
- Loads 8BP2.bin → game starts
File Order Best Practices
Typical Game Order
- Intro - Quick BASIC animation/message
- Title screen - Visual while loading
- Loader - Sets up memory and palette
- Game binary - Main game code
Simple Game Order
- Loader - Basic setup
- Game - Game code
Demo Order
- Logo - Company/group logo
- Title - Demo title
- Demo - Demo code
Advanced CDT Features
Multiple Programs
CDT can contain completely separate programs:Data Files
Include data files in sequence:Screens as Loaders
Screens can auto-execute:Troubleshooting
CDT Not Created
Check configuration:Files Not Loading
Wrong order:- Loader must come before binaries
- Screens before code that displays them
- Files must be in
${PROJECT_NAME}.map - Build generates this automatically
- Check extension (.bas, .bin, .scn)
- Verify type in map file
Tape Errors on CPC
“Read error”:- Try
|TAPEfirst (664/6128) - Check emulator tape speed
- Verify CDT file not corrupted
- CDT loads sequentially
- Can’t skip files
- Must load in order
Manual CDT Operations
Best Practices
- Order matters - Plan loading sequence carefully
- Test early - Use
devcpc run --cdtfrequently - Keep it simple - Fewer files = faster loading
- Document order - Comment CDT_FILES in config
- Provide DSK too - Give users both options
See Also
- Disk Images - DSK format
- Compiling Code - How files are generated
- Emulator Integration - Testing CDT files
- Cartridge Images - CPR alternative