# FRAMEBUFFER

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
FRAMEBUFFER CREATE HorizontalSize%, VerticalSize%
FFRAMEBUFFER WRITE
FRAMEBUFFER BACKUP
FRAMEBUFFER RESTORE [x, y, w, h]
FRAMEBUFFER WINDOW x, y, page [,I or B]
FRAMEBUFFER CLOSE

Description:

This command allows you to create, use and remove a variable size framebuffer which should make many applications which have a working area bigger than the screen easier to program.
While using a framebuffer setting a different graphics mode which changes the colour depth will cause an error. JPG files cannot be loaded to the framebuffer and will error if tried.
The framebuffer is deleted by Ctrl-C and by running a new program.

FRAMEBUFFER CREATE HorizontalSize%, VerticalSize%
This command creates a framebuffer with the width and height specified in pixels.
HorizontalSize>=MM.HRES and <=1600: VerticalSize>=MM.VRES and <=1200

FFRAMEBUFFER WRITE
This command sets all drawing commands to write to the framebuffer and inherit the width and height defined.

FRAMEBUFFER BACKUP
This command creates a backup copy of the framebuffer. If a backup already exists it is overwritten. This allows the programmer to save the background before he/she starts writing non-static data to it.
NB: It won't be possible to use this command if a very large framebuffer is specified in 12 or 16-bit colour depth. A sensible error will be given in this case.

FRAMEBUFFER RESTORE [x, y, w, h]
This command restores all or part of the framebuffer from the backup. This allows the programmer to “clean” all or part of the framebuffer before adding new non-static items

FRAMEBUFFER WINDOW x, y, page [,I or B]
This command copies an area MM.HRES by MM.VRES from the framebuffer with top left at x,y to the page specified,
The optional parameter specifies if the copy is Immediate or during frame Blanking

FRAMEBUFFER CLOSE
This command releases the memory resources used by the framebuffer and
backup allowing a new framebuffer to be created with a different size

Last edited: 05 October, 2020