SPC8106 S-MOS Systems, SPC8106 Datasheet - Page 283

no-image

SPC8106

Manufacturer Part Number
SPC8106
Description
LCD/CRT VGA CONTROLLER
Manufacturer
S-MOS Systems
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
SPC8106F
Quantity:
5 510
Part Number:
SPC8106F
Quantity:
5 510
Part Number:
SPC8106F0C
Manufacturer:
EPSON
Quantity:
912
Part Number:
SPC8106FOB
Manufacturer:
EPSON
Quantity:
430
Part Number:
SPC8106FOC
Manufacturer:
OMRON
Quantity:
2 000
SPC8106
411-1.0
/* Set the image colors. */
// Note that for cursor images only indexes 3CH and 3DH require
// programming as the other two colors are displayed as transparent
// and inverted.
outp (AUX, 0BH);
nAux = inp (AUX + 1);
nTmp = inp (AUX + 1);
// Note: The mask value of 8 (below) enables both the internal (LCD)
// and external (CRT) palettes. If it is desired to write different
// values to these palettes then this section of code will have to
// be executed twice with different palette write disable bits set.
nTmp |= 8;
outp (AUX +1, nTmp);
// SetDAC is a routine to program one RAMDAC entry. This type of code is
// a standard VGA routine and is not included in this example. The data type
// for color1, color2 ... would be long and these variables would be composed
// of RGB values.
SetDAC (3CH, color1);
SetDAC (3DH, color2);
SetDAC (3EH, color3);
SetDAC (3FH, color4);
out (AUX + 1, nAux);
// The following piece of code pertains to the SPC8108.
// The SPC8106 sprite colors are set by the user defined function
// SetDAC. As with the chain4 override the following is required
// if the program will be used with an SPC8108. The code executes
// transparently on an SPC8106 with very little execution overhead.
// Set the internal LUT colors. If this is a cursor image then only
// registers 3CH and 3DH need to be set.
outp (CRTC, 3CH);
outp (CRTC +1, color1);
outp (CRTC, 3DH);
outp (CRTC +1, color2);
outp (CRTC, 3EH);
outp (CRTC +1, color3);
outp (CRTC, 3FH);
outp (CRTC +1, color4);
/* Sprite initialization complete. */
// The sprite/cursor image may be removed from the display
// by setting AUX[5] b5 to 0.
S-MOS Systems, Inc. • Tel: (408) 922-0200 • Fax: (408) 922-0238 • http://www.smos.com
// Set AUX index to 0Bh
// Read and save the current index
//
// Mask in the overlay enable.
// Set the sprite colors.
//
//
//
// Restore the AUX register data
//
// Sprite palette 0
// Cursor background
// Sprite palette 1/
// Cursor foreground
// Sprite palette 2
//
// Sprite palette 3
X12-AN-003-02
Programming Notes and Examples
SP3-57

Related parts for SPC8106