beautypg.com

Sensoray 614 Caption Overlay User Manual

Page 17

background image

With an indirect access method as shown below, to load the caption character
fonts or overlay bitmap-blocks:

#define

G_CAPRAMDATA

0x08

// Caption RAM data[15:0]

#define

G_CAPRAMINDEX

0x0A

// Caption RAM index[15:0]

fpga_reg_write ( b, G_CAPRAMINDEX, capovlRamStart );

for

( i = 0; i <8; i++ )

{

fpga_reg_write ( b, G_CAPRAMDATA, capovlData[i] );

}

In the example above, it’s an one-char/blk-by-one-char/blk base loading sample.
Consider a caption character font (8x16 pixels/char) or an overlay bitmap block
(8x16 pixels/blk), consisted of

Char-byte[0]

bitmap-byte[0]

Char-byte[1]

bitmap-byte[1]

Char-byte[2]

bitmap-byte[2]

Char-byte[3]

bitmap-byte[3]

Char-byte[4]

bitmap-byte[4]

Char-byte[5]

bitmap-byte[5]

Char-byte[6]

bitmap-byte[6]

Char-byte[7]

or

bitmap-byte[7]

Char-byte[8]

bitmap-byte[8]

Char-byte[9]

bitmap-byte[9]

Char-byte[10]

bitmap-byte[10]

Char-byte[11]

bitmap-byte[11]

Char-byte[12]

bitmap-byte[12]

Char-byte[13]

bitmap-byte[13]

Char-byte[14]

bitmap-byte[14]

Char-byte[15]

bitmap-byte[15]

the

capovlData

[8] should be formed like:

capovlData[0] =

Char-byte[1];

// or bitmap-byte[1]

capovlData[0] = capovlData[0]<<8 +

Char-bits[0]

// or bitmap-byte[0]

capovlData[1] =

Char-byte[3];

// or bitmap-byte[3]

capovlData[1] = capovlData[1]<<8 +

Char-bits[2]

// or bitmap-byte[2]

capovlData[2] =

Char-byte[5];

// or bitmap-byte[5]

capovlData[2] = capovlData[2]<<8 +

Char-bits[4]

// or bitmap-byte[4]

capovlData[3] =

Char-byte[7];

// or bitmap-byte[7]

capovlData[3] = capovlData[3]<<8 +

Char-bits[6]

// or bitmap-byte[6]

capovlData[4] =

Char-byte[9];

// or bitmap-byte[9]

capovlData[4] = capovlData[4]<<8 +

Char-bits[8]

// or bitmap-byte[8]

capovlData[5] =

Char-byte[11];

// or bitmap-byte[11]

capovlData[5] = capovlData[5]<<8 +

Char-bits[10] // or bitmap-byte[10]

capovlData[6] =

Char-byte[13];

// or bitmap-byte[13]

capovlData[6] = capovlData[6]<<8 +

Char-bits[12] // or bitmap-byte[12]

capovlData[7] =

Char-byte[15];

// or bitmap-byte[15]

capovlData[7] = capovlData[7]<<8 +

Char-bits[14] // or bitmap-byte[14]

In the char-byte[ ] or bitmap-byte[ ], when bit=1, the pixel will be overlaid; while
when bit=0, the pixel will not be overlaid, but could be transparent or with a
background.