Mah Jongg (Nels Anderson) tile set

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |formattype=electronic |subcat=Graphics |extensions={{ext|til}} |released=1990 }} '''Mah Jongg''' is a computer version of the tile game ''Mahjong solitaire''. It...")
 
 
Line 7: Line 7:
 
'''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''.)
 
'''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.
+
Starting with v3.3, it has a '''.TIL''' tile set format, containing graphics. It also includes a tile editor. Many custom tile sets have been made and shared.
  
The editor also uses a single-tile version of TIL format.
+
A single-tile version of TIL format also exists, used by the editor.
  
 
The format is also supported by the game '''Tile Match''', by the same author.
 
The format is also supported by the game '''Tile Match''', by the same author.
Line 16: Line 16:
  
 
== Format details ==
 
== 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.
+
TIL is a seemingly simple uncompressed format, consisting entirely of a sequence of 800-byte 40x40-pixel tile images. There are normally 42 such images. The images use a predefined 16-color palette, 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.
+
A complication is that the first 21-ish 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.
 +
 
 +
Technical minutiae: The tile editor, and the Tile Match game, think the name field is 21 bytes in size. The Mah Jongg game thinks it's 22 bytes, with the last byte ignored. If the field is deemed to be present, bytes replaced by it are rendered graphically as if they were 0. Pathological files exist whose first byte is not 0, but which are not intended to have a name field.
  
 
== Identification ==
 
== Identification ==

Latest revision as of 17:35, 31 October 2025

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 editor. Many custom tile sets have been made and shared.

A single-tile version of TIL format also exists, used by the editor.

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

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

Contents

[edit] Format details

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

A complication is that the first 21-ish 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.

Technical minutiae: The tile editor, and the Tile Match game, think the name field is 21 bytes in size. The Mah Jongg game thinks it's 22 bytes, with the last byte ignored. If the field is deemed to be present, bytes replaced by it are rendered graphically as if they were 0. Pathological files exist whose first byte is not 0, but which are not intended to have a name field.

[edit] 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.

[edit] Software

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

[edit] Sample files

[edit] Further reading

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox