ASCD 0.98 - Documentation

ASCD is an emulator of Sam Coupé and ZX Spectrum. This version runs in Windows; supported is Windows 2000 and later, DirectX 6. DirectX 9 is recommended for better display experience. Older versions of ASCD supported also Windows 9x and MS-DOS. You can download all versions from www.keprt.cz.

Hardware requirements

There are almost no requirements. ASCD is written in C++ and compiled with Visual Studio 2008, which makes it run on almost any computer with Windows 2000/XP/Vista/7 or newer version of Windows. It uses standard soundcard if a soundcard is present. The current version is intended for nowadays fast computers, while the old versions (prior 0.98) run well on old slow computers with low memory. Minimum requirement is DirectX 6 (which is always present in all Windows), and DirectX 9 is recommended for better display.

What is emulated

ASCD was originally written as a Sam Coupé emulator. Later, ZX Spectrum and ZX Spectrum 128 support was added. The CPU timings aren't 100% perfect, as those computers are different, but here they share the common Z80 CPU emulation core. You can select emulation mode with generic command line switch -zxmode, with specific command line switches -zx, -128 or -sam or in the main menu.

Sam Coupé mode

You can select Sam Coupé mode with -zxmode 0 switch or in the main menu. Emulated features are:

Note that ASCD supports digital speech on beeper bit and also external DAC on ZX Spectrum, but not on SAA1099. SAA's output is updated 50x per second, beeper bit is updated 15625x per second.

ZX Spectrum mode

You can select ZX Spectrum mode with -zxmode 1 or -zx switch or in the main menu. Emulated features are:

Note that the Fullerbox AY and 3x8bit DAC use the same output ports. This means that these two devices can't be used together. ASCD always starts in Fullerbox mode, and switches to DAC as soon as it detects that the running program uses the shared ports for DAC output. The emulation is switched back to Fullerbox mode on next reset. This way users can use both Fullerbox and DAC and don't need any manual configuration.

ZX Spectrum 128 mode

ZX Spectrum 128 is very similar to the original ZX Spectrum. The emulation is very similar as well, there are just a few new features in 128K mode. You can select this extended ZX Spectrum 128 mode with -zxmode 2 or -128 switch or in the main menu. Emulated features are the same as in ZX Spectrum mode, plus the following:

Many games provide nice AY music even in 48 KB mode. That's why the AY emulation is always on even in 48 KB mode. Also, the paging disable bit of ZXS128 is ignored, and paging is always enabled when you run the emulator in ZXS128 mode. When you switch the emulator to ZXS48 mode (-zxmode 1 or -zx), then paging register is not available, memory fixed to 48 KB, but AY audio is still active.

Note that ASCD supports digital speech on beeper bit and also external DAC, but not on AY-3-8910. AY's output is updated 50x per second, beeper bit and DAC is updated 15625x per second. (You can try MQM5 demo to hear the difference.)

Supported fileformats

ASCD supports several fileformats, and also brings some new fileformats where no standard fileformats do exist.

Note about TAP files on Sam Coupé: Sam Coupé has very advanced tape routines in ROM which support some features not present on ZX Spectrum. In order to keep the standard TAP file format on Sam Coupé, I had to solve one particular problem: Sam Coupé can have particular files larger than 48 KB in one uninterrupted tape block, but this is not possible in a regular TAP file. ASCD currently limits the file size on a tape to 65533 bytes, which is the maximum size possible in TAP file. The resulting file is still a 100% standard TAP file and can be loaded on ZX Spectrum 128 using some 128KB copiers with paging support. You can test TAP files in Mr.Copy+ copier program, which is directly supported in ASCD (there is a special Mr.Copy+ hack in ASCD which make it work even without any low level EAR/MIC bit emulation).

New .SCS file format is fully documented, you can find the latest documentation version here.

OpenAir recording

