Graphic display port chapter 15 – Remote Processing RPC-2350 User Manual

Page 67

Advertising
background image

GRAPHIC DISPLAY PORT

CHAPTER 15

15-6

Figure 15-3

LOAD AND SAVE SCREENS

Two com mands load and save screen gr aphics.

D I S PL A Y L O A D (x1, y1),( x2, y2), seg, address
DISPLAY SAVE (x1, y1),( x2, y2), seg, address

The fir st syntax, DISP LAY LOA D, transfer s graphic
information from RA M or F lash to the screen. The
second syntax, DISP LAY SA VE, transfers graphic from
the display to RAM only.

address r a ng e is & 0 t o & F F F F .

Use D ISPL AY L OAD to bring up p re-gen erated g raphic
icons (such as buttons), prompts, com pany logos, or
process symbols. When us ed in conjunc tion with
DISPLA Y SAVE , it can be used to recall a graph

DISPLA Y LOA D does not save any small text info.

Param eters (x1, y1),( x2, y2) specify the rectangular area
on the display where the graphic will be placed.

Graphic coordinates correspond to those used to draw
lines, pixels, and fill areas.

The seg param eter spec ifies what m emor y segme nt to
save or load.

Memory type & size

Range of seg parameter

128K RAM

1

512K RAM

1-7

128K Flash

8 -9

512K Flash

8-15

DISPLA Y SAVE works only when seg is to RAM. To
save a screen to flash, you must use SAVE.

You will have to calculate the address, especially if you
have more than one screen.

Calculating graphic memory requirem ents

Use (x1, y1),( x2, y2) parameters in DISP LAY L OAD and
SAVE to calculate the number of bytes needed.

bytes = ((X2 - X1) / 8) * (Y2-Y1)

The equation above assume X2 > X1 and Y2 > Y1.
Round UP the result of (X2-X1)/8 if it is a fraction. See
the following example.

Suppose you want to save screen d ata from (0,1 20) to
(203,239).

bytes = ((203 - 0) / 8) * (239 - 120)
bytes = 25.375 * 119

(Round UP 25. 375 to 26)

bytes = 26 * 119
bytes = 3094

To save multiple screens, assign each screen a number
(assuming they are all the same size). When saving,
multiply the screen number by the number of
bytes/screen. This becomes the address.

Making and saving custom graphics
A program in the applications disk, BMP-GPH.EXE,
translates a .BMP file into a hex file readable by the
RPC-2350.

BMP-GP H converts a black and white, single layer (no
transparent background color) BM P file generated by
any number of PC graphics program s. Width and height
attributes of the BMP graphic are in pixels. Limits are
320 pixels for width and 24 0 pixels for height.

Some BM P graphics a re provide d for your use . T hese
are in the GRAP HICS director y of the application disk.

Graphics are transfer red to the RPC-2350 using the
H E X L O A D . B AS p ro g r am , l o ca t ed in th e F O N T
directory. Every download saves the graphic to the
same location in RAM (segment 1, starting address 0).
You must move the graphic to a predeter mined location
either in Flash or RAM.

Use the table at the end of this section to help map your

Advertising