How too101/thaimsx works
thaimsx is Z80 firmware that adds Thai input and output to MSX BASIC, distributed as an 8 KB cartridge or loadable BLOAD program. The principal workflow is machine startup and BASIC integration, followed by Thai keyboard entry and BASIC display/printing; separate commands convert strings, and graphics output is supported. The README documents these capabilities, but sampled source is limited to tape-conversion utilities, so internal call wiring is intentionally conservative.
Main entry points: init.asm Initialization · printon.asm Print Hooks · main.asm Cartridge ROM · loader_bload.asm BLOAD Loader
Components 17
Startup and Loading
- Cartridge ROM
src/main.asm - Initialization
src/init.asm - BLOAD Loader
src/loader_bload.asm - Runtime RAM
src/workram.asm - CAS Builder
scripts/mkcas.py - WAV Converter
scripts/cas2wav.py
Thai Input
- Thai Keyboard
src/keyboard.asm - Key Tables
src/kwtables_data.asm
Thai Output
- Thai Font
src/font_data.asm - Text and Graphics
src/printon.asm - Thai Printing
src/printer.asm
BASIC Extensions
- BASIC Commands
src/thaicmd.asm - BASIC Hooks
src/statement.asm - Print Hooks
src/printon.asm
Other components
- MSX User
- MSX BASIC / BIOS
- Printer
Connections 17
- MSX User → MSX BASIC / BIOS: uses BASIC
- MSX BASIC / BIOS → Cartridge ROM: starts ROM
- Cartridge ROM → Initialization: initializes
- MSX BASIC / BIOS → BLOAD Loader: loads program
- BLOAD Loader → Runtime RAM: loads into
- Initialization → Thai Keyboard: enables input
- Thai Keyboard → Key Tables: uses mappings
- Initialization → Text and Graphics: enables display
- Text and Graphics → Thai Font: uses glyphs
- MSX BASIC / BIOS → BASIC Hooks: dispatches BASIC
- BASIC Hooks → BASIC Commands: handles commands
- MSX BASIC / BIOS → Print Hooks: prints BASIC
- Print Hooks → Text and Graphics: renders text
- Print Hooks → Thai Printing: routes LPRINT
- Thai Printing → Printer: prints output
- MSX User → CAS Builder: converts BLOAD
- CAS Builder → WAV Converter: converts CAS