Yet another FPGA ZX Spectrum
A few years ago I did the FPGA
Speccy on a Digilent
development board with a Xilinx Spartan 3 chip. The software had to be
loaded from tape images via a sound card. Not the most convenient way
to do it. And not fast. Recently I learned that there is now a new OS
for a Spectrum equipped with a storage device - IDE disk, CF or MMC/ SD
card.
It is called ResiDOS
and it is capable of a lot of neat things - most importantly directly
loading the tape image files (TAP and TZX) that constitute the bulk of
all the programs in the web archives. Also direct use of the MMC/SD
card to store and load BASIC and CODE files. Well, you get the picture.
Read it's home page for more.
I already had an Apple ][ version
made for the Altera/Terrasic
DE1 board.
Apart from being a great development tool, DE1 is a really
nice retro-computing platform.It has SRAM, SDRAM, FLASH memories, 12
bit VGA and an MMC/SD card connector.

My System_on_a_chip includes an MMC/SD card interface for loading. The
only problem was the software. I only had a very simple program to load
48K "SNA" snapshots from the MMC/SD
for ZX Spectrum. (My Apple can use card files for floppy images and
ProDOS volumes).
If this doesn't look like a Spectrum font, that's because it is not.
The code runs from internal (to the FPGA) memory and the Spectrum ROMS
are not paged in. Rather than copying the text output routines I had
added a text mode with a hard character generator. It takes the same
space as a character table would but makes printing to the screen real
easy. The "attribute" memory is used to hold ASCII codes.

But that should be enough to load the ResiDOS itself from the SNA image
for the first time.
ResiDOS lives in paged RAM that doesn't exist on the original ZX
Spectrum but was added as part of the storage extension cards (such as
ZXMMC+). It needs a battery to hold the data with the power turned off
and I don't have any such memory on the DE1 board. The solution is to
store the 256K in a file on the same (or another) MMC card. All the
additional packages and settings of ResiDOS are preserved. Takes a
fraction of a second to load. And you get ResiDOS in all its glory.

The TAPEIO package works like a charm. Unfortunately there is some
problem that doesn't allow SNA images to be correctly loaded under
ResiDOS but I'll try to fix it with the OS author's help. Meanwhile 48K
SNA (but not .z80 or 128K SNA) files can be loaded by my simple
boot code.
The source is available here.It is a full
Spectrum 128 including the sound plus ZXMMC+ style paged low 16K of
memory. RAM mappable to the low 16K means of course that you can run
CP/M on this platfom if someone writes BIOS/BDOS that is...
If you have a DE-1 board and decide to try my image you need to know a
few things:
Switch SW9 must be UP or there is no CPU clock (for
debugging).
SW0 up means that FLASH images
of Spectrum ROM is mapped in. You need to load the 128K ROM image
starting from address 100000 using the "control panel" that comes with
the board
if you want to use the "native" Spectrum 128 ROMs.
SW1 up means that the extra RAM with ResiDOS is mapped in at reset.
Naturally only works if ResiDOS is loaded there first.
ResiDOS also keeps patched Spectrum ROM in one of the low memory banks
so it will work even without the ROM image in FLASH memory.
So take a blank MMC/SD card formated as FAT16. Most of them are. Copy a
file NVRAM.BIN to the root directory. Copy any number of SNA, TAP, TZX
or whatever images to whatever directory on the card you want. Insert
the card into DE1. Make sure all the
switches are DOWN except for SW9 that MUST be UP.
You should see on the screen:
MMC FAT16
1 NVRAM .BIN
Hit "1" and ENTER. 8 lines of pluses on the screen mean that ResiDOS
loaded.
Move SW1 UP. Press KEY0 - reset. ResiDOS should be
running.
to contact me add "alex@" to this
page's domain