Quick Start Guide
This guide will walk you through creating your first Amstrad CPC project using DevCPC CLI.Create Your First Project
Let’s create a new project called “my-game”:What Gets Created
Thedevcpc new command creates a complete project structure:
The
obj/ and dist/ directories are created during the build process.Navigate to Your Project
Configure Your Project
Open thedevcpc.conf file to configure your project:
devcpc.conf
Understanding BUILD_LEVEL
TheBUILD_LEVEL determines which 8BP library features are included:
| Level | Description | MEMORY | Commands | Size |
|---|---|---|---|---|
| 0 | All features | 23599 | |LAYOUT, |COLAY, |MAP2SP, |UMA, |3D | 19120 bytes |
| 1 | Maze games | 24999 | |LAYOUT, |COLAY | 17620 bytes |
| 2 | Scrolling games | 24799 | |MAP2SP, |UMA | 17820 bytes |
| 3 | Pseudo-3D games | 23999 | |3D | 18620 bytes |
| 4 | Basic (no scroll/layout) | 25299 | Basic commands | 17320 bytes |
Add Your Code
Now let’s add some code to your project.Assembly Code
Copy your assembly files to theASM/ directory:
BASIC Files
Create a simple loader inbas/loader.bas:
bas/loader.bas
Build Your Project
Now compile everything:Build Output
You’ll see output similar to this:What Was Generated
After building, check the generated files:Run in Emulator (Optional)
If you have RetroVirtualMachine installed, you can test your project:Project Structure Explained
Let’s understand each directory:Source Directories
ASM/ - Assembly Code
ASM/ - Assembly Code
Contains your Z80 assembly source files for 8BP projects.Key file:
make_all_mygame.asm - Main assembly file that includes all others.Example:bas/ - BASIC Files
bas/ - BASIC Files
Contains BASIC programs that are automatically added to the DSK.Common uses:
loader.bas- Loads and initializes your gamemenu.bas- Game menucredits.bas- Credits screen
.bas files in this directory are automatically included in the build.raw/ - Raw Binary Files
raw/ - Raw Binary Files
Contains binary files added to the DSK without AMSDOS headers.Use for:
- Custom data files
- Pre-compiled binaries
- Resource files
C/ - C Source Code
C/ - C Source Code
Optional: Contains C source files compiled with SDCC.Requires:
- SDCC installed
C_PATH,C_SOURCE, andC_CODE_LOCconfigured
assets/ - Graphics Resources
assets/ - Graphics Resources
Contains PNG images for automatic conversion.sprites/ - PNG sprites converted to ASM
- Mode 0: 16 colors, 2 pixels/byte
- Mode 1: 4 colors, 4 pixels/byte
- Mode 2: 2 colors, 8 pixels/byte
- Mode 0: 160x200 pixels
- Mode 1: 320x200 pixels
- Mode 2: 640x200 pixels
Generated Directories
obj/ - Intermediate Files
obj/ - Intermediate Files
Created during build. Contains:
*.bin- Compiled binary files*.lst- Assembly listings*.map- Memory maps*.scn- Converted screen files*.ihx- Intel HEX files (C)
devcpc clean.dist/ - Distribution Files
dist/ - Distribution Files
Created during build. Contains:
*.dsk- DSK disk image*.cdt- CDT tape image (if configured)*.cpr- CPR cartridge (if configured)
Common Commands
Here are the essential commands you’ll use:Build Workflow
A typical development workflow looks like this:Configure settings
Edit
devcpc.conf to set:- Project name
- Build level
- Source paths
- Emulator settings (optional)
Example: Complete Build
Let’s create a complete example project from scratch:Troubleshooting
Build fails with 'ASM_PATH not found'
Build fails with 'ASM_PATH not found'
Make sure Check the file exists:
ASM_PATH in devcpc.conf points to an existing file:BASIC files not appearing in DSK
BASIC files not appearing in DSK
Verify And your
BASIC_PATH is configured:.bas files are in that directory:Graphics limit exceeded
Graphics limit exceeded
Error:
_END_GRAPH exceeds 42040Your graphics are too large. Either:- Reduce sprite size/count
- Use a different MODE
- Optimize your graphics
Emulator won't start
Emulator won't start
Check:
- RVM_PATH is correct
- RetroVirtualMachine v2.0 BETA-1 R7 is installed
- File has execution permissions
Next Steps
Commands Reference
Learn all available DevCPC commands
Configuration
Deep dive into devcpc.conf options
Graphics Conversion
Convert PNG images to CPC formats
8BP Library
Learn about the 8BP game library