[an error occurred while processing this directive]
Games
Development
µC Tutorials
STM8
MCS-51
µC Tools
LLVM+SDCC
STM8 C compilers
STM8 RTOSes
[an error occurred while processing this directive]
[an error occurred while processing this directive]
Tutorial
Introduction to sdcc
ColecoVision system
Playing music
Hardware
Homebrew kits
Homebrew kit CV
Homebrew kit CVs
Software
libcv and libcvu
png2cv
png2cvs
abc2cvm
cvmtuning
compression utilities
[an error occurred while processing this directive]
Released
Schlange CV
Search for the stolen Crown Jewels
Monster Masher
Search for the stolen Crown Jewels 2
Cye
Search for the stolen Crown Jewels 3
Bankruptcy Builder
Shunting Puzzle
Ȼi̅x̅
In development
Colored Gravity
Tunnels & Trolls
[SK - name not final]
Io
[an error occurred while processing this directive]
Compiler Comparison
RTOS Availability
Tutorials
STM8L-DISCOVERY
LED Timer
Serial
STM8S-DISCOVERY
LED Timer
Serial
STM8A-DISCOVERY
STM8AF LED Timer
STM8AF Serial
STM8AF Benchmarks
STM8AL LED Timer
STM8AL Serial
EX-STM8-Q64a-207
LED Timer
Serial
Benchmarks
Open8S208Q80
LED Timer
Serial
Benchmarks
EX-STM8-Q48a-105
LED Timer
Serial
STM8/128-EVAL
LED Timer
Serial
Benchmarks
STM8L101-EVAL
Serial
[an error occurred while processing this directive]
Tutorials
EX-F320
LED Timer
Serial
C8051F340/380
LED Timer
Serial
C8051F V2.1 (F020)
LED Timer
Serial
C8051F300 Dev. B. Mod.
LED Timer
Serial
C8051F V2.1 (F120)
LED Timer
Serial
Benchmarks
51 MCU SCM
Serial
STC89 DEMO BOARD
LED Timer
Serial
EZ-USB FX2LP
LED Timer
Serial
Benchmarks
Introduction
HITECH-C for CP/M is the most common choice among ColecoVision programmers using the C language. Most ColecoVision programming tools are intended for use with this compiler. There are some problems with HITECH-C though: It's non-free (definitions of "free software" vary, but they all include the freedom to distribute and modify the software and distribute modified versions), it needs to be run on a CP/M emulator, it implements only the ANSI C / ISO C90 standard, it is no longer maintained.
There are a few alternatives to HITECH-C for CP/M, including the commercial edition of HITECH-C, the IAR compiler and z88dk. Another alternative, which has been successfully used to create ColecoVision games including the popular "Search for the stolen Crown Jewels" series is sdcc.
sdcc is a free C compiler for 8 bit systems which implements a large part of the ISO C99 standard, generates faster and smaller code than HITECH-C in many cases. It is free software, actively maintained and keeps improving.
Since there are not many programmers using sdcc for ColecoVision development there is a lack of documentation. A usability inspection identified documentation problems as the major usability problem for newbies to ColecoVision development using sdcc.
Prerequisites
This tutorial assumes that the reader is familiar with the C programming language and a modern operating system such as Windows or GNU/Linux.
Installation of necessary tools
If you are using an operating system other than Windows, such as GNU/Linux you can skip over the Cygwin stuff and just install the packages mentioned below and sdcc the way it is typically done on your operating system. Then continue with the installation of png2cv below.

- Cygwin Setup program. Packages are selected by clicking on the arrows on the left. The View button can be used to sort the list alphabetically
sdcc and the ColecoVision tools used with it were written for unixoid systems. The easiest way to use them on Windows is through Cygwin, a free unixoid environment for Windows. The Windows user should get the
Cygwin setup program. Cygwin contains nearly a thousand software packages which can be individually selected at installation. For ColecoVision development the following packages are needed (in addition to those selected by default):
- automake
- bison
- flex
- gcc-g++
- libpng12-devel
- make
- libboost-devel
- pkg-config
- libintl-devel
You can use the search box in the Cygwin setup program to easily find them.
Unfortunately sdcc and the ColecoVision-specific tools are not part of Cygwin and will have to be installed manually.

- Unpacking and configuring sdcc in Cygwin
sdcc 3.1.0 or newer is recommended. It can be
downloaded at Sourceforge. Windows users should download the "sdcc" package and compile from source, not the "sdcc-win32" binary package. These days most tarballs can be installed by
- unpacking: tar -xzf filename.tar.gz or tar-xjf filename.tar.bz2
- configuring: cd directory followed by ./configure
- compiling: make
- installing: make install
I.e. for sdcc:
- cd <whatever directory you unpacked sdcc into>
- ./configure --disable-pic14-port --disable-pic16-port
- make
- make install
More detailed sdcc installation instructions can be found at
it's website (do not use the Windows installation instructions there, since you'll want to use sdcc within Cygwin).
png2cv 0.11 (to create ColecoVision image data from png images) and png2cvs 0.4 (to create ColecoVision sprites from png images) or newer can be downloaded from this site. They install just like sdcc (Warning: Windows / IE sometimes rename .tar.gz files to .tar.tar, just use tar -xzf filename.tar.tar).
The colecovision library can be found here. The archive should be unpacked to a convenient place for ColecoVision development. The library consists of libcv, libcvu and demo programs. libcv is a low-level library that exposes the ColecoVision's hardware to the C programmer. libcvu contains some useful higher-level functions which the programmer will use most of the time. The cursor and cursor32 demos show how to use sprites and controller input. If everything above has been installed correctly they should compile to .rom files without problems. The commands entered to compile the library and create a demo ROM might look like this:
- tar -xzf libcv-0.15.tar.gz
- cd colecovision\ lib
- make
- cd demos/cursor32
- make

- Cygwin directory structure with cursor32 demo ROM file
You can run the .rom file in a ColecoVision emulator.