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.
This guide contains instructions you will need to write a video format. There is more than one way to do create one.
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 similar to 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, see “Detailed Video Formats Using Native Compiler Language”.
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.)
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. Together, they define signals that drive video output boards. You specify both rules on the command line when you run the compiler. For more information on board definition rules files, see Chapter 7, “Board Hardware Definition.” Chip definition files are not described in this book.
The examples in this book use 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.
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 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 not run correctly; another part of the system will operate in an erratic or incorrect way or you may actually damage monitor or display hardware and invalidate your warranty.|
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/bin/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.
Use templates if you do not need the complexity of writing video formats in the native compiler language and your format is simple enough that you can write it using one of the standard templates. Your monitor should not require precise timing or it does can be driven by a generic format (such as VESA-compliant monitors).
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, read Chapter 2, “Using the Block Sync Template.”
You write video formats the hard way—using the native language—when 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—see Chapter 3, “Building Blocks of a Video Format.” This chapter also serves 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 is explained in Chapter 5, “Native Compiler Language.” This chapter contains the details of expressing a format to the compiler.
Before you begin writing, it is easier to start with an example of a video format and work from there. Chapter 6, “Examples of Native Compiler Language,” shows annotated examples of different styles of video format.