Your Spectrum
Issue 10, December 1984 - Interface 1
Home Contents KwikPik
Following my comments in a previous article, there have been numerous enquiries about the forthcoming Interface 1 ROM - the one Sinclair Research is apparently still denying even exists! Well here's how you 'spot the difference'
It's an open secret that the existing Interface 1 has various bugs - a fact that was realised in Cambridge quite soon after the Microdrive launch. Thus, a new ROM was born, the code being finalised in early February this year. However, actual production was delayed by the QL difficulties and has only recently begun. Even now, at the time of writing, the release date has still to be announced. To check which ROM you have, enter the following line after a NEW or switch-on:

CLOSE #0: PRINT PEEK 23729

This will either give '0' for an old ROM, or '80' for the new one. The differences are fairly apparent from Basic. To begin with the main Microdrive commands have been speeded up considerably, so CAT and OPEN "M" now take seven seconds, instead of the previous 10. The improvement has been made by a clever piece of code which calculates the length of the tape - instead of just assuming it's always 255 sectors as the old ROM does. The other speed difference occurs during a FORMAT. On the old ROM it takes about 35 seconds; on the new it's around 10 seconds faster. The only drawback is that there's a slight loss in capacity with the new format routine.

SPACING OUT

The other difference available from Basic is in the RS232 software. 'T' type streams now support the TAB function properly, and the double-space bug has been corrected. Unfortunately, the former function requires two bytes for system variables, in fact using the previously 'unused' ones at 23728 and 23729. The first holds the cursor position, and the second the printer's width - hence the
I N T E R F A C E
R O M T H E
I N S I D E
S T O R Y
Andrew Pennell discusses the changes made to the Interface 1 ROM.
default value of 80 after initialisation.
Along with these improvements, many of the bugs in the ROM have now been corrected - the most notorious being the 'low RAMTOP' one that crashed the machine if the stack was too close to the channels area. The CLOSE# bug has also been fixed, in exactly the same way as I suggested in my book! Also fixed is a very rare bug in the network software that caused it to fall over; now it preserves the value of IX during a subroutine call.
However, some bugs still remain, in particular the 'big Basic' one; try loading a large Basic program from Microdrive which is too big to fit and the machine still falls over with both types of ROM. Also in the new ROM is the 100 bytes of code that prints out memory in Hex, used for debugging when the original ROM was first written. It's strange to see it still there as the new ROM is already pushed for space (there are only 31 unused bytes left, compared with over 1K in the old version). One addition though, is a copyright message, together with the author's initials - MJB.

BASIC IMPROVEMENTS

The improvements for the Basic programmer are very nice and all existing Basic Microdrive software should work on both ROMs, but for the machine code programmer there's a real incompatibility problem. When the numerous improvements were made to the code, it was clearly decided not to use patches that would retain
compatibility; they just re-wrote it regardless. Some programs will work OK, just so long as they use the existing hook codes only. If they call other routines directly, the chances are they won't work. Practically everything has moved, apart from the syntax routines, up to 0800 Hex. Although an extra eight bytes have been added at 0234 Hex, they've been compensated for by truncating an unused error message shortly after it.
The hook codes themselves are similar - the working ones do just the same as before (albeit, some more quickly), while the non-working ones have been corrected. Code 2B now does what it should originally have done, namely 'Create an M area'; and code 2F (for the network) also now works. In addition, two extra codes have been added, one to read the next sector header, the other to open a 'B' channel. Neither seem particularly useful.

CHECK IT OUT

For the full rundown on the differences between ROMs, anxious readers will have to await the reprint of Master your ZX Microdrive, which should just about be available by the time you read this.
The new ROM is certainly a great improvement on the old but it's doubtful whether any upgrade service will be offered. The ROMs are not socketed in the Interface 1, making an upgrade not only difficult, but unlikely.

STOP PRESS

I have just obtained the third version of the Interface 1 ROM, and it's very similar to version 2. The reason for its release is improved compatibility with the QL over the network and this has been achieved by a slight timing modification to the 'buffer' routine. The mod uses no extra bytes. The only other difference is that an extra instruction has been added, moving all subroutines from 1C3C Hex on in memory by two bytes. I'm not 100 per cent sure what the extra instruction does, but I think it's meant to improve capacity during a FORMAT.
Cartoon

"... and Robbie here is going to teach you all about computers ..."
Home Contents KwikPik