Epson Research and Development Page 69
Vancouver Design Center
Programming Notes and Examples S1D13705
Issue Date: 02/01/22 X27A-G-002-03
0xA0, 0xA0, 0x00,/* YELLOW */
0xA0, 0xA0, 0xA0,/* WHITE */
0x00, 0x00, 0x00,/* BLACK */
0x00, 0x00, 0xF0,/* LT BLUE */
0x00, 0xF0, 0x00,/* LT GREEN */
0x00, 0xF0, 0xF0,/* LT CYAN */
0xF0, 0x00, 0x00,/* LT RED */
0xF0, 0x00, 0xF0,/* LT PURPLE */
0xF0, 0xF0, 0x00,/* LT YELLOW */
0xF0, 0xF0, 0xF0/* LT WHITE */
};
/*
** Register data.
** These values were generated using 13705CFG.EXE.
** The sample code uses these values but does not refer to this array.
** In a typical application these values would be written to the registers
** using a loop.
*/
unsigned char Reg[0x20] =
{0x00, 0x23, 0xC0, 0x03, 0x27, 0xEF, 0x00, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00
};
#define MEM_SIZE 0x14000 /* 80 kb display buffer. */
typedef unsigned short WORD;/* Some useful types */
typedef unsigned long DWORD;
typedef unsigned char BYTE;
typedef BYTE * PBYTE;
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
#define SET_REG(idx, val) (*(pRegs + idx)) = (val)
/*-----------------------------------------------------------------------*/
void main(void)
{PBYTE p13705;
PBYTE pRegs;
PBYTE pMem;
PBYTE pLUT;
int x, y, tmp;
int BitsPerPixel = 8;
int Width = 320;
int Height = 240;
int OffsetBytes;
int rc;
/*
** Get a linear address we can use in our code to access the S1D13705.
** This is only needed to access the S1D13705 on the ISA eval board.