This is the home page of the ZX Ecosystem: a C++ library that provide your C++ programs with the look and feel of an authentic ZX Spectrum! The library includes support for the main user interfaces of the original ZX: the screen, the keyboard and the sound, replicating really closely their behaviors under the ZX operating system. It also has built-in support for the mouse, if you have one.
The uses of this library can be very diverse:
This library has been built upon the experience obtained through other works that I have done around the ZX Spectrum, such as the GIMP plug-in for generating ZX-like images and the Nutria ZX Spectrum emulator.
Currently the ZX Ecosystem library is written in C++11, thus it is intended for most modern programs. For installing it, just follow these steps:
The structure of your programs may be diverse, since, as you will see in the documentation, there are several ways of executing code with the ZX interfaces, mainly due to the way screen refresh is done. Perharps the most common skeleton is something like this:
In this skeleton first we get the singleton object responsible for accessing the desktop of our system, then get the ZX object for that desktop, then activate the ZX, and finally call user code under some refresh mode. The example in the figure does not need anything else except substituting the ellipsis with your code; in this case (periodic refresh mode), that code will be executed in a thread different from the main one.
The ZX Ecosystem library also includes a testing program (
test.cpp) that can be used as a much more complex example: it performs a thorough test of every functionality of the library, as seen in the video below. Be prepared for colors and sounds!
The ZX Ecosystem library is not too small or naïve. Detailed documentation on its classes and functionalities can be found here. Better start with the
ZX class and then follow the thread of the other classes and definitions as it uses them.
These are the links to download the ZX Ecosystem Library in all its modalities (open-source, compiled for Linux or for Windows). Do not forget to read the README.txt!
The ZX Ecosystem library has been developed by me (Juan-Antonio Fernández-Madrigal) in Aug-Nov 2016 (v1.0.0), Oct 2018 (v1.1.0) and Dec 2018 (v1.1.1). It was originally an exercise for deepening into C++11, SDL2, and Doxygen (and into the ZX Spectrum too!).
The intended use of the library is to be free only for non-commercial use, but the open-source license does not prevent to use it for commercial products as long as the same license is forwarded. I will appreciate that you mention this web page in your programs ;) If you are interested in other uses of the library, or in some variation of it, contact me at "software" (remove quotes), jafma.net.