Hackster is hosting Impact Spotlights: Smart Home. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Smart Home. Stream on Thursday!

Carlos Escobar Brings MicroPython to the MSX Family — By Swapping the Z80 for a Raspberry Pi Pico

Fancy doing a bit of MicroPython development on your 1980s Japanese home microcomputer? Well, this is the project for you.

Developer and vintage computing enthusiast Carlos Escobar is bringing MicroPython to the MSX — by turning a Raspberry Pi Pico into a drop-in replacement for the computer's usual Zilog Z80 CPU.

"This is not just a simple interface between MicroPython and an MSX," Escobar explains of the project. "Here, the Raspberry Pi Pico fully replaces the Z80, taking control of the MSX hardware and running MicroPython to interact with the display, keyboard, and other peripherals."

Released in 1983 as a collaboration between ASCII Corporation and Microsoft, the MSX family of home computers were implementations of an agreed-upon standard from manufacturers including Sony, Panasonic, Samsung, Yamaha, and more. All were based around the Zilog Z80 CPU, until the introduction of the MSX Turbo-R and its Z80-compatible R800 chip, and featured 8-64kB of RAM in the original generation.

While MicroPython, an implementation of the Python language focused on embedded devices, is made with resource-constrained systems in mind, it has yet to be ported to the MSX — which is why Escobar has turned to the Raspberry Pi Pico, an RP2040-based microcontroller board with a pair of Arm Cortex-M0+ cores and 264kB of on-chip static RAM (SRAM), which he has configured to act as a drop-in replacement for the original Z80 CPU.

"The goal is to be as non-invasive as possible," Escobar explains. "Most MSX computers have the Z80 in a socket, allowing this board to be installed without permanent modifications. Using latches and buffers, the Pico controls the address bus, data bus, and control signals of the system. If you want to restore the original state, you simply reinsert the Z80."

When installed, the modified MSX doesn't boot its stock ROM but instead loads an interactive MicroPython REPL from the Raspberry Pi Pico's firmware — displaying the text on TV hooked up to the MSX and allowing the user to type in their program using the machine's original keyboard.

A brief project write-up is available on Escobar's Hackaday.io page; the source code, detailing the changes made to add partial Z80 emulation and MSX peripheral support, is available in Escobar's MicroPython fork repository on GitHub under the permissive MIT license and a mixture of other licenses for sub-projects.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles