A GD3 tag gives the titles and credits of a VGM file, much as ID3 does for MP3. The
header’s GD3 offset at 14
points at it, relative to that field, and it usually comes straight after the VGM data. An
offset of 0 means no tag. Values are little-endian.
Layout
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ASCII | signature | Gd3 , with a trailing space. |
| 4 | 4 | u32 | version | 00 01 00 00: version 1.00. |
| 8 | 4 | u32 | length | Length in bytes of the text that follows. |
| 12 | length | text | strings | Eleven strings, in the order below. |
Strings
Each string is 16-bit little-endian text ended by a zero code unit. The order is:
| Number | Field |
|---|---|
| 1 | Track name, English |
| 2 | Track name, Japanese |
| 3 | Game name, English |
| 4 | Game name, Japanese |
| 5 | System name, English |
| 6 | System name, Japanese |
| 7 | Author name, English |
| 8 | Author name, Japanese |
| 9 | Release date |
| 10 | The name of the person who made the VGM file |
| 11 | Notes |
Source: the GD3 specification on the vgmrips wiki (revision 5757, 14 October 2023) gives this order, with the version as the bytes 00 01 00 00 (the number 00000100), and says two bytes are used for every character, even English ones, and that each string ends with two zero bytes. libvgm reads the same eleven strings in the same order.
What goes in each string
The wiki’s GD3 specification gives the first column of this table; the second column is from the vgmrips wiki page “Filling Out the Tags and Text File”, which says what the packs on vgmrips put in each field.
| Number | The GD3 specification | In practice (vgmrips tagging guide) |
|---|---|---|
| 1 | Track name, in English characters | The title from the OST or sound test, or the in-game use (a level name or number). |
| 2 | Track name in the original game language | The home-region-language title; officially named only, never a guess or an unofficial translation. It sometimes matches the English one. |
| 3 | Game name, English | The complete English game name. |
| 4 | Game name, original language | The complete game name in the home region language. |
| 5 | System name, English | The name of the game’s platform; spelling, spacing and capitalisation kept the same (see the list below). |
| 6 | System name, original language | The home-region-language name of the system. |
| 7 | Name of the original track author, English | The track’s artists: the composer, arranger and sometimes the music programmer; the English versions of the names, given name first. |
| 8 | Name of the original track author, original language | The same in the home region language, in that country’s name order. |
| 9 | Release date as yyyy/mm/dd, or yyyy/mm or yyyy when the month and day are not known | The date of the game’s earliest release in any region; the tagging guide writes it as YYYY-MM-DD (or YYYY-MM, YYYY). |
| 10 | Name of the person who converted it to a VGM file | The logger’s name or handle, and the trimmer’s if a different person, separated by a comma. |
| 11 | Notes | Facts about the track: its sound test or internal number, in-game use, trivia. The text file of the pack may hold opinions; the tag holds facts. |
- “Japanese”, in the field names of older programs, means “the language of the game’s home region”: Korean, French or any other.
- An unused or unknown field is an empty string: two zero bytes.
- New-line characters belong only in the notes field. The specification writes them as
00 0A; in the little-endian 16-bit text of real files the character000Ais stored as the bytes0A 00(the VGMPlay test filelemmings_012_tim7.vgmhas it so). - Characters that the tagging program cannot store are written as numeric character references (
&#…;) in the tag; the tagging guide recommends VGMTool’s “Paste as NCRs”. The explorer shows the text as stored. - The system names the specification gives as standard: Sega Master System; Sega Game Gear; Sega Master System / Game Gear; Sega Mega Drive / Genesis; Sega Game 1000; Sega Computer 3000; Sega System 16; Capcom Play System 1; Colecovision; BBC Model B; BBC Model B+; BBC Master 128.
What the explorer checks
The explorer reads the tag wherever the header says it is, and also where it follows the data when the header’s GD3 offset is 0. It reports: a version other than 00000100; a length longer than the file; fewer than eleven strings, or a string with no terminator before the end; bytes covered by the length after the eleventh string (a second terminator is the usual case). These match the defects of the vgmtools test files gd3-length-wrong, gd3-cut-short and gd3-additional-null-char.
Game_Music_Emu (Vgm_Emu.cpp, check_gd3_header) is more lenient about the version: it accepts any version below 0x200 (so 00000101 as well as 00000100) and a length that fits in the file, and it keeps only the English string of each pair, in the order track, game, system, author, release date, converter, notes. It takes the track length as the total samples times 10 / 441 milliseconds (44100 Hz) and, when the loop offset and loop samples are both non-zero, splits that into an intro and a loop. One program, so this is read from a single source.