 ==============================		     Amstrad CPC Emulator
==++8888++++++++++++++++++++++--	    for DOS, DPMI and WIN32
==+88  88+++++++++++++++++++++--
==88 ++  888888+++++++++++++++--	 (C) Cesar Nicolas Gonzalez /
==88+++++ 88  88++++++++++++++--        CNGSOFT (01.08.1997-15.04.2003)
==88++++++88++88++8888++++++++--
== 88++88+88888 +88  88+++++++--	   http://cpce.emuunlim.com
==+ 8888 +88   +88 ++  8888888--
==++    ++88++++88+++++ 88   8--             88       8888    88
==+++++++8888+++88++++++88+8+ --            888      88++88  888
==+++++++    +++ 88++88+8888++--            +88      ++  88   88
==+++++++++++++++ 8888 +88 8++--             88       8888+   88
==++++++++++++++++    ++88+ +8--             88      88+++    88
==+++++++++++++++++++++8888888--             88   88 88       88
==+++++++++++++++++++++       --           888888 88 888888 888888
 ------------------------------            ++++++ ++ ++++++ ++++++

0.- Index
=========

	1.- Copyright and guaranty
	2.- Requirements and installation
	3.- Configuration
	4.- Usage of CPCE
	5.- Acknowledgements
	6.- Registered marks
	7.- History of CPCE

1.- Copyright and guaranty
==========================

	CPCE was developed by me, Cesar Nicolas Gonzalez (CNGSOFT).

	CPCE is Freeware. Shareware distributors can distribute it if
they only take fee for copying. Software and documentation are provided
"as is" with no warranty. CPCE is not Public Domain. I retain the
copyright.

	CPC ROMs are (C) Amstrad and Locomotive Software, who gave
permission to distribute them within CPCE.

2.- Requirements and installation
=================================

	CPCE features three different executable files:

	-CPCE.EXE (DOS) requires i286 CPU, VGA graphics and DOS 3.0. It
supports SVGA graphics, joysticks and SoundBlaster sound cards.
	-CPCE32.EXE (DPMI) requires i386 CPU, VGA graphics and DOS 3.0;
pure DOS users require DPMI (DOS protected mode interface) extenders
such as CWSDPMI. It supports SVGA graphics, joysticks and SoundBlaster
sound cards.
	-CPCE95.EXE (WIN32) requires i386 CPU, VGA graphics and Windows
95. It supports SVGA graphics, joystick and most digital sound cards.

	Compatibility and performance depend of the computer. CPCE.EXE
is the best choice for very old CPUs (286, slow 386), CPCE32.EXE is
better than CPCE.EXE in newer CPUs (486, Pentiums...), and CPCE95.EXE
features the advantages (and disadvantages) of softwares for Windows.

	CPCE is easily installed; just unpack the main ZIP file into a
folder. The ZIP file contains a folder structure that most unpackers
will build correctly, otherwise do it by yourself. You'll have this
structure:
	CPCE.EXE (DOS executable)
	CPCE.ICO (icon file for Windows)
	CPCE.INI (configuration file)
	CPCE.TXT (this text file)
	CPCE32.EXE (DPMI executable)
	CPCE95.EXE (WIN32 executable)
	DISC\ (disc files folder)
	FILE_ID.DIZ (description file for BBS and FTP)
	ROM\ (ROMs folder)
	ROM\CPC464.ROM (CPC 464 ROM file)
	ROM\CPC6128.ROM (CPC 6128 ROM file)
	ROM\CPC664.ROM (CPC 664 ROM file)
	ROM\CPCADOS.ROM (CPC AMSDOS ROM file)
	SNAP\ (snapshots folder)
	TAPE\ (tape files folder)
	VOC\ (digital tapes folder)

3.- Configuration
=================

	Configuration of CPCE may be done in two ways. The first one is
based on a configuration file, CPCE.INI, read by the emulator while
loading. The second one is the command line, where parameters may be
entered when booting the emulator from the DOS prompt.

	CPCE.INI is a text file whose contents feature the syntax
