Call Box Commands
Version 2.0 15 Jan-90


CALL PT the PORT commands

There are 7 commands that control ports. A port is analogous to a super hi-res screen, it differs from a Quickdraw II port in that it has 16 palettes and 200 SCB's in it. Remember that everything goes on in ports, you need to create them before you use them and you need to point to them before drawing in them. Port 0 is always the super hi-res display screen at $E1/2000 and is initialized when the Call Box BASIC interface is started-up. Simple applications may only need this port for all of their graphics.

COMMAND FUNCTION DESCRIPTION
CALL PT,0,N SET PORT: set all the Quickdraw II action to the port specified by N. (0-31)
CALL PT,1,N CREATE PORT: creates a port in the current screen mode. You assign the I.D. number N. (1-31)
CALL PT,2,N,"pathname" LOAD PORT: load or create/load a port filling it with a super hi-res picture from disk specified by pathname. (0-31)
CALL PT,3 ***: Unused... Reserved
CALL PT,4,N1 ,X1 ,Y1 ,N2,X2,Y2, W,H PORT TO PORT: copy a specified rectangle of pixels from one port to a specified location in another port.
CALL PT,5,N DISPLAY PORT: copy the picture in the specified port to the viewable super hi-res screen port at $El/2000.
CALL PT,6,N,X,Y GLOBAL TO LOCAL: converts global coordinates (X,Y) to local coordinates in port (N).
CALL PT,7,N,X,Y LOCAL TO GLOBAL: converts local coordinates of port (N) to global coordinates.


N
Port I.D. number 0-31. Port 0 is always the super hi-res screen display at $El/2000.

"pathname"
A ProDOS 8 pathname of the picture you wish to load. This picture should be filetype $Cl (unpacked super hi-res picture format).

N1
The source port I.D. number.

N2
The destination port I.D. number.

X1
The left edge of the source rectangle.

Y1
The top edge of the source rectangle.

X2
The left edge of the destination rectangle.

Y2
The top edge of the destination rectangle.

W
Width in pixels of the rectangle.

H
Height in pixels of the rectangle.