The ZX-Spectrum ZXMMC Interface's page
This interface can be plugged into the Z80 socket of a 128K +2A/+3 ZX-Spectrum (it works on any spectrum including 16/48K machines, but there are physical clearance problems). Being a standalone version of the SD/MMC-Card interface of the ZX-Badaloc clone project, it provides communication with sd/mmc cards through an hardware SPI port built into a Xilinx CPLD. Transferring a byte to/from the card (which requires a single OUT or IN instruction) takes 16 Z80 T-states, so the adapter can sustain the continuous data flow produced by OTIR/INIR (both 21T-states long). Maximum performance can be achieved by 'code unrolling', a sequence of INI/OUTI instructions (just 16T-states), suggested by Paolo Ferraris: 218 KByte/sec at 3.5MHz.
To tell it right, this interface can be used on ANY Z80-based project with 40 pin DIL socket, provided that ports $1F and $3F are not in use. A7:A0 address lines are fully decoded.
The interface supports up to two cards, but the pcb has room for just a single slot. The second one may be soldered on the top of the first (see picture below); all pins are tied together but the chip select, which (for second slot) should be wired to "PAD1" (the gray wire in the picture). Then, the new card can be selected by lowering D1 instead of D0 on the $1F chip select register. A led is provided for each slot, indicating card access.
The basic version of this interface (in the photo) provides
SD/MMC
card communication and fits into an XC9536XL Xilinx CPLD. The full
version (that requires an XC9572XL) also provides a Kempston
Joystick
port and a RS-232 115K2 baud serial port (TTL type: level
translator is
not on board). The spare pin strips at the bottom of PCB are for
kempston/rs-232 connections.
Schematic PCB CPLD CPLD Programming Assembling SPI Software Examples RS-232 Software and Level Adapter Contact the author