Mah Jongg (Nels Anderson) tile set
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
- v2.0 (1987-09-09): mahjong3.zip (for reference; does not support TIL format)
- v3.3 (1990-03-22): MJONGG33.ZIP (Note the TILES.COM self-extracting archive.)
- v4.2 (1994-09-01)
- Tile Match
- Tile Maker - Usually included with Mah Jongg and Tile Match.
Sample files
- MegaPack II → megagames_1.zip → MISC/MJTILES/... (the .TIL files)
- Discmaster search (incomplete)