OPTION=VALUE; the value may be a number, a path or a file name. Lines
beginning with the semicolon (";") are ignored. Command line parameters
are preceded with a slash ("/") and may require a number, a plus ("+")
or a minus ("-"). Options are first read from the configuration file,
allowing command line parameters to override their values.

	Command line parameters are listed with the equivalent options;
boolean options are specified with "0" and "-" as FALSE, and "1" and
"-" as TRUE. Options requiring path names must have a ending backslash
("\"), the standard DOS and Windows path addressing.

	-DEBUG=<0..1> - /d[+/-]: Debug mode. Enable it to study the
inner working of the emulator: microprocessor operations and registers,
memory contents, etc. Its usage is explained in the next chapter.
	-HI-RES=<0..1> - /h[+/-]: Hi-res mode. When disabled, the
emulator requires less machine power, but emulation quality becomes
simpler and may become buggy. When enabled, emulation is accurate, but
more processing time is required.
	-REAL_SPEED=<0..1> - /r[+/-]: Real speed. Enable it to run the
emulator with the same speed the real machine had.
	-FRAMESKIP=<0..9> - /r<0..9>: Frame skip. Increase the value to
save machine power and get extra speed, but animation will lose
smoothness and quality.
	-PERFORMANCE=<0..1> - /c[+/-]: Performance. Speed percentages
are displayed on screen.
	-IMAGE_WIDTH=<0..3> - /h<0..3>: Screen width: 0 means 320
pixels (standard), 1 means 256, 2 means 336 and 3 means 384.
	-IMAGE_HEIGHT=<0..3> - /v<0..3>:Screen height: 0 means 200
pixels (standard), 1 means 224, 2 means 240 and 3 means 256.
	-IMAGE_DITHER=<0..1> - /b[+/-]: Screen dithering. It's a funny
effect; try it and see.
	-IMAGE_DOUBLE=<0..1> - /v[+/-]: Double screen definition (DOS
users require SVGA). High definition enhances image quality but needs
more machine power.
	-IMAGE_SCANLINES=<0..4> - /c<0..3>: Only for WIN32 version,
scanline mode for double screen definition. 0 means no scanlines; 1,
simple scanlines; 2, 50% intensity scanlines; 3, dithered scanlines;
4, hardware stretch. Fastest modes are 0 and 1. Slowest mode is 3.
	-IMAGE_FULLSCREEN=<0..1> - /m[+/-]: Only for WIN32 version,
full screen mode. ALT+ENTER (or RIGHT CLICK) switches it on and off.
	-SOUND=<0..1> - /s[+/-]: Sound playback. It won't have any
effect without a supported sound card.
	-SOUND_QUALITY=<0..2> - /s<0..2>: Sound quality. The quality is
11KHz with 0, 22KHz with 1 and 44KHz (CD quality) with 2.
	-SOUND_STEREO=<0..1> - /e[+/-]: Stereo sound. Only useful if
the sound card supports stereo playback.
	-SOUND_FILTER=<0..1> - /f[+/-]: Sound filtering.
	-SOUND_LOG=<0..1> - /w[+/-]: Sound logging. Enable it to record
the sound as a WAV file.
	-JOYSTICK=<0..1> - /j[+/-]: Joystick support.
	-ROM_PATH=<PATH\>: System ROMs location. The emulator needs the
CPC system ROMs to be located there.
	-ROM_TYPE=<0..2> - /t<0..2>: ROM type. Amstrad CPC computers
were sold in three types: CPC 464 (0), CPC 664 (1) and CPC 6128 (2).
CPC 464 had 64K RAM and tape drive; CPC 664 had 64K RAM and disc drive;
CPC 6128 had 128K RAM and disc drive. All CPCs allowed external disc
drives, and those not having a tape drive allowed an external one, too.
	-ROM_TYPE0=<FILE>: CPC 464 BIOS+BASIC 1.0 ROM file name.
	-ROM_TYPE1=<FILE>: CPC 664 BIOS+BASIC 1.1 ROM file name.
	-ROM_TYPE2=<FILE>: CPC 6128 BIOS+BASIC 1.1 ROM file name.
	-ROM_AMSDOS=<FILE>: CPC disc operating system ROM file name.
	-ROM_AMSDOS_DISABLE=<0..1> - /x[+/-]: AMSDOS usage flag.
Disabling AMSDOS emulates a computer without disc drive.
	-SNAP_PATH=<PATH\>: Snapshot files location. Snapshot files
store exact machine data, allowing to store the current status and to
recover it later.
	-TAPE_PATH=<PATH\>: Normal tape files location. Standard CPC
files may be used by the emulator by disabling the direct tape mode.
	-VOC_PATH=<PATH\>: Digital tape files location. CPC tapes may
be read as sound samples (VOC, WAV and CSW files) and as serial streams
(TZX and CDT files); they require the direct tape mode.
	-DIRECT_TAPE=<0..1> - /z[+/-]: Direct tape mode. By default,
the emulator redirects CPC tape files to standard files located in the
folder specified by TAPE_PATH. Enabling the direct tape mode disables
this redirection: the emulator plays and records digital tape files.
	-DISC_PATH=<PATH\>: Disc files location. Disc files are dumps
of real discs, that may be read and written by the emulator.
	-DISC_NEW_TRACKS=<0..99>, DISC_NEW_SIDES=<1..2>,
DISC_NEW_FIRST=<0..FF>, DISC_NEW_LAST=<0..FF>: Default disc format.
CPCE can create new, blank disc files; these parameters allow to set
their format. Common values are 40,1,C1 and C9 for DATA format, 40,1,41
and 49 for SYSTEM/VENDOR format, and 40,1,1 and 8 for IBM format.
	-PRINTER=<0..1> - /p[+/-]: Printer logging. Data sent to the
emulated CPC printer port will be stored in a file called CPCE.PRN.
	-DOUBLE_SPEED=<0..1> - /t[+/-]: Double microprocessor speed.
	-GREEN_SCREEN=<0..1> - /g[+/-]: Green screen. When buying a
CPC, screen could be green only (cheap) or full colour (expensive).
	-CRTC_TYPE=<0..4> - /g<0..4>: CRTC type. As the years passed,
CPCs were sold with different cathodic ray tube controllers (CRTCs),
that had different graphic performances.
	-YM2149_TYPE=<0..3> - /y<0..3>: YM2149 type. The standard sound
chip used a logarithmic volume table and a square wave; different
setups (linear volume, saw wave) may be chosen with this option.
	-YM2149_LOG=<0..1> - /y[+/-]: YM2149 logging. Sound chip data
can be recorded as a YM3 file that may be played back by utilities such
as ST-Sound, WinAmp YM plugins, etc. They may be up to 250 times
smaller than a equivalent WAV file, and are easily compressed.

	The configuration file is the same for all platforms, but you
can define different options with the prefixes "DOS.", "DPMI." and
"WIN32.", meaning the following option will only be used by the
specified platform. Non-prefixed options are always read.

	Command line allows file names, too; when launching, the
emulator will try to open them as snapshots, disc images or digital
tape files.

4.- Usage of CPCE
=================

	If no errors arise while launching, CPCE will start correctly
and display the familiar CPC screen. You can type BASIC programs, load
games, etc. Most PC keys emulate their CPC counterparts, with some
exceptions:
	-INSERT emulates COPY and DELETE emulates CLR.
	-Numeric pad keys can emulate the joystick. Press BLOCK.NUM. to
toggle joystick emulation. When enabled, 8 is UP, 2 is DOWN, 4 is LEFT,
6 is RIGHT, 5 and 0 are FIRE1 and "." is FIRE2; otherwise, they emulate
the CPC numeric pad.

	There's a series of functions available through the main
menu (press F10) or their keyboard shortcuts:

	-File:
		-Reset (F5): Resets the virtual CPC.
		-Load snapshot.. (F3): Loads a snapshot. A window pops
	up and lets you to browse the file system and load a snapshot.
	DOS and DPMI
		-Reload snapshot (Ctrl+F3): Loads again the latest
	snapshot.
		-Save snapshot.. (F2): Saves a snapshot. You may save a
	new snapshot, or overwrite an old one.
		-Resave snapshot (Ctrl+F2): Saves again the latest
	snapshot.
		-Open drive A.. (F7): Inserts a disc file into the
	virtual drive A.
		-Close drive A (Ctrl+F7): Empties the virtual drive A
	and closes the disc file in it.
		-Open drive B.. (F8) and Close drive B (Ctrl+F8): same
	than previous functions, but with the virtual drive B.
		-Play tape.. (Alt+F3): Inserts a digital tape into the
	virtual tape drive, and starts its playback.
		-Record tape.. (Alt+F2): Creates a new digital tape and
	starts its recording.
		-Eject tape (Alt+F1): Empties the virtual tape drive.
		-Exit (Alt+F4): Closes CPCE and goes back to the OS.

	-Options:
		-Debug (F9): Debug mode. Memory may be browsed with the
	cursor keys and the key G (Go to), and modified with the
	hexadecimal digits, 0-9 and A-F. Single instructions can be
	executed by pressing the space bar.
		-Breakpoint.. (Ctrl+F9): Microprocessor breakpoint. A
	breakpoint is an address that enables the debug mode when the
	microprocessor tries to execute the instruction located there.
	Breakpoints are disabled when entering a blank.
		-Real speed (F6): Switches the real speed status.
		-Hi-res (Ctrl+F6): Switches the hi-res mode status.
		-Double speed (Alt+F7): Switches the double speed
	status.
		-Direct tape (Alt+F8): Switches the direct tape status.
		-Save YM3 sound (Alt+F12): Switches the YM2149 logging
	status.

	-Image:
		-Monochrome (F11): Switches the green screen status.
		-Dither (Ctrl+F11): Switches the image dithering.
		-Performance (Alt+F11): Switches performance display.
		-Inc. frameskip (Num.pad +): Increases the frame skip.
		-Dec. frameskip (Num.pad -): Decreases the frame skip.
		-Max. frameskip (Num.pad *): Sets the frame skip to 9.
		-Min. frameskip (Num.pad /): Sets the frame skip to 0.
		-Save PCX image (F12): Saves the screen as a PCX file.
	-Sound:
		-Sound (F4): Switches sound playback, if available.
		-Filter (Ctrl+F4): Switches sound filtering.
		-Save WAV sound (Ctrl+F12): Switches sound logging.
	-Help:
		-Help.. (F1): Displays the keyboard shortcut table.
		-About.. (Ctrl+F1): Displays the splash text.

	File browsing supports ZIP archives. WIN32 version supports
"drag and drop" of snapshot, tape and disk files.

5.- Acknowledgements
====================

	-Thanks to Amstrad in general and Cliff Lawson in particular
for allowing me to distribute the original Amstrad CPC ROMs with CPCE.
And, of course, for creating the CPC!
	-Thanks to Marco Vieth, Bernd Schmidt, Ulrich Doewich, Martin
Korth, Richard Wilson, Antoine Pitrou, Kevin Thacker... for writing CPC
emulators: CPCEMU, CPE, CaPriCe, NoCash CPC, WINAPE, YAGE, Arnold...
Good emulators. In fact, most of them are better than mine :)
	-Thanks to Pedro Gimeno, programmer of SPECTRUM and SPEC386,
