VDC Functions.

Summary
VDC Functions.
Functions
vdc_set_readSet VDC VRAM read pointer.
vdc_set_writeSet VDC VRAM write pointer.
vdc_set_bat_sizeSet background map virtual size.
vdc_calc_addrCompute VRAM address for a given tile in BAT.
vdc_load_tilesLoad 8x8 tiles data to VRAM.
vdc_load_dataCopy data to VRAM.
vdc_fill_batSet an area in BAT to a given tile and palette.
vdc_clearSet N words of VRAM to 0.
vdc_initInitialize VDC.
vdc_yres_224Set vertical (y) resolution to 224 pixels.
vdc_yres_240Set vertical (y) resolution to 240 pixels.
vdc_xres_256Set horizontal (x) resolution to 256 pixels.
vdc_xres_320Set horizontal (x) resolution to 320 pixels.
vdc_xres_512Set horizontal (x) resolution to 512 pixels.
vdc_set_xresSet horizontal display resolution.

Functions

vdc_set_read

Set VDC VRAM read pointer.

Parameters

_diVRAM location.

vdc_set_write

Set VDC VRAM write pointer.

Parameters

_diVRAM location.

vdc_set_bat_size

Set background map virtual size.

Parameters

ABAT size (see Background Map Virtual Size)

vdc_calc_addr

Compute VRAM address for a given tile in BAT.

Parameters

XBAT x coordinate.
ABAT y coordinate.

Return

_diVRAM location

vdc_load_tiles

Load 8x8 tiles data to VRAM.

Parameters

_blTile data bank.
_siTile data address.
_cxTile count.
_diVRAM destination.

vdc_load_data

Copy data to VRAM.

Parameters

_diVRAM address where the data will be copied.
_blfirst bank of the source data.
_sidata address.
_cxnumber of words to copy.

vdc_fill_bat

Set an area in BAT to a given tile and palette.

Parameters

XBAT x position.
ABAT y position.
_alBAT area width.
_ahBAT area height.
_siTile offset
_blPalette index

vdc_clear

Set N words of VRAM to 0.

Parameters

_clword count.
_diVRAM location.

vdc_init

Initialize VDC.

Details

Initialize VDC registers, and setup BAT.

Parameters

none

vdc_yres_224

Set vertical (y) resolution to 224 pixels.

Parameters

none

vdc_yres_240

Set vertical (y) resolution to 240 pixels.

Parameters

none

vdc_xres_256

Set horizontal (x) resolution to 256 pixels.

Parameters

none

vdc_xres_320

Set horizontal (x) resolution to 320 pixels.

Parameters

none

vdc_xres_512

Set horizontal (x) resolution to 512 pixels.

Parameters

none

vdc_set_xres

Set horizontal display resolution.  The new resolution will be ajusted/clamped to 256, 268, 356 or 512.

Parameters

_axNew horizontal display resolution.
_cl’blur bit’ for control register.
Close