Following my recent inclination of using up left-over PCBs from previous projects, this time I found a LambdaSpeak-FS leftover PCB and started thinking. Given it's SPI, I2C and UART headers, it's actually quite a versatile "host" for all kinds of modules to be connected to its generic Z80 IO base. I already added the infamous DS3231 RTC to its I2C header on the back. Still need to write firmware support for reading and setting the clock, and for communicating with it over the Z80 databus (using port IO). Soon.
But for starters, I decided to go with the SPI header and turn this into a graphics display / "VDP" for he Microprofessor. Back in the day, there was a primitive graphics interface available for the machine, and a remake exists, but it is a heavy lift requiring a lot of retro- and somewhat difficult to source components (i.e., the MC6845 display controller).
Then, there is also https://github.com/dadecoza/arduino-mpf1-vdp, which is super minimal and only requires an ATmega 328p to produce b&w PAL or NTSC video, utilizing the TVOUT Library. But, it is low resolution, has no color, and a bit "too minimal" for my taste. A real CRT is nice, but not very practical for a little portable machine such as the Microprofessor, so, I decided to keep the footprint small and to simply add an Adafruit ST7735R 160x128 TrueColor TFT display from my stash to the LambdaSpeak-FS SPI, and go from there.
Porting the LambdaSpeak-FS ATmega 644p-based firmware was a bit more challenging, and after a bit of trial and error I decided to go with MightyCore which, to my relief, worked out of the box with the Adafruit GFX Library on the ATmega 644p @ 20 MHz. I then re-wrote the required parts of the WinAVR-based LambdaSpeak-FS firmware in Arduino with MightyCore for doing the Z80 bus IO, and after a few hours of struggling with the infamously slow GPIO operations I finally got this work (by bypassing the Arduino GPIO operation). The result can be seen here:
In the next weeks, I will add support for the RTC (given that we already have a speech synthesizer working, it would be a missed opportunity to not implement a speaking, graphical analog clock!), as well as more graphics primitives from the Adafruit GFX library. My goal is to get the Appleman / Mandelbrot fractal on the screen. Stay tuned!
Michael Wessel
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.