for his great work and his encouraging letters.
	-Thanks to The Fox of Emulators Unlimited ( www.emuunlim.com )
for hosting CPCE. My Capcom CPS1&2 emulator, CPSE, may be found there,
too ( cpse.emuunlim.com ).
	-Thanks to Emumania ( www.emumania.com ), Emulatronia
( www.emulatronia.com ), Carsten ( www.terra.es/personal/rt95plus ),
Joseman ( www.terra.es/personal2/amstradweb ), Malc Jennings
( www.commodore-ale.com/cpczone ), and more, for their interest in CPC
emulation.
	-Thanks to Antonio Ortiz Carrasco (found a bug in CPCE 0.8.1),
Esteban Ruiz "Pinace" (found a bug in CPCE 1.11) and Ramon Garcia
Hevia (dragon droppings).
	-Thanks to Tomasz Gryzstar for creating FASM, the best
assembler ever! Without it, CPCE would have never able to break the DOS
barrier.
	-Thanks for reading!

6.- Registered marks
====================

	-CPC, AMSDOS (C) Amstrad Consumer Electronics & Locomotive
Software.
	-SoundBlaster (C) Creative Labs.
	-Mentioned emulators (C) Their programmers.

7.- History of CPCE
===================

	-01.08.1997: First ASM lines.
	-20.11.1998 (v0.0): First version. Documentation in Spanish
