#demo #dsk #z80 #sna #amstrad

nightly cpclib

Set of tools and libraries to ease demomaking on the Amstrad CPC platform. WIP

27 releases

Uses new Rust 2024

0.11.0 Jul 19, 2025
0.10.0 Nov 17, 2024
0.9.0 Aug 5, 2024
0.8.0 Jul 11, 2024
0.2.8-beta Dec 28, 2018

#137 in Emulators

Download history 5/week @ 2025-10-24

1,919 downloads per month
Used in 3 crates (via cpclib-imgconverter)

MIT and AGPL-3.0-only

4MB
64K SLoC

Rust 43K SLoC // 0.0% comments C 16K SLoC // 0.2% comments Assembly 2.5K SLoC // 0.3% comments GNU Style Assembly 1.5K SLoC C++ 402 SLoC // 0.0% comments Visual Studio Project 224 SLoC Python 88 SLoC Visual Studio Solution 30 SLoC Shell 1 SLoC

cpclib

cpclib is a library that aims at helping to develop Amstrad CPC demos. Maybe it could be usefull for other z80 platform or even games. None of the functionalities are 100% functional. I have only implemented the subset I need for my current Amstrad CPC demo project. Several tools are provided in addition to library.

There are more are less able to do:

  • assemble z80 source code.
    • Mainly interesting for auto-generated code, not for handcrafted one.
    • Not all opcodes are managed.
    • Functionalities not available in other assemblers:
      • Injection of basic source code (WIP)
      • Function able to provided the opcode value of an instruction or its standard duration
  • manipulate .sna files
    • Minimal support of chunks at the moment
  • convert images to CPC format. Usable for standard resolutions/modes
  • manipulate DSK (trying to mimick iDSK or dskmanager). Able to format and add files
  • communicate with cpcwifi board
    • Replication of xfer utility.
    • Only reset and run file have been coded at the moment
    • In opposite to the original xfer tool, cpclib one is able to start snapshots V3 (there are simply converted as snapshot v2 on the fly)
  • create basic tokens from basic source (WIP)

Dependencies

~29–48MB
~766K SLoC