Skip to main content
The devcpc.conf file is the central configuration file for your DevCPC project. It controls compilation behavior, output formats, paths, and emulator settings.

Configuration File Location

The configuration file must be located in your project root:
my-project/
├── devcpc.conf    ← Configuration file
├── ASM/
├── bas/
└── ...
devcpc.conf is automatically created when you run devcpc new <project-name>.

Configuration Sections

The configuration file is organized into logical sections:

1. Basic Configuration

PROJECT_NAME (Required)

The name of your project, used for generated DSK, CDT, and CPR files.
PROJECT_NAME="MI_JUEGO"
Usage:
  • DSK filename: ${PROJECT_NAME}.dsk
  • CDT filename: ${PROJECT_NAME}.cdt
  • CPR filename: ${PROJECT_NAME}.cpr
  • Map filename: ${PROJECT_NAME}.map
Use uppercase and avoid spaces. Use underscores instead: MY_GAME not my game.

BUILD_LEVEL (Required for 8BP Projects)

Determines which 8BP features are included (0-4). See Build Levels for details.
BUILD_LEVEL=0
ValueDescriptionMEMORY Value
0All functionalities23599
1Maze games24999
2Scrolling games24799
3Pseudo-3D games23999
4Basic features25299

2. Source Code Paths

Path to your main assembly file (not a directory).
# For 8BP projects - points to main assembly file
ASM_PATH="asm/make_all_mygame.asm"
For non-8BP ASM projects, use these additional variables:
ASM_PATH="ASM"           # Directory path
SOURCE="main"            # Source filename (without .asm)
TARGET="program"         # Output binary name
LOADADDR=0x1200         # Load address
Optional: Comment out if not using assembly code.
Path to directory containing BASIC files. All .bas files are automatically added to the DSK.
BASIC_PATH="bas"
What it does:
  • Scans directory for *.bas files
  • Adds each file to DSK with its original name
  • Files appear in DSK catalog as LOADER.BAS, MENU.BAS, etc.
Optional: Comment out if not using BASIC.
Path to directory containing raw binary files (no AMSDOS header).
RAW_PATH="raw"
Use cases:
  • Custom data files
  • Pre-compiled binaries from other tools
  • Graphics or sound data
Optional: Comment out if not using raw files.
Configuration for C code compilation with SDCC.
C_PATH="C"
C_SOURCE="main.c"
C_CODE_LOC=20000
Variables:
  • C_PATH: Directory containing C source
  • C_SOURCE: Main C file to compile
  • C_CODE_LOC: Memory address where C code loads
Memory constraint:
C_CODE_LOC + compiled_size < 23999
Requires SDCC compiler installed. C code must not exceed address 23999 to avoid overwriting 8BP library.

3. Output Directories

Control where build artifacts are stored.
# Intermediate build files (.bin, .lst, .map, .ihx)
OBJ_DIR="obj"

# Final distributable files (.dsk, .cdt, .cpr)
DIST_DIR="dist"

# Disk image filename
DSK="${PROJECT_NAME}.dsk"
These directories are automatically created during build and removed with devcpc clean.

4. Tape Image (CDT) Configuration

Generate cassette tape images alongside your DSK.
# Enable CDT generation
CDT="${PROJECT_NAME}.cdt"

# Files to include in tape (order matters!)
CDT_FILES="loader.bas 8BP0.bin main.bin"
CDT - Filename for the tape image
CDT="${PROJECT_NAME}.cdt"  # Uses project name
# or
CDT="my_tape.cdt"          # Custom name
CDT_FILES - Space-separated list of files to include
CDT_FILES="loader.bas 8BP0.bin game.bin screen.scn"
Comment out CDT and CDT_FILES to disable tape generation.

5. Cartridge (CPR) Configuration

Generate cartridge files for GX-4000 and CPC Plus.
# Enable CPR generation
CPR="${PROJECT_NAME}.cpr"

# File to auto-execute on boot (no 'run' command needed)
CPR_EXECUTE="loader.bas"
CPR="${PROJECT_NAME}.cpr"  # Uses project name
# or
CPR="my_cartridge.cpr"     # Custom name
The cartridge is generated from your DSK image.
Specifies which file runs when the cartridge is inserted.
# Just the filename - DevCPC adds run" automatically
CPR_EXECUTE="disc"        # Default DSK program
CPR_EXECUTE="8BP0.BIN"    # Direct binary
CPR_EXECUTE="loader.bas"  # BASIC loader
Do not include run" in the value - DevCPC handles this automatically.
# ✅ Correct
CPR_EXECUTE="loader.bas"

# ❌ Wrong
CPR_EXECUTE='run"loader.bas"'
Compatibility:
  • ✅ GX-4000 (console)
  • ✅ CPC 464+
  • ✅ CPC 6128+
  • ❌ CPC 464/664/6128 (no cartridge port)
Comment out CPR to disable cartridge generation.

6. Emulator Settings

Configure RetroVirtualMachine for testing with devcpc run.
# Path to RetroVirtualMachine executable
RVM_PATH="/Applications/Retro Virtual Machine 2.app/Contents/MacOS/Retro Virtual Machine 2"

# CPC model to emulate (464, 664, 6128)
CPC_MODEL=464

# File to auto-execute (DSK only)
RUN_FILE="8BP0.BIN"

# Execution mode: "auto", "dsk", or "cdt"
RUN_MODE="auto"
Platform-specific paths:macOS:
RVM_PATH="/Applications/Retro Virtual Machine 2.app/Contents/MacOS/Retro Virtual Machine 2"
Linux:
RVM_PATH="/usr/local/bin/RetroVirtualMachine"
Windows (WSL):
RVM_PATH="/mnt/c/Program Files/RetroVirtualMachine/RetroVirtualMachine.exe"
Only v2.0 BETA-1 R7 (10/07/2019) supports the development features required by DevCPC.
All emulator settings are optional. Comment them out if not using devcpc run.

