The ZX-Spectrum ZXMMC Interface's page
Garry Lancaster is developing a specific +3e ROM for this interface. The current beta version supports fast loading mode and let the user format, partition and setup the MMC card, as well as saving and loading files. It also supports the "spectrum" command, for .z80 and .sna snapshots loading.
The low-level I/O routines has been copied from the bootrom.asm ZX-Badaloc's firmware and put together with a small header in order to quickly test card communication. A 128K +3 machine was not available so the card has been tested on my 48K Spectrum. Processor orientation is reversed when compared to the +3, and in fact the card faces the internal side of the machine instead of the outer side. Keyboard connection is also not easy when the interface is plugged in such a model (which, however, is not the model that the card is made for).
The test software can perform the following functions:
USR 40000: Card initialization: Returns number of found cards (0, 1 or 2)
USR 40003: Writes 6656 bytes (13 blocks) from screen memory to sd/mmc card at a fixed position
USR 40006: Reads back 13 blocks from the same card's position to the screen
USR 40009: Loads a 16K snapshot, that should have been previously saved to the card by ZX-Badaloc. Number of snapshot should be POKED at address 23728
USR 40012: Copy 1 megabyte from CARD0 to CARD1 at offset +512K
USR 40015: Compares 1 megabyte between CARD0 and CARD1 at +512K offset
New optimized version with OUTI/INI for maximum performance (218Kbytes/sec @3.5Mhz) ASM Source Code
This short video has been recorded with an earlier home-made PCB prototype, in which it's possible to see the interface in action. After loading about 1KB from tape interface (the zxmmc test software), the following commands are typed in:
PRINT USR 40000, that initializes the card (see the blue led turning off) and returns 0 (OK: it was an early version, providing single card management)
POKE 23728,1 to select snapshot n. 1 (which is a 16K snapshot)
RANDOMIZE USR 40009, that actually loads the snapshot. The led on the interface turns on for a moment, during data transfer.
Another video shows the device in it's final version while comparing data between cards (function 40015). One megabyte is compared by 8K blocks. First, 8K are read from SLOT0 (blue led); then, the first 6912 bytes are copied to screen memory (just to see it); the corresponding 8K block is then read from SLOT1 (yellow led) and (again) the first 6912 bytes are copied to screen (this can't be noticed as data matches). A loop is then executed to compare the two buffers against any mismatch. If everything is ok, then the cycle is repeated with the next pair of blocks. Note that most of the time is spent copying data between read buffers and screen and in the comparison loop: the card's access time is very short (led is steady on during the whole 8K read process).
Back to Main Page