only.
	-12.12.1998 (v0.1): Better Z80 emulation, border emulation, YM
logging. Documentation in English. Snapshot filenames don't need SNA
extension.
	-02.02.1999 (v0.2): Frame skipping, joystick emulation, better
interface... "Zub", "Bubble Bobble" and "Rainbow Islands" don't work
yet!
	-12.03.1999 (v0.3): Tape support through standard AMSDOS files
placed in the TAPE directory; standard extensions BAS and BIN aren't
required, as in a true CPC; CAT does nothing (use a DIR TAPE\*.* from
DOS instead).
	-12.05.1999 (v0.4): Sound through SoundBlaster-compatible sound
cards. PCX screens are saved in order (CPCE0000.PCX, CPCE0001.PCX...).
	-30.07.1999 (v0.5): Better interface, more options. A bit
faster emulation. Printer emulation: printed data is sent to a file
called CPCE.PRN.
	-10.03.2000 (v0.6): Fully rewritten! The @#$%&! bug of "Zub",
"Bubble Bobble", etc. has been fixed! Graphic user interface, more
options... YM logging doesn't need pitch fixing any more.
	-15.06.2000 (v0.7): Many new features! Disc emulation, tweaked
VGA graphics (more resolution), rasters, overscan, split screens,
multilanguage, configuration file, digital SoundBlaster sound... The
price paid for all these enhancements is a slower emulation, and a
larger executable file.
	-12.12.2000 (v0.8): Many extras and bug fixes: protected tape
