Introduction

A video format is the set of electrical and timing characteristics that drive a monitor (or any video output device). In the context of this book, a video format usually refers to the video format source language you use to describe the video format itself.

There is no need to use a ten-pound hammer for a one-pound task. Most carpenters know this. How complicated is your video format problem? Why are you writing a video format, anyway?

If you just need to assemble a quick little format for a more-or-less normal monitor to a resolution other than the standard Silicon Graphics® formats, see “Simple Video Formats Using Templates”.

On the other hand, if you have a special monitor that requires special timing, you will need to learn the detailed language of the compiler described in “Detailed Video Formats Using Native Compiler Language”.

Compiler Functions

The compiler takes the video format source language file and produces a video format object file. You can use this produced file to load video generation hardware (some hardware architectures require an intermediate step that combines multiple video format object files).

Rules-Based Operation

The compiler produces video format object files for a single graphics architecture that you specify. You name the target architecture by specifying which hardware rules (supplied by Silicon Graphics) the compiler should follow when constructing the video format object file. A rule is a description of the operation of the hardware, written and provided by Silicon Graphics for each hardware architecture.

The compiler uses two rules: a “board” rule, which describes the circuit board driving the video output; and a “chip” rule, which describes the behavior of the integrated circuit producing the timing. You specify both rules on the command line.

Sample Rules

The examples in this book uses sample rules files, one for the chip and one for the board: samplechip.def and sampleboard.def, respectively. They are installed when the video format compiler is installed. You can use these rules to work along with the examples; however, these rules do not represent real hardware and will not make a format that allows you to do anything beyond the examples.

Legitimate Hardware Rules

The rules that accompany actual hardware allow you to build formats targeted to that hardware. Note that the architecture of the hardware may be more restrictive than that of other hardware or that of the sample rules files: not all hardware is created equal!


Caution: Do not be tempted to modify the source of the hardware rules that Silicon Graphics supplies. The rules describe the generation of many different signals and special scalar values and have been generated with some care. If you change the rules, you will likely get unpleasant results: the format will just not run correctly; some other part of system will operate in an erratic or incorrect way or you may actually damage monitor or display hardware and invalidate your warranty.


Specifying Rule Sets

You can specify the rule set on the command line when executing the video format compiler (all the command-line options are described in the man page [reference page]). To specify the board and chip options, use the -c option of vfc. For example, to specify the sample rules (see “Sample Rules”), use this command:

/usr/sbin/vfc -c board=sampleboard.def,chip=samplechip.def filename.vfs

The chip and board files, not edited by users, are installed in a standard directory where the compiler knows to find them.

Simple Video Formats Using Templates

By using templates, you have decided you do not need the complexity of writing video formats in the native compiler language. Instead, you know that your format is simple enough that you can write it using one of the standard templates. Because you are using a template, you are also fortunate enough to have a monitor that does not require precise timing or can be driven by a generic format.

The value of templates is that you need not know much about video formats and need know nothing at all about the native language of the compiler.

For general information on templates, read Chapter 1, “Running the Compiler With a Template.” For formats for most multi-sync monitors in Chapter 2, “Using the Block Sync Template.”

Detailed Video Formats Using Native Compiler Language

You are writing video formats the hard way—using the native language—because the specification of your video format is too complicated or specific to be expressed using templates.

To begin, you need to know about the nomenclature Silicon Graphics uses for video formats—information in Chapter 3, “Building Blocks of a Video Format.” This chapter may also serve as a tutorial for understanding the overall architecture of a video frame.

In Chapter 4, “Compiling Native Language Video Formats,” you can find instructions for running the video format compiler.

The full native language for writing formats sees an explanation in Chapter 5, “Native Compiler Language.” This chapter contains the details of expressing a format to the compiler.

As with anything, it is easier to start with an example of a video format and work from there. To that end, Chapter 6, “Examples of Native Compiler Language,” shows annotated examples of different styles of video format.

Writing Video Format Compiler Rules

Normally, writing of rules is reserved for Silicon Graphics internal use. There is no need for customers of Silicon Graphics to write the definition rules files. Moreover, you should never modify the definition rules files as supplied; modifying these carefully-crafted definitions will probably make your system unsupportable and will definitely void your warranty.

There are two types of files: chip definition files (not described in this book) and board definition files (described in Chapter 7, “Board Hardware Definition”). These two files work together to define signals that drive video output boards.