7. Graphics Conversion Settings

Automatically convert PNG images to CPC formats during build.
# CPC screen mode for conversions (0, 1, or 2)
MODE=0

# --- Sprites (PNG → ASM) ---
SPRITES_PATH="assets/sprites"
SPRITES_OUT_FILE="ASM/sprites.asm"
SPRITES_TOLERANCE=8
SPRITES_TRANSPARENT_INK=""

# --- Loading Screens (PNG → SCN) ---
LOADER_SCREEN="assets/screen"
CPC screen mode affects resolution and colors:
ModeResolutionColorsPixels/Byte
0160×200162
1320×20044
2640×20028
MODE=0  # Standard for most games
MODE=1  # Higher resolution, fewer colors
MODE=2  # Monochrome, highest resolution
Requires Pillow: Install with pip3 install Pillow to enable graphics conversion.

Complete Configuration Example

Here’s a fully configured devcpc.conf for a scrolling platformer game:
# ==============================================================================
# Platformer Game - DevCPC Configuration
# ==============================================================================

# Basic Settings
PROJECT_NAME="PLATFORMER"
BUILD_LEVEL=2  # Scrolling games - includes MAP2SP, UMA

# Source Paths
ASM_PATH="asm/make_all_platformer.asm"
BASIC_PATH="bas"

# Output Directories
OBJ_DIR="obj"
DIST_DIR="dist"
DSK="${PROJECT_NAME}.dsk"

# Generate both tape and cartridge versions
CDT="${PROJECT_NAME}.cdt"
CDT_FILES="loader.bas 8BP2.bin level1.bin level2.bin"

CPR="${PROJECT_NAME}.cpr"
CPR_EXECUTE="loader.bas"

# Emulator Configuration
RVM_PATH="/Applications/Retro Virtual Machine 2.app/Contents/MacOS/Retro Virtual Machine 2"
CPC_MODEL=464
RUN_FILE="8BP2.BIN"
RUN_MODE="auto"

# Graphics Conversion
MODE=0
SPRITES_PATH="assets/sprites"
SPRITES_OUT_FILE="ASM/sprites.asm"
SPRITES_TOLERANCE=8
LOADER_SCREEN="assets/screen"

Validation

Verify your configuration before building:
devcpc validate
Checks performed:
  • ✅ Required variables set (PROJECT_NAME, BUILD_LEVEL)
  • ✅ Configured paths exist
  • ✅ Required files present (e.g., ASM main file)
  • ✅ Tools installed (Python, SDCC if needed)
Example output:
═══════════════════════════════════════
  Validar Proyecto: PLATFORMER
═══════════════════════════════════════

→ Validando configuración...
✓ PROJECT_NAME: PLATFORMER
✓ BUILD_LEVEL: 2 (Juegos con scroll)

→ Validando rutas...
✓ ASM_PATH: asm/make_all_platformer.asm
✓ BASIC_PATH: bas (2 archivo(s) .bas)

→ Validando herramientas...
✓ Python 3 instalado
✓ Pillow instalado

═══════════════════════════════════════
  Resumen de Validación
═══════════════════════════════════════

✓ Proyecto válido - Sin errores ni advertencias

Viewing Current Configuration

devcpc info
Displays your current project settings:
═══════════════════════════════════════
  Configuración del Proyecto
═══════════════════════════════════════

Proyecto:        PLATFORMER
Build Level:     2

Rutas configuradas:
  ✓ ASM:    asm/make_all_platformer.asm
  ✓ BASIC:  bas

Directorios:
  Objetos:  obj
  Salida:   dist
  DSK:      PLATFORMER.dsk
  CDT:      PLATFORMER.cdt
  CPR:      PLATFORMER.cpr

Emulador:
  Modelo:   464
  Modo:     auto

Configuration Best Practices

Use Comments

Document why you chose specific settings, especially BUILD_LEVEL.
# Using level 2 because game needs
# MAP2SP for tile streaming
BUILD_LEVEL=2

Comment Unused Options

Keep optional settings commented until needed. Makes config cleaner.
# Uncomment when adding C code:
#C_PATH="C"
#C_SOURCE="main.c"

Use Variables

Leverage ${PROJECT_NAME} for consistency.
DSK="${PROJECT_NAME}.dsk"
CDT="${PROJECT_NAME}.cdt"
CPR="${PROJECT_NAME}.cpr"

Version Control

Commit devcpc.conf to your repository. Others can build with the same settings.

Common Configuration Patterns

PROJECT_NAME="simple_game"
BUILD_LEVEL=4
ASM_PATH="asm/make_all_simple.asm"
BASIC_PATH="bas"
OBJ_DIR="obj"
DIST_DIR="dist"
DSK="${PROJECT_NAME}.dsk"
PROJECT_NAME="c_game"
BUILD_LEVEL=0
ASM_PATH="asm/make_all_c_game.asm"
BASIC_PATH="bas"
C_PATH="C"
C_SOURCE="main.c"
C_CODE_LOC=20000
OBJ_DIR="obj"
DIST_DIR="dist"
DSK="${PROJECT_NAME}.dsk"

Next Steps

Build Levels

Learn how to optimize memory with BUILD_LEVEL

Project Structure

Understand where files are located

Quickstart Guide

Start building your first project

Commands Reference

Explore all available commands

Build docs developers (and LLMs) love