Every block ends with three packs of type 0x8f. The sources are the libcdio guide “CD Text Encoding and Decoding Guide” (the guide), Sony’s “CD TEXT authoring and mastering” documents (Sony, with the document number), the MMC-3 draft revision 10g and EBU Tech 3264.
The 36-byte record
The guide: “the payload bytes of three 0x8f packs form a 36-byte record. The track number bytes of the three packs have the values 0, 1, 2.” Each block has one such group, and each group gives the highest sequence number and the language code of all blocks. The guide’s table numbers its last row “28 - 36”; the three packs hold 36 bytes, numbered 0 to 35.
| Byte | Field | Meaning |
|---|---|---|
| 0 | Character code | For the types 0x80 to 0x85: 0x00 ISO-8859-1, 0x01 7-bit ASCII, 0x80 MS-JIS (Japanese Kanji, double-byte characters). |
| 1 | First track | The number of the first track. |
| 2 | Last track | The number of the last track. |
| 3 | Copyright | 3 means the CD-Text is copyrighted, 0 that it is not. |
| 4 to 19 | Pack counts | The number of packs of each type: byte 4 + n counts the packs of type 0x80 + n. |
| 20 to 27 | Last sequence numbers | The highest sequence byte number of blocks 0 to 7. |
| 28 to 35 | Language codes | The language of blocks 0 to 7: the table below. |
The explorer lays the three payloads end to end in the order of their track bytes 0, 1 and 2, and
reports a block that lacks one of them; libcdio refuses such a block (its reader,
cdtext_read_pack). Sony’s checker (DOC10) requires, for every block: the first track
not above the last and both not above 0x63 (99; rule 1-5); the pack counts to match the packs
present (1-6); the last sequence number to match the block’s last pack (1-3) and not to be 0
for a block that exists (1-15); the character code to be 0x00, 0x01 or 0x80 (1-13); and the
language code to be 0x00 to 0x2F or 0x45 to 0x7F (1-14).
Example
Sony’s example (DOC06) has, in both its blocks, the three packs
8f 00 2e 00 00 01 0e 03 16 03 00 00 00 07 01 02,
8f 01 2f 00 05 04 00 00 00 02 00 03 30 30 00 00 and
8f 02 30 00 00 00 00 00 09 09 00 00 00 00 00 00 (each followed by its CRC). They
say: character code ISO-8859-1, tracks 1 to 14, copyrighted (Sony’s text file says
Text Data Copy Protection = ON); 22 title packs, 3 performer packs, 7 message packs,
1 disc identification pack, 2 genre packs, 5 table-of-contents packs, 4 second table-of-contents
packs, 2 closed-information packs and the 3 packs of the record, 49 packs in all; the last
sequence number 0x30 (48) in blocks 0 and 1; and the language 9 (English) in blocks 0 and 1.
Language codes
The guide’s table, which it takes from “tech3264.pdf appendix 3”: EBU Tech 3264, Appendix 3, the same codes that the EBU uses for subtitles and for its MAC/packet systems. The guide notes that not all of them “have ever been seen with CD Text”. EBU’s table spells a few names differently (Icelandic, Portugese, Romansh), assigns 0x2c to 0x3f to “national assignment” and names nothing at 0x40 to 0x44; Sony’s checker accepts 0x00 to 0x2f and 0x45 to 0x7f, so the explorer accepts 0x2c to 0x2f as unnamed codes.
| Code | Language | Code | Language | Code | Language |
|---|---|---|---|---|---|
| 0x00 | Unknown | 0x01 | Albanian | 0x02 | Breton |
| 0x03 | Catalan | 0x04 | Croatian | 0x05 | Welsh |
| 0x06 | Czech | 0x07 | Danish | 0x08 | German |
| 0x09 | English | 0x0a | Spanish | 0x0b | Esperanto |
| 0x0c | Estonian | 0x0d | Basque | 0x0e | Faroese |
| 0x0f | French | 0x10 | Frisian | 0x11 | Irish |
| 0x12 | Gaelic | 0x13 | Galician | 0x14 | Iceland |
| 0x15 | Italian | 0x16 | Lappish | 0x17 | Latin |
| 0x18 | Latvian | 0x19 | Luxembourgian | 0x1a | Lithuanian |
| 0x1b | Hungarian | 0x1c | Maltese | 0x1d | Dutch |
| 0x1e | Norwegian | 0x1f | Occitan | 0x20 | Polish |
| 0x21 | Portuguese | 0x22 | Romanian | 0x23 | Romanish |
| 0x24 | Serbian | 0x25 | Slovak | 0x26 | Slovenian |
| 0x27 | Finnish | 0x28 | Swedish | 0x29 | Turkish |
| 0x2a | Flemish | 0x2b | Wallon | 0x45 | Zulu |
| 0x46 | Vietnamese | 0x47 | Uzbek | 0x48 | Urdu |
| 0x49 | Ukrainian | 0x4a | Thai | 0x4b | Telugu |
| 0x4c | Tatar | 0x4d | Tamil | 0x4e | Tadzhik |
| 0x4f | Swahili | 0x50 | Sranan Tongo | 0x51 | Somali |
| 0x52 | Sinhalese | 0x53 | Shona | 0x54 | Serbo-croat |
| 0x55 | Ruthenian | 0x56 | Russian | 0x57 | Quechua |
| 0x58 | Pushtu | 0x59 | Punjabi | 0x5a | Persian |
| 0x5b | Papamiento | 0x5c | Oriya | 0x5d | Nepali |
| 0x5e | Ndebele | 0x5f | Marathi | 0x60 | Moldavian |
| 0x61 | Malaysian | 0x62 | Malagasay | 0x63 | Macedonian |
| 0x64 | Laotian | 0x65 | Korean | 0x66 | Khmer |
| 0x67 | Kazakh | 0x68 | Kannada | 0x69 | Japanese |
| 0x6a | Indonesian | 0x6b | Hindi | 0x6c | Hebrew |
| 0x6d | Hausa | 0x6e | Gurani | 0x6f | Gujurati |
| 0x70 | Greek | 0x71 | Georgian | 0x72 | Fulani |
| 0x73 | Dari | 0x74 | Churash | 0x75 | Chinese |
| 0x76 | Burmese | 0x77 | Bulgarian | 0x78 | Bengali |
| 0x79 | Bielorussian | 0x7a | Bambora | 0x7b | Azerbaijani |
| 0x7c | Assamese | 0x7d | Armenian | 0x7e | Arabic |
| 0x7f | Amharic |