libmsx
C library for MSX
Loading...
Searching...
No Matches

Dispalay area adjust / Hardware scroll. More...

+ Collaboration diagram for Display registers:

Enumerations

enum  vdp_yjk_mode { VDP_RGB = 0x00 , VDP_YJK = 0x08 , VDP_YJK_RGB = 0x18 }
 MSX2+ Enumeration of V9958 VDP's color space. More...
 

Functions

void vdp_set_adjust (int8_t x, int8_t y)
 MSX2 Set VDP display adjust register.
 
void vdp_set_vscroll (uint8_t y)
 MSX2 Set VDP vertical display offset register.
 
void vdp_set_hscroll (uint16_t x)
 MSX2+ Set VDP horizontal display offset register.
 
void vdp_set_hscroll_mask (bool enable)
 MSX2+ Enables/Disables the screen mask for the leftmost 8 pixels.
 
void vdp_set_hscroll_dual_page (bool enable)
 MSX2+ Enable/disable horizontal scrolling for two pages.
 
void vdp_set_yjk_mode (enum vdp_yjk_mode yjk)
 MSX2+ Set V9958 VDP's color space to RGB, YJK, or YJK/RGB.
 

Detailed Description

Dispalay area adjust / Hardware scroll.

Enumeration Type Documentation

◆ vdp_yjk_mode

MSX2+ Enumeration of V9958 VDP's color space.

VDP_RGB can be used to reset to default color space for each screen mode.

VDP_YJK and VDP_YJK_RGB are supposed to use with GRAPHIC 7 screen mode, and not with any other screen mode.

See also
vdp_set_yjk_mode()
Enumerator
VDP_RGB 

Default color space of the V9958 (same as the V9938).

In case of GRAPHIC 7 screen mode:

  • 256 colors
    • 3-bits per pixel of R component (0..7)
    • 3-bits per pixel of G component (0..7)
    • 2-bits per pixel of B component (0..3)
  • Pre-defined 16 colors for sprites.
  • No color palette.

Any other screen mode:

  • According to colors for each screen mode.
VDP_YJK 

YJK mode.

In case of GRAPHIC 7 screen mode:

  • 19,268 colors
    • 5-bits per pixel of Y component (0..31)
    • 6-bits per 4-pixels of J component (-32..+31)
    • 6-bits per 4-pixels of K component (-32..+31)
  • 16 colors out of 512 colors (color palette) for sprites.

Any other screen mode:

  • Not supposed to use with.
VDP_YJK_RGB 

YJK / RGB mixed mode.

In case of GRAPHIC 7 screen mode:

  • 12,499 colors
    • 4-bits per pixel of Y component (0..15)
    • 6-bits per 4-pixels of J component (-32..+31)
    • 6-bits per 4-pixels of K component (-32..+31)
  • or 16 colors out of 512 colors (color palette).
  • 16 colors out of 512 colors (color palette) for sprites.

Any other screen mode:

  • Not supposed to use with.

Definition at line 518 of file vdp.h.

Function Documentation

◆ vdp_set_adjust()

void vdp_set_adjust ( int8_t  x,
int8_t  y 
)

MSX2 Set VDP display adjust register.

  • If x < 0, shift the display area to left.
  • If x > 0, shift the display area to right.
  • If y < 0, shift the display area to upper.
  • If y > 0, shift the display area to lower.
Parameters
xx offset (-7..+8)
yy offset (-7..+8)

◆ vdp_set_vscroll()

void vdp_set_vscroll ( uint8_t  y)

MSX2 Set VDP vertical display offset register.

Parameters
yvertical offset. (0..255)

◆ vdp_set_hscroll()

void vdp_set_hscroll ( uint16_t  x)

MSX2+ Set VDP horizontal display offset register.

Parameters
xhorizontal offset (0..511)

◆ vdp_set_hscroll_mask()

void vdp_set_hscroll_mask ( bool  enable)

MSX2+ Enables/Disables the screen mask for the leftmost 8 pixels.

Parameters
enableHide the leftmost 8 pixels if true, show otherwise.

◆ vdp_set_hscroll_dual_page()

void vdp_set_hscroll_dual_page ( bool  enable)

MSX2+ Enable/disable horizontal scrolling for two pages.

Parameters
enablescrolling two pages if true, one page otherwise.

◆ vdp_set_yjk_mode()

void vdp_set_yjk_mode ( enum vdp_yjk_mode  yjk)

MSX2+ Set V9958 VDP's color space to RGB, YJK, or YJK/RGB.

Set / Reset YJK/YAE bit of V9958 VDP register R#25.

Affects GRAPHIC 7 screen mode color space and pixel format.

VDP_RGB can be used to reset to default color space for each screen mode.

VDP_YJK and VDP_YJK_RGB are supposed to use with GRAPHIC 7 screen mode, and not with any other screen mode.

Parameters
yjkcolor space