files, better debugger, better digital sound, VOC tape files, YMP...
	-14.12.2000 (v0.8.1): Fixed a bug in the keyboard handler.
	-21.12.2000 (v0.8.2): Fixed another keyboard bug (!). Enhanced
tape handling (cache, CSW compression).
	-09.07.2001 (v0.90): Fully rewritten, more compatible. general
CRTC ruptures, CSW.COM. Multilanguage removed, does anyone miss it?
	-19.11.2001 (v0.91): Using a new programming library (made by
me), digital SoundBlaster sound gets more compatible, ZIP files are
supported, and a fistful of new and enhanced features. CPC emulation
itself is a bit more exact (Final Fight and others: CRTC ghosting) and
complete (CDT support).
	-09.09.2002 (v1.00): First multiplatform version (DOS, DPMI
and WIN32), thanks to the great FASM compiler. Again fully rewritten,
everything is now much better, faster, cleaner... Removed YMP and CSW
(did anyone use them?). Just two problems: WIN32 platform can't browse
(yet) ZIP files, and WIN2K doesn't like my WIN32.LSEEK (disc handling).
	-12.09.2002 (v1.01): Gabriel Gag warned about a distribution
bug: the configuration file requested PARADOS.ROM but the released
AMSDOS ROM is CPCADOS.ROM! Fixed.
	-03.01.2003 (v1.10): Printer logging, joystick support, better
NEC765 emulation (error handling), safer (WINNT4: WIN32.LSEEK bug) and
handier (ZIP file handling from WIN32, fullscreen mode).
	-19.01.2003 (v1.11): Scanline modes, some bug fixes (FDC: EOF
flag and Read ID command), TIMER flag removed (timer is autodetected).
	-10.04.2003 (v1.20): CDT and YM2149 engines rewritten, safer
ZIP file handling, dragon droppings for WIN32, ALT+ENTER/RIGHT CLICK,
performance, WIN32 screen size and multi-platform options.
        -15.04.2003 (v1.21): YM2149 bug fix, better default setup.