OpenAir library is an open implementation of older famous AIR input recording system. The main difference between AIR and OpenAir is in encryption: AIR was intended for computer game tournaments and used a multilevel encryption system, the file format was closed, and the software was quite complicated. The new OpenAir library supports the same application programming interface (API) but uses new unencrypted simple file format.

AIR files record keyboard, and possibly digitla joysticks, but not mouse. You must control the input recording from command line: -record <file.air> starts the emulation in recording mode. You must also specify the name of disk image or snapshot or tape as another parameter. Name of the disk/snap/tape file is stored to AIR file, so you can replay the recording later using the switch -playback <file.air>.

Audio-video recording

One of the new features in ASCD 0.98 is the ability to record audio-video to an AVI file. It is strongly recommended to install a good video coded prior to the video recoring, because there is a 2.0 GB limit on standard AVI files. (ASCD uses WfV library in Windows API to write AVI files and there is 2.0 GB limit in there.) Actually, ASCD can write up to 4 GB to a single file, but some players and editors won't be able to read it correctly.

The #1 codec for ASCD is SCLS, the #2 option is MSUD. Both these codecs are lossless, so they provide the best image quality. SCLS is superior to MSUD, because it is faster and has a significantly higher compression ration. These two codesc and can be obtained at Moscow State University. (Enter MSU SCLS codec to Google, or click here: SCLS MSUD.) If neither of these codecs is present, ASCD tries to use MJPEG codec. MJPEG is a codec used by many personal camcorders, it is a native format on DV digital video casettes. But MJPEG codec is usually not free. You need to obtain VfW codec (not DirectShow). I successfully tested ASCD with Morgan MJPEG codec, it is just necessary to set compression quality to 100%.

AVI video recording must be started from command line using switch -writeavi <file.avi>. Video is always recorded in resolution 320x240, it always contains the border, and it is compressed if a suitable video codec is found. Codecs are tried in this order: SCLS, MSUD, MJPG. If neither of these codecs is found, the video is written in RGB24 uncompressed form and you can record only 5.5 minutes of gameplay. Audio is always recorded in 44100 Hz stereo, even in ZX Spectrum mode (where audio is mono), and it is always compressed by Microsoft ADPCM codec. This audio codec is always present in Windows, so you don't need to install anything. The audio bitrate is always 384 kbps.

You should be able to replay AVI's created by ASCD in any standard video player. Successfully tested were: MPlayer and its clones, Media Player Classic, also VirtualDubMod editor work perfectly. The SCLS and MSUD aren't supported work in VLC player.

Quicksave/Quickload

Another new interesting feature in ASCD 0.98 is the ability to do a quicksave/quickload. The saved files reside in quicksave directory, so you can find them in there and make a copy of one particular quicksave if you wish, but the main goal of this feature is to let you play easily many games, because you can reload the game when you die etc. In other words the quicksave feature is like rewinding the game to a prior point in time. :-) This powerful feature can be also combined with -record switch to record the game. ASCD record the optimum best gameplay, i.e. it skips all parts which you "rewind" by quickload. :-)

Advanced options

ASCD was originally controlled by command line switches only. Later an INI file was added. Now some options can be also controlled from a standard Windows' main menu, but not all. Some advanced options must be set in ascd.ini or can be set using command line switches. Command line uses the same set of switches as ascd.ini file, you just need to add - in front of it. (For example you write zxmode 1 in ascd.ini, but you write -zxmode 1 at the command line.)

Also note that some special command line switches aren't saved to ascd.ini and must be always entered on command line. You can see the list of all cupported command line switches in menu Help - Command Line Switches.

Note that on the original Sam Coupe keyboard there are keys F0 to F9 in place where a PC has numeric keypad. Beacuse of that Sam Coupé's F-keys are emulated with PC's numeric keypad. It means that if a program says "press F1", you need to press numpad-0, not F1. Real PC F-keys are used to control some emulator's settings on the fly. Also note that these keys can change from version to version. You can see the list of control keys in menu Help - Keyboard shortcuts.