Software - Utilities

Chroma Program Enhancement Creator

The Chroma Program Enhancement Creator is a Windows utility for designing replacement character sets and colour definitions for enhancing the appearance of existing ZX81 programs using the facilities provided by the Chroma interface. It will automatically generate loader programs that configure the Chroma interface facilities prior to loading the target program. Character and colour definitions can be saved as .chr and .col files respectively for reloading at a later date, or for use with the ZX ROM Cartridge Creator.

The Chroma Program Enhancement Creator is an amalgamation of the functionality previously provided by the Chroma Program Enhancement Designer utility and Chroma Program Enhancement Generator utility (which itself replaced the Chroma Colourisation Generator and Character Generator utilities).

A screenshot of the Chroma Program Enhancement Creator can be seen below:

Chroma Program Enhancement Creator

The top right area presents an entry for each character of the character set. The top of a character entry shows the standard Sinclair pixel pattern and underneath this is the redefined pattern and colour for the character. Clicking on an entry will draw a red border around it to show that it is selected. A large version of the character will then appear in the area to the top left. The left and right mouse buttons are used to set and reset a pixel respectively.

The controls underneath the character grid allow manipulation of the character definition, and moving the mouse over each control will display a help summary of the action each performs. Bit patterns may be copied from one character to another or from an external image. To the right of the grid are drop down selections that allow the ink and paper colour for each line of the character to be specified. The Cell Colours checkbox allows the ink and paper drop downs for the top line to apply to all lines of the character. Changes made are not automatically stored back into the character set and so the Commit control button must be used to do this. Alternatively, the Auto Commit checkbox can be ticked and will cause all changes to be immediately written back to the character set.

The Character Set Controls area provides functions to manipulate all entries in the character set in one go. It also provides a drop down to allow selection of the border colour. The target can be set from the ZX81 to the ZX80, and this simply changes the standard Sinclair character set representations shown. Although a Chroma 80 SCART interface does not yet physically exist, enhanced ZX80 programs can be used on a ZX81 via the ZX80 Emulator ROM Cartridge.

The Show Colours checkbox causes the character set entries to be displayed with or without colour. This is useful to check that the redefined characters appear when used on their own appear comparable to the coloured versions, thereby ensuring that an enhanced program displays well using just an original QS Character Board or dk'tronics / Kayde Graphics ROM Board.

For the entry selected in the character set area, its character code and a description appear below the character set area. The description is included only as a reminder of what the character represents in the program being enhanced. Double clicking the entry will allow its description to be changed.

Right clicking the Sinclair character for an entry in the character set area will present options to copy the pattern to the clipboard or to overwrite the redefined version for that entry. Right clicking on the redefined version presents an option to created all inverted or all non-inverted characters based on the opposite set of characters, which is particularly useful when constructing fonts. Options are also presented to reset the character pattern and description back to their original configurations.

The Character Definition Details and Colour Definition Details areas each allow a description to be specified, which can be used as a reminder of the program the files are intended to enhance, along with other relevant details such as author or creation date. The Program Details area allows the target program to be selected. It will show the file name embedded within the ZX81 program if present, else the name of the PC file it was read in from.

The area to the bottom left presents controls to discard all character, all colour or both the character and colour configuration data.

The bottom right area is used to select the type of output file to generate, with toggle buttons used to specify whether to include a character loader, and / or a colour loader, and / or the program file. When a character loader is to be included, the format of the UDGs can be specified. Three formats are available, although Chroma only supports two of these (the other is there to allow character definitions to also be used with other UDG interfaces). Information about the modes can be viewed by clicking the 'i' icon next to the 'Format' label.

The three UDG formats are:

The Create button brings up a dialog allowing the output file format to be chosen. If multiple program options are selected for output then the save format will be .tzx, but if only a single program option is selected then the save format can also be to .p (nameless ZX81 file), .p81 (named ZX81 file) or .o (ZX80 file). When creating a character loader, the utility will first prompt whether to include the definitions for all characters that have not changed from their default Sinclair forms. On a standard ZX81 there is no need to include these as the default character patterns are simply copied from the ROM, but if the output file is to be used with the ZXpand interface then it is not possible to copy the character patterns from the ROM and so it is necessary for the loader program to explicitly include and set them all. However, this will make the loader program larger which is less desirable if it will be used with from a real cassette.

The ZX81 file name used for a character or colour loader when saving as a .tzx or .p81 file is based upon the ZX81 file name of the program file. For the character loader, a '$' is appended to the file name, and for the colour loader a '+' is appended to the file name. If a program file is not selected then the Program Details File Name entry box will be empty, in which case the name of the output PC file will be used instead as the base for the loader programs. In such a case, the colour loader (or the character loader if a colour loader is not included in the output) will perform an unnamed load, i.e. LOAD "". Otherwise if a program file name is specified (with or without a program file being selected) then a named load will be performed, i.e. LOAD "name". Performing an unnamed load can be useful to allow the loader programs to be used with multiple programs, although if targetting the ZXpand interface then all loads must be of the named variety. The ZXpand only supports .p files and so each loader program must be created individually. Only PC file names up to 8 characters long are supported and so the ZX81 program's file name must be edit to fit within this length. Note that the ZXpand has further restrictions on the symbol characters that can appear within file names.


