Computus Interruptus, Part 3

Authors

Wes Brzozowski

Publication

Publication Details

Volume: 3 Issue: 5b

Date

April 1985

Pages

3
See all articles from SINCUS v3 n5b

If you try to relocate the machine code to the same 16K memory block as the display file (16-32K), you 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 T/S 2068 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. 

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

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 T/S 2068 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 been 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 the 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 24164: READ k: POKE j,k: NEXT j
30 DATA 62,93,237,71,237,94,201,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 T/S 2068 never uses this area, so it’s ideal for us. The only problem is screen snow. 

Scroll to Top