XXIIVV
Maeve ROM Metadata
Maeve ROM Metadata16W09

Metadata exposes additional information about a Varvara rom.

An external program can find the location of a ROM's metadata, by forming a 16-bit address from the second and third bytes of a rom file. That program can verify that this is indeed a valid address by reading the subsequent 3 bytes which should always be 80 06 37.

First six bytes
LIT2addressLITportDEO2...
a0hblb800637...

The body of the metadata can be anything, but it is recommended that it be plain-text with 0a as line separator, and that the first line be the name of the application. Here are some suggestions for lines to include in the body of the metadata:

The metadata is stored in the rom itself to allow the program to make use of this information internally. The entire size of the metadata should be at most 256 bytes.

Implementation

The metadata format begins with a byte for the varvara version, followed by a null-terminating text:

|0100 ( -> )

	;meta #06 DEO2

BRK

@meta 00 &body
	( name ) "Nasu 0a
	( details ) "A 20 "Sprite 20 "Editor 0a
	( author ) "By 20 "Hundred 20 "Rabbits 0a
	( date ) "Jan 20 "8, 20 "2023 00
	02
		( icon ) 83 =appicon
		( mask ) 41 1705

If supported by the emulator, writing the metadata's address to the system device, via #06 DEO2, informs the emulator of the metadata's location, and it may choose to handle this information when a ROM is started.

Extended

The length of the metadata can be extended and host various other informations. The format for the fields is: a single byte id field, followed by a 2 bytes value field.

Applicationidvalue
--41Expected device mask.
Potato8324x24 icon in the chr format.
8864x64 icon in the icn format.
a0The application manifest.

Reading Metadata

A program can check a rom for metadata with the following routine:

@has-meta ( filename* -- bool )

	.File/name DEO2
	#0003 .File/length DEO2
	;&b .File/read DEO2k DEO2
	,&litport LDR2 #8006 EQU2
	,&deo2 LDR #37 EQU AND

JMP2r
	&b &litport $2 &deo2 $1

incoming roms varvara