Skip to content

Repository files navigation

ttx42

Decode CEEFAX-era Level 1 broadcast teletext into a reusable 25×40 cell grid, then render it with ordinary ANSI terminal colours.

screen

let page = ttx42::Page::from_raw(&bytes)?;
let grid = ttx42::decode(&page, &ttx42::DecodeOptions::default());
print!("{}", ttx42::to_ansi(&grid, &ttx42::AnsiOptions::default()));

The ttx42 command reads raw 960/1000-byte pages, MRG .tti files and 42-byte packet .t42 recoveries. It reads stdin when no file (or -) is given:

ttx42 page.tti
ttx42 recovery.t42 --page 100 --subpage 1 --reveal
ttx42 page.bin --separated braille
ttx42 page.bin --narrow

Separated mosaics default to widely-supported braille. Its bottom dot row is repeated to give the 2×3 teletext mosaic a better terminal aspect ratio. Contiguous legacy sextants and Unicode 16 separated sextants are selectable. Double height and flash remain explicit cell metadata so graphical consumers can render or animate them properly.

Terminal output is 80 columns wide by default. Double-height text uses a two-row 4×8 octant font derived from the original Mullard SAA5050 character ROM and generated by sn8kfonts; use --narrow for a compact 40-column fallback.

Specimen

Run cargo run --example specimen -- --wide for a small built-in page, or render a recovery with ttx42 recovery.t42 --page 188 --wide. A terminal screenshot can replace this note after release preparation.

Corpus

corpus/ is gitignored. Run corpus/fetch.sh to fetch a small public recovery sample used by the ignored smoke test.

Prior art and authoring

The dormant Rust teletext decoder and its ttxcat CLI by Vilcans are prior art. For browser-based authoring see edit.tf and the ZXNet teletext editor.

Scope

This release targets UK Level 1 pages. Level 1.5/2.5/3.5 enhancements, additional national subsets and editing are intentionally out of scope.

License

WTFPL.

About

TeleText to ANSI using Unicode octants and wide chars

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages