Personal Computer News


Curing The Hiccups In The MTX Screen Saver

Categories: Letter

 
Author: P. Brewer
Published in Personal Computer News #093

Curing The Hiccups In The MTX Screen Saver

I was delighted to see the routine for saving the graphics screen on the Memotech MTX (issue 87) but had some trouble in getting it to work. On consulting the VDP Manual, I found some errors.

The VDP requires a minimum of 8 microseconds between the initial address setup and the subsequent data read or write. The program for dumping the VRAM to RAM has only 7.5 microseconds between these two instructions and so requires the insertion of two NO OP instructions.

The cassette save/load routine requires that resister DE is loaded with the number of bytes to be transferred, and not resister BC as was listed.

Finally, as written, the routine would not save the colour information. This can be rectified by also saving the colour table. It is simply necessary to save #3800 bytes instead of #1800 bytes, as indicated in my listing.

SAVE

LD A,0
OUT (2),A
LD A,0
OUT (2),A
NO OP
NO OP
LD HL,#B800
LOOP: IN A,(1)
LD (HL),A
INC HL
LA A,H
CP #F0
JR NZ,LOOP
LD HL,#B800
LD DE,#3800
LD A,0
LD (#FD68),A
CALL #AAE
RET

LOAD

LD HL,#B800
LD DE,#3800
LD A,1
LD (#FD68),A
CALL #AAE
LD A,0
OUT (2),A
LD A,#40
OUT (2),A
LD HL,#B800
LOOP: LD A,(HL)
OUT (1),A
INC HL
LD A,H
CP,#F0
JR NZ,LOOP
RET

P. Brewer
Bury, Lancs.

P. Brewer