The original Memotech 80-column card has the font programmed in a ROM chip and therefore cannot be changed. However, when re-implementing the 80-column display in FPGA for the MFX, the font is stored in RAM within the FPGA. The FPGA provides Z80 ports which allow updating the font.
To make use of this feature a small program loadfont has now been written to load new character sets into the FPGA.
If the program is run without any parameters, then it displays the currently loaded font.
If the program name is followed by a file name, then a new font is loaded from the specified file. If the file extension is omitted then an extension of ".mtf" is assumed. Note that the format of the font file (documented below) is specific to the Memotech and loadfont. A random font file found on the internet will not work without conversion.
By convention Memotech font files are given the extension ".mtf".
The contents of the file are:
| Offset | Description |
|---|---|
| 0 to 3 | The string "FONT" to identify a font file. |
| 4 to 125 | A description of the font. The description is
terminated by the three characters carrage return, line feed,
<Ctrl+Z> (end of text file). As a result, the destription
can be read by using the command type font.mtf |
| 126 | First character in the font. |
| 127 | Last character in the font. |
| 128+ | The font data. 10 bytes per character, giving the pixels in each row, from top to bottom. Within each byte, a 1 bit indicates a lit pixel, with bit 7 being leftmost. |