ROMANTIC ROBOT have been selling a Snapshot-type device for a while now. Their Multiface 1 is something of a Rolls Royce compared with the Snapshot 2, and has a price tag to match - five pence short of forty quid. The Multiface consists of an 8K ROM and 8K of RAM, providing the instant SAVE facility for most disk and tape systems, plus options to examine and POKE memory. It can also call any address or print out the screen display. Besides the magic button you get a through port for other peripherals, a Kempston joystick socket and a switch to make the interface undetectable to the computer.
One very nice feature of this system is the way that you can load your own applications into the 8K RAM, independently of the standard 48K, and call them up at will while a program is loaded. ROMANTIC ROBOT give full instructions to help you do this, although the facility is only available to machine-code programmers.
ROM-ROB have just launched a package that uses this feature; as such it is worthless unless you've got Multiface 1, but I have found it so useful over the last few weeks that I think it might even justify the purchase of a Multiface to some people, especially keen hackers.
The package is called Genie. It lets you stop and start any program at any point, and examine its operation in great detail. In effect, it is a small but well-designed machine-code monitor that is compatible with absolutely everything. Genie costs £*.** and consists of a cassette, containing about 5K of code, and six neatly-printed, well written A4 pages of documentation.
Genie loads into the RAM on the interface - the instructions tell you how to copy it to Microdrive or disk and configure it for different printers; Genie will print via any device connected to the Spectrum's channel 3, including the ZX printer, the Spectrum 128 serial port, and most plug-in interfaces. You must tell the program whether or not your printer expects 'line- feed' characters at the end of each line.
Once Genie is installed you can call it up by pressing the red button. Instead of the usual Multiface menu, an eight-line window appears at the top of the screen. You can call up the normal Multiface menu by typing BREAK as you press the red button, but you MUST reload Genie before you press the button again.
Everything Genie does appears in the eight-line window. The colour-scheme is bright but readable unless your telly is playing up - characters are white on red or black on yellow. The top part of the window lists keys that work in most modes, while a two line menu bar carries the main options, rather cryptically listed as 'DIS', 'TEXT', 'NUM, 'Z80', 'FIND' and 'RET'.
Z80 shows you the values of all the Z80 registers, including the program counter. You can alter any value, and turn interrupts on or off, but you can't display or change the interrupt mode. So what, I hear you say!
FIND will search the whole 48K RAM for a sequence of up to 24 bytes. Searching is very quick, and you can step from one match to the next by pressing a key. This is great for looking for specific instructions but not so hot for messages, because the values to be found must be entered as numbers - not text.
DIS is a full Z80 disassembler- a routine which converts stored numbers into machine-code mnemonics, whether or not they are really part of a program. You can start and stop disassembly at any address.
DIS has several nice features - it sifts out the 'error code' bytes which follow RST 8 instructions, and decodes the undocumented Z80 instructions, like SLL C and SUB A,IXH, which confuse lesser disassemblers. The display can be made to scroll continuously or print a new line when you press ENTER. At top speed, or if you hold the key down, the information rolls by very fast indeed.
The TEXT option is similar but interprets memory as characters. Unprintable codes appear as full stops. TEXT is very useful if you feel like changing a few messages in your favourite (or least favourite) program. NUM prints the numeric values in memory.
All of the Genie options let you switch from decimal to hex input and output at any time: this is achieved by pressing the H key. The border colour changes from blue to cyan to signal which number base is currently selected. Addresses actually change their form on the screen when you press H!
It takes a while to get used to the way Genie accepts numbers - you don't have to press ENTER if you type the maximum number of characters (five for a decimal address or three for a byte value.) I found it a little irritating that leading zeroes are always printed.
You can print the contents of the window at any time by typing C for Copy, and relay all output to the printer between presses of P. The G option lets you go backwards through the memory; it takes DIS a few bytes to work out what has happened thereafter, but most disassemblers have this quirk.
You can change any data in registers or memory by pressing A for Alter, as corresponding values are displayed. You're asked for an address, but ENTER gives the last one examined. You have to type new values as single-byte numbers.
Finally, the 'RET' option returns you to the program that was interrupted, restoring the old display on the top 8 lines of the screen. If have altered the value of the register, the program re-starts at the address you set. The instructions illustrate how you can return directly to ZX BASIC.
There are a few missing features that I would have liked, such as conditional search and replace and some facility to enter text directly into the machine, rather than as numbers. However, Genie has to fit into the Spectrum's memory map with the Muitiface ROM and 48K of program to be examined, and the limited space has been well used.
Real hackers will love Genie, but it's pretty meaningless unless you understand machine-code. It will not necessarily be useful for debugging your own code, unless your programs are so large that there's no spare RAM for a conventional monitor. However, it is absolutely wonderful for getting inside someone else's code. If that's what you enjoy, you'll find Genie a very professional tool - simple, effective and unique.