Jul 142016

A new version of the SDCC C compiler is available. You can use SDCC to develop for the Amstrad CPC, e.g. with using the SDCC Code::Blocks template or the programming tutorials by Mochilote or with the new CPCtelera framework. The new version contains also some features for the Z80 port, so be sure to update it. You can download it from http://sdcc.sourceforge.net.


  • Merged upstream binutils 2.25
  • New memory management with lower overhead
  • Changed default language dialect to –std-sdcc11
  • Diagnostic for missing type specifier: No implicit int outside of C90 mode anymore
  • C11 generic selections
  • char type is now unsigned by default (old behaviour can be restored using –fsigned-char)
  • Character constants are now of type int instead of char.
  • ISO C95 and ISO C11 wide character constants
  • ISO C95 and ISO C11 wide string literals
  • Basic standard library support for wide characters: c16rtomb(), mbrtoc16(), mbsinit(), mbtowc(), mbrlen(), mbrtoc32, c32rtomb(), mbrtowc(), wcrtomb(), mblen(), wctomb()
  • Treat all ports the same in the manual (i.e. mcs51-specific stuff is now clearly described as such)
  • Reorganized interrupt handling for z80, z180, r2k, r3ka, tlcs90, gbz80 backends
  • Workaround for stm8 division hardware bug
  • ELF/DWARF support for stm8
  • Output symbol table for ELF
  • pic16 port now uses standard-compliant crt0iz that initializes static and globals to 0 by default
  • Numerous feature requests and bug fixes
Apr 202016

A new version of CPCtelera, the Amstrad CPC game engine for C developers, was just released in version 1.4. CPCtelera offers a huge C library for the SDCC C cross-compiler, which makes it easier to create games and applications for the Amstrad CPC. This version features a new license (LGPL), support for the CPCRSLib, a lot of new examples and a huge load of new methods and optimisations (see the changelist below). It is available for Windows, Linux and OS-X. You can get the latest version from GitHub and discuss it in the CPCWiki forums.

Changes in v1.4:

  • Low-level library, scripts, building system and examples moved to LGPL license to suit more developer needs.
  • Added CPCRSLib installer script (cpct_installrslib): automatically installs and configures CPCRSLib to be used along with CPCtelera.
  • Added -c modifier to cpct_mkproject to let the user create CPCRSLib enabled projects.
  • Improved cpct_drawSpriteMaskedAlignedTable to work with un-aligned sprites. Only 256-bytes transparency table shall be aligned now.
  • Added interrupt unsafe functions for keyboard scanning
  • Improved img2cpc sprite generation: explicit array width*height sizes and automatic size constants generation.
  • Added new high-quality random number generators: Marsaglia XORShift 8/16/32 bits and Marsaglia XORShitf+ 40 bits state.
  • Simplified use of random number generators with standard macros cpct_rand and cpct_srand, to work like C functions rand/srand.
  • Added simple user example for random number generation: easy/random.
  • Added macro IMG2SPRITES for automatically converting tilemap TMX files into C arrays on typing “make”.
  • Added macro TMX2C for automatically converting image files into sprites (C-arrays), tiles and tilesets on typing “make”.
  • Added configuration files image_conversion.mk and tilemap_conversion.mk to easily include TMX2C and IMG2SPRITES macros for all user assets in the project.
  • Added new conversion options to cpct_tmx2csv: generation of C/H files, different output folder, and custom c-identifier generation.
  • Added new macros cpctm_createTramsparentMaskTable and cpctm_declareMaskTable to easily define and create 256-bytes aligned transparency tables, greatly simplifying the process.
  • Added Horizontal Sprite flipping functions: for Modes 0, 1 & 2 and normal/masked sprites, working from RAM and ROM, to suit different user needs.
  • Added user examples for horizontal flipping functions. C-examples: flipAnimM2, flipSprites. ASM-examples: hflipSpriteM1, flipMaskSprite.
  • Added macro cpctm_screenPtr to do static calculation of screen memory pointers, saving CPU and binary space when calculating constant locations.
  • Updated old examples to use new macros, especially cpctm_screenPtr.
  • Improved cpct_img2tileset output messages and success status check. Also added an option to output harware converted palette values.
  • Added CPCT_VMEM_START macro defining video memory start: standarizes its uses.
  • Updated hello world template example to use new macros, simplifying its code.
  • Added assembly macros for undocumented Z80 opcodes: used to clarify code.
  • Added ultra-optimized assembly macros for bit and pixel reversing inside bytes: they can reverse pixels inside a byte for modes 0, 1 and 2.
  • Added macros CPCT_ABSOLUTE_LOCATION_AREA and CPCT_RELOCATABLE_AREA to absolutely locate code and data inside binary space and memory.
  • Added example advanced/relocateMemory to show how to use memory relocation macros.
  • Added CPCT_XBITARRAY and CPCT_ENCODEXBITS macros to easily define, declare and populate bitarrays.
  • Added new type of bitarrays: bitarrays of 6-bits per item.
  • Added new example medium/bitarrayMaps1 to clarify the use of bitarrays as tilemaps and other structures.
  • Added sprite blending functions: can blend sprites with background using different modes like XOR, OR, AND, ADD, ADC, SUB, SBC, LDI, NOP.
  • Added sprite blending example medium/blendedSprites.
  • Added colour enumerations to simplify palette definitions and palete colour changes (CPCT_FW_Colour and CPCT_HW_Colour)
  • Added support for cpct_winape script to automatically load debugging symbols on launching DSKs.
  • Updated cpct_winape to download Winape 2.0 beta 2.
  • Added another ASM example with some sprite/text drawing, automatic sprite conversions and animations.
  • Some performance improvements on previous functions.
  • Updated to SDCC 3.5.5. (and fixed libboost 1.6. compilation problem).
  • Fixed a problem with multithreaded compilation on ARM platforms using SD Cards as main storages (mainly Raspberry Pi)
  • Added OBJS2CLEAN variable to makefiles to let the user clean some custom generated objects.
  • Improved documentation
  • Fixed cpct_tmx2csv failing on cygwin
  • Added tilemap_hwscroll example to show hardware scrolling capabilities along with an expanded tilemap.
  • Added latest 1.1.1. version of Retro Game Asset Studio (RGAS)
  • Everything packed with love to give user the best possible set of tools 🙂
