STOS STe blitter extension
--------------------------

* Simplest command uses the blitter to clear the screen in a super-
fast way.

BLIT CLS screen

BLIT CLS screen,op

Screen can be a screen address, such as physical screen or a memory bank
which has been reserved as a datascreen.You can use op to specify what
to fill the screen with.Using 0 fills the area of memory with 0s,which
translates into the first colour,usually black,and a 1 fills it with
1s the last colour of your palette.

* BLITHALFTONE pat1,pat2,,,,,,,,,,,,,,pat16

These enable you to set up a 16 x 16 half tone pattern.It's easiest to
enter the patterns as binary words,so each digit represents a pixel.
The blitter can throw areas of screen memory around without any problem-
rather like the screen copy command,but quicker.

* BLIT COPY source,desination

  BLIT COPY source,destination,op
  BLIT COPY source,x1,y1,x2,y2,destination,x,y
  BLIT COPY source,x1,y1,x2,y2,destination,x,y,op

  source and desination can be screen addresses or memory banks.The first
version does a straight screen copy.Alternatively,you can specify the 
screen coordinates,copying from x1,y1 to x2,y2 and plonking it down on
the destination at x,y. As usual with STOS,the x1 and x2 coordinates get
rounded to the nearest value of 16 - you can place it anywhere,though.
The optional op parameter can range from 1 to 14 and sets the type of
copying to do.

1 source AND destination
2 source AND NOT destination
3 source (a straight copy)
4 NOT source4 AND destination
5 destination
6 source XOR destination
7 source or destination
8 NOT source AND NOT destination
9 NOT source XOR destination
10 NOT destination
11 source OR NOT destination
12 NOT source
13 NOT source OR destination
14 NOT source OR NOT destination
 
(NB.   XOR does a transparent copy)

* BLIT SOURCE ADDRESS address
  BLIT SOURCE X INC inc
  BLIT SOURCE Y INC inc
  BLIT DEST X INC inc
  BLIT DEST Y INC inc

The 1st 2 commands set the memory address of the source and destination
address.The value is rounded to an even number.The INC commands set the
increment to the next word in bytes.The blitter copies one word at a
time - each word is made up from 2 bytes.Set BLIT SOURCE X INC to 2 and
it does a direct copy.Set it to 4 and you only get every other word.
DEST X INC does the same trick with the destination.The Y INC commands
set the line increment in the same manner.

* BLIT X COUNT count
  BLIT Y COUNT count

These 2 set the no. of words to be read on a line and the number of lines.

* BLIT ENDMASK1 mask
  BLIT ENDMASK2 mask
  BLIT ENDMASK3 mask

These set the mask for the desination data.ENDMASK1 sets the mask for the
first word; ENDMASK3 sets the last word; the command in the middle sets
the mask for all the words in the middle.The mask is set as a binary word,
the same as in the set line command.If you want a pinstripe effect set the
mask to
%1010101010101010.

* BLIT HOP hop

Sets the operation you want to perform with the halftone pattern you have
set.The hop parameter can take 4 values:

0 all ones
1 half tone
2 source
3 source and half tone

If you don't want to use the half tone, set BLIT HOP to 2.

* BLIT OP op

This sets the logical operation of the data being copied.The operations are
the same as for BLIT HOP with two options:
0 all zeros
15 all ones

* BLIT H LINE number

This command sets the line number to start the half tone mask when its 
being used.The number parameter ranges from 0 to 15.

* BLIT SKEW skew

This command sets the number of bits to be shifted to the right before 
being copied to the destination address.The skew value ranges from
0 to 15.

* BLIT SMUDGE smudge

If smudge is set to 1, then the data set in BLIT SKEW is used as the
BLIT H LINE number.If it's set to 0 then it isn't so phooey to you.

* BLIT NFSR n
  BLIT FXSR n

NFSR stands for no final source read.When n is set to 1,the last source
read on every line is not performed.FXSR stands for force extra source
read.When n is set to 1, an extra source read is performed on every
line.

* BLIT HOG

This puts the blitter chip in command of your ST, taking all the
processing time.It stops all interrupts,apart from a few important
system ones.Avoid using this because STOS has its own interrupt 
routines and doesn't like it.

* BLIT IT

This is it! This command sets everything going.You must make sure
you have set up all the relevant details or else the system is
almost certain to crash.

* x=BLITTER

This checks to see if a blitter is fitted.If a 1 is returned, you
one, if 0 is returned you don't.

* x=BLIT BUSY

The last command.The blitter runs alongside the central processor.
You can do something else while it's doing it's tricks unless you 
have used the BLIT HOG command.The blitter is damn quick, so
you're unable to do much before it has finished in interpreter mode.
Once compiled,though,things go a lot faster.You could set the blitter
off copying data,check your variables or do the sprite stuff,then
check to see if it has finished before carrying on.
 
  