-
Notifications
You must be signed in to change notification settings - Fork 69
Metadata
The 32blit tools provide a means for converting a metadata.yml
into embedded metadata for games.
Game metadata includes:
- Title - maximum of 24 characters
- Description - maximum of 128 characters
- Version - such as v1.0.0 - maximum of 16 characters
- Splash - a 128x96 pixel cover art image
- Icon - an 8x8 pixel icon
A .yml file is used to store metadata and determine which image to use for the Splash and Icon.
This is the metadata.yml
for the hardware-test
example:
title: Hardware Test
description: A test of 32Blit's inputs and outputs.
author: pimoroni
splash:
file: hardware-test.png
icon:
file: hardware-test-icon.png
version: v1.0.0
Metadata is attached to a 32blit binary file using the tools.
The 32blit tool accepts a --config
argument with a path to the matadata.yml
file and --file
argument with the path to a 32blit binary file.
Metadata is parsed, validated, packed and appended to the end of the 32blit binary.
32blit metadata --config metadata.yml --file hardware-test.bin
If metadata is already appended to the target binary, the --force
argument must be supplied to overwrite it.
If a 32blit binary has metadata, the tools can be used to display it.
For example, running:
32blit metadata --file hardware-test.bin
Will display the metadata like so:
Parsed: hardware-test.bin (24,812 bytes)
Relocations: No
Metadata: Yes
Title: Hardware Test
Description: A test of 32Blit's inputs and outputs.
Version: v1.0.0
Author: pimoroni
Icon: 8x8 (3 colours)
Splash: 128x96 (8 colours)
The tools can also retrieve the images from a 32blit binary with metadata using the --dump-images
flag.
Images fill be saved in the format <binary-name>.<image-type>.png
.
Running:
32blit metadata --file hardware-test.bin --dump-images
Will display the metadata and filenames of the dumped images:
<snip>
Icon: 8x8 (3 colours)
Dumped to: hardware-test.icon.png
Splash: 128x96 (8 colours)
Dumped to: hardware-test.splash.png