[About] [Download] [Contact]
[About]

NUTRIA (the spanish for "otter") is a MS-DOS hosted emulator for the ZX Spectrum 48K. Under the knowledge of the author and according to the information gathered in the popular ZX-site World of Spectrum, it is the oldest Speccy emulator for the PC, along with Z80 and JPP, that were released the same year (thanks to Martijn van der Heide for the info).

I have sporadically written other software related to the ZX Spectrum since those days, such as a GIMP plug-in for converting RGB images into ZX-like ones and the ZX Ecosystem library for writing ZX-like programs for modern computers in C++.

The first version (NUTRIA-I) was written entirely in Intel286 assembly in 1991 (although some preprocessing programs were in TurboPascal), for an IBM PC AT equipped with a conventional CGA graphic card, thus it could not emulate the colours of the ZX or the border, only the bitmap on the screen. The ZX ROM was retrieved from an actual ZX Spectrum 48K through a home-made communication circuit attached to the rear ZX slot on one side and to the PC parallel port on the other. Some games were also transferred this way (no ZX games archive existed by then!). The schematic of the transmission circuit is below, but I have not checked it out, thus if you decide to use it or make anything like it, it is under your own responsibility!

There was not much information about undocumented Z80 and ZX features in the early 90s, thus it was not a perfect emulator in that sense. In spite of this, it could run a number of well-known ZX games completely. As a curiosity, it included a Z80 disassembler to examine on-the-fly the program being executed, as shown in the figure, and also a Z80 register explorer to watch and change the CPU registers.

They were three the versions of NUTRIA developed from 1991 to 1994. The second one (NUTRIA-2) was able to work with colours by using the 320x200 MCGA mode (256 colors) of a conventional VGA card, but did not emulate the ZX border. The third version (NUTRIA-3, see figure below) removed the fixed-on-screen control menu, substituting it by a full graphical interface written in C that hid while emulating, thus solving the border problem. This one substituted the integrated disassembler by an instrumentation of the emulator to gather statistical information from the execution of machine instructions of the Z80. Still a fourth version was developed in 2002, derived from the third one and recovering the disassembler and some monitoring options that were absent in previous versions; NUTRIA-4 was intended for improving the emulation by debugging the internals of the algorithms, thus it is not considered to be an application for the public.

In summary, the main limitations of the last public version (NUTRIA-3) are its still incomplete support for undocumented features and the need of conversion of the ZX games from standard file formats to the ones used by NUTRIA (the standards are standard only now!). Two small programs were developed to provide some limited conversion capabilities (from .SNA and SP formats). Also, when running the emulators in VirtualBox, I have detected the execution of some invalid 286 instructions in some programs, but this bug, probably hidden in the code since the first version of the emulator, does not have any influence when executing on a real MS-DOS machine.

Running in its original PC, the three versions of NUTRIA executed at about the same pace of a ZX at its original 3.47MHz clock. This was not achieved easily: some pre-fetching of registers and inlining of routines were necessary to accelerate emulation. In other words: the development of the core of the emulator in assembly language was absolutely justified at the time. Today, obviously, that would not be a limitation. The result is that the original versions of NUTRIA run too quickly in today computers, thus in this page you can download slightly modified versions that include a configurable delay to accommodate the high speed of current processors.

[Download]

Here you can download different files:

  • A zip file that contains the executable of the three emulators (no sources) plus some conversion utilities.
    [Download zip with executables, 215.8KB]
  • An iso image to be burned in a CD that contains a MS-DOS 7.0 live CD and also the executable files of the three versions of the emulator. The way of entering the emulator once the computer has been started is to select option 1 (enter MS DOS) and then change to device C: You will find the emulators in the NUTRIA directory, along with some utilities.
    [Download iso image, 12.6MB]
  • A zip file containing only the sources of the emulator (they were written and supported by MASM 5.0 assembler, Borland C 3.0, and Turbo Pascal). Please be aware that except for messages to be displayed in the interface, they are completely in spanish.
    [Download zip with sources, 211.1KB]

No further maintenance or development of these emulators is expected by now, given the abundant emulator scenario we have these days.

[Contact]

The NUTRIA emulators were developed by me (Juan-Antonio Fernández-Madrigal) during my MSc degree in Computer Science, for having fun and also for recovering my loved ZX. At that time I signed every software that I developed as "Archaeopteryx Soft".

They were forgotten short after that and survived through a number of backups until today. The only modifications made to the downloadable versions of this page have been the translation to english and the inclusion of the configurable delay, both intended to provide a minimally enjoyable software.

If you are interested in this work, or have any doubts about how to produce the format of the files needed by the emulator, you can contact me in "jafmag" (remove quotes) at gmail.