Product specifications

BASIC sets up the VRAM tables as shown in Appendix A. The data bytes which are
used, and the routine to perform this set-up are listed in the example below.
The routine is called VRGINI (VDP Registers Initialisation Routine). It needs no
register setup on input, and affects none on output. It uses a table called VRGTAB
which has 18 elements, and the routine VOUTRG, which must be present.
;VRGINI-INITIALISE VDP WRITE-ONLY REGISTERS DEPENDENT CONTENTS OF
TABLE VRGTAB
; NO REGISTER SET-UP REQUIRED ON ENTRY
; NO REGISTERS AFFECTED ON EXIT
;
VRGINI: PUSH AF ;Save Ace and flags
PUSH DE ;Save DE register pair
PUSH HL ;Save HL register pair
LD B, 18 ;Set loop counter = 18
LD HL,VRGTAB ;Set HL to point to start address of table
;VRGTAB
VRG1: LD E,(HL) ;Load data byte into E
INC HL ;Move onto next byte in table VRGTAB
LD D, (HL) ;Load control byte into D
INC HL ; Move onto next byte in table VRGTAB
CALL VOUTRG ;Output data byte held in to register number
;held in D
DJNZ VRG1 ;Decrement loop counter and If loop counter
;<> 0 then goto VRG1 else drop through to
;VRG2
VRG2: POP HL ;Get old HL register pair
POP DE ;Get old DE register pair
POP AF ;Get old Acc and flags
RET ;Return to calling routine
;
VRGTAB: DB 0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0
;
The contents of the eight VDP write-only registers are shown in the table below.
Following this table is a description of each register and what each of the control bits
actually do.
Registers 0 and 1 contain flags to enable or disable various VDP features and modes.
Registers 2 through to 6 contain values which are the start addresses for the various
sub-blocks of VRAM (for example where the screen is located).
Register 7 is used to define backdrop and text colours.