Dec 242015

A new version of the Z88dk development environment for Z80 based computer (e.g. Amstrad CPC, Cambridge Z88, MSX, Sinclair ZX 81, Sinclair ZX Spectrum, etc.) was just released. The release is a transition release on the way to v2.0 which aims on using the SDCC compiler instead of the Small-C compiler, which was used before. This leads to much faster and smaller output binaries. You can choose between using the Small-C compiler with the old and the new C library or use the SDCC compiler with the new C library. The new C library also introduces full C standard compliance to Z88dk.
The newest version can be downloaded from the Z88dk homepage.

(Brief) Changelog:

  • [z80asm] Sections have been introduced for generating memory maps and compiling to bankswitched memory.
  • [z80asm] Modern logical operators have been adopted.
  • [z80asm] New scoping keywords PUBLIC, EXTERN and GLOBAL introduced.
  • [z80asm] Relocate files are generated for output binaries for patching assembled code to a new address at load time.
  • [sccz80] Numerous bugfixes.
  • [sdcc] SDCC is now fully supported as alternate C compiler for the new C library.
  • [sdcc] SDCC’s generated code is improved by a large set of aggressive peephole rules (use -SO3 to enable).
  • [sdcc] SDCC’s calls to its primitive functions are modified to use callee linkage.
  • [new c lib] New C library written in assembly language from scratch aiming for a subset of C11 compliance.  Contains more than 700 functions currently.
  • [new c lib] Stdio made object-oriented so that drivers can inherit library code to implement features with a minimal amount of additional code.
  • [new c lib] Stdio base classes currently include serial character i/o and terminal i/o implementing windows and proportional fonts.  Disk i/o is missing in this release.
  • [new c lib] Unique stdio implementation allows removal of high level buffers without affecting performance.
  • [new c lib] Many functions from GNU and POSIX are present beyond the C11 standard.
  • [new c lib] Many unique libraries including some C++ STL containers, data compression, obstacks, game libraries, sound, fzx proportional fonts, etc.  The new C lib contains libraries not present in the classic C lib and vice versa.  Over time the two libraries will homogenize.
  • [new c lib] CRTs are supplied for three initial targets:  embedded (generic z80), cpm, zx (zx spectrum).  Specialized crts allow immediate compilation without customization by the user.
  • [new c lib] The library and crts are highly configurable at library build time and at compile time.  Options allow easy generation of binaries for ROM or RAM targets.
  • [tools] New tool ticks is a command line z80 emulator able to exactly measure execution time of a code block.
  • [tools] New tool dzx7 is a decompressor counterpart to zx7.
  • [tools] New tool zx7 is an optimal lz77/lzss data compressor with companion decompression subroutines in the z80 library.
  • [appmake] +rom added to manipulate raw binaries; options include code injection, extraction and conversion to intel hex format.


Oct 172015

A new version of CPCtelera, the Amstrad CPC game engine for C developers, was just released in version 1.3. CPCtelera offers a huge C library for the SDCC C cross-compiler, which makes it easier to create games and applications for the Amstrad CPC. This version features SDCC patches and bugfixes, some speed optimisations, new methods and a big toolset improvement. It is available for Windows, Linux and OS-X. You can get the latest version from GitHub and discuss it in the CPCWiki.

