Mah Jongg (Nels Anderson) tile set

From Just Solve the File Format Problem
Revision as of 15:02, 25 October 2025 by Jsummers (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File Format
Name Mah Jongg (Nels Anderson) tile set
Ontology
Extension(s) .til
Released 1990

Mah Jongg is a computer version of the tile game Mahjong solitaire. It was developed by Nels Anderson. It runs on DOS. (Note that there are several different accepted spellings of Mahjong.)

Starting with v3.3, it has a .TIL tile set format, containing graphics. It also includes a tile set editor. Many custom tile sets have been made and shared.

The editor also uses a single-tile version of TIL format.

The format is also supported by the game Tile Match, by the same author.

Compare to Mah Jongg -V-G-A- tile set.

Contents

Format details

TIL is a seemgingly-simple uncompressed format, consisting entirely of a sequence of 800-byte 40x40 tile images. There are normally 42 such images. The images use a predefined 16-color palette, which is not contained in the file.

The format is complicated by several things. For one, the first 21 bytes of the file are overloaded. They may be graphical data, or they may be a "name" field, possibly depending on whether the first byte of the file is 0.

Identification

Identification of a TIL file from its contents is not impossible to do reasonably well. But it is not easy.

Files are usually (but not always) exactly 33600 bytes in size. Failing that, they're usually (but not always) at least a multiple of 800 bytes in size. File sizes up to 48000 bytes (60 tiles) have been observed.

There's more that can be done. Consider that the images include the edges of the tiles, which usually follow a predictable pattern. A full investigation is beyond the scope of this article.

Software

  • Mah Jongg by Nels Anderson
  • Tile Match
  • Tile Maker - Usually included with Mah Jongg and Tile Match.

Sample files

Further reading

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox