EP1 format

From Teletext Wiki
Jump to navigation Jump to search

EP1 is a proprietary teletext page file format from Softel, generated by their page editor Flair.

The following format description was reverse engineered by analysing test files generated by Flair32. Some bytes were always the same, so their meaning if any could not be inferred.

EP1 files hold Level 1 page data for 24 teletext rows (0 to 23), and sixteen Level 1.5 enhancement packets.

Bytes 0x00–0x05 contain a header.
    byte 0x00: always 0xFE
    byte 0x01: always 0x01
    byte 0x02: language code
        07 = Czech/Slovak
        08 = Danish
        09 = English
        0B = French
        0D = German
        0E = Greek
        11 = Italian
        14 = Polish
        16 = Rumanian
        17 = Portuguese/Spanish
        18 = Swedish/Finnish
        1C = Turkish
        1E = Serbian/Croatian/Slovenian
        FF = "other" - Lettish/Lithuanian, Estonian, and Hungarian
    byte 0x03: 0xCA if enhancement data present else 0x00
    byte 0x04: low byte of offset to start of Level 1 page data from end of page header.
    byte 0x05: high byte of offset

Level 1.5 enhancement data follows EP1 header
    byte 0x06: always 0xC2
    byte 0x07: always 0x00
    byte 0x08: low byte of enhancement data length
    byte 0x09: high byte of enhancement data length
    byte 0x0A: n enhancement packets (one to sixteen inclusive)
        byte 0x0A + 40n + 0: designation code, 0x00 to 0x0F
        byte 0x0A + 40n + 1: thirteen enhancement triplets
            byte 0x0A + 40n + 3y + 1: address (terminator is for some reason 7F instead of 3F)
            byte 0x0A + 40n + 3y + 2: 5 bit mode
            byte 0x0A + 40n + 3y + 3: 7 bit data

Level 1 page data follows enhancement data
    offset + 0: 960 bytes of teletext data representing rows 0 to 23
    offset + 0x3C0: 40 byte buffer to save teletext data pushed off page when editing
    offset + 0x3E8: two byte terminator 0x0000.

Flair32 renders Danish pages in the Swedish/Finnish character set, with the exception that the Ä, Ö, ä, and ö characters are replaced with Æ, Ø, æ, and ø respectively.

Flair32 supports a limited repertoire of Level 1.5 enhancements.

The following characters are supported from each diacritical mark combining attribute:

G0 character without diacritical mark @ [ \ ] ^ ` { | } ~
G0 character with mark 1 (grave) À È Ì Ò Ù à è ì ò ù
G0 character with mark 2 (acute) Á Ć É Í Ĺ Ń Ó Ŕ Ś Ú Ý Ź á ć é í ń ó ŕ ś ú ý ź
G0 character with mark 3 (circumflex) Â Ê Î Ô Û â ê î ô û
G0 character with mark 4 (tilde) Ã Ñ Õ ã ñ õ
G0 character with mark 5 (macron) ū when combined with character 0x5F
G0 character with mark 6 (breve) ğ (A, a, e, and g, are displayed with caron)
G0 character with mark 7 (dot above) İ ė (A and a are displayed with ring)
G0 character with mark 8 (diaeresis) Ä Ë Ï Ö Ü ä ë ï ö ü
G0 character with mark 9 (dot below) none supported
G0 character with mark 10 (ring) Ů ů
G0 character with mark 11 (cedilla) Ç Ş Ţ ç (s, t, and ~ give corrupt characters)
G0 character with mark 12 (low line) none supported
G0 character with mark 13 (double acute) Ő Ű ő ű
G0 character with mark 14 (ogonek) ą ę
G0 character with mark 15 (caron) Č Ď Ě Ľ Ň Ř Š Ť Ž č ď ě ľ ň ř š ť ž

The following characters are supported from the G2 character set:

¥ § ¤ ‘ “ « ← ↑ → ↓ ° ± ² ³ × µ ¶ · ÷ ’ ” » ¼ ½ ¾ ¿ _ ― ¹ ® © ™ ♪ € ‰ ⅛ ⅜ ⅝ ⅞ Æ Đ ª Ħ IJ Ł Ø º Þ Ŧ Ƞ ʼn æ đ ð ħ ı ij ł ø æ ß þ ŧ ƞ.

The prohibited character 0x5B is rendered as Ƶ

No G3 line drawing or smoothed mosaics are supported.


An EPX file consists of a header followed by multiple concatenated EP1 files.

Bytes 0x00-0x05 contain a header.
    byte 0x00–0x02: magic string "JWC"
    byte 0x03: Number of EP1 pages in file
    byte 0x04–0x05: always 00 00