Skip to main content
Build levels in DevCPC determine which 8BP library features are included in your compiled program. Choosing the right build level is crucial for optimizing memory usage and ensuring your game has enough BASIC memory available.

What Are Build Levels?

The 8BP library for Amstrad CPC includes multiple features for game development: sprite handling, scrolling, layouts, pseudo-3D rendering, and more. Not all games need all features, so DevCPC allows you to select a build level that includes only what you need.
Higher build levels (4 = least features) free up more BASIC memory by excluding unused 8BP commands.

The 5 Build Levels

Level 0: Full Featured

All 8BP functionality included. Use when you need everything or aren’t sure yet.Memory: 23599 bytes
Size: 19120 bytes

Level 1: Maze Games

Layout and collision features for maze-style games.Memory: 24999 bytes
Size: 17620 bytes

Level 2: Scrolling Games

Map-to-sprite and update features for scrolling games.Memory: 24799 bytes
Size: 17820 bytes

Level 3: Pseudo-3D Games

3D rendering features for pseudo-3D games.Memory: 23999 bytes
Size: 18620 bytes

Level 4: Basic Features

Core sprite features only. Maximum memory available.Memory: 25299 bytes
Size: 17320 bytes

Detailed Build Level Comparison

LevelDescriptionMEMORY ValueLibrary SizeAvailable Commands
0All functionalities2359919120 bytes|LAYOUT, |COLAY, |MAP2SP, |UMA, |3D
1Maze games2499917620 bytes|LAYOUT, |COLAY
2Scrolling games2479917820 bytes|MAP2SP, |UMA
3Pseudo-3D games2399918620 bytes|3D
4Basic (no scroll/layout)2529917320 bytesCore sprite commands only

How to Choose Your Build Level

Use this decision tree to select the optimal build level:
1

Analyze Your Game Requirements

List all the 8BP features your game needs:
  • Tile-based layouts? → Consider Level 1
  • Scrolling maps? → Consider Level 2
  • 3D graphics? → Consider Level 3
  • Simple sprites only? → Consider Level 4
  • Not sure yet? → Use Level 0
2

Check Memory Requirements

Estimate how much BASIC memory your game logic needs:
  • Large BASIC programs → Choose higher build levels (more memory)
  • Small BASIC, complex 8BP → Level 0 is fine
3

Set BUILD_LEVEL in devcpc.conf

# Example: Scrolling platformer game
BUILD_LEVEL=2
4

Update MEMORY in Your BASIC Loader

10 REM Match MEMORY to your BUILD_LEVEL
20 MEMORY 24799  ' For BUILD_LEVEL=2
30 LOAD"8BP2.bin"
40 CALL &6B78

Configuration Example

In devcpc.conf:

PROJECT_NAME="platformer"

# Choose build level based on your needs
BUILD_LEVEL=2

# Rest of configuration...
ASM_PATH="asm/make_all_platformer.asm"
BASIC_PATH="bas"

In Your BASIC Loader (bas/loader.bas):

10 REM Platformer Game Loader
20 MODE 0
30 MEMORY 24799: REM For BUILD_LEVEL 2
40 LOAD"8BP2.bin"
50 CALL &6B78
60 REM Your game initialization here
The MEMORY value in your BASIC program must match the BUILD_LEVEL in devcpc.conf. Mismatches can cause crashes or memory corruption.

Build Level Binary Names

Each build level produces a uniquely named binary:
BUILD_LEVELBinary NameLoad From BASIC
08BP0.binLOAD"8BP0.bin"
18BP1.binLOAD"8BP1.bin"
28BP2.binLOAD"8BP2.bin"
38BP3.binLOAD"8BP3.bin"
48BP4.binLOAD"8BP4.bin"
DevCPC automatically sets the ASSEMBLING_OPTION variable in your ASM file based on BUILD_LEVEL.

Switching Build Levels

You can change build levels at any time:
# 1. Edit devcpc.conf
BUILD_LEVEL=4  # Change to level 4

# 2. Update your BASIC loader
# Change MEMORY and binary name to match

# 3. Clean and rebuild
devcpc clean
devcpc build

Memory Limit Verification

During build, DevCPC automatically checks:
Limit: _END_GRAPH < 42040Ensures sprite and graphics data don’t overflow into system memory.
✓ Graphics limit respected (40152 < 42040)
Limit: C_CODE_LOC + size < 23999Ensures C code doesn’t overwrite the 8BP library.
✓ C code memory OK (20000 + 3500 = 23500 < 23999)

Build Output Messages

When you run devcpc build, you’ll see:
═══════════════════════════════════════
  Compilar Proyecto: my_game
═══════════════════════════════════════

ℹ Build Level: 2 (Juegos con scroll)
ℹ Memoria BASIC: MEMORY 24799

✓ Compilación exitosa
✓ Límite de gráficos respetado (< 42040)

Best Practices

Start with Level 0

Begin development with Level 0 to access all features, then optimize later.

Match MEMORY Values

Always ensure your BASIC MEMORY statement matches the build level.

Test After Switching

Run devcpc validate and test thoroughly when changing build levels.

Document Your Choice

Add comments in devcpc.conf explaining why you chose a specific level.

Common Issues

Problem: Your code uses a command not available in your build level.Solution: Either:
  • Change to Level 0 or Level 2 (includes |MAP2SP)
  • Remove the unsupported command from your code
Problem: MEMORY value doesn’t match BUILD_LEVEL.Solution: Check your BASIC loader:
' BUILD_LEVEL=2 requires:
MEMORY 24799
LOAD"8BP2.bin"
Problem: Large BASIC program hitting memory limits.Solution: Use a higher build level:
  • Level 0 (23599) → Level 4 (25299) = +1700 bytes
  • Remove unused 8BP features

Next Steps

Configuration Guide

Learn how to configure BUILD_LEVEL and other settings

Project Structure

Understand where build outputs are stored

Build docs developers (and LLMs) love