Taper V2.04 Documentation

Please note this content is from the original WoS site, and may no longer be relevant. If you have any queries, please contact us.

TAPER v2.04 DOCUMENTATION

[TAPER!]

Written by M. van der Heide, Martin Kopanske and Tomaz Kac
Copyright 1997-1998 ThunderWare Research Center

This program may be used for maintenance purposes of your ZX Spectrum tapes and ZX Spectrum emulator tape files.

It can be used as a virtual tape unit in conjunction with a real ZX Spectrum. Supported tape file formats are .TAP, .LTP, .ZXS (readonly), .VOC, .RAW (the `Raw tape sample’ format used by emulator Z80em), .CSW and .TZX (up to v1.12).

Supported snapshot file formats are .Z80 and .SNA (readonly). Such files are immediately converted to compressed, turbo loading .TZX files.

STANDARD DISCLAIMER

This program is provided “as is”, without any warranties, nor an indication that it will fit the purpose.

TAPER has been tested on a lot of systems, including ‘386, ‘486, ‘486DLC and Pentium machines (even emulators), with ISA, VLB and PCI causing no problems. If you want to use this program, though, you do so at your own risk. This means that it is extremely unlikely to damage your system, but if the unthoughtful event DOES happen, you will be on your own. ThunderWare Research Center can and will accept no claims whatsoever.

This program is neither public domain nor shareware: it’s freeware.
This means that anyone is allowed to distribute and use the program, but all copyrights are still owned by ThunderWare Research Center.
You can therefor not request any money from anyone for copying this program, apart from the expenses made for the media onto which it has been copied.

The file `DIAGRAM.Z80′ was included with permission of B G Services, UK.
It was taken from the distribution of the (PC) ZX Spectrum emulator `Z80′ and is copyright Gerton Lunter and B G Services, UK.

Remember you can always freely obtain the latest version from The World of ZX Spectrum, at:
https://worldofspectrum.net/
or
https://worldofspectrum.net/pub/sinclair/tools/pc

For the full description of the TZX file format, have a look at its home base
https://worldofspectrum.net/TZXformat.html
Notice that this is no longer Tomaz Kac’s site. The latest version is v1.12.

BETA DISCLAIMER

For beta versions of TAPER, the same legal restrictions apply.
As such a version is uncertain to be stable, using one is at your own risk. We try to make beta versions that are harmless to the system even when failing, but chances of failures are more likely than in normal versions.

INDEX

  1. Requirements
  2. Important Notes
  3. Sytax
  4. The Screen
  5. Fill-In Fields
  6. Tape Catalogs
    1. Working With Tape Entries
    2. Flag/Parity Behavior
    3. Inserting Entries
  7. The Configuration
    1. The Configuration File
  8. The Menu Strip
  9. Playing a Tape
    1. Using a Soundcard
    2. Using the Parallel Port
  10. Block Encryption
  11. Working with BASIC Blocks
    1. Saving BASIC Blocks
  12. The Hex Editor
  13. The Disassembler
  14. Loading Snapshots
  15. Using a Custom Palette
  16. Troubleshooting
  17. The Credits
  18. How to Contact Us

1. REQUIREMENTS


In order to be able to use this program you will need the following hardware:

  • A 80386 or better processor,
  • A (Super)VGA card with at least 256Kb,
  • A mouse with a fully Microsoft compatible driver (Microsoft compatibility version 6.26 or up),
  • At least 4Mb of memory,
  • Either a SoundBlaster 2.0 (compatible) soundcard or the Parallel Port Interface as discribed in the file `DIAGRAM.Z80′ if you want to playback tapes to a real ZX Spectrum.

And the following software:

  • (MS)DOS 5.0 or better,
  • A copy of the free DOS/4GW runtime.

2. IMPORTANT NOTES


If you want to use options that are not yet in your configuration file, simply start TAPER, choose `Config’ and `Save’. This writes the configuration file back, but with the new options added (at their default values).

  • If a fatal error occurs, you will be asked if an attempt should be made to rescue the tape (if it had been changed). If a successful attempt was made, the tape will be in the file `xxxxTAPE.TZX’, where xxxx is LEFT for the left window and RGHT for the right window.
  • If the following fatal error occurs after writing back a changed tape: `Could not install new tape’, or `Could not remove old tape’, the version just written will have an extension `.TMP’ (in the same directory as the old tape).
    You must rename this file yourself before restarting.
  • Since v2.00, TAPER runs perfectly well in a Windows DOS box, except timing routines don’t like Windows that much (Parallel Port playing only so far).
    Also see the troubleshooting section on Windows.
    Other considerations are:

    • Set variable `NoLocalMouseHiding’ in TAPER.INI to `On’ (if running NT);
    • Playing though a Parallel Port Interface may not work correctly.
  1. Some options need a temporary directory to be defined.
    In DOS, you define this with the command (in your AUTOEXEC.BAT)

      SET TMP=path

    Windows users will probably have a `TEMP’ setting instead.
    TAPER will look for `TMP’ first. If this is not set it will look for `TEMP’. If neither one is set, it will use the TAPER directory.
    If you start TAPER from a floppy or CD-ROM, you MUST have one of `TMP’ or `TEMP’!
    If you want some real speed, create a RAM disk and make `TMP’ point to it.

  2. The configuration option `Play IRQs Disabled’ may improve the playback when using the Parallel Port. However, it’s a “brute force” method which simply (temporarily) disables all hardware IRQs 3 through 7.
    Use this option with care!

3. SYNTAX

To see what syntax is available, use TAPER -?

To start TAPER, use the syntax

  TAPER [-w] [-s] [-m] [tapefile1] [tapefile2]

Option `-w’ is used to disable MS Windows `multitasking’ if it is detected. It will be enabled again once you leave TAPER. This should be used with caution. This option works on Windows 3.x in enhanced mode and on Windows95.
Of course, programs run from the shell will still detect that Windows is running and act accordingly, but timing will be more accurate.
This option should only be used on slow machines.
If you want accurate timing while running in MS Windows, use the configuration option `Play Windows Disabled’ from the configuration window.

Option `-s’ disables use of a Soundcard. Use this if your machine crashes on soundcard detection, or if you don’t want TAPER to lock your soundcard under Windows.

Option `-m’ disables handling of a software Mixer on the detected soundcard. Use this only if your machine cannot handle this.

Option `-u’ (disable use of Upper memory) is no longer used, but is allowed for compatibility with older versions of TAPER.

`tapefile1′ will be loaded into the source window (left).
`tapefile2′ will be loaded into the destination window (right).


4. THE SCREEN


The screen is set up in a 640x480x16 resolution and contains two windows. The left window holds the source tape, the right window the destination tape.

At the top of these windows is a `128K’ button. This is used only to remap characters according to the 128K ZX Spectrum when printing a BASIC listing and for the special TZX block `Stop tape if in 48K mode’ (when playing).
This flag is automatically cleared when a new tape is read, and is automatically set if a TZX file has been read with a `Hardware Type’ block that indicates that a 128K machine is required for that particular program.

At the same height is a Size box. This size is the total amount of virtual memory that the currently loaded tape takes.

At the bottom of these windows is the name of the current tape printed, together with a checkmark if the tape has been changed.

Each window is formatted as follows:
– entry number (starts at 0),
– ‘*’ for a custom loading block, or blank otherwise,
– entry description.

Between these two windows you will find the following buttons:

 

Config Configure the application.
Shell Shell out to DOS. WARNING: you must not start TSR programs from within the shell, or the application will not be able to swap back in!
If MS Windows multitasking has been disabled, it is still disabled while you’re in a shell.
Quit Stop.


Help View this file.
About Shows an about box.
SysInfo Shows some system information.


The buttons can be selected in two ways:

1. By clicking on them,
2. By pressing [ALT] + the underlined character.

You can make a snapshot (GIF image) of the full screen at any time by pressing [CTRL][Print Screen]. In each session, the first screen dump will be called SDUMP001.GIF, the next SDUMP002.GIF etc.


5. FILL-IN FIELDS


A lot of fields in requesters can be edited. Click on it to get a cursor.
The keys are:

 

[CURSOR LEFT] One char left;
[CURSOR RIGHT] One char right;
[HOME] Go to the start of the box;
[END] Go to the end of the box;
[BACKSPACE] Delete the character before the cursor;
[DEL] Delete the character under the cursor;
[INS] Toggle insert/overstrike mode (the startup mode is set in the configuration window);
[ENTER] Accept the input and elect next button;
[TAB] Accept the input and elect next button;
[SHIFT][TAB] Accept the input and elect previous button;
[ESC] Restore and stop editing;


[CTRL] and one of:

 

[CURSOR LEFT] One word left;
[CURSOR RIGHT] One word right;
[HOME] Go to the start of the input field;
[END] Go to the end of the input field;
[DEL] Clear the entire input field.
B Clear start of input field up to the cursor;
E Clear from the cursor to the end of the input field;
W Clear from the cursor to the start of the next word;


Any ASCII character inserts the character.
Some fields only accept numerical characters.
If you start editing, overstrike or insert mode is selected depending on the configuration.

Some input buttons have more than one line (such as Message Block). These buttons use the [ENTER] key in the editor and must be finished with the [TAB] key.


 

6. TAPE CATALOGS



A tape catalog reports the following information per entry:

If the entry represents a normal tape block:

  1. (Expanded) ZX Spectrum file name;
  2. Type of file: PROG, CODE, A-AR, N-AR, HEAD, DATA, ????, PURE DATA;
  3. Depending on the type:
    PROG (Program) Auto-start line or —– if none
    CODE (Code) Startaddress of the code;
    A-AR (Alphanumerical Array)
    N-AR (Numerical Array)
    ???? (Unknown header block) The Type byte
    HEAD (Headerless block) The Flag byte
    DATA (Data block after a header) The Flag byte
    PURE DATA
  4. Length of the block.

Otherwise:

    1. Short description of the entry type, in blue.

 

    Entries with variable data sizes have their length at the end of the line.

Entries of type ‘GROUP’ and ‘LOOP’ are drawn with a small arrow at the start of the line. You can click on the arrow to expand/collapse the entire group/loop. A right-arrow means the group/loop is collapsed, a down-arrow means the group/loop is expanded (default).
The `-‘ key can also be used to collapse, and the `+’ key to expand again.
Dragging, playing and deleting a collapsed GROUP/LOOP block handles the entire group at once.

If a line is written in red, there’s an error in the entry (such as a bad parity byte). When you view detailed info, the exact error is written in red too.

If a (data) line is written in bright red, the entry will loose data when saved (for example, a `Normal Speed’ block with an incomplete byte at the end looses that incomplete byte when saved, unless saved as VOC). When you view detailed info, the exact part is written in bright red too.


 

6.1. WORKING WITH TAPE ENTRIES



The ‘active’ tape window has a blue window header. To change the active window, either press [TAB] or click somewhere in the window.
Notice that the menu shortcut keys apply to the active window as well.
Almost every tape entry can be selected. The current entry is inverted.
To select another entry, either move the slider and click on it with the mouse or use the keys:

 

[CURSOR UP] Move one entry up;
[CURSOR DOWN] Move one entry down;
[PAGE UP] Move a page up;
[PAGE DOWN] Move a page down;
[INS] Choose the entry;
[CTRL][HOME] Move to the first entry;
[CTRL][END] Move to the last entry;
[CTRL][INS] Toggle the `selected’ status of the entry.


[CTRL][CURSOR DOWN] Advance to the next block, as the current block is played.
This option is very useful to test if a tape is played in the desired order.
Collapsed blocks are automatically expanded when entering;
[CTRL][CURSOR UP] Clear the advance variables (CALL stack, Loop counter);


To toggle the `selected’ status of an entry with the mouse, hold down [CTRL] or the middle mouse button (if you have a 3-button mouse) while clicking on the entry.

You can toggle the `selected’ status of an entire range of entries at once (with the mouse only!) by selecting the entry at the beginning of the range and then selecting the last entry in the range while pressing [SHIFT].

`Selected’ entries are printed with a cyan background.

The slider can be used as follows:

 

  • Pick up the slider and drag it to the position you want;
  • Hold down [CTRL] or the middle mouse button and click somewhere on the slider bar to set the slider to that position directly;
  • Click above the slider to go up a page (repeated while pressed);
  • Click below the slider to go down a page (repeated while pressed);
  • or use the arrow gadgets to go up/down a line (repeated while pressed);

When you double-click an entry, you get a window showing details about it.

You can drag a tape entry from one window and drop it in either the same or the other window.
If you want to move the entry rather than copy, hold down [ALT] when you start dragging it.

This can also be done with the keyboard alone with [F5]:

[F5] Copy entry after the highlighted entry in the other window,
[F5][ALT] Move entry after the highlighted entry in the other window,
[F5][CTRL] Copy entry before the highlighted entry in the other window,
[F5][ALT][CTRL] Move entry before the highlighted entry in the other window,


If you drag a selected entry, all selected entries will be copied at once.


 

6.2. FLAG/PARITY BEHAVIOR



In order to display tape blocks correctly, the following simple rules are applied to flag and parity bytes:

 

  • Entry types `Normal Speed’ (0x10) and `Custom Speed’ (0x11) always have both a flag byte and a parity byte, unless the total block is less than 2 bytes;
  • Entry type `Pure Data’ (0x14) doesn’t have a flag nor a parity byte. Instead, both bytes are kept into the data block, but are displayed between brackets when viewing the entry info (the parity byte field has 2 values displayed – the last byte in the block and the calculated ‘parity’).

If the last byte is incomplete (less than 8 bits), the one-last byte is used as parity byte.


 

6.3. INSERTING ENTRIES



Apart from dragging and dropping entries, you can also create entries out of thin air. This is done with the `Insert…’ menu option.
For example, you have a .SCR file that represents the original loading screen of a program and you wish to insert it into a tape file.
This will usually require 2 steps:

  1. Insert the data block. This is insert option `Raw Datablock’.
  2. Stick a header in front. This is insert option `Header Block’.

Of course it may be necessary to also edit the (BASIC) loader program, so that your new block is actually loaded!


 

7. THE CONFIGURATION



The configuration window holds the following items:

 

Remap Bright Black Should the ULA bug be matched and should bright black be displayed as dark black?
Emulate Flash If turned on, flash is emulated when drawing ZX Spectrum screens.
Slow Flash Normally, flashing is done every 16/50th of a second (as the ZX Spectrum itself does). If you have a slower computer or video card, this may result in loss of responsiveness. In this case, you should turn this option on, so that flashing is reduced to a third of the time (just under a second).
Both these options can be toggled from the menu strip.
Confirm Quit User must confirm quit?
Confirm Delete User must confirm delete?
Confirm Overwrite If turned on, TAPER will ask for confirmation when a file is about to be overwritten (except the tape itself).
Follow Slider If turned on, a combo window will be updated while you move the slider bar. If turned off, only the slider bar will be updated while moving; the result will be printed when you release the mouse button.
This option should be turned off for slower computers only.
Edit Insert Sets the initial edit mode for startup of edit buttons.
Checked means insert mode, cleared means overstrike mode.
Always Backup If this option is turned on (the default), TAPER will make a backup of the tape the first time that a new version is to be written. This file will have extension `.BAK’
This option can be temporarily overridden from the menu.
Disable Sounds Disable all speaker sounds from TAPER.
Trace Sound Blocks If turned on, TAPER will constantly show the currently played block when the `Play’ menu option is used.
This option can be temporarily overridden from the menu.
It should be turned off for slower computers, or when playing through the Parallel Port.
Show Play Time If set, will show the remaining play time while playing.
Default VOC Filter Should the VOC filter be turned on by default?
Text Editor Path ASCII Editor to be used when editing a `Custom Info – Instructions’ block;
Play Device Selects either SoundBlaster or Parallel Port.
Play Windows Disabled If turned on, disables Windows multitasking while playing and enables it afterward.
Play IRQs Disabled Only used when playing through the Parallel Port. It will block all hardware IRQs 3 through 7, which may help if you have a really dodgy computer. Use with care!
LPT Port Selects the Parallel Port to be used if the Play Device was set to the Parallel Port.
COM Port Not used yet.
Blanker Installed Use the blanker?
Blanker Time-Out Number of seconds of non-keyboard/mouse activity before the blanker activates.


Button `Save’ will save the current configuration, `Reload’ will load the configuration back from disk.
You must explicitely press the `Use’ button (or the close gadget or the [ESC] key) to leave the configuration window.


 

7.1. THE CONFIGURATION FILE



The file TAPER.INI holds the above configuration. Other values are:

 

ZX-EditPath Full path to the ZX-Editor executable, used to edit/view `Custom Info – ZX-Edit Document’ blocks.
This path is automatically asked when needed.
GIFViewerPath
GIFViewerOptions
JPGViewerPath
JPGViewerOptions
The full path and possible extra command line options to the external GIF/JPG viewers used to display `Custom Info – Picture’ blocks.
These values are automatically asked when needed.
DragOutlineOnly If turned on, will update only the window’s outline while a window is being dragged. This should only be turned off if you have an extremely fast processor and video card (as the used video mode is slow)
ResizeOutlineOnly If turned on, will update only the window’s outline while a window is being resized. This should only be turned off if you have an extremely fast processor and video card (as the used video mode is slow)
PreLoadResources Load all font files at startup when set. This will save some floppy swapping when running TAPER from floppies and will prevent TAPER from getting out of memory a bit.
DirectVideoControl Do not use the RIL if one has been detected. This will speed up all screen functions, but can cause a messed up screen if your video card cannot handle it.
You will want to enable this option.
SwapInTextMode If set, ignore the startup video mode and always set MODE 80 when swapping out.
QuitInTextMode If set, ignore the startup video mode and always set MODE 80 on program exit.
DefaultDecodeROMTiming Sets the `Force ROM Timing’ scheme as default for the VOC decode requester.
SBNoHighSpeedDMA Turn this option on if your soundcard crashes when using playback samplerates about 22kHz.
MixerInputValues These are set from the sample window and hold the values of the software mixer of your soundcard to be used while sampling a physical tape.
A ‘0’ value means that the register is not set.
TZXStripPauseLengths The `pause length’ field of TZX block types 0x10, 0x11, 0x14 and 0x15 is written as 0 if it’s the last block in the tape or the next block is a `Stop the tape’.
This will force emulators that load at high speed (e.g. X128) to return to normal speed immediately when the game starts so you can see everything.
This option is turned on by default.
ShowRemainingPlayTime If set, will show the remaining play time while playing.
NextFloppyDiskId This is the next floppy number to be used. You should NOT edit this field by hand!
UseGeniusMouseHiding If turned on, will use the old-style Genius mouse hiding function. Turn it on only when you have a Genius mouse driver with version 7.02 or below.
NoLocalMouseHiding If turned on, TAPER will use an internal mouse hiding routine.
This should only be used when you have a really weird mouse driver (e.g. in Windows NT) that messes up the screen.
ForceMouseRelease To be used only if you have a weird mouse that seems to be lost (doesn’t work in a next application) if you quit.
SwapMouseButtons If turned on, will swap the left and right mouse buttons.
Emulate3rdMouseButton If turned on, will simulate a 3-button mouse from a 2-button mouse. Useful when selecting entries in a combo window. In stead of pressing [CTRL] while selecting the entry with the left mouse button. press the left mouse button and while keeping it pressed, press the right mouse button as well.
SnapMouseDefault Turn it on if you want the mouse to move to the default button if a window/requester is drawn or if an edit button is finished with the [ENTER] key (Default is off).
DoubleClickInterval The maximum time elapse in milliseconds between two mouse clicks to be recognised as a double-click.
InitialContPushDelay The initial delay in milliseconds when keeping a continuous push button pressed (e.g. the arrow buttons on sliders).
UseCustomPalette see `Using a Custom Palette‘ below.
CustomColorXX see `Using a Custom Palette‘ below.


The above parameters must be filled in by hand.

This file can be edited with any ASCII editor, but is also rewritten if you change the configuration.


 

8. THE MENU STRIP



TAPER has a menu strip a la Amiga. For users unfamiliar with the Amiga, I’ll explain how it works:

 

  • To use the menu strip, press the right mouse button. You’ll see the strip at the top line of the screen;
  • While keeping the right button pressed, move it to one of the words in it. A roll-down menu will appear;
  • While still keeping the right mouse button pressed, move the mouse over the menu entry you wish to activate. Entries with an `>>’ at the end have a submenu attached;
  • When the mouse highlights the entry you want, release the right mouse button;
  • If you don’t want one of the options, move the mouse somewhere in the void and release the right mouse button there.
  • Some menu entries have key shortcuts. These are shown at the end of a line. The shortcut keys are remapped to the active tape window.


It can also be controlled with the keyboard:

[F9] start/stop the menu
[ESC] stop the menu


While only a menu is shown, without any option highlighted, use:

[CURSOR LEFT] One menu section left
[CURSOR RIGHT] One menu section right


Otherwise:

[CURSOR UP] One option up
[CURSOR DOWN] One option down
[CURSOR RIGHT] Enter submenu (if any)
[CURSOR LEFT] Leave submenu
[PAGE UP] Go back to the top (menu name)
[PAGE DOWN] Go to the last option
[ENTER] Activate the highlighted option

The menu strip has the following entries:

1/3 x Window (x = ‘<‘ or ‘>’ )

New Remove the current tape from memory and start with an empty one. You will be asked to save first if you changed anything;
Notice that the tape name will be `(new tape)’.
When saving a new tape, you should use the menu option `Save As…’ to give it a proper name.
Open … Remove the current tape from memory and open a new one. You will be asked to save first if you changed anything;
Save As … Save the tape to a new file;
Save Save the tape;
Import tape Join another tape in memory. The new tape will be simply added.
Afterward, the selection bar will be on the first imported line.
Get tape CRC Calculate and display the 7-byte tape CRC value.
As this value is unique for the data in a tape, it can be used to quickly compare tapes of different format.
Get tape play time Calculate the time needed to play the entire tape.
Backup tape If checked, will create a backup of the `old’ tape before writing a new one (to temporarily override the `Always Backup’ option from the configuration window).
Auto-decrypt SpeedLock 2 through 7 blocks are encrypted. Most of them have a fixed encryption scheme. If the tape file contains a ‘Group Start’ entry with a group name starting with ‘SpeedLock X’ and this option is turned on, the blocks are automatically decrypted when using a ‘View As’ menu option.
Decrypt any Will decrypt any block if set, not only SpeedLocks.
Set values … Define the decryption values.
(see ‘Block Encryption’ further in this document)
Match tapes Check if the (Spectrum) data of both tapes is equal.
Quit Guess…

2/4 x Entry (x = ‘<‘ or ‘>’ )

Deselect all Make all entries unselected;
Invert selected Invert the selected entries – selected entries are now deselected and vice versa;
Insert … Insert (create) a tape entry manually;
Delete You will see a submenu:

Entry Delete the current entry;
Selected Delete all selected entries at once;
Duplicate entry Duplicate the currently selected entry;
Play You will see a submenu:

Entry Play the current entry through the `Play Device’;
Selected Play all selected entries through the `Play Device’;
From entry Play from the current entry up to the end of the tape through the `Play Device’;
All tape Play the entire tape through the `Play Device’;
Save raw data Save the data of the currently selected tape entry to a separate file, excluding flag/parity bytes. This can be used to create .SCR files for example.
Decode entry (Available only if the currently selected block is a Direct Recording Block): Decode the block as if it was an ordinary VOC file;
Edit header Edit the currently selected header block;
Selected block You will see a submeun:

Make group Make a group of all selected entries;
Make loop Make a loop of all selected entries;
Edit timing Edit timing values of all selected entries at once;
Get play time Calculate and display the time needed to play the selected entries.
Group parity Used to check the group parity of a SpeedLock 2, 3, 4, 5, 6 or 7 group. The group parity must be correct in order to successfully load the program. The individual entries will never be printed in red to indicate bad parity, as they are Pure Data blocks (which don’t have one!).
Find match You will see a submeun:

This tape Match the current entry against all entries in this tape. All entries that fully match get a light green block number, all entries of which only the data matches (e.g. different timing) get a dark green block number.
Tape data blocks are treated specially – the flag and parity bytes are not included in the data match, but in the timing match.
Other tape The same, but match against the entries in the other tape.
Get CRC Calculate and display the 7-byte block CRC value.
This is the value used for the above match finding.
The generated value is identical to the value that ZX-Rainbow (Claus Jahn and Andy Schraepel) generates.
View as You will see a submenu:

Hex editor View/edit in both hexadecimal and ASCII;
Header View as if the entry is a header (first 17 bytes)
BASIC listing View as if the entry is a ‘Program:’ data block.
The listing is shown in a separate window, together with the button ‘Drop Colors’ (Remove the colors from the output). Also refer to `Saving BASIC Blocks‘ further in this document;
Screen image View as if the entry is a loading screen;
Disassembly View as Z80 disassembly.
View entry info View detailed info on the current entry (the same as double-clicking the entry);

5. System

Disable sounds Turn all sounds from TAPER on/off. Has the same purpose as the command line option `-q’.
Sound volume Adjust the sound volume when playing through soundcard.
Emulate flash Emulate flashing characters when drawing a ZX Spectrum screen
(see `The Configuration File’ for details).
Slow flash Slow down the flashing timer to a third.
(see `The Configuration File’ for details).
Trace SB blocks If turned on, TAPER will constantly show the currently played block when the `Play’ menu option is used.
You can turn this permanently on/off using the `Trace Sound Blocks’ option in the configuration.
It should be turned off for slower computers, or when playing through the parallel port.
Show play time Will show the remaining play time length while playing (part of) a tape through the soundcard or parallel port.
You will probably not want this option turned on when using the parallel port…


 

9. PLAYING A TAPE



If you still have an actual ZX Spectrum and would rather run your programs on that machine in stead of an emulator, this option will be interesting for you. The playback option turns TAPER into a virtual tape deck, which will generate the famous loading sounds.
Playback of tapes can be done either through your soundcard or through the Parallel Port.
Simply connect the chosen device’s output to the ‘EAR’ socket of your ZX Spectrum and select one of the `Play’ menu options. You could also connect to a real tape deck and write these tape files back to an audio cassette.
Especially when using TZX files, you will thus recreate the original programs, exactly the same as they were sold on tape.


 

9.1. USING A SOUNDCARD



When TAPER starts, it automatically checks for a SoundBlaster compatible sound card. As some soundcards crash on detection functions, TAPER will use the environment variable `BLASTER’ for its values.
Only the 8-bit functionality of the soundcard is used, so the following parts must be provided:

    Axxx - base Address      (xxx usually 220)
    Ix   - IRQ line          (x usually 5)
    Dx   - 8-bit DMA channel (x usally 1)

If this environment variable is not found, or either one of the above 3 parts is missing, detection fails.
Otherwise, a short test is done to see if the soundcard responds to requests at the base address.
You can see whether the card was detected succesfully by pressing the `SysInfo’ button.
TAPER cannot handle IRQ values above 7 (Windows 95 tends to like IRQ 10 very much). Try setting it to 5 in such cases.
The 8-bit DMA stream should not be 0, as this value causes problems with a lot of motherboards.
Notice that not all SoundBlaster (compatible) models can handle all frequencies. The following table lists the frequency ranges:

    Model                    Frequency range (Hz)

    SoundBlaster 2.x         4000-15151
    SoundBlaster Pro         4000-45454
    SoundBlaster 16          4000-45454
    SoundBlaster (AWE)32/64  5000-45454


If you find that the sound output is not loud enough for your Spectrum, use one of the following options:

  1. Use the menu option `Sound volume’ to adjust the mixer values,
  2. Put an amplifier between the SoundBlaster OUT and the Spectrum EAR (don’t set it too loud, or you will blow up your Spectrum!), or
  3. First record the sound to a cassette tape and play that tape into your Spectrum afterward.


 

9.2. USING THE PARALLEL PORT



The Parallel Port often gives better results, as the volume level of the sound is always correct.
You will need a Parallel Port interface to use this option. This interface is exactly the same one that the emulator `Z80′ uses.

This option may not work correctly under Windows. At least make sure that no other tasks are running and try to enable the configuration option `Play Windows Disabled’.

So far, Parallel Port playback has only been tested on Pentium machines, so I am very unsure if it works on ‘386 or ‘486 machines. If the machine causes too much lag, you will get an error message `Sorry, your machine iis too slow’.
The slowest machine it has been reported working on was a 486DX2/50.
A good thing to do is to turn the `Trace Sound Blocks’ and `Show Play Time’ configuration options Off. If you hear strange `ticks’ in the sound, try turning the option `Play IRQs Disabled’ on. Be careful not to use this option if you are using a modem at the same time, as all IRQs 3 through 7 will be disabled during playing!
If you still hear `ticks’ in the sound, try to first record the sound to a cassette and then play the cassette into your Spectrum. This method worked for some of the machines we tested on.
If you have a ‘386 or ‘486 machine and Parallel Port playing works for you, please tell us, so that we can update our documentation!

The interface as described in the manual of the `Warajevo Spectrum Emulator’ and the manual of `TAPE2TAP’ is not sufficient, as this implements the input part only, while TAPER needs the output part.
If you do not use this interface, you can severely damage your computer! For users who know how to build electronic devices, a diagram and testing program of this device is provided with the registered version of Z80 (file `DIAGRAM.Z80′).
It has been included with this program, with permission of B G Services, UK. Of course, you need a ZX Spectrum emulator to run this program. You can also buy this quality device from B G Services, UK.

                B G Services
                64 Roebuck Road
                Chessington
                Surrey KT9 1JX

Telephone enquiries on (0181) 287 4180, Fax (0181) 391 0744, or from abroad: +44 181 287 4180 and +44 181 391 0744 respectively.

Please note that B G Services, UK is by no means involved in the TAPER project. You are kindly requested NOT to contact them for problems with TAPER.


 

10. BLOCK ENCRYPTION



Several tape encoding schemes used block encryption as part of the protection. Encryption means that a block of data is garbled by a certain algorithm.
This shows clearly if you try to view an encypted loading screen!
The best-known example of encryption is the SpeedLock loader.
TAPER can take care of on-the-fly decryption of such encrypted blocks if the encryption algorithm is of the form:

              (loaded byte in L register)
              LD   A, value1
              XOR  L
              ADD  A, value2
              LD   (IX+0), A
              ...

`value1′ is called the XOR-value, and `value2′ is called the ADD-value.
SpeedLock used encryption in the turbo loading blocks of the programs (which are shown as PURE DATA in the tape listing) and even while 2 programs can be protected with SpeedLock X, the encryption values are not necessarily the same. The most widely used (and default) values are:

  SpeedLock 2/3: XOR-value 152 (0x98), ADD-value 11 (0x0B)
  SpeedLock 4-7: XOR-value 193 (0xC1), ADD-value 17 (0x11)

You can use options in the menu strip to handle on-the-fly decryptions:

Menu option `Auto-decrypt’ will automatically decrypt all SpeedLock 2-7 PURE DATA blocks when showing the block with a `View As …’ menu option.

Menu option `Decrypt all’ will automatically decrypt any block in any tape (not only SpeedLock or PURE DATA, but _anything_) with the above algorithm.

Menu option `Set values …’ can be used to set the XOR- and ADD-values.

Encoding schemes that use a different algorithm will of course not be decrypted correctly.


 

11. WORKING WITH BASIC BLOCKS



If a tape block contains a `Program:’ data block, it can be viewed as BASIC using the menu option `View as’ -> `BASIC listing’.
The listing window contains the following buttons:

 

Drop Colors Remove in-line color attributes from the output.
Real numbers View numbers as they are used when running the program. These are stored in the 6 bytes after the displayed number in a Spectrum line and do not necessarily represent the same value!
Especially programmers of protection schemes (eg. the BASIC part of a SpeedLock 1) turned WYSIDNWYG (`What You See Is Definately Not What You Get’) into an art-form. You will want to turn this option on most of the time, especially when saving to ASCII.
Save Save out the listing to an ASCII file.


 

11.1. SAVING BASIC BLOCKS



The used filename will be the same as the game, but with extension `.BAS’, and the file will be put in the current directory.
The following conversions are used when saving:

Control codes:

Chars Displayed as
00-05 “{XX}”, where XX is 2-digit hex, holding the value
06 tab
07-0C “{XX}”, where XX is 2-digit hex, holding the value
0D end of line
0E skipped
0F “{XX}”, where XX is 2-digit hex, holding the value
10-17 PAPER, INK, BRIGHT, FLASH, OVER, INVERSE, AT and TAB control characters are printed at e.g. “{PAPER x}”
18-1F “{XX}”, where XX is 2-digit hex, holding the value


Normal codes:

20-7E character it stands for
7F “{(C}}”


Graphics:

80-87 “{-X}”, where X is 1-8 (the key to press)
88-8F “{+X}”, where X is 1-8 (the key to press along with shift)
90-A3 “{X}”, where X is ‘A’ – ‘U’


BASIC tokens:

A4-FF expanded token


The UDGs T and U are printed as token `SPECTRUM’ and `PLAY’ if a 128K listing is being written.


 

12. THE HEX EDITOR



The hex editor (previous known as Memory Dump) allows to actually change the contents of a tape block. Even encrypted blocks (SpeedLock and such) can be edited this way and are re-encrypted afterward.
The default load address (the `ORG’ address) is tried to be determined from the accompanying header in the tape itself:

 

