Software - ROM Cartridges

ZX81 RS232 ROM

This 16K ROM cartridge consists of a ZX81 ROM with the cassette routines patched to support loading and saving via RS232 or cassette. The LOAD or SAVE commands default to using RS232 but prior to loading or saving actually commencing it is possible to switch to use cassette by pressing the C key. Likewise, it is possible to revert back to RS232 by pressing the R key. If the RS232 socket is disabled (via configuration switch 5) then loading and saving defaults to cassette.

The character code colouring mode provided by the Chroma interface can also be used with the ZX81 RS232 ROM cartridge, thereby allowing colourised ZX81 games to be loaded via RS232.


ZX Tape Player

The ZX Tape Player utility (for Windows) is used to load and save ZX81 programs via a PC's serial port at 57600 baud (19200 is only applicable for legacy versions of the RS232 ROM up to V2.02).

ZX Tape Player

To load a program from a PC using RS232, select ZX81 Files on the toolbar, and chose the file format (.P or .P81) and the desired serial port. Click the Browse button and select the folder containing the ZX81 programs. The Files pane on the left hand side will be updated with all matching files. Clicking on a program in the list will cause a summary of the file's contents to be displayed in the File Contents pane. On the ZX81, type LOAD "" and click the PLAY button on the ZX Tape Player utility. When using .P81 files, programs contain their original ZX81 filename and so it is also possible to load using LOAD "name".

To save a program to a PC using RS232, click on the RECORD button and specify a location and name of the file to save the program in. On the ZX81, type SAVE "name" and the program will be transferred to the PC. The PC file is automatically closed once the file has been received. If the target file type is .P format then the ZX81 program filename is discarded.

The ZX81 LOAD routine always expects a filename before the program data, and so for .P files the ZX Tape Player will include a filename of "P".

For best results it is recommended to set jumper J1 on the Chroma interface to the DTR handshaking position.


Transfer Functions

The ZX81 ROM is only 8K in size, leaving 8K of space available in the ROM cartridge. This space is used to hold the patches for the cassette routines, and also for a couple of routines that allow rapid loading and saving via RS232. These routine are invoked using the following USR functions:

The transfer functions allow an exact copy of a program to be transferred between PC and cassette. If this process were performed manually then system variables, such as FRAMES, would be different between the original and saved versions. Once a program has loaded, the screen will turn white for 2 seconds then black with occasional white streaks.

If saving to cassette, start the cassette deck recording and then press a key. The transfer routine outputs 5 seconds of silence before saving the program. If saving to RS232 then start recording on the ZX Tape Player utility and the file will automatically be sent. Once the program has been saved, the screen will blink white again for 2 seconds before turning black with occasional white streaks. It is now possible to repeat the save operation. This feature allows multiple copies of a program to be saved back to back on cassette, or for a program to be saved to RS232 in both .P81 and .P formats. Pressing SPACE during loading will reset the ZX81, but pressing SPACE at all other times will return control to BASIC.

If the RS232 socket is disabled (via configuration switch 5) then both transfer routines default to loading and saving from/to cassette. This allows cassette files to be duplicated.

Note that the transfer routines support a maximum filename length of 32 characters. If a file contains a longer filename then it will be truncated.


Downloads

Three versions of the ZX81 RS232 ROM cartridge are available:

The Edition 1 ZX81 ROM contained an infamous floating point bug that resulted in SQR 0.25 yielding the incorrect answer of 1.3591409 instead of 0.5. To avoid discarding ROMs that had already been manufactured, Sinclair fitted some ZX81s with a small hardware board that intercepted the floating point execution and altered one of the instructions to render it harmless to the calculation result. The hardware board was soldered directly across the Z80 CPU. It is not possible to directly run the Edition 2 ZX81 ROM in a machine fitted with the hardware fix. Either the CPU needs to be replaced or a modified version of the ROM used such that the hardware fix does not intercept any instructions. I've therefore produced an alternate version of the ROM cartridge containing an Edition 2 ROM with bytes within a few floating point routines shifted such that the hardware fix will not get invoked. If the standard edition 2 ROM cartridge version is used with a ZX81 containing the hardware fix then incorrect floating point maths will occur. Note that the routine relocations in the alternate edition 2 ROM result in a theoretical loss of support for pseudo hi-res programs that use the pixel patterns obtained by setting the I register to 22. Codes 36 to 45 are affected and would display incorrectly. However, I am not aware of any software that actually uses this set of pixel patterns and so it is unlikely that any impact will be seen in practice.

Using a ROM cartridge containing an Edition 2 ROM means that a ZX81 containing an edition 1 ROM is effectively upgraded. It is also possible for a ZX81 containing an edition 2 ROM to be effectively downgraded to use the edition 1 ROM, which may be useful when testing whether a program operates correctly with both editions of the ZX81 ROM.

The RS232 ROM is compatible with all ZXC ROM cartridges. For the ZXC1 and ZXC2 ROM cartridges, the cartridges must be populated appropriately and an EPROM programmer used to program them. For the ZXC3 and ZXC4 ROM cartridges, the Cartridge Creator utility can be used to send to the programs to a Spectrum for direct programming into the FLASH ROM (in the future the Cartridge Creator utility will be enhanced to allow direct programming from the ZX81).

Click here to download the ZX81 (Edition 1 ROM) RS232 ROM cartridge [V2.03]. 16K
Click here to download the ZX81 (Edition 2 ROM) RS232 ROM cartridge [V2.03]. 16K
Click here to download the ZX81 (Hardware fix compatible Edition 2 ROM) RS232 ROM cartridge [V2.03]. 16K
Click here to download the ZX Tape Player [V2.1.0] utility.
Chroma thumbnail