MMBasic Font 1 in the serial terminal - and UTF-8
=================================================

MMBasic on the Colour Maximite 2 and the PicoMite family (PicoMite,
PicoCalc, ...) uses the same Font 1 (font1.h, 8x12 pixels). This
package makes a PC terminal show exactly what the screen shows, and
suggests a firmware option for UTF-8 output on the serial console.

Files
-----
README.txt                 this file
feature-request.txt        the suggestion: OPTION SERIAL UTF8 ON | RAW | OFF
utf8demo.bas               demo of the suggestion, written in BASIC
MMBasic_Font1.ttf          Font 1 as TrueType, byte mode (ISO8859-1)
MMBasic_Font1_Unicode.ttf  Font 1 as TrueType, UTF-8 mode
font1_unicode_table.txt    the table Font 1 byte -> Unicode -> UTF-8
screenshots/
  1_byte-mode_ISO8859-1.png  today: Tera Term in byte mode with
                             MMBasic_Font1.ttf - rows 128 and 144 stay
                             dark, everything else matches the screen
  2_utf8demo_UTF-8.png       utf8demo.bas: Tera Term in UTF-8 mode with
                             MMBasic_Font1_Unicode.ttf - all rows match
                             the screen, plus real UTF-8 text
  3_utf8demo_PicoCalc_LCD.png  the same run on the PicoCalc LCD
                             (SAVE IMAGE): characters not in Font 1 are
                             dots, the boxes line up with the terminal.
                             Taken with the first version of the demo,
                             which had German screen texts.

Both fonts were made directly from font1.h (identical in the CMM2 and
the PicoMite sources). One font pixel is one square, so the font is
sharp at sizes that are a multiple of 12 pixels (9 pt or 18 pt at 96
dpi, 18 pt at 144 dpi).


1. Byte mode (works today, no change to MMBasic)
------------------------------------------------
Font: MMBasic_Font1.ttf
Bytes 32-127 and 160-255 look exactly as on the screen. Bytes 128-159
stay dark: Tera Term 5 treats them as C1 control characters, also with
Accept8BitCtrl=off, so no font can show them.

Tera Term settings:
  Setup > Terminal > Coding (receive):  ISO8859-1
  Setup > Terminal > Coding (transmit): ISO8859-1
  Setup > Font: MMBasic Font1, 9 or 18
  TERATERM.INI, section [Tera Term]: Accept8BitCtrl=off
  Setup > Save setup


2. UTF-8 mode (with utf8demo.bas, or with the suggested option)
---------------------------------------------------------------
Font: MMBasic_Font1_Unicode.ttf
It has all Font 1 glyphs on their Unicode code points, the icons with
no Unicode equivalent on U+E000 + byte, and the complete Latin-1 range
(a-umlaut, e-acute, n-tilde, sharp s, ...) in the same 8x12 style.

Tera Term settings:
  Setup > Terminal > Coding (receive):  UTF-8
  Setup > Terminal > Coding (transmit): UTF-8
  Setup > Font: MMBasic Font1 Unicode, 9 or 18
  Setup > Save setup

In this mode the normal output of MMBasic (CLI, editor, LIST,
PRINT CHR$(128...255)) is missing in the terminal: a single byte
128-255 is not valid UTF-8. That is what the suggested option solves.


3. utf8demo.bas
---------------
Tested on the PicoCalc only. It should also run on the CMM2 (it uses
OPTION CONSOLE SCREEN / SERIAL / BOTH), but that is not tested yet. The source is plain ASCII.

  RUN

Part 1 "UTF8 ON": the Font 1 table and a box made of Font 1 bytes.
  The screen gets the bytes, the terminal gets the same characters as
  UTF-8. Both look the same, including rows 128-159.
Part 2 "UTF8 RAW": the program writes UTF-8 (a box with "Mueller"
  with u-umlaut, accented letters, euro sign, Greek, icons).
  The terminal gets the UTF-8 unchanged. The screen shows the Font 1
  character where the table has one, otherwise a dot CHR$(250).
  Every character takes one cell on both sides, so the boxes line up.

When installing a new version of a font, uninstall the old one first
and restart Tera Term (Windows keeps fonts with the same name).

Matthias Hollatz, November 2026
