CPCEC Amstrad CPC emulator and its ZX Spectrum sibling ZXSEC
CPCEC is an emulator of the family of home microcomputers Amstrad CPC
(models 464, 664 and 6128) whose goal is to be loyal to the original
hardware and efficient in standard modern systems. Thus it brings a
faithful emulation of the Z80 microprocessor and it replicates the
behavior of the CRTC 6845 and Gate Array video chips, the PSG AY-3-8912
sound chip, the remaining circuits found in the original hardware, and
the tape deck and floppy disc drive that made possible loading and
ZXSEC is an emulator of the Sinclair Spectrum family (48k, 128k,
+2/Plus2 and +3/Plus3) based on the components it shared with the
Amstrad CPC family: the Z80 microprocessor, the PSG AY-3-8192 sound
chip, the tape system and the NEC765 disc drive controller.
CPCEC requires a Microsoft Windows 2000 operating system or later. The
minimal hardware requirements are those fitting the operating system,
and it's advised that the main microprocessor runs at 400 MHz at least.
Screen resolution in pixels must be 800x600 at least. A sound card is
optional. Using a joystick is optional, too.
The source code of CPCEC and its binaries follow the GNU General Public
License v3, described in the file GPL.TXT within the package.
Source code is located at the UNED project archive; it's also available on request.
Arkanoid 2 (1988 Imagine) CPC 464
Skweek (1989 Loriciels) CPC 6128
Cobra (1986 Ocean) Spectrum 48k
Zub (1987 Mastertronic) Spectrum 128k
Mega Phoenix (1991 Dinamic) CPC 464
Beast Preview (1992 Overflow) CPC 6128
Dark Star (1984 Design Design) Spectrum 48k
Deliverance (1990 Hewson) Spectrum 128k
Mission Genocide (1987 Firebird) CPC 464
Logon's Run (2017 Logon System) CPC 6128
Starion (1985 Melbourne House) Spectrum 48k
Mot (1989 Opera Soft) Spectrum Plus3
Samurai Trilogy (1987 Gremlin) CPC 464
PhX (2018 Condense) CPC 6128
Vectron (1988 Firebird) Spectrum 48k
Cray 5 (2011 Retroworks) Spectrum Plus3
This emulator owes its existence to a series of people and societies
that are listed as follows:
The firmware files included in the package are Amstrad's
properties, who allows the emulation of their old computer
systems and supports the distribution of their firmwares as long
as their authorship and contents are respected, and whom I
wholeheartedly thank the creation of those magnificent computers
and the good will towards their emulation.
This emulator was my final project for the Computer
Engineering postdegree at the Distance-Learning National
University (Universidad Nacional de Enseñanza a Distancia,
UNED), a project directed by professor José Manuel Díaz Martínez
and ultimately awarded a 100% and the right to a honorable
The documentation about the system comes from cpcwiki.eu,
cpc-power.com, cpcrulez.fr and quasar.cpcscene.net.
The alpha tests were handled by the faithful and loyal Denis
20190314 -- first public release.
20190317 -- second public release. Fixed Win32 joystick bugs: JoyGetPos returns ZERO on OK, not on ERROR.
20190318 -- third public release. By default the window shows a menu; new option -+ hides it.
20190325 -- fourth public release. Onscreen indicators (hide them with -O); fixed bugs in ZXSEC that slowed emulation down when the frameskip wasn't zero, and another bug in audio recording on WAV files.
20190331 -- fifth public release. Tapes can be browsed, either by file position (WAV and CSW) or by block (CDT, TZX and TAP).
20190404 -- sixth public release. Fixed a Z80 emulation bug in IRQ logic. Configuration (computer model and file paths) is kept across sessions in a INI file.
20190408 -- seventh public release. Fixed a bug in the YM3 file recording, another one in the ZXSEC internal timings, and one more in the debugger commands with optional parameters.
20190419 -- eighth public release. Added options for image and sound interpolation; tape automatically rewinds itself when it reaches the end (à la FUSE); fixed a bug in TZX files that store 0 instead of 8 in the "used bits" field, another bug in CUSTOM INFO blocks in TZX files, and another one when ZXSEC loads a 48K SNA file in Plus3 mode (users should manually switch to a safe model beforehand anyway). INI files now remember the names of the last used files.
20190430 -- ninth public release. Softer B/W Spectrum palette; fixed bug in FDC sector size calculation if GAP datas are stored (Loriciels' discs); added simple memory contention to ZXSEC ("Amaurote", "Black Lamp", "Puzznic", "Sly Spy", "Zub"...).
20190524 -- tenth public release. Added support for CDT/TZX file blocks 0x24 and 0x25 (loop start and ending) (cfr. BATMAN.TZX), fixed bugs in the handling of weak sectors in DSK files (cfr. "Titus Classiques"), YM file recording is reentrant, fixed a bug in INI files with empty fields and added the option `autorewind <0|1>` to rewind (or remove) a tape when playback reaches the end.
20190526 -- minor patch fixing a bug in autorun mode: opening menus and switching windows cancelled the automatic keyboard.
20190731 -- eleventh public release. Added a new UI-based debugger (typing commands is no longer needed) and support for ZIP archive reading based on PUFF.C from the ZLIB project, upgraded GCC to 5.1.0 and removed all `inline` tags (they did more harm than good), and generally reworked all internals to make them OS-independent. Several details improved as well: the file selector fixes a bug in Win10 (and in some cases in Win7), "browse tape" dialog shows the file name, Spectrum +3 automatically becomes +2A to load tapes, `auto rewind` shows up in Edit menu and fixes bugs in CSW files, and sound emulation has improved, for example "Terminus" on CPC plays sound and "Agent X II" on Spectrum is no longer noisy.
20190809 -- minor patch restoring the "silent" discarding (i.e. without error codes) of write operations in read-only discs and allowing the automatic booting of IBM-formatted discs.
20190817 -- minor patch fixing a crash when booting tapes right when the automatic frameskip kicks in.
20190831 -- minor patch fixing several bugs (booting two-sided discs with FLIP SIDE option on, recording snapshots or tapes after loading a snapshot or tape from a ZIP archive), improving several details (loading snapshots with memory compression, emulating up to 576 kB RAM) and redefining the menus (Edit is divided into Edit and Settings, Image and Sound become Video and Audio, new video filter functions...) and the command line: "-+" now limits the zoom to integer values; "-!" inherits the option of hiding the menu.
20191003 -- twelfth public release. Precise (albeit not perfect yet) memory contention and ULA noise ("snow") on Spectrum: "48K Timing Tests" passes all tests but 36 and 37, and "128K Timing Tests" fails on just six tests. "Mask 3: Venom Strikes Back" draws the attribute and border effects on their precise locations on all platforms (48K, 128K/Plus2, Plus3) and Software Creations' "Black Lamp", "LED Storm" and "Sly Spy" behave well on 128K machines. Improvements in the debugger: fixed disassembly panel invalid cursor locations, added optional tall characters, avoided debug+pause clashing, new key M toggles memory dump ROM+RAM and RAM-only modes. Improved ZIP handling (ZIP archives are no longer locked, files within archives are filtered by extension), user interface fixes.
20191004 -- minor patch making the debugger options set with V and M stick between sessions.
20191117 -- thirteenth public release. More precise emulation of type 1 CRTC (by default instead of 0) in CPCEC ("From Scratch", "Pinball Dreams"...) and 48K memory contention in ZXSEC ("Starion", "Black Lamp"...). CPCEC also allows choosing the length of the V-hold signal (for example "Thunder Blade" needs a short signal) and whether horizontal sync must be flexible ("Batman Returns", "Pinball Dreams"...) or not ("CPC 30th Anniversary Megademo", "PhX"). Unfortunately, some demos that worked well in past versions now suffer problems that cannot be solved by selecting another CRTC. Removed third joystick button in CPCEC, no real joystick ever included it. The ZXSEC joystick is Sinclair 2 by default.
20191130 -- minor patch fixing a bug when running CPCEC and ZXSEC on a screen shorter than 600 px, another one when recording a WAV file, and another one in the port logic of CPCEC ("Knight Rider", OUT &0088,&88 must not reach the Gate Array, but "Hero Quest", OUT &00C0,&C0 must reach it). The CRTC types 0 and 2 have improved ("Face Hugger Ultimate Megademo": "Tantrum", "5KB Megademo 3", "Power System Megademo": "Glooms"...) but cannot handle "Pinball Dreams" yet, unlike CRTC 3 and 4, that together with CRTC 1 support this game now.
20191227 -- fourteenth public release. Visual improvements: the green screen palette is closer to the original, the vertical filters ("Y-Masking") are compatible with the interlaced modes, mixing X-Masking and Y-Masking together shows a checkered pattern. Internal improvements: the new traits of the CRTC registers 3 and 9 and the delays between the Gate Array, the Z80 and the CRTC finally can emulate "Pinball Dreams" as a whole for all the CRTC types and solve the problems in several demos ("Scroll Factory", "Still Rising", parts of "The Demo"...) and games ("Action Fighter", "Storm Warrior", "Usagi Yojimbo"), although some titles still need particular CRTCs ("PhX" CRTC0, "Onescreen Colonies" CRTC1, etc.) to work correctly.
20191231 -- minor patch fixing a bug in the FDC (bit 6 of SENSE DRIVE STATUS must react when the user changes discs: "Fugitif") and a regression in CRTC0 (detect REG6<REG4 rather than REG6<=REG4: "5KB Megademo 3: Nayad"). Happy new year 2020!
20200101 -- minor patch fixing a regression in CRTC0 caused by the previous patch ("Scroll Factory", intro of "Pinball Dreams", "Overflow Preview: Part 1") and improving its heuristics ("Overflow Preview: Part 3").