Compatibility

This cartridge works on the following PCBs and with the following models of Spectrum:

PCB16K48K/+128/+2
Latest Version: 1.05
PROM Size: 32K - 48K (depending on build)
Click here to jump to the downloads section.


Description

This 32K ROM cartridge is intended for use with the 48K Spectrum, Spectrum+, Spectrum 128 and Spectrum +2, and accurately provides it with the software functionality found on the Spanish Spectrum 128 (the forerunner to the UK Spectrum 128). Two branches of the emulator exist. The first is a basic port of the Spanish Spectrum 128 ROMs, including all bugs within the new Editor ROM. The second version fixes as many bugs within the Editor ROM as space allows. The bugs within the 48K BASIC ROM have not been fixed to maintain compatibility with 16K/48K Spectrum software. The emulator utilises the paging facilities found on the ZXC2 and ZXC3 PCBs to support the two ROMs of the Spanish 128. In the description that follows the Spanish model is referred to as the Spanish 128 and the UK model is referred to simply as the Spectrum 128.

The Spanish 128 was released in 1985, a year before the Spectrum 128 was launched in the UK. The hardware of the Spanish model is essentially identical to the UK model but the Editor ROM code is nearly 40% different. There are no menus as on the Spectrum 128, but instead the machine starts up directly in 128 BASIC mode.

Spanish 128 Emulator Power-On Screenshot

The separate Calculator mode available on Spectrum 128 is combined with 128 BASIC mode in the Spanish 128. There is no Tape Loader, Tape Tester or Test Screen options as found on the Spectrum 128, and the only method of reverting to 48 BASIC mode is to issue the SPECTRUM command. The PLAY command is supported by the Spanish 128, and so are the new RS232 and RAM disk routines. The main differences between the models is the 128 BASIC editor.

Like the Spectrum 128, the Spanish 128 when in 128 BASIC mode also requires commands to be typed in letter by letter, and the full screen editor behaviour between the models is very similar. However, all keywords must be entered in uppercase, which has the advantage that variables whose names are identical to keywords can be entered by typing them in lowercase. In the Spectrum 128, variables named the same as keywords are not allowed. The black banner at the bottom of the screen is used in the Spanish 128 to display mode information, i.e. whether Caps Lock is on or off, and whether the editor is currently in Graphics mode or Extended mode. Another advantage of the Spanish 128's editor is that it allows colour control codes to be embedded within programs, just as in 48 BASIC mode. The colour transitions are shown by two special 'G' characters showing the old colour and the new. The editor displays syntax errors differently to the Spectrum 128 by showing a bug symbol within the cursor instead of turning the cursor red.

Spanish 128 Emulator BASIC Editor Screenshot Spanish 128 Emulator Embedded Colour Control Codes Screenshot Spanish 128 Emulator Syntax Error Screenshot

The lower screen edit mode is different to the Spectrum 128 in that it consists of a single row only. The mode will remain in force following the insertion of a line into the BASIC program, but will revert to the full screen edit mode if a command is entered for direct execution. When using the lower screen edit mode, four new commands are available. These commands can only be entered for immediate execution, and not for insertion within a BASIC program. The four new commands are:

The parameters shown in square brackets are optional and if omitted then default values will be used. These commands are not case sensitive and not all letters need to be entered, e.g. the EDIT command can be entered as E, ED, EDI or EDIT.

The DELETE command will delete a block of BASIC lines from line n1 to line n2 inclusive.

The RENUMBER command will renumber the BASIC program, setting the first line to have value n1 and then subsequent lines incrementing in value by n2. The two parameters are optional, with default values of 10 being used if they are omitted. The renumber routine is identical to that in the Spectrum 128 and so is subject to the same limitations, e.g. expressions will not be renumbered.

The WIDTH command is accepted by the Spanish 128 but due to a bug its usefulness is severely limited. For this reason, it is not even mentioned in the Spanish 128 User Manual. The command's intended purpose is to allow the RS232 column width to be changed from the default value of 80. Specifying the WIDTH command without a parameter should restore the number of columns to 80. However, the bug causes the WIDTH command to set the number of columns to 0 when no parameter is specified, and to 80 columns when any value is specified. This bug has been corrected in the bug fixed version of the emulator.

