TVP4020
Programmers Reference Manual
Pseudocode Definitions
273
Code is shown in courier and comments are C++ style '//' indicating that
the rest of the line is a comment. Any statement which ends in
parenthesis is a register update, other statements will generally be
assignments. A variable, say render, is of a type associated with the
register being modified. This will usually be clear by the context and will
not usually be declared as such. All the type definitions are in the header
files. The values assigned to a register will be either a variable as
described above, a macro i.e. P
ERMEDIA
_TRUE, as found in the headers,
or an immediate constant in C style format i.e. 0x45. In registers which
have several fields, some of which are not relevant to a particular
example, the field can be ignored completely or set to
don't care. In
some registers, values for fields which need to be set but are not readily
available will typically be set
as appropriate.
In some fragments, simply a list of commands is given e.g.:
// Sample code to rasterize a rectangle
StartXDom ()
// Start dominant edge
StartXSub ()
// Start of subordinate
dXDom ()
dXSub ()
Count ()
YStart()
dY ()
// Set-up to render an aliased trapezoid.
Render ()
// Render the rectangle
This technique is used to simply give a feel for the registers involved in a
particular operation and where a detailed treatment is not warranted.
To take the address of a register, the name is used, thus this example
stores the address of the StartXDom register in the buffer pointed to by
the variable buf and increments the pointer:
*buf++ = StartXDom
To test the value of a register the register name is dereferenced using
the C '*' operator as for instance in this example which tests for the
completion of a DMA operation:
while( *DMACount != 0 ) ;
Содержание TVP4020 PERMEDIA 2
Страница 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Страница 47: ...Memory I O and Organization TVP4020 Programmers Reference Manual 38 Texture address TextureBaseAddress T W S ...
Страница 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Страница 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Страница 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Страница 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Страница 323: ...Index TVP4020 Programmers Reference Manual 314 ...