Epson Research and Development
Page 65
Vancouver Design Center
Programming Notes and Examples
S1D13704
Issue Date: 01/02/12
X26A-G-002-03
0x00, 0x00, 0x0F,/* LT BLUE */
0x00, 0x0F, 0x00,/* LT GREEN */
0x00, 0x0F, 0x0F,/* LT CYAN */
0x0F, 0x00, 0x00,/* LT RED */
0x0F, 0x00, 0x0F,/* LT PURPLE */
0x0F, 0x0F, 0x00,/* LT YELLOW */
0x0F, 0x0F, 0x0F/* LT WHITE */
};
/*
** Register data for the configuratin described above.
** These values were generated using 1374CFG.EXE.
** The sample code uses these values but does not refer to this array.
*/
unsigned char Reg[0x20] = {
0x00, 0x23, 0xB0, 0x03, 0x27, 0xEF, 0x00, 0x00,
0x1E, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/*
** Useful definitions, constants and macros to make the sample code
** easier to follow.
*/
#define MEM_OFFSET 0x01374B0B
/* Location is platform dependent */
#define REG_OFFSET MEM_ 0xFFE0/* Memory 64K - 0x20 */
#define MEM_SIZE 0xA000
/* 40 kb display buffer. */
typedef unsigned char BYTE;
/* Some usefule typedefs */
typedef BYTE far * LPBYTE;
typedef unsigned short WORD;
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
#define SET_REG(idx, val) (*(LPBYTE)(REG_ idx)) = (val)
/*-----------------------------------------------------------------------*/
void main(void)
{
LPBYTE pRegs = (LPBYTE)REG_OFFSET;
LPBYTE pMem = (LPBYTE)MEM_OFFSET;
LPBYTE pLUT;
int
LUTcount, RGBcount;
int x, y, tmp;
int BitsPerPixel = 4;
int Width = 320;
int Height = 240;
int OffsetBytes;
*