The EDIT command is used for two purposes. When followed by a line number, the cursor is displayed next to the specified line in the full screen edit area. When the command is followed by the name of a string variable, a text editing mode is entered that allows the contents of the string variable to be edited visually. If the variable already existed then the display is preloaded with the variable's contents. The cursor can then be moved around the screen and the contents of the variable changed as desired. The editor displays the current row and column position of the cursor and also the current mode, e.g. graphics mode or extended mode. The variable editing mode supports a number of options:

Insert mode will place the newly typed character at the current position, shifting all subsequent characters along by one. Overtype mode will simply replace the current character with the newly typed character. Selecting Indent mode will set the left hand margin that all newly created rows will use. The margin size is set as per the column that the cursor is at, capped to a maximum of column 26. The indentation column will revert back to column 0 when either Insert or Overtype mode is selected. The three modes are cycled between by pressing the keypad TOGGLE key (accessible via the keyboard by entering Graphics mode and pressing Z). When the Word Wrap option is set to On, it will prevent words from being split across rows by moving the whole word to the new row. Word Wrap can be switched on and off by pressing the keypad key combination of SHIFT and TOGGLE (accessible via the keyboard by entering Extended mode and pressing Q).

Spanish 128 Emulator String Variable Edit Mode Screenshot

The Spanish 128 supports the additional editing functions available on the optional plug-in keypad, and these can be used for editing BASIC programs or editing string variables.

The emulator differs to the real Spanish Spectrum 128 in that all error report messages, display messages and new editor keywords have been converted from Spanish to English. Also, in the bug fixed version as many bugs as space allows have been fixed within ROM 0 (see below for a full list). In order for the ROMs to be ported to the ZXC2 and ZXC3 PCBs, it has been necessary for the routine vector table at 0100h in ROM 0 to be removed. This is only an issue for machine code programs that use this table, but there are probably very few (if any) that do.


Downloads

Both English language and Spanish language versions of the Spanish Spectrum 128 emulator can be downloaded below. There are a number of variants of each type, which might be useful in specific circumstances. The different permutations can be selected using the following drop down lists.

Message text language Display messages translated to English or in their original Spanish.
ROM 0 (Editor) Include bug fixes to the resolve most of the errors present in the Spanish 128 Editor ROM.
ROM 1 (48 BASIC mode) Use the Spectrum's internal ROM for 48 BASIC mode or the ROM cartridge's version.
ZX Interface 1 support Include a version of the Interface 1 ROM.

Click here to download the selected Spanish 128 Emulator ROM cartridge. 32K

A number of bugs exist within the Editor ROM of the Spanish 128 and so I have resolved as many of these as room allows.

Click here to download the Spanish 128 Bug List.

When the Spanish 128 emulator ROM cartridge is in use, it is not possible to access the ROM of the ZX Interface 1 and hence the hardware facilites it provides cannot be used. To overcome this, a copy of the Interface 1 ROM can also be included within the emulator. Either edition of the Interface 1 ROM can be selected, although for most purposes the Edition 2 ROM is to be preferred. If a real ZX Interface 1 with Edition 1 ROM is connected then including the Edition 2 version ROM within the emulator effectively upgrades it. Even if a real ZX Interface 1 is not connected, the Interface 1 ROM can still be included within the emulator and will allow the non-hardware specific commands to be run, e.g. CLS # and MOVE.

When 48 BASIC mode is selected, the emulator can disable the ROM cartridge and revert to using the Spectrum's internal 48 BASIC ROM. This has the advantage of providing maximum compatibility with games. This stems from the ZXC2/3/4 PCB using the last 64 bytes of ROM space for memory mapped I/O control of the bank paging mechanism and therefore the necessity to relocate the character set 64 bytes lower within the BASIC ROM. This change causes programs that attempt to directly access the character set memory to fail. Worse still, if such a program were to access the last 8 characters of the character set, i.e. the last 64 bytes of the ROM, then they would invoke the bank paging mechanism of the ROM cartridge and almost certainly cause a crash. Note that programs that access the character set indirectly via system variable CHARS would not suffer this problem. The situation where it would be desirable to continue to use the modified version of the BASIC ROM is when a ZX Interface 1 fitted with an Edition 1 ROM is connected. This would then allow the effective software upgrade to an Edition 2 ROM to continue even when in 48 BASIC mode.