Back to the VGS page

Emulator font modification

David Keil's emulator uses several .FNT files for generating the TRS-80 like fonts (model I and III used 6x12 the emulator (and my modified VGS) uses 8x12).

About the original fonts... the first realization one did with these computers, made in the late '70s, was that they had no lowercase (model I, same as UK101, Apple ][ and more). Further investigation revealed that the memory mapped screen was without the 5th bit. One went out and bought a lowercase kit and voided any warranty with a soldering iron... These lowercase kits typically came with a driver on cassette to load every time the machine was started. In my case there was also a note saying that one could buy an external ROM with the driver... Well, I'm the proud owner of the 'Microsoft Basic Decoded & Other Mysteries' book and easily found out that the code in the ROM was mangling the characters before putting them into the screen memory. So I replaced one of my ROM's with an EPROM. Funny that the ROM's in the Video Genie isn't pin compatible with any EPROM, I had to put in a wire-wrap socket and bend the legs around each other.

The change is probably documented in many places but here is my version, to bypass all calculation and display directly. I change the code

 at address 0471h from 'FE 40 38 08 D6 40 FE 20 38 02 D6 20' to 'C3 7D 04 00 00 00 00 00 00 00 00 00'.
Actually the first 3 bytes are enough but clearing the unused code is more aestectic (to me). The C3 instruction is direct jump which is the fastest way to bypass the gap. The modification is not interfering with anything else so it is perfectly safe to do.
 A modified TRS-80 model I level 2 ROM file
This file can be used with the emulator by renaming the .ROM file to LEVEL2.ROM after making a backup of the LEVEL2.ROM original file.

This modification also frees the 0 to 31 codes from general use, so when I later replaced the character generator with my own I could utilize the 0 to 31 codes for my own symbols like the Norwegian æøåÆØÅ. This modification is unfortunately not perfectly safe since some programs (only games in my experience) have their own screen drivers and fold text down to the 0 to 31 area, displaying gibberish instead of some text (like hiscore and title screens). All sensible software goes through the normal system and drivers.

The .FNT files are quite easy to figure out, they are pretty straight forward a byte for each line in a character and 12 of these for each character (The 80x24 mode of the model 4 uses only the top 10 lines of these). The first character set consists of 256 characters (model I/III and 4 in normal mode), 128 reverse characters and 64 line drawing or katakana characters (the extra modes on model 4, these are not supplied in the model I emulator so the file is shorter).

I have made two small programs which converts .FNT files into .BMP (windows bitmap) files and back (after you have edited the file in your favourite picture editing utility). These are command-line dos programs. (I will make a better program soon, with a user interface and supporting both versions of the emulator in one program.)

 Converter for model I font files  and  Converter for model III/4 font files

My modified model I font file
As it has my characters in the 0 to31 codes area it requires the modified ROM above, in this page.
it looks like this:

I have wished for the Emulator to support a font like this:

It is approximately what I got out of the Lowe Electronics colour kit, that I had in my Video Genie before the HIRES which it of course conflicted with, so I had to take it out. I had some very good snake games with this appart from being pleasant to look at. I'll probably put up more about this later here.

I am giving this files and information away for free so there are no warranties of any kind.

Copyright (c) 2001 Knut Roll-Lund

14/2-01 Created

Back to the VGS page