Jan 252017
 

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 released. The release is a transition release on the way to v2.0 which aims on using both, the SDCC compiler and the Small-C compiler, to combine their advantages, which 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. The source code is available on GitHub.

Changelog:

Package:

  • The win32 and osx packages are complete and now include the zsdcc & zsdcpp binaries. zsdcc is z88dk’s customization of the sdcc compiler. Other users can compile zsdcc from source.
  • A VS2015 solution file is now available in z88dk/win32 for building all z88dk binaries except zsdcc & zsdcpp. Instructions for building zsdcc & zsdcpp can be found in the install instructions link above.

ZCC – Compiler Front End:

  • M4 has been added as an optional macro pre-processor. Any filename ending with extension “.m4” will automatically be passed through M4 and its output written to the original source directory with the “.m4” extension stripped prior to further processing. The intention is to allow source files like “foo.c.m4”, “foo.asm.m4”, “foo.h.m4” and so on to be processed by M4 and then that result to be processed further according to the remaining file extension.
  • In conjunction with the above, a collection of useful M4 macros has been started in “z88dk.m4” that can be included in any “.m4” file processed by zcc. Currently macros implementing for-loops and foreach-loops are defined.
  • List files ending with extension “.lst” can be used to specify a list of source files for the current compile, one filename per line. The list file is specified on the compile line with prefix @ as in “@foo.lst”. List files can contain any source files of any type understood by zcc and individual lines can be commented out with a leading semicolon. Paths of files listed in list files can be made relative to the list file itself (default) or relative to the directory where zcc was invoked (–listcwd). List files can list other list files, identified with leading ‘@’.
  • zcc now processes all files it is given to the final output file type specified. For example, with “-E” specified, all listed .c files will be run through the C pre-processor individually and all output copied to the output directory. Previous to this, only the first file listed was processed unless a binary was being built.
  • -v gives more information on what steps zcc takes to process each source file.
  • -x now builds a library out of the source files listed.
  • -c by itself will generate individual object files for each input source file. However, if -c is coupled with an output filename as in “-o name”, a single consolidated object file will now be built instead of individual ones. The intention is to provide a means to generate identical code in separate compiles by allowing this single object file to be specified on different compile lines.
  • Better error reporting for source files with unrecognized types.
  • Better parsing for compile line pragmas; pragma integer parameters can now be in decimal, hexadecimal or octal.
  • -pragma-include added to allow a list of compile time pragmas to be read from a file as in “-pragma-include:zpragma.inc”. This way projects can consolidate pragmas in one location; this is especially important for the new c library which uses pragmas extensively to customize the crt.
  • -pragma-export added, is similar to -pragma-define but the assembly label defined as a constant on the compile line is made public so that its value is visible across all source files.
  • –list will generate “.lis” files for each source file in a compile to a binary. The “.lis” file is an assembly listing of source prior to input to the linker.
  • –c-code-in-asm causes C code to be interspersed as comments in any generated assembly listing associated with C source files.
  • “.s” files are now understood by zcc to be asz80-syntax assembly language source files. This allows sdcc project files written in assembly language to be assembled by z88dk. asz80 mnemonics are non-standard so zcc attempts to translate to standard zilog mnemonics before assembling. You can see the translation to standard zilog form by using “-a” on a compile line. This is still a work-in-progress feature.
  • –no-crt allows compiles to proceed without using the library’s supplied crt for a target. The first file listed on a compile line will stand in as the crt and will be responsible for initialization and setting up the memory map.
  • Temporary files are always created in the temp directory. The option “-notemp” has been removed.
  • Library and include search paths have been fixed to honour the order specified on the compile line. This allows the user to override library functions when desired.
  • Source files are now processed from their original location so that includes can be properly resolved. Previously this was only done for .c files but this now applies to other file types.
  • clang/llvm compilation is in an experimental state.

Continue reading »

Dec 312016
 

Roudoudou worked on a compressor / decompressor which uses the LZ48 / LZ49 compression algorithm on the Amstrad CPC and released his work in the CPCWiki forums. The compressor is inspired by the LZ4 compression algorithm of Yann Collet and the modifications fits well to the Z80 CPU of the Amstrad CPC. The advantage of this compression method is, that the decompression code is very small (83 bytes) and very fast. The disadvatage is that there are other compressors which feature a better compression ratio, but require more memory and more time for decompression as well.
You can get more information about the modified algorithm and download the assembly source from the CPCWiki forums. You can also find a version for SDCC / CPCtelera and binary files for Windows there.

LZ48/49 (de)compressor
LZ48/49 (de)compressor
LZ48-49-de-compressor.zip
16.5 KiB
54 Downloads
Details
Sep 272016
 

Vector Vaults is a new arcade game for the Amstrad CPC. It is based on vector graphics with 25 frames per seconds and also features multi dimensional and pixel precise scrolling. You have to pilot your ship through nine levels. The game was written with CPCtelera, SDCC and assembler.

In the game you play Samuel, who is flying a virtual avatar shaped like a ship which has to break through different security levels. You control the ship with the keyboard (O, P, Q, A and SPACE) or joystick. Here is a short video showing the gameplay of Vector Vaults:

You can get the game in three different version:

  • Free version – you can download the DSK image from the Vector Vaults homepage and at the end of this news
  • Personalized digital copy – For 5 EUR you will get a digital copy of a personalized version
  • Personalized physical copy – You get a 3 inch version of the game for 18 EUR (plus shipping costs), which will also feature a nice box, a short manual and your name in the credits section.

Be sure to download the game from the Vector Vaults homepage (or at the end of this news) and play it, if possible, on the real machine :-).

Vector Vaults
Vector Vaults
VectorVaults.zip
Version: 1.0
77.5 KiB
57 Downloads
Details
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.

Changes:

  • 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 🙂

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.

Close