BaDCaT Wifi Modem
Homebrew project for MSX computers
BaDCaT wifi modem
BaDCaT PCB
New SMD (AFE) version with PLCC UART
BaDCaT Wifi Modem
Picture from retropixelwarriors.blogspot.com
BaDCaT, is a WiFi modem to connect our MSX computers to the Internet. The main goal was to reduce Z80 CPU load as much as possible with the addition of external hardware in the same cartridge for TCP/IP processing. On the other hand to be able to work on MSX1 computers even with low RAM. All this process is carried out by an ESP8266 integrated circuit, specifically the ESP12 version with 4MB of flash memory.
The cartridge consists of an UART 16C550C which implements an RS232 port as interface between ESP12 and the MSX bus. It also provides an standard serial port to the MSX. In short, we could say that this cartridge features two working modes:
MSX1: both the TCP/IP stack and telnet client run on the cartridge. The computer would only run a terminal program.
MSX2 and higher: the TCP/IP stack runs on cartridge and telnet client on the MSX. To do this, the ducasp's telnet version has been modified in order to offer the same functionality with the WiFi modem and UNAPI interfaces. This telnet version is already available on ducasp's Github.
Technical specifications:
MSX1/MSX2 (and higher) compatible.
Serial port up to 115200 bps.
RTS/CTS flow control.
Fossil driver compatible (without any modification).
ESP12 modem based on zimodem, effective speed of 57600 bps.
ducasp's telnet compatible and with all its functionalities (fast ANSI decoding, files download...)
Possibility of running telnet client on the cartridge itself.
Upgradable firmware.
Experimental feature: loading roms up to 48KB (thanks to Armando Pérez!)
UNAPI driver available (only SMD version) for MSX2 computers (thanks to Alexander Nihirash)
First Prototype
BaDCaT project started as a way to have a Fossil Driver compatible RS232 port to transfer files from the PC to the MSX. But... Why use cables while we can connect machines wirelessly? This was the beginning of the BaDCaT wifi modem
After some testing, I decided to use the espressif ESP8266 in its ESP12 version, as it incorporates some very nice features beyond wifi connection such as 4MB of flash memory that provides enough room for having a relatively sophisticated firmware. This way, it would be possible to offload all the TCP/IP processing out of the Z80, and even implement some application layers in the cartridge... This opens a world of posibilities while having an easy to access hardware! Moreover, since the ESP processor can be accessed using very simple assembler program, no special requirements are neccessary and it can be used in MSX1 machine with small amount of RAM
Fossil Driver Compatible
An SDCC-ASM library was created to make an easy interface to the Fossil Driver. This way, BaDCaT modem is compatible with all the software which uses that driver. This library can be found here: https://github.com/andortizg/MSX/blob/master/fossil_interface.h
Ducasp Telnet compatible
Benchmarking
Thanks to X1pepe for making downloading speed comparisons with different Network interfaces available for MSX computers. The results are summarized in the following figure.
Downloading times for a big ANSI and a 32KBytes file from sotanomsxbbs. BaDCaT performance was compared with GR8NET and Obsonet Interfaces (thanks to @x1pepe)
OTA upgrades
Now the BaDCaT firmware can be upgraded from the internet with just a command. This way, upgrades and new functionality can be added in the future very easily.
BaDCaT V1.3 storage
The new firmware of BaDCaT allows you to manage a local filesystem in the BadCaT flash. Moreover, you can load roms up to 32 KB in your MSX/MSX2 computer!
Additionally, files can be downloaded from an internet repository to the local storage, or even execute roms directly from Internet, without copying into the local storage.
** Not available with UNAPI firmware
New! UNAPI firmware and driver available
UNAPI driver for BaDCaT SMD version (AFE)
MSX2
Active TCP and UDP protocols implemented
Firmware, BaDCaT configuration tool and UNAPI driver available at: https://github.com/andortizg/BaDCaT/tree/master/UNAPI