Code blocks use the start address as in the header
Program blocks start at 23755
Array blocks have no default


The hex editor works together with the disassmbler and a button is provided to start the disassembler from the current edit address.
The ASCII window prints the same values as the hex window, or a ‘.’ if the byte was not in range [32, 127]. Naturally, the ASCII window uses the orginal Spectrum font!
Together with a find option that lets you find strings presented in either ASCII or hex string (max 16 bytes), you will be able to adjust all software! The following keys are available while editing:

 

[CURSOR UP] Go one line up
[CURSOR DOWN] Go one line down
[CURSOR LEFT] Go one byte(half) left
[CURSOR RIGHT] Go one byte(half) right
[PAGE UP] Go one page up
[PAGE DOWN] Go one page down
[HOME] Go to the start of the line
[END] Go to the end of the line
[CTRL][TAB] Switch between the hex and ASCII editing window


Of course, the hex window only accepts hexadecimal values, the ASCII window only accepts ASCII characters in range [32, 127].
There is a ‘Hex’ boolean button. If checked, the addresses at the start of the lines are printed in hex, otherwise in ASCII. Notice that this button is linked to the disassembler window’s number mode as well.
When leaving the editor/disassembler, the parity matching byte is recalculated. The entry will usually turn up in red in the tape window. Don’t forget to correct the parity byte or the tape will not load!


 

