Cross-platform Amstrad CPC emulation core (C++17). Emulates the CPC 464 / 664 / 6128 and CPC+ (ASIC): Z80 CPU, CRTC, Gate Array, PPI 8255, PSG AY-3-8912, FDC µPD765, tape, DMA, memory banking.
Used by:
- SugarboxV2 — Qt desktop emulator
- SugarConvDsk, SugarConvTape — disk/tape conversion tools
- SugarLibRetro — libretro core
Requirements: CMake ≥ 3.16, a C++17 compiler.
git clone https://github.com/Tom1975/CPCCore.git
cd CPCCore
git submodule update --init --recursivesudo apt-get install build-essential libgl1-mesa-dev libx11-dev \
libxrandr-dev libfreetype6-dev libglew-dev libjpeg-dev libudev-dev \
freeglut3-dev xvfb
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make allcmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build build --config Release
cmake --install buildmkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5
make -j$(sysctl -n hw.logicalcpu)The test suite covers FDC emulation, copy-protection schemes (Speedlock, Alkatraz, CodeMasters…), tape loading, and CPU correctness.
Build with tests enabled:
cmake .. -DCMAKE_BUILD_TYPE=Release -DGENERATE_UNITTESTS=TRUE
make allRun (Linux — requires a display or xvfb):
xvfb-run --auto-servernum ./UnitTests/Release/unitTestsRun (Windows):
.\build\UnitTests\Release\unitTests.exe| Option | Default | Description |
|---|---|---|
GENERATE_UNITTESTS |
OFF |
Build the unit test binary |
GENERATE_BENCHMARK |
OFF |
Build the benchmark binary |
CMAKE_POLICY_VERSION_MINIMUM |
— | Set to 3.5 when building with CMake 4.x |