SPC8106 S-MOS Systems, SPC8106 Datasheet - Page 281

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
/* Enable the Sprite Hardware Functions */
/* ------------------------------------ */
// Enable the sprite (AUX[5] bit 5) and disable the upper 256k (AUX[5] bit 0).
outp (AUX, 5);
outp (AUX + 1, 0x20);
// In AUX register 9 select sprite page 0 (b3), logical plane 0 (b2)
// upper page swap (b1) and Sprite Write Mode (b0)
outp (AUX, 9);
outp (AUX + 1, 3);
// The SPC8108 sprite write mode did not disable the sequencer chain4
// bit and required the following code to ensure correct operation in all
// video modes. The SPC8106 sprite write mode correctly disables chain4 and
// the following code may be omitted in cases where this code will be run on
// an SPC8106 only. Note that including this code ensures the correct handling
// of the sequencer for both video controllers. Its use is transparent on
// the 8106 and it imposes very little execution overhead.
// Temporarily disable chain4 addressing (should we be in mode 13h)
nSeqIdx = inp(SEQ);
outp(SEQ, 4);
nSeqDat = inp(SEQ + 1);
nTmp = inp(SEQ + 1);
nTmp &= 2;
outp(SEQ + 1, nTmp);
/* Load the Image into Display Memory */
/* ---------------------------------- */
// Set the pointers to both display memory and the even pixel image array.
// (512 bytes of Least Significant Bits of color data)
// Loop 512 times moving the pixel image array to display memory. Sprite
// Write Mode handles switching of planes placing even addressed data into
// plane 0 and odd addresses into plane 2.
pImgData = EvenArray;
pDisplayMem = A000H:0000
for (x = 0; x < 512; x++)
// Select sprite logical plane 1 (AUX[9] b2).
// This step requests that even addressed data be placed into plane one
// and odd address be placed into plane three.
outp (AUX, 9);
outp (AUX + 1, 7);
*pDisplayMem++ = *pImgData++;
S-MOS Systems, Inc. • Tel: (408) 922-0200 • Fax: (408) 922-0238 • http://www.smos.com
// Select index 9.
// Read and save current index
// Set index 4
// Read and save the data.
// Read the current data.
// Mask off the chain 4 bit
// Set the new data
// Select index 5.
//
// 0011b
// (XOR array if a cursor)
//
// Select index 9.
// In this example I know the state of
// AUX[9] so I will forego a read/mask/write
// and just write blind turning b2 on.
X12-AN-003-02
Programming Notes and Examples
SP3-55

Related parts for SPC8106