Character File Format

Character files are text files formatted using XML tags, allowing them to be created using a simple text editor. They have the .chr file extension. A character file defines the pixel patterns for every line of each character. An example character file is shown below.

<?xml version="1.0"?>
<definition>
  <version>1</>
  <description>Character definition file (c)2015 Paul Farrow for QS Asteroids (c)1982 Quicksilva</description>
  <entry code="157" description="Inverse 1">
    <line index="0">11110000</line>
    <line index="1">11101110</line>
    <line index="2">11011110</line>
    <line index="3">10111110</line>
    <line index="4">00001101</line>
    <line index="5">11101011</line>
    <line index="6">11100111</line>
    <line index="7">11101111</line>
  </entry>
  <entry code="129" description="Top-left-white">
  ...
  </entry>
</definition>

The example shows the definition of the following character:

QS Asteroids character

The purpose of each XML tag is described in the following table.

Tag Description
definition Encloses the character definitions.
version The format of the character file. Currently this must always be 1.
description Free form text to note any information deemed relevant, e.g. author, release date, intended program(s) to use the characters with.
entry A character file will typically contain several entry tags one after the other. Each will define the bit patterns to use for a specified character. The code attribute indicates the character code (0 to 63 for the normal characters, and 128 to 191 for the inverted characters). The description attribute allows free form text and is intended to be used to describe the character that this entry defines.
line Each character is formed of 8 lines and so an entry tag must contain 8 line tags to explicitly define them. The index attribute defines which line within the character, with 0 for the top line down to 7 for the bottom line. The contents of the tag define the bit pattern for the line using binary notation, with 1 for a black pixel and 0 for a white pixel.

When the Chroma Program Enhancement Creator saves a .chr file, it only includes entries that have been changed from their standard Sinclair representation. However, when a character loader is generated it will always initialise all non-specified characters to their standard Sinclair patterns.

Should a .chr file be edited by hand with the result that there are in multiple entry definitions for a particular character then the last entry supersedes all preceding ones for that character.


Colour File Format

Colour files are text files formatted using XML tags, allowing them to be created using a simple text editor. They have the .col file extension. A colour file defines the colouring scheme to be used for every line of each character, and also the colour to use for the border. An example colour file is shown below.

<?xml version="1.0"?>
<colourisation>
  <version>1</version>
  <description>Colourisation file (c)2015 Paul Farrow for Mazogs (c)1981 Bug-Byte Software</description>
  <border><colour>0</colour><bright>0</bright></border>
  <entry code="0" quantity="128" description="Default colours for all characters">
    <line index="0">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="1">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="2">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="3">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="4">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="5">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="6">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
    <line index="7">
      <paper><colour>7</colour><bright>1</bright></paper>
      <ink><colour>0</colour><bright>0</bright></ink>
    </line>
  </entry>
  ...
</colourisation>

The purpose of each XML tag is described in the following table.

Tag Description
colourisation Encloses the colour scheme definitions.
version The format of the colourisation file. Currently this must always be 1.
description Free form text to note any information deemed relevant, e.g. author, release date, intended program(s) to colourise.
border Contains tags that define the colour of the border area.
entry A colour file will typically contain several entry tags one after the other. Each will define the colours to use for one or more characters. The code attribute indicates the starting character code (0 to 63 for the normal characters, and 64 to 127 for the inverted characters). The quantity attribute specifies how many characters are to use this colour definition. The description attribute allows free form text and is intended to be used as a comment to describe the range of the characters this entry covers.
line Each of the lines within a character can be colour independently and hence an entry tag must contain 8 line tags to explicitly define them. The index attribute defines which line within the character, with 0 for the top line down to 7 for the bottom line.
ink Contains tags that define the colour for the set pixels for the current line.
paper Contains tags that define the colour for the reset pixels for the current line.
colour Specifies the colour for the current item.
Supported colours are: 0=Black, 1=Blue, 2=Red, 3=Magenta, 4=Green, 5=Cyan, 6=Yellow, 7=White.
bright Specifies the brightness of the colour for the current item. Note that Dull Black and Bright Black will both display the same.
Supported values are : 0=Dull, 1=Bright.

When the Chroma Program Enhancement Creator saves a .col file, it automatically determines blocks of consecutive characters using the same colour scheme and simply defines a single entry for these. This is beneficial when the .col file is to be used with the ZX ROM Cartridge Creator as it minimises the amount of space required to hold the colour definition information within the ROM cartridge.

Should a .col file be edited by hand with the result that there are in multiple entry definitions for a particular character then the last entry supersedes all preceding ones for that character.


Downloads

Click here to download the Chroma Program Enhancement Creator [V1.0.1] utility.

The Chroma Program Enhancement Creator utility requires .NET Framework 4. The Chroma Program Enhancement Creator installer will determine whether it is already on the PC and if not then will prompt to download it from the Microsoft website.

A selection of character files are available for download from the Character Definition Files page, and a selection of colour files are available for download from the Colourised Programs page. They can be used as the basis for generating character and colourisation files for other ZX81 programs.

Chroma thumbnail