Project Structure
Configuration (devcpc.conf)
BASIC Program (loader.bas)
Line-by-Line Explanation
Line 10: MODE 1- Sets screen mode 1 (320x200 pixels, 4 colors)
- Uses 16KB of video memory
- Sets border color to white (INK 26)
INK 0,26- Pen 0 = WhiteINK 1,0- Pen 1 = BlackINK 2,9- Pen 2 = Bright GreenINK 3,18- Pen 3 = Green
LOAD "KEY.SCN",&C000- Loads screen image directly to video memory&C000is the video memory base address- SCN file is 16384 bytes (16KB full screen)
LOCATE 12,20- Position cursor at column 12, row 20PRINT- Display message over the loaded screen
CALL &C000- Call machine code at &C000 (if any)GOTO 70- Loop forever
Raw Data File (texto.txt)
- Store level data
- Include text files
- Add custom binary data
- Bypass AMSDOS header requirements
Build and Run
Validate Project
Build Project
Run Project
Working with Loading Screens
Creating PNG for Mode 1
Your PNG must be:- Resolution: 320x200 pixels exactly
- Colors: Maximum 4 colors from CPC palette
- Format: PNG (any bit depth)
CPC Palette for Mode 1
Use these RGB colors in your image editor:Loading Screens in BASIC
Loading Screens from ASM
Cartridge (CPR) Support
What is CPR?
CPR files are cartridge images for:- GX-4000 - Amstrad’s console
- CPC 464+ - CPC with cartridge port
- CPC 6128+ - CPC with cartridge port
CPR Configuration
CPR Build Output
Using CPR Files
- Emulator: Load CPR in RetroVirtualMachine or similar
- Real Hardware: Flash to cartridge with appropriate tools
- GX-4000: Use with cartridge adapter
Creating Tape (CDT) Images
CDT Configuration
Loading from Tape
On the CPC:- Auto-play
- Load
loader.bas - Execute automatically
Multiple Files on Tape
Working with RAW Files
What are RAW Files?
RAW files are added to the DSK without AMSDOS headers:- No load address
- No execute address
- No file type
- Just raw bytes
Use Cases
- Level Data: Store game levels as binary data
- Text Files: Include messages or dialog
- Custom Formats: Your own file formats
- Large Data: Bypass AMSDOS limitations
Loading RAW Files in BASIC
Loading RAW Files in ASM
RAW files must be loaded using BIOS calls:Memory Considerations
Screen Memory
BASIC Memory
Complete Example: Multi-Screen Demo
Enhanced loader.bas
devcpc.conf for Multi-Screen
Troubleshooting
”Screen not displaying”
- Verify PNG is exactly 320x200 for Mode 1 (or 160x200 for Mode 0)
- Check you’re using maximum 4 colors from CPC palette
- Ensure MODE is set before LOAD
”File not found on DSK”
- File names are truncated to 8 characters
- Extension is max 3 characters
- Use uppercase in BASIC:
LOAD"FILE.BAS"
”Colors wrong”
- Set INK values AFTER MODE command
- Use .scn.info file to see detected palette
- Match INK colors to those detected
Next Steps
- Add More Screens: Create multiple PNG files for different scenes
- Interactive Menus: Use INKEY$ for menu selection
- Load Binaries: Add machine code with
LOAD"PROG.BIN",&4000 - Data Files: Store level data in RAW files
- Test on Real CPC: Use the generated DSK or CDT
Related
- 8BP Game Example - Using 8BP library
- ASM Project Example - Assembly programming
- Loading Screens - Detailed screen creation guide
- Multi-File Projects - Organizing larger projects