A simple ZX81 emulator on the CH32V006

It’s a toy, but I can now emulate a 1980’s ZX81 on the CH32V006. The performance is equivalent to about a 3 MHz Z80 which, due to how the ZX81 spends most of the time drawing the display rather than running the code, means the overall system is faster than the original.
This version runs over the serial port, translates the ZX81 character set to the equivalent Unicode, and translates the VT keycodes into the equivalent ZX81 keys.
The emulation gets 4 KiB of the CH32V006’s 8 KiB of RAM which is a good step up from the original’s 1 KiB. This could be extended 6 KiB+ by reworking how address decode is done.
Thanks to Zephyr for the RTOS, sz81 for the ROM, and z80emu for the Z80 core.
Next up is to implement the remainder of the keyboard and to decide how to load some games onto it. Medium term I want to experiment with different emulator architectures, generating composite video, and adding PSRAM to run CP/M.