This utility works with the following models of Spectrum:
The ZX ROM Cartridge Creator is a Windows based utility that allows the generation of Sinclair Spectrum ZX Interface 2 ROM cartridge files for use on 16K, 48K, 128K and +2 models. The files are intended for use with the ZXC1, ZXC2, ZXC3 and ZXC4 ROM cartridge PCBs, and are suitable for direct programming into PROMs. This page details those facilities applicable to the ZXC1.
The utility supports three file types:
- PC-based emulator snapshot files (.Z80, .SNA, .SZX)
- ZX80 program files (.O, .P80, and .80) for emulation on the Spectrum 128
- ZX81 program files (.P, .P81, and .81) for emulation on the Spectrum 128
The ZXC1 can only support a single program. The utility will automatically determine which PCB configurations and EPROMs are suitable for the selected program. The program is stored in a compressed format, thereby maximising the use of the available space.
PC-based emulator snapshot files (.Z80, .SNA and .SZX) allow the majority of 16K, 48K and 128K cassette based software titles to be converted into ROM cartridges. For most efficient results, the snapshot of a 16K game should be taken on emulated 16K machine and the snapshot of a 48K game taken on an emulated 48K machine. On a Spectrum 128, snapshots of programs taken while in 128 BASIC mode may fail to run properly on a Spectrum +2, and vice versa. This is due to routine relocations within the Editor ROM of the Spectrum +2.
To convert a snapshot, a few bytes of RAM are required and the safest place to attempt to obtain these from is the stack. Although this will work fine for the majority of programs, some might become corrupted if there is not enough stack space spare. If such an error is encountered then it might be possible to overcome it by taking a snapshot at a different stage within the program, preferably when there is little activity occurring, e.g. when showing a menu instead of during the game play.
|ZX80 Program Files|
ZX80 program files (.O, .P80, and .80) can be selected and will run using my ZX80 emulator ROM cartridge program (which will be included automatically). There are a couple of variants of the ZX80 emulator and the ZX80 program can be assigned to use one or other of them. Note that ZX80 programs are only supported on 128K Spectrums.
|ZX81 Program Files|
ZX81 program files (.P, .P81, and .81) can also be selected and will run using my ZX81 emulator ROM cartridge program (which will be included automatically). A number of variants of the ZX81 emulator also exist and the ZX81 program can be assigned to use a particular version. As with ZX80 programs, ZX81 programs are only supported on 128K Spectrums.
|Creating a ROM Cartridge Image|
To create a ROM cartridge image file for use on the ZXC1, set the Target type as 'Spectrum' and 'ZXC1'. A program can then be selected via the Add button located on the toolbar (or from the Edit menu). It is also possible to drag-and-drop a file from Windows Explorer into the program area. A range of sub-options allow direct selection of a particular program type, e.g. snapshots only. A program can also be added by pressing the Insert key. A program can be removed via the Remove button in the toolbar, from the Edit menu, or by pressing the Delete key. When Add is clicked, a dialog window is displayed which allows selection of the program to insert and allows only files of the chosen type to be shown. The utility remembers the file type selected and will default to this next time the dialog is invoked. Once a program has been selected, it is added to the program area within the middle area of the utility's window. This area shows a summary of details for the program. Fields show the file name of the program, the size the program occupies within the ROM image, and its type (e.g. a Z80 snapshot).
|Spectrum Game ROM Cartridge|
Once a Spectrum snapshot file has been selected, the Cartridge Configuration area shows which PCB configurations will support this program and the EPROM type required for the currently selected configuration. The configuration select must match the population of the ZXC1 PCB.
The RAM field displays the amount of memory required by the Spectrum to be able to run the snapshot - 16K, 48K or 128K.
The Auto-Run Line field is not used for Spectrum snapshots (it is used when creating ZX80 and ZX81 emulator game ROM cartridges).
The Embed image of Spectrum ROM field specifies whether to incorporate a copy of the Spectrum ROM within the ROM cartridge instead of paging back to the real Spectrum ROM. Since a small amount of RAM has to be used to coordinate the transfer of the program from ROM to RAM, it is not always possible to locate a suitable area or to guarantee that it is really unused by the program. Selecting to embed a copy of the Spectrum ROM allows the RAM used for the coordination task to be reclaimed at the end of the transfer process and hence ensures that the Spectrum's memory completely matches the snapshot image. However, it does require an additonal 16K of EPROM space. Note that the standard 48K Spectrum ROM is used, even for a 128K snapshot.
The Use spare area in ROM image field is only available when the Embed image of Spectrum ROM option is selected. It allows the Cartridge Creator utility to make use of the spare bytes at the end of the Spectrum ROM. This cuts down on the amount of RAM required for the transfer process and can also result in the program fitting within a smaller EPROM.
Once the desired configuration has been selected, the Create button can be used to write the ROM image to a binary file.
|ZX80 and ZX81 Emulator Game ROM Cartridge|
The Cartridge Creator utility can also be used to generate ZX80 and ZX81 game ROM cartridges. These typically require 32K, with the first 16K bank containing the game and the other 16K bank containing the ZX80 or ZX81 emulator. The game is first copied into RAM and then executed once the bank containing the emulator is paged in.
The Memory field allows selection of the RAM pack size to use for the program. By default, the smallest possible size is selected but it is possible to choose a larger RAM size if desired. Some games that require less than 4K of RAM assume a collapsed display file and might not run correctly with 16K.
The Run field indicates whether a program is configured to automatically run upon loading by displaying the line number that will be executed. If the program is not configured to automatically run then None is displayed and the list box is populated with all the line numbers found within the program. Selecting a line number will cause the Cartridge Creator utility to modify the program such that the chosen line automatically executes upon loading. This even applies to the ZX80 which is not normally capable of automatically running saved programs (for the ZX80 a GO TO command is executed).
The Embed image of Spectrum ROM field is not applicable to the generation of ZX80 or ZX81 ROM cartridges and so is always disabled. It is only used when generating Spectrum game ROM cartridges.
The Use spare area in ROM image field is used to allow the Cartridge Creator utility to embed all or part of the selected program within the unused area found at the end of the ZX80 or ZX81 emulator image. This can result in a single 16K bank holding both the game and the emulator.
The Emulator field allows the program to be run using a particular variation of the ZX80 or ZX81 emulator. By default, the standard version of the ZX80 emulator and the Edition 2 ROM version of the ZX81 emulator will be selected.
A snapshot file contains a complete dump of the Spectrum's RAM and also the state of the CPU's registers. As a result, snapshots becomes specific to the model of Spectrum on which they are taken. So for example, a snapshot of a 16K program taken using an emulated 48K Spectrum will not run on a real 16K Spectrum when converted to a ROM cartridge. Therefore a snapshot should be taken on the lowest model of Spectrum supported by the program.
Snapshots of 128K programs may also be specific to the model of emulated 128K Spectrum used to create them. This is due to relocation of routines within the Editor ROM of the Spectrum +2 compared to the Spectrum 128. Programs that use 128K BASIC will have different addresses stored on the stack and so snapshots of these programs will be specific to model of Spectrum that they were taken on. A similar issue applies to the Spanish Spectrum 128, which has a dramatically different Editor ROM than the UK Spectrum 128 and the UK, Spanish and French versions of the Spectrum +2. However, any 128K program that uses pure machine code and does not access any of the Editor ROM routines will work correctly on all 128K models when converted to a ROM cartridge.
Snapshots of programs that utilise the facilities of the ZX Interface 1 may also become specific to the edition of the Interface 1 ROM being emulated. Such a program might only perform a check for the Interface 1 ROM edition when it first runs. If a snapshot is taken after this point then the snapshot becomes specific to a particular ROM edition of the Interface 1. It is therefore important to take snapshots of such programs before any attempt is made by the program to run machine code. Snapshots taken when the CPU is running the ROM code within the Interface 1 should be avoided since the Cartridge Creator utility does not attempt to page in the Interface 1 ROM before it runs the loaded program. Therefore always take snapshots at a point in the program when Interface 1 facilities are not being actively used.
|Click here to download the ZX ROM Cartridge Creator utility.|