Overview
Thedevcpc build command compiles your complete project, including sprite conversion, screen loading, ASM compilation, C compilation, and DSK/CDT/CPR generation.
Syntax
Build Process (14 Steps)
The build process executes the following steps automatically:- Convert PNG sprites to ASM (if
SPRITES_PATHis defined) - Convert PNG screens to SCN (if
LOADER_SCREENis defined) - Compile ASM code with ABASM (if
ASM_PATHis defined) - Verify graphics limits (
_END_GRAPH < 42040) - Create DSK image
- Add ASM binary to DSK (8BP0.bin, 8BP1.bin, etc.)
- Add SCN screens to DSK (if
LOADER_SCREENis defined) - Compile C code with SDCC (if
C_PATHis defined) - Verify C memory limits (< 23999)
- Add BASIC files to DSK (if
BASIC_PATHis defined) - Add RAW files to DSK (if
RAW_PATHis defined) - Show DSK contents
- Create CDT tape image (if
CDTandCDT_FILESare configured) - Show CDT catalog
Output Example
Build Levels (8BP Projects)
For 8BP projects,BUILD_LEVEL determines which 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 | Scroll games | 24799 | |MAP2SP, |UMA | 17820 bytes |
| 3 | Pseudo-3D games | 23999 | |3D | 18620 bytes |
| 4 | Basic (no scroll/layout) | 25299 | Basic commands | 17320 bytes |
Sprite Conversion
IfSPRITES_PATH is configured in devcpc.conf:
- Scans all PNG files recursively
- Converts to ASM format compatible with Amstrad CPC
- Generates palette information
- Creates
sprites.asmready to include
Screen Loading
IfLOADER_SCREEN is configured:
- Converts PNG screens (160x200, 320x200, or 640x200)
- Generates SCN files in
obj/ - Creates
.scn.infofiles with palette data - Adds screens to DSK
C Compilation
IfC_PATH is configured:
- Compiles C code with SDCC
- Verifies memory limits (< 23999)
- Converts to binary format
- Adds to DSK
CDT Tape Generation
IfCDT and CDT_FILES are configured:
- Creates empty CDT
- Adds files in specified order
- Generates catalog
CDT_FILES is critical - files load sequentially.
CPR Cartridge Generation
IfCPR is configured:
- Converts DSK to CPR format
- Configures auto-boot command
- Patches ROMs (OS, BASIC, AMSDOS)
- Creates cartridge for GX-4000/Plus
Generated Files
Intermediate Files (obj/)
*.bin- Compiled binaries*.lst- Assembly listings*.map- Memory maps*.scn- Screen files*.scn.info- Palette information*.ihx- Intel HEX (C code)
Output Files (dist/)
*.dsk- Disk image*.cdt- Tape image (optional)*.cpr- Cartridge ROM (optional)
Validation
The build automatically validates:- Configuration is correct
- Source paths exist
- Graphics limits respected
- Memory limits respected
- Required tools installed
Error Handling
Performance
Build time depends on:- Number of PNG files to convert
- Size of ASM source code
- Number of files to add to DSK/CDT
- C code complexity
- Small project: 1-3 seconds
- Medium project: 3-8 seconds
- Large project: 8-15 seconds
Related Commands
devcpc clean- Remove generated filesdevcpc run- Build and executedevcpc validate- Validate before buildingdevcpc info- Show build configuration