Pico MZ-80K and the RC2014 RP2040 VGA terminal card

A new year and I’m back to tinkering with the Pico MZ-80K emulator.

I’ve started work on support for the RC2014’s RP2040 VGA terminal card. I’d not had very much luck with it last year, but I’m now making decent progress thanks to a closer examination of the picoterm firmware and the excellent documentation it ships with.

I also had a very welcome big hint about how the USB keyboard and buzzer are implemented from Spencer over at RC2014 towers.

A game of space invaders in progress. The RC2014 backplane with the RP2040 VGA terminal card is in the foreground.
A game of space invaders in progress. The RC2014 backplane with the RP2040 VGA terminal card is in the foreground. Yes whale.

The only thing I have left to implement properly is the buzzer.

It will require a different approach to the way I’ve implemented sound on the Pimoroni demo base as it’s addressed through the i2c bus. A quick hack earlier on today made it generate an ear-splitting monotone, but I’m hoping that I can do rather better than that once I’ve delved into the mysterious world of the pico-playground code yet again. Wish me luck …

9th January 2025

So the onboard buzzer won’t work for the purposes of the emulator as it’s active and will only emit a fixed 2Khz tone. Fortunately I think there are a couple of unused gpio pins that I can get to through the expansion connector, so pwm audio (as on the Pimoroni board) ought to work.

10th January 2025

Expansion header soldered to card, passive buzzer retrieved from my cardboard box of doomed projects, code edited to allow pwm output on GPIOs 23 and 24 and it all works. All that’s left to do is tidy the code up, put it back into the repo and update the documentation.

A RC2014 backplane 8 holding a RP2040 VGA terminal card. There's a passive buzzer attached to gpio 23 via the expansion header. The card is running the Pico MZ-80K emulator.
The finished article. The passive buzzer is attached to GPIO 23 on the expansion header. GPIO 24 also provides the same output.

11th January 2025

Not directly related to the RC2014 work (but it benefits from it) is the fix I’ve created today to remove the use the F9 key in standard builds (i.e. ones where a physical keyboard must be attached to the emulator).

The F9 key used to change the scanning method depending on how the MZ-80K program being used managed keyboard input. This mostly affected games written in machine code. The changes I’ve made to keyboard handling makes this kludge redundant, as everything now seems to work correctly without it. (Famous last words …)

16th January 2025

I’ve also got this working with the RC2014 Pi Pico VGA Terminal. A 3.3v microSD breakout board needs to be connected to the expansion connector as well as a passive buzzer or speaker (on GPIO18 and/or GPIO19), so perhaps this configuration is not as practical as the RP2040 based card.

Version 1.2.3 is the first version of the code to support both boards.

The Pi Pico VGA Terminal Board with microSD breakout and a chonky 3W passive speaker.