GBKiss.org

Metadata

All GBKiss files contain some amount of metadata. A minimal file could contain just a header of 6 bytes and a short file name, while a maximal file could consume over 256 bytes just for metadata.

Section Req. Size Notes
File size Y 2 Total, including this field
Flags Y 1  
Cartridge code Y 1  
Title+Icon size Y 1  
Creator code Y 1  
Title Y 1-12 Uses rich text encoding
Icon N 96/192  
History N 46  

Flags

Flags contains the union of zero or more flags:

  • %00010000: if set, file has icon (2bpp or 1bpp, per next flag)
  • %00001000: if set, icon is 2bpp; if clear, icon is 1bpp
  • %00000100: file is executable
  • %00000010: file must be installed to zero region
  • %00000001: file has history information

Cartridge Code

A file may optionally have a cartridge code which restricts which cartridges can run it.

Each cartridge that supports GBKiss has an associated code, located at address $00:$0014. If a file’s cartridge code is non-zero, it is restricted to run only on matching cartridges. On a non-matching cartridge, the GBKiss menu will display the file type as cross, and will not execute it.

The following cartridge codes are known:

In addition, there are two special values of the cartridge code:

  • $00: used for software that is universal and can run on any cartridge.
  • $ff: used for Kiss Mail. Also used on files as they are being received, so that they will not be marked as executable until the transfer successfully completes.

Creator Code

A file may have a creator code which associates it with other files. This code is used to determine the file’s icon, and in the case of data files, determines which software can open it.

The following creator codes are known:

Icon

If a file’s “has icon” flag is set, then it contains an icon following its title. The icon may be 2bpp or 1bpp depending on whether the “2bpp icon” flag is set or clear.

Icons are 32×24, stored in column-major order (rgbgfx --columns). 2bpp icons occupy 192 bytes, and 1bpp icons occupy 96 bytes.

If the file’s “has icon” flag is clear, the icon is determined as follows:

  • If the file’s creator code is $00, then its title is rendered as text.
  • If the file’s creator code matches one of the built-in icons, that icon is used:
    • $01: LETTER
    • $81: MAIL
    • $40: HIKOU0
    • $41: PUZZLE0
    • $42: KEN0
    • $43: CARD0
    • $44: MAP
    • $45: IE2
  • If the file’s creator_code & $7f matches another installed file, that file’s icon is used.
  • Otherwise, the broken file icon SIMULA1 is used.

History

Section Size Notes
Points 2  
Author 10 Uses plain text encoding, padded with spaces
Author points 1  
First-hand source 10 Uses plain text encoding, padded with spaces
First-hand source points 1  
Second-hand source 10 Uses plain text encoding, padded with spaces
Second-hand source points 1  
Third-hand source 10 Uses plain text encoding, padded with spaces
Third-hand source points 1