Computus Interruptus, Part 3

See all articles from SINCUS v3 n5b

If you thought that this column’s absence last month meant [illegible]at it was over, you can think again! A brief bout of microdrive fever put it on hold for a bit, but Computus Interruptus is back, meaner than ever. There’s still plenty to do and the name alone is too thoroughly horrible to waste on just two installments, so here we go !.

First, the old business. We left off last time with a cryptic comment about that print screen program that we’ve just about beaten to death. Those who’ve tried to relocate the machine code to the same 16K memory block as the display file (16-32K) will notice that the quality of the picture degrades badly when it’s running. The servicing of interrupt mode 2 confuses the hardware that generates the display, when both are trying to operate with the same memory chips. (The TS2068 memory from 16-32K is produced by two 16K x 4 chips.) As a result, the image on the screen contains a lot of “snow”, although the snow isn’t copied onto the printer picture.

While we’re not on the subject, the last installment contained a comment suggesting that the use of pullup resistors in Spectrum emulators might not be as useful as I’d first expected. On the contrary, their performance has been spectacular, so far. More on that, in a bit.

Now, on to the questions !

#9. If relocating the print screen program makes a snowy picture, then why bother?

In three months, you’ll be sweating, and wishing for snow, [illegible] then you can… no, that’s not it. Actually, it’s amazing that such a short program is such a pain to relocate. It would be nice to find some little used “memory nook” to hide it in. This way, it probably won’t try to occupy the same space as the other programs. It turns out that the TS2068 has several such nooks that are known to but a few. Timex’s change to the Spectrum ROM has it lay out small sections of RAM that it never uses – – at all ! They would have benn used by some of the hardware add-ons that Timex never released, but now they’re free for us to play with. Unfortunately, they’re all in that “noisy” 16-32K memory block. If we relocate the print screen program into one of these areas, we’ll have a “last resort” version that might work when the better version won’t.

The relocated program will need to put a different value in 6he I-register (piece of cake). It will have to have a continuous 257 byte space for the kludge block, and that must start on a 256 byte boundary, (probably not too hard). The handler needs to start at a memory address whose first byte is identical to its second byte (tricky, but reasonable as long as you dont forget). And all of these have to be done at once, in one of the available “memory holes” (a head scratcher, but it can be done.)

RELOCATED PRINT-SCREEN LOADER

  10 FOR j=23808 TO 24065: POKE
j,94: NEXT j
20 FOR j=24151 TO 24184: READ
k: POKE j,k: NEXT j
30 DATA 62,93,237,71,237,94,20
1,245,197,213,229,62,127,219,254
,246,224,254,252,32,6,243,6,192,
205,5,10,225,209,193,241,195,56,
0
40 RANDOMIZE USR 24151

The BASIC program given here places the print-screen program in an unused memory area that follows the system variables. This would have been used for new system variables and possibly for microdrive channels. In any case, the standard TS2068 never uses this area, so it’s ideal for us. The only problem is screen snow.

Hopefully, this concludes our discussion of the print-screen program. Next time, if all goes well, we’ll start contorting the interrupt handler to produce moving sprite graphics.

#10. What about the resistors on the Spectrum emulators?

They work great!! It’s possible to produce programs that still don’t work with them, but it seems right now that the main problem is in the hardware add-ons that weren’t designed to work in conjunction with interrupt mode 2. Many programs that were once thought not to work with the resistors work fine, once that joystick, light pen or printer interface is unplugged from the back of the computer!

Now, a lot of people who’d be interested in this subject might miss it if it were buried in this article. Therefore, a full explanation is in a seperate article in this issue. Just between us, it’s a continuation of this series, but no one else need know. So, right now, turn to ” Running Those Unrunnable Spectrum programs”, and continue reading…