Chapter 2. Using the Block Sync Template

The block sync template creates the simplest format of all the templates, and if you are using a typical multi-synchronous monitor, you are in luck. The sync signal this template creates runs on most monitors that can accept a variety of sync signals because the vertical sync signature is a simple block.

Of course, your format must fall within the range of what the monitor can run–everything has its limits–but imagine of the block sync template with a cheerful, sunny manner that makes most monitors giddy at the prospect of running a format you create with this template.

Parameters

You can specify the parameters in Table 2-1 with the block sync template.

Table 2-1. Block Sync Template Parameters

Parameter Name

Definition

Default

ACTIVE_LINES

The number of lines in the active (visible) portion of the video format.

1024

ACTIVE_PIXELS

The number of pixels in each line of the active (visible) portion of the video format.

1280

FPS

The number of video frames per second the format should generate.

60


About the Created Format

The template is located in /usr/gfx/ucode/common/vfc/vfs/BlockSync.vfs. See that file for details that may have changed since this document was published.

In general, the block sync template creates a simple horizontal blanking region with a sync pulse on every line that makes a downward transition at the beginning of the line, staying low for a small percentage of the line. The vertical blanking region has a short back porch, a single sync pulse that continues for several lines and terminates with a horizontal sync pulse, and a multiple line back porch. The durations of the total and the components of both horizontal and vertical blanking regions are variable, scaling themselves to the speed of the specified active region.

Figure 2-1. Block Sync Patterns

Figure 2-1 Block Sync Patterns

In Figure 2-1, you can see the layout of the sync pulses of the block sync template. This is only a prototype; the durations of the horizontal and vertical sync pulses depend on the size of the active pixel area you specify.

Examples of Template Use

You can use the following examples as a guide to using the block sync template. All examples in this section use the sampleboard.def and samplechip.def rules; for information on the sample rules, see “Sample Rules”. Also, each example creates a file called MyFormat.vfo via the -o option. For a comprehensive list of all the vfc options, see the vfc man page (reference page).

Example 2-1 shows a high-resolution output that has 1200 lines and is 1500 pixels wide. Its frame rate is 72 Hz.

Example 2-1. 1500 x 1200 at 72 Hz


# /usr/sbin/vfc \
-p "-DACTIVE_LINES=1200" \
-p "-D	ACTIVE_PIXELS=1500" \
-p "-DFPS=72" \
-c chip=samplechip.def,board=sampleboard.def \
-o MyFormat.vfo \
/usr/gfx/ucode/common/vfc/vfs/BlockSync.vfs

The format in Example 2-2 has 680 lines with 960 pixels per line. The frame rate is 50 Hz.

Example 2-2. 960 x 680 at 50 Hz


# /usr/sbin/vfc \
-p "-DACTIVE_LINES=680" \
-p "-D	ACTIVE_PIXELS=960" \
-p "	-DFPS=50" \
-c chip=samplechip.def,board=sampleboard.def \
-o MyFormat.vfo \
/usr/gfx/ucode/common/vfc/vfs/BlockSync.vfs

The format in Example 2-3 has 480 lines with 640 pixels per line. The frame rate is 60 Hz; note the frame rate is not specified because the default is already 60 Hz (see Table 2-1).

Example 2-3. 640 x 480 at 60 Hz


# /usr/sbin/vfc \
-p "-DACTIVE_LINES=480" \
-p "-D	ACTIVE_PIXELS=640" \
-c chip=samplechip.def,board=sampleboard.def \
-o MyFormat.vfo \
/usr/gfx/ucode/common/vfc/vfs/BlockSync.vfs

These are merely examples!

Although these examples are available as part of the compiler installation and work as written, they will not create an object file that you can use with hardware—the examples are provided solely to permit practice of syntax. To use real hardware, you must use the rules files shipped with that hardware (see the user guide for your hardware for the name); you must specify the name of a legitimate template to create a meaningful format.