Let's try something with SFML.
SpecIde is (yet another) ZX Spectrum (and, partially, Amstrad CPC) emulator. Currently, the ZX Spectrum emulation is quite accurate. The Amstrad CPC emulation is still a work in progress, but it is mostly enough for playing most games. Some of the supported features are:
You can check the Releases page for Windows binaries.
Sometimes I keep here non-official releases:
For GNU/Linux and MacOS I'm not providing binaries yet, but SpecIde can be compiled quite easily.
git clone https://github.com/MartianGirl/SpecIde.git
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_prefix_ -Bbuild -S.
with prefix being the path where SpecIde will be installed. For instance, to install SpecIde into $HOME/bin, the order would be: cmake -CMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~ -Bbuild -S.
cmake --build build && cmake --install build
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake
brew install boost
brew install sfml
(SFML 2.6.x is required)brew install zlib
brew install pkgconfig
ln -s $(brew --prefix sfml)/share/SFML/cmake/Modules/FindSFML.cmake $(brew --prefix cmake)/share/cmake/Modules/FindSFML.cmake
git clone https://github.com/MartianGirl/SpecIde.git
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_prefix_ -Bbuild -S.
with prefix being the path where SpecIde will be installed. For instance, to install SpecIde into $HOME/bin, the order would be: cmake -CMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~ -Bbuild -S.
cmake --build build && cmake --install build
I've successfully compiled SpecIde with MinGW and Visual Studio 2015 & 2017. I've included a script RunCMake.bat that helps in the build process.
set BOOST_ROOT=\<Path_to_Boost_root_directory\>
and set SFML_ROOT=\<Path_to_SFML_binaries\>
RunCMake \[MS32|MS64\] RELEASE
ninja clean & ninja install
or mingw32-make clean & mingw32-make install
(or use Visual Studio IDE)SpecIde is invoked from the command line. To run SpecIde, type:
SpecIde [options] [tapefiles|diskfiles]
Supported formats are TAP, TZX and DSK.
The following command line options are available:
Model selection options:
--issue2 Spectrum 48K, issue 2.
--issue3 | --48 Spectrum 48K, issue 3. (Default)
--48sp Spectrum + 48K. (Spanish ROM)
--128 Spectrum 128K.
--128sp Spectrum 128K. (Spanish ROM)
--plus2 Spectrum +2.
--plus2sp Spectrum +2. (Spanish ROM)
--plus2a Spectrum +2A.
--plus2asp Spectrum +2A. (Spanish ROM)
--plus3 Spectrum +3.
--plus3sp Spectrum +3. (Spanish ROM)
--pentagon Pentagon 128.
--cpc464 Amstrad CPC 464. (BASIC v1)
--cpc464sp Amstrad CPC 464. (Spanish ROM, BASIC s1)
--cpc464fr Amstrad CPC 464. (French ROM, BASIC f1)
--cpc664 Amstrad CPC 664. (BASIC v2)
--cpc6128 Amstrad CPC 6128. (BASIC v3)
--cpc6128sp Amstrad CPC 6128. (BASIC s3)
--cpc6128fr Amstrad CPC 6128. (BASIC f3)
Joystick options:
--kempston Map joystick 1 to Kempston (older behaviour). Map joystick 2 to Sinclair 1.
--kempstonnew Map joystick 1 to Kempston (newer behaviour). Map joystick 2 to Sinclair 1.
--fuller Map joystick 1 to Fuller and enable Fuller sound. Map joystick 2 to Sinclair 1.
--cursor Map joystick 1 to cursor keys. Map joystick 2 to Kempston.
--sinclair Map joystick 1 and 2 to Sinclair interface. (Default)
--pad|--nopad Map pad extra buttons to keys.
PSG options:
--psg|--nopsg Emulate AY chip in 48K Spectrum.
--abc|--acb|--mono Select stereo mode.
--turbo Select TurboSound with 2 PSGs. (mono)
--turboacb|--turboabc Select TurboSound with 2 PSGs. (stereo ACB/ABC)
--turbonext Select Next-style TurboSound with 4 PSGs.
--ay|--ym Select PSG: AY-3-8912/YM-2149.
Covox options:
--covox LPT Covox on port 0xFB (Mono)
--covox2 Stereo Covox (ports 0xFB and 0x4F)
--covox3 Czech Covox (ports 0x1F, 0x3F, 0x5F)
--soundrive1 Soundrive on ports 0x0F, 0x1F, 0x4F, 0x5F.
--soundrive2 Soundrive on ports 0xF1, 0xF3, 0xF9, 0xFB.
--nocovox No Covox present.
Misc hardware options:
--sd1 Emulate Dinamic SD1 hardware protection.
--cmos|--nmos Emulate CMOS/NMOS Z80. (Affects OUT(C),0 instruction)
Video options:
--fullscreen Start SpecIde in full screen mode.
--window Start SpecIde in windowed mode.
--scanlines Render PAL double scan mode.
--average Render PAL double scan mode, averaging scanlines.
--nodoublescan Single scan mode. (Default)
--sync Sync emulation to PC video refresh rate (only 50Hz)
Sound options (add prefix 'no' to disable. Eg. --nosound):
--sound Enable buzzer/PSG sound. (Default)
--tapesound Enable tape sound.
Emulation options (add prefix 'no' to disable. Eg. --noflashtap):
--flashtap Enable ROM traps for LOAD and SAVE.
When the emulator is running, pressing F1 displays help about the function keys.
Key | Function |
---|---|
F1 | Display help. |
F2 | Switch between fullscreen and windowed mode. |
F3 | Save DSK file to disk. |
Shift-F3 | Create blank DSK file. |
F4 | Select next disk image. |
Shift-F4 | Select previous disk image. |
F5 | Reset the Spectrum. |
F6 | Clear SAVE buffer. (Spectrum only) |
Shift-F6 | Add FlashTAP to SAVE buffer. (Spectrum only) |
F7 | Write SAVE buffer to disk. (Spectrum only) |
Shift-F7 | Use SAVE buffer as FlashTAP. (Spectrum only) |
F8 | Toggle PSG: AY-3-8912/YM-2149. |
F9 | Turn sound on/off. |
Shift-F9 | Turn tape sounds on/off. |
F10 | Exit the emulator. |
F11 | Play/Stop the tape. |
Shift-F11 | Remember tape position. (Reset tape counter to zero). |
F12 | Rewind tape to start. |
Shift-F12 | Rewind tape to saved position. (Rewind to tape counter zero). |
Finally, SpecIde looks for a configuration file (SpecIde.cfg) in the following places:
A template SpecIde.cfg.template is provided in the source code, and a sample SpecIde.cfg is included in the binary distributions.
System ROMs can be placed also in the config directory:
The following ROMs are included in the binary packages:
File Name | Model | Size |
---|---|---|
48.rom | Spectrum 48K | 16K |
128-0.rom | Spectrum 128K (ROM 0) | 16K |
128-1.rom | Spectrum 128K (ROM 1) | 16K |
plus2-0.rom | Spectrum +2 (ROM 0) | 16K |
plus2-1.rom | Spectrum +2 (ROM 1) | 16K |
plus3-0.rom | Spectrum +2A/+3 (ROM 0) | 16K |
plus3-1.rom | Spectrum +2A/+3 (ROM 1) | 16K |
plus3-2.rom | Spectrum +2A/+3 (ROM 2) | 16K |
plus3-3.rom | Spectrum +2A/+3 (ROM 3) | 16K |
128-spanish-0.rom | Spanish Spectrum 128K (ROM 0) | 16K |
128-spanish-1.rom | Spanish Spectrum 128K (ROM 1) | 16K |
plus2-spanish-0.rom | Spanish Spectrum +2 (ROM 0) | 16K |
plus2-spanish-1.rom | Spanish Spectrum +2 (ROM 1) | 16K |
plus3-spanish-0.rom | Spanish Spectrum +2A/+3 (ROM 0) | 16K |
plus3-spanish-1.rom | Spanish Spectrum +2A/+3 (ROM 1) | 16K |
plus3-spanish-2.rom | Spanish Spectrum +2A/+3 (ROM 2) | 16K |
plus3-spanish-3.rom | Spanish Spectrum +2A/+3 (ROM 3) | 16K |
pentagon-0.rom | Pentagon 128 (ROM 0 - 128K + TR-DOS support) | 16K |
pentagon-1.rom | Pentagon 128 (ROM 1 - 48K BASIC) | 16K |
trdos.rom | TR-DOS ROM for BetaDisk 128 | 16K |
amsdos.rom | AmsDOS ROM for CPC 664/6128 | 16K |
cpc464.rom | BASIC ROM for CPC 464 | 32K |
cpc664.rom | BASIC ROM for CPC 664 | 32K |
cpc6128.rom | BASIC ROM for CPC 6128 | 32K |
Also, the fonts can be placed in here:
This is an attempt at writing a ZX Spectrum emulator using SFML for video, audio and user interface. The goals I set for myself were:
David Garijo: For taking the time and helping with the MacOS build process.
Ast_A_Moore: For all his help with the +2A timings and port 0x0FFD.
César Hernández Bañó: For his help with the initial values for IR register, his comments, and his own emulator ZesarUX.
Miguel Mesa: For pointing out that the FLASH attribute was running at half speed.
Weiv (for his tests), ICEknight (for his videos), and all the people who helped describing the ULA Snow Effect on 48K/128K/+2 machines.
People from the #emulation discord for their ongoing testing efforts to discover every detail on the ZX Spectrum machines.
ZXSpectrum.ttf font by Jorge Ferrer García (JFSebastian) (Public Domain - http://unlicense.org)
AmstradCPC.ttf font by Damián Vila Río (CC0 1.0)
Older AmstradCPC.ttf font by Wesley Clarke (CC-BY-SA 4.0)
ZX Spectrum ROMs are (c) Amstrad PLC. Amstrad PLC has kindly given permission for the redistribution of the ZX Spectrum ROMs for their use with emulators, but retains the copyright for them.
Amstrad CPC ROMs are (c) Amstrad PLC. CPC BASIC is (c) LocoScript Software (Howard Fisher). Both parties have kindly given permission for the redistribution of their unmodified ROMs for their use with emulators, but retain the copyright for them.