# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 148
- 149
- 150
- 151
- 152
…
- 373
- 374

interpreted when rendered.
A resource in the library has three major characteristics:
1. Location or source of the resource - The following are the recognized sources of resources
• internal flash memory type
• internal RAM type
• external memory type
• external EDS memory type
2. Data types of the resource - The following are the supported types of resources:
• image
• font
• palette
• binary data
3. Data compression type of the resource - the following are the supported compression of data:
• RLE - Run length encoded compression. This type of compression is only available for 8 and 4 bpp bitmaps.
• IPU - Compressed data is encoded using the DEFLATE algorithm with fixed Huffman codes; dynamic Huffman codes are
not supported.
The first four types indicates the location of the resource. The next five types indicates which kind of resource and the next 3
types indicates if the resource data is compressed or not.
By combining these three groups, a resource can be described fully and accessed appropriately in the library. For example:
By combining the location, type and compression into one type, the library can pass the resource type parameter when
rendering the resource. GFX_RESOURCE_MCHP_MBITMAP_EXTERNAL_RLE = (
GFX_RESOURCE_TYPE_MCHP_MBITMAP | GFX_RESOURCE_MEMORY_EXTERNAL |
GFX_RESOURCE_COMP_RLE )
Each type will determine how the library will access the resource when rendering.
Remarks
None.
1.6.1.2.16 GFX_RESOURCE_BINARY Type
Defines the structure used for the binary type resource.
File
gfx_types_resource.h
Syntax
typedef struct {
union {
uint32_t extAddress;
uint8_gfx_image_prog * progByteAddress;
uint16_gfx_image_prog * progWordAddress;
const char * constAddress;
char * ramAddress;
__eds__ char * edsAddress;
} location;
uint32_t size;
uint32_t param1;
uint32_t param2;
} GFX_RESOURCE_BINARY;
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
150

- 1
- 2
…
- 148
- 149
- 150
- 151
- 152
…
- 373
- 374