VCE I/O Ports.

Summary
VCE I/O Ports.
Ports.
colorportVCE port.
color_ctrlVCE Control register.
color_regVCE control table index register.
color_dataVCE Color table data register.
Control Register Flags.
VCE control register bitmask.
VCE_COLOR_MODE_MASKBit 7 selects the video mode.
VCE_BLUR_MASKBit 2 is used to enable or disable sprites and background characters edge blur.
VCE_DOT_CLOCK_MASKBits 0 and 1 selects the dot clock.
VCE color modes
VCE_COLOR_MODE_BWBlack and white video.
VCE_COLOR_MODE_RGBColor video.
VCE blur.
VCE_BLUR_ONBlur edges of the sprites and background characters.
VCE_BLUR_OFFDisable edges blur.
VCE dot clock.
VCE_DOT_CLOCK_10MHZ10MHz dot clock.
VCE_DOT_CLOCK_7MHZ7MHz dot clock.
VCE_DOT_CLOCK_5MHZ5MHz dot clock.
VCE Helper Macros.
RGBConvert 3bit R, G, B to 9bit palette entry.
Predefined colors
VCE_BLACKVCE value for black.
VCE_WHITEVCE value for white.
VCE_REDVCE value for red.
VCE_GREENVCE value for green.
VCE_BLUEVCE value for blue.
VCE_YELLOWVCE value for yellow.
VCE_MAGENTAVCE value for magenta.
VCE_CYANVCE value for yellow.
VCE_GREYVCE value for grey.

Ports.

colorport

colorport = $0400

VCE port.

color_ctrl

color_ctrl = colorport

VCE Control register.

color_reg

color_reg = colorport+2

VCE control table index register.

color_data

color_data = colorport+4

VCE Color table data register.

Control Register Flags.

Summary
VCE control register bitmask.
VCE_COLOR_MODE_MASKBit 7 selects the video mode.
VCE_BLUR_MASKBit 2 is used to enable or disable sprites and background characters edge blur.
VCE_DOT_CLOCK_MASKBits 0 and 1 selects the dot clock.
VCE color modes
VCE_COLOR_MODE_BWBlack and white video.
VCE_COLOR_MODE_RGBColor video.
VCE blur.
VCE_BLUR_ONBlur edges of the sprites and background characters.
VCE_BLUR_OFFDisable edges blur.
VCE dot clock.
VCE_DOT_CLOCK_10MHZ10MHz dot clock.
VCE_DOT_CLOCK_7MHZ7MHz dot clock.
VCE_DOT_CLOCK_5MHZ5MHz dot clock.

VCE control register bitmask.

VCE_COLOR_MODE_MASK

VCE_COLOR_MODE_MASK = %10000000

Bit 7 selects the video mode.  2 modes are available : black & white, and color.

VCE_BLUR_MASK

VCE_BLUR_MASK = %00000100

Bit 2 is used to enable or disable sprites and background characters edge blur.

VCE_DOT_CLOCK_MASK

VCE_DOT_CLOCK_MASK = %00000011

Bits 0 and 1 selects the dot clock.  This determines how many pixels are displayed on each horizontal line.

VCE color modes

VCE_COLOR_MODE_BW

VCE_COLOR_MODE_BW = %10000000

Black and white video.

VCE_COLOR_MODE_RGB

VCE_COLOR_MODE_RGB = %00000000

Color video.

VCE blur.

VCE_BLUR_ON

VCE_BLUR_ON = %00000100

Blur edges of the sprites and background characters.

VCE_BLUR_OFF

VCE_BLUR_OFF = %00000000

Disable edges blur.

VCE dot clock.

VCE_DOT_CLOCK_10MHZ

VCE_DOT_CLOCK_10MHZ = %00000010

10MHz dot clock.

VCE_DOT_CLOCK_7MHZ

VCE_DOT_CLOCK_7MHZ = %00000001

7MHz dot clock.

VCE_DOT_CLOCK_5MHZ

VCE_DOT_CLOCK_5MHZ = %00000000

5MHz dot clock.

VCE Helper Macros.

Summary
RGBConvert 3bit R, G, B to 9bit palette entry.
Predefined colors
VCE_BLACKVCE value for black.
VCE_WHITEVCE value for white.
VCE_REDVCE value for red.
VCE_GREENVCE value for green.
VCE_BLUEVCE value for blue.
VCE_YELLOWVCE value for yellow.
VCE_MAGENTAVCE value for magenta.
VCE_CYANVCE value for yellow.
VCE_GREYVCE value for grey.

RGB

Convert 3bit R, G, B to 9bit palette entry.

Parameters

rRed
gGreen
bBlue

Predefined colors

VCE_BLACK

VCE_BLACK = $000

VCE value for black.

VCE_WHITE

VCE_WHITE = $1ff

VCE value for white.

VCE_RED

VCE_RED = $038

VCE value for red.

VCE_GREEN

VCE_GREEN = $1C0

VCE value for green.

VCE_BLUE

VCE_BLUE = $007

VCE value for blue.

VCE_YELLOW

VCE_YELLOW = $1F8

VCE value for yellow.

VCE_MAGENTA

VCE_MAGENTA = $03F

VCE value for magenta.

VCE_CYAN

VCE_CYAN = $1C7

VCE value for yellow.

VCE_GREY

VCE_GREY = $124

VCE value for grey.

colorport = $0400
VCE port.
color_ctrl = colorport
VCE Control register.
color_reg = colorport+2
VCE control table index register.
color_data = colorport+4
VCE Color table data register.
VCE_COLOR_MODE_MASK = %10000000
Bit 7 selects the video mode.
VCE_BLUR_MASK = %00000100
Bit 2 is used to enable or disable sprites and background characters edge blur.
VCE_DOT_CLOCK_MASK = %00000011
Bits 0 and 1 selects the dot clock.
VCE_COLOR_MODE_BW = %10000000
Black and white video.
VCE_COLOR_MODE_RGB = %00000000
Color video.
VCE_BLUR_ON = %00000100
Blur edges of the sprites and background characters.
VCE_BLUR_OFF = %00000000
Disable edges blur.
VCE_DOT_CLOCK_10MHZ = %00000010
10MHz dot clock.
VCE_DOT_CLOCK_7MHZ = %00000001
7MHz dot clock.
VCE_DOT_CLOCK_5MHZ = %00000000
5MHz dot clock.
VCE_BLACK = $000
VCE value for black.
VCE_WHITE = $1ff
VCE value for white.
VCE_RED = $038
VCE value for red.
VCE_GREEN = $1C0
VCE value for green.
VCE_BLUE = $007
VCE value for blue.
VCE_YELLOW = $1F8
VCE value for yellow.
VCE_MAGENTA = $03F
VCE value for magenta.
VCE_CYAN = $1C7
VCE value for yellow.
VCE_GREY = $124
VCE value for grey.
Close