• Nie Znaleziono Wyników

CROSS-REFERENCES

W dokumencie AM95C60 (Stron 94-99)

Chapter 5: Addressing Modes and Scaling Chapter 6: Line Texture

Chapter 7: Clipping and Picking Chapter 8: Graphical Operations

COMMENTS

Arc Current assumes a pixel aspect ratio of 1 (square pixels). If this is not the case, the appearance on the display surface will be that of an elliptical arc.

More information is available to the Am95C60 than is strictly required to define an arc. Since there is redundant information, it must be self-consistent.

The end points may be calculated using the following equations:

x

= Center + Radius • COS Theta Y = Center + Radius • SIN Theta

Call

(System Control)

Call causes the Am95C60 to enter Program mode, if it is not currently in Program mode, and pushes a return address of all 1 s onto the stack. If the Am95C60 is already in Program mode, a sub-routine is called; a return address (the address of the instruction following the call) with bit 12 not set is pushed onto the stack.

In Program mode, the Am95C60 fetches instructions from display memory rather than from the instruction FIFO. This allows the Am95C60 to execute stored programs, thus relieving the host of some burden. Figure 4-2 illustrates a program being called that in turn calls a subprogram.

Program mode is exited using a Return instruction (if not currently within a nested subroutine).

Call requires four parameters, plus an optional list of indices.

PP is a 2-bit field that specifies the bit plane num-ber from which instructions are to be fetched.

I is a one-bit field that indicates whether a list of indices is present. If I is a one, then LOCATION is taken to be the top of a dispatch table, and the indices are pOinters into the table. The dispatch table must be in plane zero.

Each index is processed as follows: The index (i) is multiplied by 2 and an X,V address pair is fetched from LOCATION, LOCATION + W2). Execution begins at this X,Y address in the bit plane specified in PP. When an unnested Return is executed, bit Call conditional. If PO is a one, the Call is executed only if bit 13 of the Y component of the Current Pen Position is a zero (implying CPPY is positive).

If PO is a zero, the Call is executed uncon-ditionally. If I is a one, the PO bit is ignored and the instruction is executed unconditionally.

LOCATION is specified as a standard operand address pair. This is the address of the subroutine if I is a zero, or the address of the dispatch table if I is a one. If relative addressing is used, LOCATION is calculated with respect to the Current Pen Position. The four low order bits of the X component of must resolve to all zeroes.

The Current Pen Position is unchanged by the execution of this instruction.

C is present in the list of indices. When each index has been used as a pointer into the dispatch table and an unnested Return has been executed, this bit is tested. If it is a one, the Am95C60 uses the next entry in the index list. If C is a zero, the Call instruction terminates.

INDX is the index into the dispatch table. Only the low order 10 bits are used. Bits 10 through 14

PERFORMANCE CROSS-REFERENCES Call requires 140 SYSCLK cycles Return (Instruction)

Set Stack Boundaries (Instruction) EXAMPLE

COMMENTS This example calls a program, the first instruction of

which is located at 512,500 in bit plane zero. If the Am95C60 is not in Program mode when this instruction is executed, a return of all 1 s is pushed.

If the Am95C60 is already in Program mode, the address of the instruction following the Call Program is pushed.

The Y component of the stack pointer is incremented by 2 following the push. Any instruction may be executed in Program mode.

0032 ·Plane Zero

0200 • Address to call 01F4

onS5A 14-6

CALL

INSTRUCTION FIFO

DISPLA YMEMORY

Figure 14-2 Program Mode

TABLE

r---+

ROUTINEO

XO~

RETURN

YO

X1 • ROUTINE 1

Y1

X2 RETURN

Y2

Xn • ROUTINE n

Yn

RETURN

Figure 14-2b Call Table

Circle

(Drawing Primitive)

Circle creates the image of a circle in display memory. Line style, logical PEL and anti-aliasing may be specified.

Circle requires 8 parameters:

AA is a 1-bit field that controls anti-aliasing if the Logical PEL is not enabled and controls the PEL source if the logical PEL is enabled.

SI is a 1-bit field that specifies whether the logical PEL is to be inverted. This applies only if the logical PEL is enabled.

M is a 1-bit field that specifies whether the logical PEL is to be stored only where the destination matches the search color. This applies only if the logical PEL is enabled.

LS is a 1-bit field that specifies whether the line style is to be solid or dashed-dotted.

EP is a 1-bit field that specifies whether the termination end point is to be drawn unconditionally or only if it falls within a dash or dot element. The first point (at the bottom of the circle) is always drawn.

SOAXZ is a 3-bit field that specifies how the arc is to be drawn over the current contents of the display memory.

CENTER is specified with a standard operand address pair. If relative addressing is specified, CENTER is calculated with relative to Current Pen Position. The center may lie outside display offsets are equal to the desired radius.

The Current Pen Position following this instruction is the CENTER point.

PERFORMANCE

Instruction Overhead (PEL disabled Instruction Overhead (PEL enabled) Octant Overhead

Cycles/Pixel (Plain vanilla circle) Cycles/Pixel (Anti-aliased) Cycles/Pixel (Dashed-Dotted) Cycles/Pixel (1x1 PEL) Cycles/Pixel (2x2 PEL) Cycles/Pixel (4x4 PEL) to obtain Graphical SET.

054A *Circle

CROSS-REFERENCES

Chapter 5: Addressing Modes and Scaling Chapter 6: Line Texture

Chapter 7: Clipping and Picking Chapter 8: Graphical Operations

COMMENTS

ance on the display surface will be that of an ellipse. The X and Y scale factors apply only to the center (and possibly to the radius).

Any addressing mode may be used for either operand. Viewport addressing will probably not produce useful results for the radius.

. Circle assumes pixels with an aspect ratio of 1 (square pixels). If this is not the case, the

appear-The circle is drawn beginning at the bottom with a full-length dot or dash going counterclockwise.

The last point is immediately to the left of the first point.

RADIUS SPECIFICATION

DISPLAY MEMORY

onS5A 14-11

Figure 14-3 Circle

W dokumencie AM95C60 (Stron 94-99)

Powiązane dokumenty