13. THE DISASSEMBLER



You can view tape blocks as disassembly using the menu option `View As’.
The disassembler produces text in the way the book `The Complete Spectrum ROM Disassembly’ does, using both an internal and a user manageable symbol table and a set of buttons.
When starting, it first asks where the data will be loaded in the Spectrum’s memory. It is desireable to set this correctly, so that 16-bit instruction operands (and therefor symbols are well) point to the correct data.
The default load address (the `ORG’ address) is tried to be determined from the accompanying header in the tape itself:

 

Code blocks use the start address as in the header
Program blocks start at 23755
Array blocks have no default


The following fields are used:

 

  1. Instruction address
  2. Object code in hex
  3. Address symbol if symbols are used and a match was found
  4. Instruction in mnemonic code

Any instruction is decoded, both official and undocumented ones. The special auto-copy (undocumented) instructions get the auto-copy register appended as extra operand. Eg. DDCB00CF is disassembled as `SET 1,(IX+0),A’.
When printing in hex, operand values are prepended with a `+’, addresses are not. Eg. `LD A,+7F’ or `LD HL,+1234′, but `CALL 05E3′.
Instructions with an address operand, CALL, JP, JR and DJNZ, of which the address matches a symbol get the symbol name as extra operand.
Eg. `CALL 05E3,LD_EDGE_2′.
To the right of the disassembly window, you find pager buttons to go up and down per page, line (instruction) or byte.
Apart from these pagers, you can use the keyboard equivalents:

 

[PAGE UP] Go one page back
[CURSOR UP] Go one line (instruction) back
[CURSOR LEFT] Go one byte back
[PAGE DOWN] Go one page forward
[CURSOR DOWN] Go one line forward
[CURSOR RIGHT] Go one byte forward


At the top of the window, you find the following option buttons:

 

Hex The `number mode’: Toggle between decimal and hexadecimal (default is hex).
Sysvars If set, expand 16-bit numbers to the name of the appointed system variable. Only numbers, not addresses in CALL or JP instructions.
Assumed will be that the IY register pair is kept locked at address 23610, and operands (IY+d) will be expanded in the same way.
Spectrum ROM If set, all references to addresses below 16384 will get the 48K Spectrum ROM symbols (the internal symbol table, in the file `SPROM48.SYM’).
Apart from that, literals following RST 08 and RST 28 instructions are expanded as well.
RST 08 instructions are followed by the desired error code and RST 28 instructions by the floating-point calculator stack instructions. Instruction operands of second-level instructions “jump”, “jump_true”, “stk_data” and the “series_XX” are decoded too.
When disassembling a block that contains the 48K Spectrum ROM itself, TAPER will notice and adjust symbol handling accordingly.


Other buttons in this window are:

 

Go to Start disassembling at a different address.
Hexedit Start the hex editor from the address at the top of the page.
Symbols Edit the user defineable symbol table.
This button pops up a window where you can load, save, merge, flush, add and delete symbols. You can maintain symbol tables per tape, or even per tape block. Simply create a table and save it. When disassembling the tape again, re-load the table.
Save Save (part of) the block disassembly to an ASCII file.
The default filename will be the same as the game, but with extension `.DIS’, and the file will be put in the current directory.


A symbol table file has extension `.SYM’ and is fully kept in ASCII:

 

  1. Each line represents one symbol.
  2. Each line is built up as “<address> <name>”
  3. The separation of <address> and <name> may be done with any combination of TABs and spaces.
  4. The maximum (used) length of a symbol name is 9 characters.

As the file is kept in ASCII, it can be edited with any ASCII editor, or using the `Symbols’ button from the disassembler window.

When an address is asked or read from a symbol table file, it may be given in both hexadecimal or decimal. Hexadecimal values must be prepended with a hex mark `$’.


 

14. LOADING SNAPSHOTS



TAPER can load snapshots of type .Z80 (all versions) and 48K .SNA files.
Such files are immediately converted to turbo-loading, compression tapes, to be uploaded to a real Spectrum just like any other tape file.
When loading a snapshot, you will get a small requester where you can adjust the speed at which the file will load, select an alternate loading screen, override the border colour from the snapshot and select the (compression) method. The possible speeds are:

 

Normal Speed (1500 bps) The file will be saved with ROM timing. Note that you can NOT use the result in a TAP file, since a custom loader is used!
High Speed (2250 bps) A tad faster. Use this speed if 3000 bps appears to be too fast for your tape deck to reliably record.
Turbo Speed (3000 bps) This is the default value and is probably the highest speed you can safely use when saving the file to a physical tape.
Ludicrous Speed (6000 bps) This speed can only be used when playing the file straight into a Spectrum! You probably need a soundcard rather than a parallel port interface to play, since the parallel port appears to give a too low signal strength on such high speeds.


Possible methods are:

 

Fastest All blocks will be compressed.
Cleanest This is the default. If the block that contains the screen corrupts the screen while loading, the block will not be compressed. This will load a couple of more Kb, but the screen will look good all the time.


Several snapshots that are available on the net are saved in 48K mode, while they are actually 128K programs. All of these can be loaded into 128K mode on a real Spectrum. Unless the program only checks once (at the beginning) for the running mode, AY-sound and extra memory used by the program is then available!
Likewise, special care has been taken so that several 128K programs will successfully load in 48K mode.


 

15. USING A CUSTOM PALETTE



If you dislike the choises I made for the colors of the ZX Spectrum, or you are unable to see everything due to your (monochrome) monitor, or you just want to see how weird ZX Spectrum screens (and TAPER itself for that matter) can look, you can use a custom palette. The colors to be used must be set up in your configuration file and you must turn `UseCustomPalette’ ON.
The values `CustomColorXX’ are in ZX Spectrum order and bright colors have 8 added to their number (eg. bright red has number 10).
The values used must be supplied in hexadecimal, preceeded by the tag `0x’ for clearity. Both upper and lower case characters may be used in the number.

For users unfamiliar with the hexadecimal system, you only need to be aware of the following simple rules:

  1. While the decimal number system has base 10, hexadecimal uses base 16;
  2. Digits above 9 are represented by letters starting with ‘A’, so `A’ = 10, `B’ = 11, `C’ = 12, `D’ = 13, `E’ = 14 and `F’ is 15.

The numbers themselves have the following format: `BBGGRR’, where
`BB’ holds the Blue color part,
`GG’ holds the Green color part,
`RR’ holds the Red color part.
As the chosen video mode has 6 bits/color, the largest allowed number in each part is 3F. In other words, the color 0x3F3F3F will represent the brightest possible white.

If you don’t like the changes you made and want to try again but forgot the original values, simply remove the `CustomColorXX’ values from your configuration file, start TAPER, choose `Config’ and `Save’ to get fresh values.


 

16. TROUBLESHOOTING



Q When I return from TAPER to DOS, or when I start a shell from within TAPER, the screen does not have a cursor, but I see a cursor-like line somewhere in the void. The font seems to have changed too. What happened?
A I encountered this problem so far only when using MouseWare from Logitech. If you use Logitech’s MouseWare, ensure that the VCI module `LVESA.OVL’ is loaded and cursor enhancements are off.
To do this, edit your `MOUSEDRV.INI’ file. Look for the section `[Display]’ and ensure that a line `VideoModule=C:\MOUSE\LVESA.OVL’ is present (or whereever the `LVESA.OVL’ file resides).
Now, if you load your mouse driver (possibly from your `AUTOEXEC.BAT’ file), load it with parameter `NOCENHANCE’.
Q The mouse makes a mess of the screen! I don’t like this at all!
A1 You have a Genius mouse with a driver version 7.02 or below. Genius mouse drivers v7.02 and below have a different approach for mouse hiding. If you use one, weird things can happen. Yet, no harm is done by this to the application nor your computer. Two solutions are available:

  1. Get yourself a newer mouse driver, or
  2. Turn the option `UseGeniusMouseHiding’ on in the configuration file.
A2 You have a combination of an older (ISA) video card and an older mouse driver, which does not provide the RIL (Register Interface Library). Be sure that you turned the option `DirectVideoControl’ off in `TAPER.INI’, as this disables the RIL.
You can see if the RIL is present when pressing the `SysInfo’ button. If a RIL is present, you will see a line `RIL version : xxxx’ in the video section. If it is absent (or not used), you get `Control : Direct’ instead.
You can solve this problem in the following ways:

  1. If you are running TAPER in a DOS-box from OS/2, update the box’s parameters, so that compatibility mode is on.
  2. Use a newer, fully Microsoft compatible mouse driver, or
  3. Add the following line in your `CONFIG.SYS’:
        DEVICE = EGA.SYS

    This device driver also provides the RIL.

 

Q When I have TAPER running, I can’t see what’s on the screen very well.
Is there anything I can do about it?
A Yes, you can use a custom palette to create better color contrast.
See `Using a Custom Palette‘ for details.
Q1 I run TAPER from Windows NT. The mouse cursor often stays in the ‘waiting’ cursor shape, until I move the mouse.
Q2 I run TAPER from Windows NT. The mouse cursor looks very weird.
A Although Windows from Microsoft, the emulated mouse cursor in a DOS box is absolutely NOT Microsoft compatible! Talk about weirdos, eh!
You should turn on the `NoLocalMouseHiding’ in the configuration file. This will solve the screen problems, although the mouse will still look weird in Windows NT.
Q I run TAPER from a Windows (95) DOS-box. When I start it, it complains about a missing mouse driver. I’m using my mouse without problems within Windows though!
A This is a common mistake. Windows and DOS each need their own mouse driver. The mouse driver from Windows cannot be used within DOS and vice versa.
You should add a line in your `AUTOEXEC.BAT’ to activate a mouse in DOS (or type it on the command line before starting TAPER).
If you upgraded from Windows 3.x to Windows95, the install program from Windows95 removed this line from your `AUTOEXEC.BAT’ (or put `REM’ in front of the line) for no appearant reason, so you should add it back and write a hate-mail to Bill Gates.
Q My soundcard works with TAPER from DOS, but not from Windows. How’s that?
A1 Windows has already allocated the soundcard to another application.
A2 Windows has wrong information regarding your soundcard.
To find out which one it is, close all applications, start a fresh DOS box and start TAPER in it. If it now works, the answer is A1.
Otherwise it’s A2. Click the `SysInfo’ button in TAPER to see if the soundcard has succesfully been detected.
Q When I play the tape through my soundcard, the pointer bar is always ahead.
A This is correct. The pointer bar is updated when the next block is going to be written to the DMA buffer. As the actual playing is slower than the writing, it is very likely that the next block can be written while the previous one is still playing.
Q Parallel Port playing does not work. I hear all sorts of strange quirks and too much lag is generated in order for the Spectrum to load the program.
A Try turning both the `Trace Sound Blocks’ and `Show Play Time’ configuration options off. If it still doesn’t work, try to turn the option `Play IRQs Disabled’ on or see the next question…
Q I run TAPER on a Pentium <million>MHz, and get this funny message when I want to play through the parallel port: `Sorry, but your machine is too slow for this feature’. This is a joke, right?
A I am fully aware of this problem but have not found out what causes it yet. It has something to do with latency in the timr circuit of your machine.
So far, I saw this problem only with (badly) overclocked machines.


 

14. THE CREDITS



We would like to thank the following people:

 

  • Sir Clive Sinclair for creating such a terrific machine;
  • Jeroen J. Kwast of ThunderWare Research Center for his enthusiasm, details and for being such a critical beta-tester;
  • Claus Jahn for his endless enthusiasm, his CRC creation routine, very detailed beta reports, very late night beta testing and overall mental support 🙂
  • Andy Schraepel for his Spectrum collection work and several good ideas;
  • Andy Barker for all his good suggestions and VOC files to play with;
  • Stefano Donati for his great help with SpeedLock timings;
  • Erik Kunze for several useful ideas, lots of VOC files to test with and very detailed beta reports;
  • Geraldo Oporto Jorrin for very detailed beta reports and several ideas for improvement;
  • Lee ‘Blood’ Tonks for his ideas regarding the disassembler and providing lots of VOC files with echoes and noise 🙂
  • Miodrag Stancevic for all his testing with the Parallel Port playing;
  • James McKay for writing the first emulator to support the TZX format!
  • Everyone who downloaded and tested the beta versions of TAPER;
  • Getronics Networks & Services for holding my ZX Spectrum archive;
  • All those people who maintain WWW pages and archive sites for the Spectrum;
  • All those people who made snapshots of games and gave them away!



 

15. HOW TO CONTACT US



If you have suggestions for improvement (bug reports are also welcome… 😉 write an e-mail, or an oldfashioned snail-mail letter to:

  ThunderWare Research Center
  to: Martijn van der Heide
  Cederstraat 56
  2565 JR - The Hague
  The Netherlands

Although please be aware that development on TAPER has seized since 2000!

When reporting problems, please try to give as much information as possible.
For example, if parallel port playing doesn’t work for you, at least tell what processor you have (‘386, ‘486, etc.) and what you tried so far.
If soundcard options don’t work, state the brand/type/revision of your card.

Enjoy!

Martijn van der Heide
Software Development Engineer
ThunderWare Research Center