MZF files

#include "mzf.h"

Typedefs

typedef uint8_t const *const IMGP

Constant image pointer.

Functions

void sanitiseImage(uint8_t *const image, uint32_t *const size)

Sanitise an MZF image and change its size accordingly.

Parameters:
  • image[inout] MZF image.

  • size[inout] Image size.

uint16_t imageSize(IMGP image)

Determine the size of an MZF image from its header.

Parameters:

image[in] MZF image.

Returns:

Size of MZF image.

bool checkImage(IMGP image, uint16_t const size)

Check whether the MZF file is valid.

Parameters:
  • image[in] MZF image.

  • size[in] Image size.

Returns:

true if image is valid, false otherwise.

void prepareLoader(uint8_t *const loader, IMGP image)

Prepare a turbo loader image for a given MZF image.

Parameters:
  • loader[out] Buffer for MZF turbo loader image.

  • image[in] MZF image.

Variables

size_t const turboLoaderSize

Size of the turbo loader image.