Page 60 Epson Research and Development
Vancouver Design Center
S1D13505 Programming Notes and Examples
X23A-G-003-07 Issue Date: 01/02/05
Parameters: DevID - registered device ID
pSize - pointer to a DWORD to receive the size
Return Value:ERR_OK - the operation completed successfully
Note
Memory size is only checked when call ing seRegisterDevice(), seSetDisplay Mode() or seSetInit(). Afterwards, the memory size is stored and made available through seGet-MemSize().
int seGetLastUsableByte(int DevID, DWORD * pLastByte)
Description: Calculates the offset of the last byte in the display buffer which can be used by appli-
cations. Locations following LastByte are reserved for system use. Items such as the
half frame buffer, hardware cursor and ink layer will be located in memory from
GetLastUsableByte() + 1 to the end of memory.
It is assumed that the registers will have been initialized before calling seGetLastUs-
ableByte(). Factors such as the half frame buffer and hardware cursor / ink layer
being enabled dynamically alter the amount of display buffer available to an appli-
cation. Call seGetLastUsableByte() any time the true end of usable memory is
required.
Parameters: DevID - registered device ID
pLastByte - pointer to a DWORD to receive the offset to the last usable byte of
display buffer
Return Value: ERR_OK - operation completed with no problems
int seGetBytesPerScanline(int DevID, UINT * pBytes)
Description: Determines the number of bytes per scan line of the current display mode. It is
assumed that the registers have already been correctly initialized before seGetBytes-
PerScanline() is called.
The number of bytes per scanline calculation includes the value in the offset register.
For rotated modes the return value will be either 1024 (8 bpp) or 2048 (15/16 bpp)
to reflect the 1024 x 1024 virtual area of the rotated memory.
Parameters: DevID - registered device ID
pBytes - pointer to an integer which indicates the number of bytes per scan line
Return Value: ERR_OK - operation completed with no problems
ERR_FAILED- returned when this function is called for rotated display modes other
than 8, 15 or 16 bpp.
int seGetScreenSize(int DevID, UINT * Width, UINT * Height)
Description: Gets the width and height in pixels of the display surface. The width and height are
derived by reading the horizontal and vertical size registers and calculating the
dimensions.