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.
You can specify the parameters in Table 2-1 with the block sync template.
The number of lines in the active (visible) portion of the video format.
The number of pixels in each line of the active (visible) portion of the video format.
The number of video frames per second the format should generate.
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.
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.
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.
# /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.
# /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
# /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.