This project creates the firmware for ZX-Wespi-V - a DIY ESP32-based TFT/VGA-video-display-interface and wifi-enabled fileserver for ZX81. When using a Sinclair ZX81 nowadays, one may look for a more handy replacement of the TV set and cassette recorder. Maybe even something that can be built in, and allows to exchange the ZX programs and files via wifi to your modern computer.
Common modern LCD monitors often get in trouble with the ancient ZX81 video signal, as there is no colour carrier signal that allows the monitor to recognize PAL versus NTSC, and the synchonisation sinals are - lets say a 'bit more dynamic' than on modern devices, so nowadays' displays are offended and show blue screens whenever ZX switches to FAST mode. Wespi-V is ZX-aware, starts up quickly, handles FAST mode gracefully, and shows the expected LOAD/SAVE-stripes.
Components needed for building the device are quite inexpensive (about 20€ in total), and required soldering skills are just classic cables and a few simple components.
ESP32-based modules are often used whenever it comes down to electronics control tasks, combined with wifi communication abilities. Here, the I2S interface of the ESP is used to retrieve the ZX81 video signal - which is, as special feature of the ingenious ZX computers, also used as tape recorder output. ESP32 furthermore feeds the tape input of the ZX computer, so LOAD and SAVE work.
McKlaud kindly provided more professional drawings (great thanks !) :
Starting from software version v0.6, a simple VGA interface for standard monitors is supported.
For the VGA interface hardware, you need five resistors (3x 270$\Omega$ and 2x 100$\Omega$) and the well-known female-type 15-pin D-subminiature connector. Connect as follows:
ESP32 VGA
Module Connector
D13 ----[R 270 Ohm]---- 1 (RED)
D12 ----[R 270 Ohm]---- 2 (GREEN)
D14 ----[R 270 Ohm]---- 3 (BLUE)
D27 ----[R 100 Ohm]---- 13 (HSYNC)
D26 ----[R 100 Ohm]---- 14 (VSYNC)
GND ------------------- 6,7,8,10,5 (GND)
The monitor connection is completely optional, one may use VGA, LCD-TFT, both, or none.
ESP32 and TFT-diplay need 5 Volts at about 250mA. Safest variant is an additional switching regulator like outlined in the schematic sketch. If your ZX is already upgraded with a modern regulator or bigger heat sink, you may use the 5V from the ZX81 PCB directly.
If you use the Wespi as an external device, easiest wasy is of course to just utilize the USB plug as a power supply.
If you do not want to modify the ZX81 or its case, Wespi-V can also be used as external monitor/interface, connected via longer cables. In this case, R1 should be a 75 Ohms resistor to act as standard cable impedance termination. Of course, in this case it is required that the ZX is internally equipped with a video mod/amplifier.
0.6.3 Improvements for older ULA (2C184E) video signal
0.6.0 VGA output support added
0.5.0 Initial pre-release (derived from zx-iot-mi)
Info for the flash files and initial image download for the ZX-Wespi project:
ZX-Wespi is usually able to do over-the-air (OTA) updates via the webserver user interface.
However, for the following cases a regular download of the flash image is required:
This short instruction is for using the ESP32 download tool (tested with V3.8.5)
Connect ESP32 to computer via USB or COM as applicable
Get the download tool, at time of writing available at https://www.espressif.com/en/support/download/other-tools, choose flash_download_tool_v3.8.5 or higher
Run the tool, go to "Developer Mode", "ESP32", choose "SPI download" tab
Set up the following files and positions to flash:
For the rest of parameters, use:
Press start to flash. If the ESP32 does not connect automatically, try holding the BOOT knob and/or EN(reset)
Once you have the system running and connected to WLAN, incremental firmware updates can be done just using a browser. for this,
zx_iot_video.bin
and press upload. The process will take 30-60 seconds, the upload button will change text when done. As an info - Wespi OTA uses double-buffering, so a failed update should not harm.
Instruction v1.2