Project Structure
Configuration (devcpc.conf)
Main Assembly File (make_all_mygame.asm)
BASIC Loader (loader.bas)
Loader Explanation
- Line 10: Set MEMORY limit to 23599 (BUILD_LEVEL 0 requires this)
- Line 20-30: Load and initialize 8BP library
- Line 32-34: Configure screen mode and colors
- Line 40: Use integer variables for speed
- Line 50: Setup sprite 31 with image 16 and 9 frames
- Line 60-80: Position and display sprite
C Integration Example (ciclo.c)
Build and Run
Build the Project
- Converts PNG sprites to ASM format
- Converts PNG loading screens to SCN format
- Compiles assembly code with ABASM
- Compiles C code with SDCC (if configured)
- Creates DSK image with all files
- Creates CDT tape image (if configured)
Run in Emulator
Expected Output
Key Features Demonstrated
8BP Library Integration
- Complete 8BP library with all commands (BUILD_LEVEL 0)
- Sprite management with |SETUPSP, |LOCATESP, |PRINTSP
- Map-to-sprite conversion with |MAP2SP
- Hardware scrolling support
Music Support
- WYZ Tracker integration
- Multiple music tracks (.wyz, .mus files)
- Sound effects with percusiones.fx
- WYZ player v4.2 for CPC
Graphics Pipeline
- Automatic PNG to ASM sprite conversion
- Automatic PNG to SCN screen conversion
- Mode 0 support (160x200, 16 colors)
- Sprite tables and animation sequences
C Programming
- SDCC compiler integration
- 8BP wrapper for C functions
- Inline Z80 assembly in C code
- Mini BASIC compatibility layer
Memory Map
Next Steps
- Customize Graphics: Replace PNG files in
assets/sprites/andassets/screen/ - Add Music: Create or import .wyz files to
src/music/ - Modify Game Logic: Edit ASM files or C code
- Adjust Build Level: Change BUILD_LEVEL if you don’t need all 8BP features
- Test on Real Hardware: Use the generated DSK or CDT files
Related
- ASM Project Example - Pure assembly without 8BP
- BASIC Program Example - BASIC-only project
- Multi-File Projects - Organizing large projects
- Music & Sound - Music integration details