Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ libfcvg(3X) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

LIBFCVG(3X)  —  NEWS-OS Programmer’s Manual

NAME

libfcvg − list of functions of full color video graphics library /usr/sony/lib/libfcvg.a

SYNOPSIS

Open and close of the device
 

fcvg_open()
fcvg_close()

 
Initialization of the device
 

fcvg_init(flag)
fcvg_cur_clr_w()
fcvg_clut_default_w()

 
Functions for the video plane
 

fcvg_video_box_w(x, y, width, height, plane, color)
fcvg_video_pixel_r(x, y, plane)
fcvg_video_pixel_w(x, y, plane, color)
fcvg_video_scan_r(x, y, n, plane, colors)
fcvg_video_scan_w(x, y, n, plane, colors)
fcvg_rgb_pixel_r(x, y, rgb)
fcvg_rgb_pixel_w(x, y, rgb)

 
Functions for the character plane
 

fcvg_char_box_w(x, y, width, height, col_num)
fcvg_char_pixel_r(x, y)
fcvg_char_pixel_w(x, y, col_num)
fcvg_char_scan_r(x, y, n, col_nums)
fcvg_char_scan_w(x, y, n, col_nums)

 
Functions for the sub-character plane
 

fcvg_subchar_box_w(x, y, width, height, col_num)
fcvg_subchar_pixel_r(x, y)
fcvg_subchar_pixel_w(x, y, col_num)
fcvg_subchar_scan_r(x, y, n, col_nums)
fcvg_subchar_scan_w(x, y, n, col_nums)

 
Functions for the control plane
 

fcvg_ctl_box_w(x, y, width, height, ctl)
fcvg_ctl_pixel_r(x, y)
fcvg_ctl_pixel_w(x, y, ctl)
fcvg_ctl_scan_r(x, y, n, ctl)
fcvg_ctl_scan_w(x, y, n, ctl)

 
Functions for the cursor plane
 

fcvg_cur_r(cur)
fcvg_cur_w(cur)
fcvg_cur_move(x, y)
fcvg_cur_pos(x, y)

 
Functions for the color look-up table
 

fcvg_clut_r(col_num, rgb)
fcvg_clut_w(col_num, rgb)

 
Functions for the status register
 

fcvg_reg_r(bit)
fcvg_reg_w(bit, mask)

 

COORDINATE SYSTEM

The FCVG library uses the coordinate system whose origin locates at the upper left of the screen as show below:

 
line from 0.675,10.012 to 3.425,10.012 line from 3.225,9.962 to 3.425,10.012 to 3.225,10.062 line from 0.675,10.012 to 0.675,8.262 line from 0.625,8.462 to 0.675,8.262 to 0.725,8.462 line from 0.675,9.012 to 2.175,9.012 to 2.175,10.012 line from 0.675,8.637 to 2.675,8.637 to 2.675,10.012 "(0, 479)" at 0.113,8.983 ljust "(0, 511)" at 0.113,8.671 ljust "y" at 0.613,8.171 ljust "x" at 3.300,9.983 ljust "(1023, 0)" at 2.425,10.108 ljust "(767, 0)" at 1.863,10.108 ljust "(0, 0)" at 0.487,10.108 ljust "Display area" at 0.988,9.483 ljust "Memory area" at 1.488,8.796 ljust

IMAGE FILE FORMAT

In the FCVG library, the follwing two types of the image file formats are applicable. 

Video plane image file format
Character plane Image file format

VIDEO PLANE IMAGE FILE FORMAT

The video plane image file consists of two parts: “Header” and “Image data”. 

HEADER

The image file data information is defined at the beginning of the file with the following structure:

#define FCVG_PIC_MAGIC 0x8945
typedef struct header {
short magic;
short type;
short x, y;
short x_start, y_start;
} fcvg_header;

The contents of the structure are shown below:

magic Magic number to show the image data file.  It is the value specified with FCVG_PIC_MAGIC. 

type Shows the type of the data file.  If the video plane is not compressed and the image data is ordered as rgb, it is set to 0x0000. 

x,y The lengths (x and y directions) of the image data file are set (in pixel). 

x_start,y_start The coordinate of the upper left of the image data is set. 

IMAGE

The values of the pixels are positioned in the order of rgb (one byte x 3), rgb and rgb as from the upper left corner to +x direction, from the left to +x direction when reaches the rightmost and to the bottom right. 

IMAGE FILE FORMAT OF THE CHARACTER PLANE

The image file of the character plane consists of the three parts: “Header”, “Color look-up table” and “Image data“. 

HEADER

Same as the header of the video plane.  type is set to 0x2000 if the character plane of the image is not compressed. 

COLOR

Follows the header part.  The data are positioned from color number 0 to 15, in the order of rgb (one byte x 3), rgb, rgb ..... 

IMAGE

Follows the end of the color look-up table.  Each pixel is one byte data. Lower 4 bits are applicable.  Other data are same as the video plane image data. 

FILES

/usr/src/sony/lib/libfcvg/∗directory for the source code of the library
/usr/sony/demo/NWB224directory for a sample program
/usr/sony/lib/libfcvg.aFCVG library
/usr/sony/include/fcvg.hheader file
/usr/sony/include/fcvg_lib.hheader file
/usr/sony/include/fcvg_reg.hheader file

SEE ALSO

Chapter 8 "Full-Color Video Graphics Interface Board" in NEWS-OS Release 4.0 Programmer’s Guide. 
 

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026