Product specifications
In most cases if you are doing anything that BASIC would not normally do you will
have to use assembler. BASIC can easily be disabled by using a DI instruction at
the start of your code, and an RETI instruction at the end. If you have modified the
contents of the VDP registers drastically it would be far better to perform a JP £0000
as your last instruction as a warm boot back to BASIC.
No matter what processes you perform in Z80 ram, as long as you do not corrupt the
VDP registers, or perform a BASIC reboot, or perform a system reset the integrity of
VRAM will always be maintained.
You can switch from one VDP mode to another in mid processing operation by
performing a VDP write only register change. Some very interesting effects can be
obtained by having graphics 1 mode tables and text mode tables on compatible VRAM
start boundaries and then switching from one to the other.
All direct VDP operations are associated with ports 1 and 2 only.
VDP and CTC Interrupts – Introduction
3.1
At the end of each active display scan which is about every 1/50 of a second, the VDP
chip will stop all screen processing and perform other tasks. It is possible to set up
VDP interrupt servicing routines which will start at the end of each active display scan,
and finish before the next one has begun.
This routine is a period of time when data bytes written to the screen or blanked on-
screen can be processed in a glitch free manner.
Bit 5 of register 2 must be set to a 1 to allow VDP interrupts to take place. This should
be done during VDP write only register set up at the start of your code.
In addition to this the use of standard IM 2 interrupts has been enhanced using the
CTC chip on board the MTX, to allow the user to set up vector tables on an 8 byte
boundary within a page instead of a page boundary alone leading to a much greater
flexibility and ease of use in vector table positioning.
This can be a complex subject for some computer users who are new to the subject,
but it is well worth while persisting with this section. The results of mastering
interrupts make the effort involved small in comparison.
The advantages of using VDP interrupts are:
1. A drastic improvement in the quality of animated displays. Reducing or
removing glitches created when transferring bytes to or from the display
screen area.
2. It gives a second optional clock and can be used for timing and compact
delay loops.