VDP Display Registers
This page was last modified 02:16, 6 December 2016 by Mars2000you.

WIP

Control Register 18

This control register is available on the MSX2/2+ VDP and can be read/written with the MSX-BASIC instruction VDP(), using the value 19. It corresponds to the SET ADJUST instruction of MSX-BASIC, but without saving in the Real Time Clock (RTC).

Bits Code Meaning Values
7 to 4 V3 to V0 Vertical alignment on the screen * Value 7 to 1 for top alignment
* Value 0 for center alignment
* Value 15 to 8 for bottom alignment
3 to 0 H3 to H0 Horizontal alignment on the screen * Value 7 to 1 for left alignment
* Value 0 for center alignment
* Value 15 to 8 for right alignment


Using this register in combination with copy commands can lead to a VRAM corruption when the sprites are disabled (value 1 in bit 1 of control register 8). To avoid that, you need to wait for the end of the copy command (value 0 in bit 0 of status register 2) before using control register 18.

Using this register to make screensplits can lead to uncommon results when the sprites are disabled. For example, the background color will be used for the current line by moving the screen to the left with control register 18.

Control Register 19

This control register is available on the MSX2/2+ VDP and can be read/written with the MSX-BASIC instruction VDP(), using the value 20. It defines the line number where a programmed interrupt must happen when horizontal retrace interrupts are enabled (value 1 in bit 4 - IE1 - of control register 0).

The VDP will generate interrupt when it starts to display the scan line corresponding to the value written in control register 19. It will also set to 1 bit 0 - FH - of status register 1.

Control Register 23

This control register is available on the MSX2/2+ VDP and can be read/written with the MSX-BASIC instruction VDP(), using the value 24. It sets the value of the first line to display on the screen.

Virtual screen size is 256 lines (0 to 255), visible vertical screen size can be 192 or 212 depending of bit 7 - LN - of control register 9. By default, value of this register is 0 and lines 0 to 191 or 211 are displayed. Setting another value than zero creates a vertical offset, displaying un-initialized parts of the VRAM which may look as garbage.

Display of virtual screen is made in cycle: if you increase the value in this register, top of virtual screen will appear at the bottom of the visible screen. This trick can be used to easily make vertical scrollings.