Standard Project Layout
When you create a new project withdevcpc new, the following structure is generated:
Core Directories
Source Code Directories
ASM/ - Assembly Source
ASM/ - Assembly Source
Contains Z80 assembly source code for the 8BP library. The main file (typically
make_all_mygame.asm) serves as the entry point that includes all other ASM files.Key points:- Set via
ASM_PATHindevcpc.conf - Must point to the main
.asmfile (not the directory) - Example:
ASM_PATH="asm/make_all_mygame.asm" - Auto-generated
sprites.asmplaced here ifSPRITES_PATHis configured
bas/ - BASIC Programs
bas/ - BASIC Programs
Stores BASIC program files (
.bas) that are automatically added to the DSK during build.Key points:- Set via
BASIC_PATHindevcpc.conf - All
.basfiles are automatically included in the DSK - Common use: loader programs, menus, game logic
- Example:
BASIC_PATH="bas"
C/ - C Source Code
C/ - C Source Code
Optional directory for C code compiled with SDCC. Requires proper wrapper files to interact with 8BP.Key points:
- Set via
C_PATHandC_SOURCEindevcpc.conf - Requires SDCC compiler installed
- Must specify load address with
C_CODE_LOC - Memory limit: must be < 23999 to avoid overwriting 8BP
raw/ - Raw Binary Files
raw/ - Raw Binary Files
Optional directory for raw binary files added to the DSK without AMSDOS headers.Key points:
- Set via
RAW_PATHindevcpc.conf - Files added as-is without modification
- Useful for custom data files
Asset Directories
assets/sprites/
PNG image files for sprites. Automatically converted to ASM format during build.Configuration:
SPRITES_PATH="assets/sprites"SPRITES_OUT_FILE="ASM/sprites.asm"- Searches recursively for PNG files
assets/screen/
PNG image files for loading screens. Converted to SCN format and added to DSK.Configuration:
LOADER_SCREEN="assets/screen"MODE=0(or 1, 2)- Resolution: 160x200 (Mode 0), 320x200 (Mode 1), 640x200 (Mode 2)
Build Output Directories
obj/ - Intermediate Files
obj/ - Intermediate Files
Contains intermediate build artifacts. This directory is generated during compilation.Contents:
*.bin- Compiled binary files (e.g.,8BP0.bin)*.lst- Assembly listing files*.map- Memory map files*.scn- Converted screen files*.scn.info- Screen palette information*.ihx- Intel HEX files (from C compilation)
OBJ_DIR="obj"indevcpc.conf- Cleaned with
devcpc clean
dist/ - Final Output
dist/ - Final Output
Contains the final distributable files: DSK, CDT, and CPR images.Contents:
*.dsk- Disk image (always generated)*.cdt- Tape image (optional, ifCDTconfigured)*.cpr- Cartridge file (optional, ifCPRconfigured)
DIST_DIR="dist"indevcpc.confDSK="${PROJECT_NAME}.dsk"- Cleaned with
devcpc clean
Configuration File
devcpc.conf
Thedevcpc.conf file is located in the project root and contains all configuration settings. It defines:
- Project name and build level
- Source code paths (ASM, BASIC, C, RAW)
- Output directories and file names
- Graphics conversion settings
- Emulator configuration
- CDT and CPR generation options
File Naming Conventions
DevCPC follows specific naming conventions to ensure compatibility with Amstrad CPC file systems.
Assembly Files
- Main file:
make_all_<projectname>.asm - Support files:
images_<projectname>.asm,music_<projectname>.asm - Generated sprites:
sprites.asm
Output Binaries
- 8BP binaries:
8BP0.bin,8BP1.bin,8BP2.bin,8BP3.bin,8BP4.bin- Numbering corresponds to BUILD_LEVEL
- C binaries:
<C_SOURCE>.bin(e.g.,main.bin)
Screen Files
- SCN files:
<basename>.scn(e.g.,title.png→title.scn) - Info files:
<basename>.scn.info
Best Practices
Keep Source Organized
Group related files in subdirectories within
assets/sprites/ and maintain clear naming conventions.Comment Your Config
Use comments in
devcpc.conf to document optional features you’re not using.Version Control
Commit source directories (
ASM/, bas/, assets/). Exclude build outputs (obj/, dist/).Clean Builds
Run
devcpc clean before important builds to ensure fresh compilation.What Gets Generated
When you rundevcpc build, the build system:
-
Converts graphics (if configured):
- PNG sprites → ASM in
ASM/sprites.asm - PNG screens → SCN in
obj/*.scn
- PNG sprites → ASM in
-
Compiles source code:
- Assembly →
obj/8BP<N>.bin - C code →
obj/<name>.bin(if C_PATH configured)
- Assembly →
-
Creates disk image:
- Generates
dist/<PROJECT_NAME>.dsk - Adds all binaries, BASIC files, screens, and RAW files
- Generates
-
Optional outputs (if configured):
- Tape image:
dist/<PROJECT_NAME>.cdt - Cartridge:
dist/<PROJECT_NAME>.cpr
- Tape image:
All source files remain unchanged. DevCPC only generates files in
obj/ and dist/.Next Steps
Build Levels
Learn about the 5 build levels and memory optimization
Configuration
Deep dive into devcpc.conf settings