Changes in v1.3:

  • API change on cpct_getXBits functions. Changed order of parameters to further optimize operations.
  • Optimized functions: bitarray functions, cpct_count2VSYNC, cpct_px2byteM0, cpct_enable/disablefirmware, cpct_getHWColour, cpct_setPalette, cpct_fw2hw
  • Added example on getting hardware values with cpct_getHWColour
  • Automatic inclusion of binary files in DSK: Users can now specify a path for the makefile to retrieve binary files and insert them on the DSK on compilation.
  • iDSK: Fixed historic data corruption problem on adding new files.
  • Added cpct_winape script that automatically downloads, installs and lauches winape from command line to speed up development process. It works multiplatform, transparently using wine where required.
  • Added cpct_setInterruptHandler and cpct_removeInterruptHandler functions to let the user easily hook any function to system interrupts.
  • Added example on hooking a function to system interrupts.
  • Added cpct_img2tileset support for generating sprites with interlaced masks.
  • Added new script cpct_tmx2csv to convert tmx files from tiled into CSVs ready for inclusion in user code.
  • Added Augusto Ruiz’s dskgen tool for generating and managing DSKs low level.
  • Updated SDCC with latest patches and bugfixes.
  • Modified SDCC building: SDCC now builds with maximum optimizations activated and all unnecessary parts are removed from compilation (it compiles faster)
  • Improved Makefile functions for CDT Creation.
  • Added examples about automatic assets inclusion/conversion and CDT generation with multiple files.
  • Improved compatibility and functionality of Augusto Ruiz’s img2cpc
  • Improved examples and explanations
  • Added GCC/CLang version checking on installation (checks required C++11 features are present)
  • Added splitted C/ASM bindings for most of CPCtelera’s functions, along with __z88dk_callee and __z88dk_fastcall calling convention use.
Aug 062015

After two months of intense development a new version of CPCtelera, the Amstrad CPC game engine for C developers, was just released. CPCtelera offers a huge C library for the SDCC C cross-compiler, which makes it easier to create games and applications for the Amstrad CPC. It is available for Windows, Linux and OS-X. You can get the latest version from GitHub and discuss it in the CPCWiki.

UPDATE: Version 1.2.1 was released some bugs including a OSX problem during installation. See below for more information.

New features included in v1.2:

  • Added new modules: cpct_random & cpct_easytilemaps
  • 3 new fast functions for very easy management of Tilemaps and Tilesets directly.
  • New cpct_img2tileset utility for converting images containing complete tilesets or sprites groups into C data for including directly in projects code.
  • 2 new fast functions for generating pseudo-random byte numbers uniformly distributed.
  • 2 faster memset functions, up to 3 times faster than original cpct_memset (cpct_memset_f8, cpct_memset_f64)
  • New function to set the location of the program stack at will (cpct_setStackLocation)
  • New function for drawing Masked Aligned Sprites using Transparency Tables(cpct_drawSpritesMaskedAlignedTable)
  • Added a transparency_tables header file for easing inclusion.
  • Added a C-script for generating mask lookup tables.
  • Added new examples: Text Software Scrolling, fastmemset, Easytilemaps demo, drawSpritesMaskedAligned demo, ProgramStack demo.
  • Added Img2CPC image conversion tool by Augusto Ruiz.
  • Added new version of RGAS: 1.0
  • Updated SDCC to 3.5.0
  • Movable project folders: they can be moved to different locations on a same hard-disk or even on a different machine without any change (provided CPCtelera 1.2 is installed). They now use an environment variable for linking with framework.

List of improvements and bug-fixes:

  • Added a bug-fix for SDCC __z88dk_callee function binding on tail jumping optimizations.
  • Improved performance for C calls to functions using __z88dk_callee and __z88dk_fastcall new calling conventions included with SDCC 3.5.0.
  • Fixed mixed up definitions for Joy1_Fire1 and Joy1_Fire2
  • Optimized several library functions.
  • Documented functions that use self-modifying code (and will not work from ROM, logically)
  • Split C and ASM bindings for most functions: calls from both languages include their own code without overheads
  • Recalculated timings of most functions with respect to Amstrad’s microsecond-rounded scheme.
  • cpct_mkproject checks for valid AMSDOS characters on project names.
  • Fixed a subtle calculation bug in cpct_getScreenPtr
  • Added library cleanup to setup.sh
  • Improved OSX compatibility for the cpct_mkproject and setup.sh scripts

 Changes in v1.2.1:

  • Fixed setup.sh failing under OSX
  • Fixed cpct_img2tileset not accepting full paths
  • Better information display and progressbar for cpct_img2tileset
  • Added offline documentation that was being ignored by git
  • Added new advanced example: Smooth 1-pixel movement in mode 0 (advanced/move1pixel)

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.