Loadable fonts for MFX 80-column display

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.

Usage

loadfont

If the program is run without any parameters, then it displays the currently loaded font.

loadfont cp437

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.

Included font files

Font file format

By convention Memotech font files are given the extension ".mtf".

The contents of the file are:

OffsetDescription
0 to 3The string "FONT" to identify a font file.
4 to 125A 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
126First character in the font.
127Last 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.