VDP Table Base Address Registers
This page was last modified 02:14, 6 December 2016 by Mars2000you.

WIP

Contents

Control Register 2

This control register is common to all MSX generations and can be read/written with the MSX-BASIC instruction VDP(), using the value 2. It defines the base address of the Name Table (or Pattern Layout Table).

On MSX1, value of bits 7 to 4 is always 0. Bits 3 to 0 on MSX1 give the base address: the Name Table base address is equal to (Register 2) x 400. 16 different pages can be defined in SCREEN 1, 3 and 0, width 1-40. 4 different pages can be defined in SCREEN 2.

On MSX2/2+, for the MSX1 screens and SCREEN 4, value of bit 7 is always 0. 32 different pages can be defined in SCREEN 1, 3 and 0, width 1-40. 8 different pages can be defined in SCREEN 2 and 4.

For SCREEN 0 width 41-80, value of bit 7 is always 0 while value of bits 1 to 0 is always 1. 16 different pages can be defined.

For SCREEN 5, 6 and 9, value of bit 7 is always 0. Bits 6 and 5 determine the page number (0 to 3) while value of bits 4 to 0 is always 1.

For SCREEN 7, 8, 10 to 12, value of bits 7 and 6 is always 0. Bit 5 determines the page number (0 or 1) while value of bits 4 to 0 is always 1.

On the MSX2+ VDP, value of bit 5 is always 1 when bit 0 - SP2 - of register 25 has value 1 to set the horizontal screen size to two pages for the horizontal scrolling.

For the KANJI screens, it will vary according using of Bitmap screen 5 or 7.

Default returned values:

SCREEN Binary Decimal Decimal x 400 Hexadecimal conversion
0, WIDTH 1-40 00000000 0 0 0000
0, WIDTH 41-80 00000011 3 - -
1, 2, 4 00000110 6 2400 1800
3 00000010 2 800 0800
5 - 8, 10 - 12 00011111 31 - -
9 00111111 63 - -


Control Registers 3 and 10

The Control Register 3 is common to all MSX generations and can be read/written with the MSX-BASIC instruction VDP(), using the value 3. It defines the base address of the Color Table.

On the MSX2/2+ VDP, this register is associated as low table with Control Register 10 as high table, what extends the available addresses for the Color Table. Bits 7 to 3 of register 10 have always value 0. Register 10 can be read/written with the MSX-BASIC instruction VDP(), using the value 11.

For SCREEN 0 width 41-80, bits 2 to 0 of register 3 have always value 1.

For SCREEN 1, the Color Table base address is equal to (Register 3) x 64 on MSX1.

For SCREEN 2 and 4, bits 6 to 0 of register 3 have always value 1. Only bit 7 of register 3 and eventually bits 2 to 0 of register 10 are important here. It implies that on MSX1, the Color Table can be located only at 0000 and 2000 in hexadecimal for SCREEN 2.

Default returned values:

R 10 R 3
SCREEN Binary Decimal Binary Decimal Decimal x 64 Hexadecimal conversion
0, WIDTH 41-80 00000000 0 00100111 39 - -
1 00000000 0 10000000 128 8192 2000
2, 4 00000000 0 11111111 255 - -


Control Register 4

This control register is common to all MSX generations and can be read/written with the MSX-BASIC instruction VDP(), using the value 4. It defines the base address of the Pattern Table.

On MSX1, value of bits 7 to 3 is always 0. Bits 2 to 0 give the base address for SCREEN 1, 3 and 0, width 1-40: the Pattern Table base address is equal to (Register 4) x 2048.

On MSX2/2+, value of bits 7 and 6 is always 0. Bits 5 to 0 give the base address for all concerned SCREENs, except 2 and 4.

For SCREEN 2 and 4, value of bits 1 and 0 is always 1. The base address is defined by bits 5 to 2 (only bit 2 on MSX1 for SCREEN 2).

Default returned values:

SCREEN Binary Decimal Decimal x 2048 Hexadecimal conversion
0, WIDTH 1-40 00000001 1 2048 0800
0, WIDTH 41-80 00000010 2 - -
1, 3 00000000 0 0 0000
2, 4 00000011 3 - -


Control Registers 5 and 11

The Control Register 5 is common to all MSX generations and can be read/written with the MSX-BASIC instruction VDP(), using the value 5. It defines the base address of the Sprite Attribute Table. On the MSX1 VDP, bit 7 of register 5 has always the value 0.

On the MSX2/2+ VDP, this register is associated as low table with Control Register 11 as high table, what extends the available addresses for the Sprite Attribute Table. Bits 7 to 2 of register 11 have always value 0. Register 11 can be read/written with the MSX-BASIC instruction VDP(), using the value 12.

For SCREEN 1 to 3, the Sprite Attribute Table base address is equal to (Register 5) x 128.

For SCREEN 4 to 6, it's equal to [(Register 5) - 3] x 128.

For SCREEN 7, 8, 10 to 12, it's equal to [(Register 5) + 3] x 2 x 128.

Default returned values:

R 11 R 5
SCREEN Binary Decimal Binary Decimal Modified decimal Decimal x 128 Hexadecimal conversion
1-3 00000000 0 00110110 54 54 6912 1B00
4 00000000 0 00111111 63 60 7680 1E00
5-6 00000001 1 11101111 239 236 30208 7600
7-8, 10-12 00000001 1 11110111 247 500 64000 FA00


Control Register 6

This control register is common to all MSX generations and can be read/written with the MSX-BASIC instruction VDP(), using the value 6. It defines the base address of the Sprite Pattern Table.

On MSX1, value of bits 7 to 3 is always 0. On MSX2/2+, value of bits 7 and 6 is always 0.

For all concerned screens, the Sprite Pattern base address is equal to (Register 6) x 2048.

Default returned values:

SCREEN Binary Decimal Decimal x 2048 Hexadecimal conversion
1-4 00000111 7 14336 3800
5-6 00001111 15 30720 7800
7-8, 10-12 00011110 30 61440 F000