This is a follow up of a request from Jim for an easy environment in which to develop programs for the MTX using C. In response I suggested using the Code::Blocks IDE, and developed an initial library, reproducing a number of the MTX BASIC commands.
The attached files are the latest version of this. For ease of maintenance I have split the installation into three parts. Create a top-level folder in which to do your MTX development, I suggest calling this MTX_Projects, and then unzip each of the attached files in this folder.
The three bundles are:
- MTXLib - This contains the library source, documentation and build scripts. The library has now been extended and includes:
- The routines reproducing the BASIC commands.
- Routines for reading and writing disk files. These routines only read or write whole 128-byte disk sectors. It would be possible for someone to write a C wrapper around these to read or write arbitrary length records.
- Routines for searching for files, renaming or deleting them.
- Routines for providing direct access to the VDP memory and registers.
- Routines for handling CTC and VDP interrupts.
- MEMU - The Memotech emulator. This has been updated yet again. I found that when a RUN file was loaded from the command line, the disk system was not even initialised. On a real MTX, RUN files of course have to be read from disk.
- demo - The demo program has been extended to illustrate and test a representative sample of all the routines in MTXLib. Note that not everything has been tested.
Other than perhaps posting the code on GitHub I have no intention of doing any more work on this in the near future.