Shinobi Library - LCD Function

pdVmsLcdWrite

Displays LCD data

FORMAT

Sint32 pdVmsLcdWrite( port, *data, flag )
Uint32 port
const void *data
Uint32 flag

PARAMETER

 port  Port number 
 *data  Pixel data address 
 flag  Flag 

RETURN

 PDD_LCDERR_OK  OK 
 PDD_LCDERR_NO_LCD  VMS not connected 
 PDD_LCDERR_BUSY  VMS is busy 

DESCRIPTION

Displays bitmap graphics in the visual memory LCD.

 Resolution  H 48xV 32 pixels 
 Intensity  Intensity 2 (monochrome) 

The following values are specified for port.

 PDD_PORT_A1  Extension socket 1 for port A 
 PDD_PORT_A2  Extension socket 2 for port A 
 PDD_PORT_B1  Extension socket 1 for port B  
 PDD_PORT_B2  Extension socket 2 for port B 
 PDD_PORT_C1  Extension socket 1 for port C 
 PDD_PORT_C2  Extension socket 2 for port C  
 PDD_PORT_D1  Extension socket 1 for port D 
 PDD_PORT_D2  Extension socket 2 for port D 

The pixel data format for the argument data is expressed by 8 bits (1 byte) per pixel for easier handling by the software. The intensity is expressed in the lower 4 bit, but in this library only bit 3 is referred to.

For pixels that are white (LCD base color), store data (0x00, 0x07, etc.) as 0 in bit 3.
For pixels that are black, store data (0x0f, 0x08, etc.) as 1 in bit 3.

For a full-screen LCD screen, pixel data has 48x32=1536 bytes. Pixel data is stored continuously from left to right, top to bottom.

The following is an example of pixel data for a memory image.

 0x8C100000  ( 0, 0 )  ( 1, 0 )  ( 2, 0 )  ...  ( 47, 0 ) 
 0x8C100030  ( 0, 1 )  ( 1, 1 )  ( 2, 1 )  ...  ( 47, 1 ) 
   :  :  :    : 
 0x8C1005D0  ( 0, 31 )  ( 1, 31 )  ( 2, 31 )  ...  ( 47, 31 ) 

For a software recording, the following method can be used.

const Uint8 cgdata[48 * 32] =
{
0x00, 0x00, 0x0f, 0x0f, ...
...
};

The following values are specified for flag.

 PDD_LCD_FLAG_NOFLIP  Displays data as is 
 PDD_LCD_FLAG_HFLIP  Displays data with a horizontal flip 
 PDD_LCD_FLAG_VFLIP  Displays data with a vertical flip 
 PDD_LCD_FLAG_HVFLIP  Displays data with a horizontal and vertical flip 


EXAMPLE

  const Uint8 cgdata[48 * 32] = {
    0x00, 0xff, ...
          :
  };
  ret = pdVmsLcdWrite(PDD_PORT_A1, cgdata, PDD_LCD_HVFLIP);
  if (ret != PDD_LCDERR_OK) {
    /* Display not possible */
  }

pdVmsLcdWrite
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999