A C library for using the TMS9918A video board on a RC2014 retrocomputer.
This library is still very much a work in progress. It has been tested against the rc9918 rev 1 board on a RC2014 running RomWBW v2.9.1-pre.5.
To build this library, you first must have the z88dk Z80 cross compiler installed.
Right now, only the examples can be built as stand alone CP/M apps. To build all examples, in the repository's root directory type:
make all
The build examples will be placed in the examples/bin
directory.
The library created around a context
handle, which is created when you initialize a board. To the user, the context
handle is opaque, but internally it contains state of the rc9918 board it was configured for. This means it is possible to have more than one active context
in an application. Each context
should be initialized to an unique set of ports. Right now the library is set up to permit only 2 active contexts, but more can be enabled by setting a higher value to the compiler macro RC9918_CONTEXT_ARRAY_SIZE
.
Each call to the library requires that a context
handle be passed to it, and the function will operate on the board that context
represents.
- Complete library for all graphic modes of the TMS9918A, possibly rethinking the library's API.
- Create and example or two for each graphics mode.
- Update library for forthcoming revision 3 of the rc9918 board, notably to enable interrupts.
- Update library to take advantage of the VDP interrupts for syncing screen updates
- Update Makefile to allow compile time overriding of
RC9918_CONTEXT_ARRAY_SIZE
value. - Optimize, optimize, optimize
- Make default fonts optionally compiled to save space if not needed
Much of the code in this library was heavily inspired by the code examples provide by J. B. Langston in his RC9918 Board repository.