Zap Documentation      Latest release     
ZapRedraw      Contact      Download     

Previous | Contents | Index | Next

Chapter 14: Developing for Zap

This section of the manual is for people who want to contribute to the Zap development effort. Firstly, it should be made clear that you don't have to be a programmer to help with this! We also need people to thrash out ideas for future features, to test beta versions of Zap, to help write documentation, and many other things (probably including ones we haven't thought of :-).

14.1 Developer mailing lists

If you want to get involved with Zap, it is advisable to subscribe to one or more of the mailing lists. Whether you are intending to contribute to the main development, or whether you merely want to write an extension for your own use and are looking for help, the mailing lists are a good place to start.

For information on how to subscribe, see The current lists are:

If you think we need a new mailing list, email [email protected] to discuss it.

14.2 Writing extensions to Zap

First, it should be noted that in order to write extensions for Zap, you do need to be able to write in ARM assembler. Although it is possible to write commands and, to a certain extent, modes in C, you still need to be able to use bits of support code, and probably write some of your own as well.

Having said that, it's not quite as difficult as it sounds, because there are plenty of examples for which source is available - more or less all of the Zap distribution is available in source code form, and some of it, particularly the combined command extensions (ZapText, ZapUtil etc.) are specifically designed so that the framework can be quickly re-used to create new extensions.

Zap extensions are written as RISC OS modules, which allows them to be dynamically loaded, thus giving Zap a smaller memory footprint. In addition, Zap extensions are wrapped up in normal RISC OS application directories, which can then simply be dropped into Zap's !Zap.Modules directory to install them (you need to reboot Zap to actually recognise new extensions).

You should read the file !Zap.Resources.UK.Docs.Technical.!ReadMe for an introduction to how to write a Zap extension.

14.2.1 Writing additional Zap commands

In order to add commands to Zap, you need to call the Zap call Zap_AddCommands. This allows you to add a single data table, containing the information about the commands you wish to add. Zap currently has space reserved for 64 command tables, although this can easily be increased.

14.2.2 Writing a Zap mode

To add a new mode to Zap, you need to call the Zap call Zap_AddMode. This adds a mode data table, giving the information about your new mode; as well as things such as the mode's name, it contains all the 'entry points' Zap uses when it needs your mode to do things.

You will probably need to read most of the documentation in Docs.Technical before attempting to write a mode.

14.3 Working on the Zap core

Zap's core is currently being developed by a group of people, and the source is kept under a version control system called CVS. You can browse the source at, or grab a copy of the latest source from the CVS pserver - there are full details at

Urgent bug-fix changes should be sent to [email protected]; other changes should either be emailed to [email protected] (if they are small), or to Darren Salt or James Aylett for inclusion in the main source tree.

14.4 Working on Zap's documentation

Zap's documentation is now stored in an internal 'source' format, which can then be easily converted to produce both the text version distributed with Zap itself, and the HTML version used on the web site. (Currently we are half-way between an old version of the system, which was rather grotty, and a new version that hasn't been finished yet, so for the moment working on things is a little tricky.)

If you want to work on the Zap documentation, the best thing to do is to contact the maintainer directly at [email protected].

The final section of the maual is chapter 15, which covers other user documentation included with Zap; the future of Zap, and how to get in touch with the Zap development team. It also covers things such as bug reports.

Previous | Contents | Index | Next

© Copyright Zap Developers 1992-2004. All Rights Reserved.