                       Screen master



            For those of you wary of attempting

             our machine code graphics series,

            Matthew Probert presents a powerful

              screen artist program in BASIC.



Screen master is a graphics design system for the 48K

Spectrum or Spectrum+. It enables the user to quickly and

simply design and save screens which may be used as title

pages for programs during loading, or used within programs

themselves by extracting the short machine code routine

used by Screen Master to display a screen instantaneouly.



 Terminology



Within these instructions certain terms will be used which

should be understood. These are as follows:



'Display' refers to the design on the TV screen.

'Editor or Block cursor' a two character square block which

may be moved around the display under user control.

'Menu' refers to the 'Select Option' state with the display

showing the design being worked upon and the program wait-

ing for the user to press a key.

'Pixel cursor' refers to a single pixel cursor which may be

moved around the display under user control.

'Prompt' refers to a message displayed indicating that the

user should press a key, ie 'Select option' is a prompt.

'Request' like 'prompt' but indicates that some data should

be entered by the user.

'Screen refers to a section of Ram holding the data of the

design being worked upon.

'Text' refers to characters which may be displayed in

'Print' fashion.



 Functions



Screen Master provides the user with eight different types

of function for the display and manipulation of screen

data. These functions are:



'Pixel functions' which operate basically upon single

pixels.

'Block functions' which operate upon a block of data and

tend to use the 'Editor cursor'.

'Screen functions' which operate upon screens of data.

'Tape functions' which use the cassette recorder.

'Attr functions' which change attributes.

'Text functions' which manipulate text.

'Brush functions' which provide various shading effects.

'Status functions' which alter or display the current

status of the system.



 Pixel functions



There are seven pixel functions; 'Freehand', 'Circle',

'Ellipse', 'Box', 'Move', and two others 'Move' and 'Erase'

which are only accessed from 'Freehand'.

   There are then three functions relating to 'Freehand',

these plot points, move the pixel cursor and erase points

respectively. From one function to another within Freehand

the user may select either one of the other Freehand func-

tions by pressing keys P, M and E respectively or exit back

to the Menu by pressing Enter. The Freehand function is

selected from the Menu by key F.

   When in Freehand mode, the pixel cursor, like all other

cursors may be moved around the display by the cursor keys

or keys 5 to 8. During Freehand in all of its functions the

coordinates of the pixel cursor, X,Y are displayed at the

bottom of the display to aid the user.

   The next three pixel functions, Circle, Ellipse and Box

are selected by keys C, E and X respectively from the Menu.

Each function requests an input from the user, for Circle

this input is the radius of the circle in pixels to be

drawn with the coordinate X,Y as the centre of the circle.

If 0 is entered as the radius the system will return to the

Menu. Ellipse requests both the radius in the X and Y axis

of the ellipse to be drawn. Entering 0 for the X radius

will again return the user to the Menu, otherwise an el-

lipse will be drawn with the coordinates X,Y of the pixel

cursors as its centre. Box works in a similar fashion, but

draws a rectangle to the right and down from the pixel

cursor, so that the coordinates X,Y form the top left

corner of the shape. Entering a negative value in response

to 'Length' will result in the rectangle being drawn to the

left, and a negative value for height will result in it

being drawn up.

   Pixel function 'Move' as selected from the Menu by key L

allows the user to move two cross lines around the screen

at a rate of eight pixels per move. Upon exiting from this

function the pixel cursor will be set to the coordinates at

which the cross lines intersect.



 Block functions



There are eight block functions, two of which use a special

designer grid and these will be considered first.

   'Sprite', selected by key S allows the user to design a

two by two character block on a large grid a bit like a UDG

generator. The cursor on the grid may be moved in three

ways, with the cursor keys or keys 5 to 8 as usual, and

also with symbol shift and keys 5 to 8 together, in which

case it will leave a trail of filled in squares behind it.

Single squares may be filled with key 9 and deleted with

key 0.

   'Alter', selected by key A, is similar to Sprite, but

picks up a two character square block of the screen,

removes it from the display and transfers it to the grid

ready for alterations to take place.

   'Reflect' switches the data on either side of the Editor

cursor either from top to bottom or left to right depending

upon whether X or Y was entered in response to the request

respectively. Reflect is selected by key R.

   'Delete', selected by key DEL erases the data below the

Editor cursor from the display and screen.

   'Copy' is the same as Alter, but merely allows a copy of

the data to be reproduced elsewhere without erasing the

original. Copy is selected by key U.

   'Switch', selected by key H, changes the attributes

under the Editor cursor to the current values.

   'Fill', selected by key N, fills in the area under the

cursor as a solid block.

   'Zap', selected by key Z changes the data under the

cursor in a random way so as to give the impression that

the data has been 'zapped'.

   In all cases Enter should be used to exit from the move

cursor routine, and Y or N pressed in response to the Okay?

message. Pressing N reverst the display and screen back to

how it was before the operation took place.



 Screen functions



There are three screen functions, the first 'Cls' selected

by pressing EDIT clears the display having first trans-

ferred the display into the current screen, thus pressing

EDIT twice consecutively will also clear the current screen

as well as the display.

   The second function, 'Down' selected by key W copies the

screen to the display.

   The last function 'Merge' selected by key M requests a

screen number to be pressed and then overlays this screen

on top of the display in such a way that the new screen

takes preference over the old, but leaves the attributes

alone.



 Tape functions



There are just two tape functions, 'Save' and 'Load', both

of which operate using SCREEN$ and either save the display

or load in the display and current screen. They are selec-

ted by Symbol Shift and either S or J respectively.



 Attr functions



There are four Attr functions, the first, 'Ink' selected

by key I changes the current ink colour, 'Paper' selected

by key P changes the paper colour and 'Bright' selected by

key B switches the brightness from on to off and from off

to on automatically. All three of these work in 'temporary'

fashion.

   The last function, 'Chg' is selected by key O and chan-

ges the entire display and screen to the attribute value

entered, it does not clear the display.



 Text functions



There is one text function, selected by pressing key " it

allows up to thirty two characters at a time to be dis-

played anywhere on the display and screen. The text may be

graphics, selected by pressing the graphics key followed by

entry of the required text, or ordinary characters.

   The text may be displayed in inverse by pressing the INV

Video key, or made to flash by pressing extend followed by

CAPS shift and key 9 together. If you wish to exit the

routine, pressing Q whilst in the Move cursor stage will

return you to the Menu.



 Brush functions



Six different brushes are provided, selected by keys 1

to 6 from the Menu. The brush function works like a cross

between the text and Freehand functions described earlier.



 Status functions



There are two status functions, 'Status' which is selected

by pressing key K and displays the current ink, paper,

bright, screen number and pixel cursor coordinate values,

and 'Addr' which is selected by key T and allows the user

to change screens between 1 and 4.



 Technical details



The four screens are each 6848 bytes long and stored at

addresses 58519, 51671, 44823, and 37975 respectively. The

routine to copy the display into screen 'n' is at address

23296 with the screen address held in bytes 23300 and

23301. The routine is relocatable.

  The routine to copy a screen to the display is at address

23308 with the screen address held in bytes 23309 and

23310. This routine is also relocatable.

   The program uses seven UDG's, from O to U respectively.

Ramtop is automatically reset to below screen 4 so that NEW

does not affect the screens, in this way screens may be

saved as Data, by: Pressing BREAK to break into Screen

Master. Typing NEW to lose Screen Master, and either load-

ing in your own program or saving the screen(s) as data.