Please create an account or Login! Have fun!

Editing DAT

Jump to navigation Jump to search
You are not logged in. While you can edit without logging in, your IP address will be recorded publicly, along with the time and date, in this page's history. It is sometimes possible for others to identify you with this information. Creating an account will conceal your IP address and provide you with many other benefits. Messages sent to your IP can be viewed on your talk page.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 7: Line 7:
The format is a relatively simple binary structure.  All fields are little-endian.
The format is a relatively simple binary structure.  All fields are little-endian.


=== File header ===
=== File header ====


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 92: Line 92:


{| class="wikitable" border="1"
{| class="wikitable" border="1"
!
!Byte
!<code>$0_</code>
!Tile
!<code>$1_</code>
!Byte
!<code>$2_</code>
!Tile
!<code>$3_</code>
!Byte
!<code>$4_</code>
!Tile
!<code>$5_</code>
!Byte
!<code>$6_</code>
!Tile
!Byte
!Tile
!Byte
!Tile
!Byte
!Tile
|-
|-
!<code>$_0</code>
|<code>$00</code>
|[[Image:Floor.png]] [[Floor]]
|[[Image:Floor.png]] [[Floor]]
|[[Image:Clone block S.png]] [[Clone block]] (S) <ref name="clone-block">Must be used when creating a block cloner, to indicate the direction of cloning.  A clone block placed on its own won't be pushable.</ref>
|<code>$10</code>
|''unused'' <ref>Used internally as the [[overlay buffer|Combination]] tile.</ref>
|[[Image:Clone block S.png]] [[Clone block]] (S)
|<code>$20</code>
|''unused''<br><small>(used internally as [[overlay buffer|Combination]])</small>
|<code>$30</code>
|[[Image:Thin wall SE.png]] [[Thin wall]] (SE)
|[[Image:Thin wall SE.png]] [[Thin wall]] (SE)
|<code>$40</code>
|[[Image:Bug N.png]] [[Bug]] (N)
|[[Image:Bug N.png]] [[Bug]] (N)
|<code>$50</code>
|[[Image:Glider N.png]] [[Glider]] (N)
|[[Image:Glider N.png]] [[Glider]] (N)
|<code>$60</code>
|[[Image:Paramecium NS.png]] [[Paramecium]] (N)
|[[Image:Paramecium NS.png]] [[Paramecium]] (N)
|-
|-
!<code>$_1</code>
|<code>$01</code>
|[[Image:Wall.png]] [[Wall]]
|[[Image:Wall.png]] [[Wall]]
|[[Image:Clone block E.png]] [[Clone block]] (E) <ref name="clone-block"/>
|<code>$11</code>
|[[Image:Thief.png]] [[Thief]]
|[[Image:Clone block E.png]] [[Clone block]] (E)
|<code>$21</code>
|[[Image:Thief.png]] [[Key thief]]
|<code>$31</code>
|[[Image:Clone machine.png]] [[Cloner]]
|[[Image:Clone machine.png]] [[Cloner]]
|<code>$41</code>
|[[Image:Bug W.png]] [[Bug]] (W)
|[[Image:Bug W.png]] [[Bug]] (W)
|<code>$51</code>
|[[Image:Glider W.png]] [[Glider]] (W)
|[[Image:Glider W.png]] [[Glider]] (W)
|<code>$61</code>
|[[Image:Paramecium WE.png]] [[Paramecium]] (W)
|[[Image:Paramecium WE.png]] [[Paramecium]] (W)
|-
|-
!<code>$_2</code>
|<code>$02</code>
|[[Image:Computer chip.png]] [[Computer chip]]
|[[Image:Computer chip.png]] [[Computer chip]]
|<code>$12</code>
|[[Image:Force floor N.png]] [[Force floor]] (N)
|[[Image:Force floor N.png]] [[Force floor]] (N)
|<code>$22</code>
|[[Image:Socket.png]] [[Chip socket]]
|[[Image:Socket.png]] [[Chip socket]]
|<code>$32</code>
|[[Image:Force floor Random.png]] [[Random force floor]]
|[[Image:Force floor Random.png]] [[Random force floor]]
|<code>$42</code>
|[[Image:Bug S.png]] [[Bug]] (S)
|[[Image:Bug S.png]] [[Bug]] (S)
|<code>$52</code>
|[[Image:Glider S.png]] [[Glider]] (S)
|[[Image:Glider S.png]] [[Glider]] (S)
|<code>$62</code>
|[[Image:Paramecium NS.png]] [[Paramecium]] (S)
|[[Image:Paramecium NS.png]] [[Paramecium]] (S)
|-
|-
!<code>$_3</code>
|<code>$03</code>
|[[Image:Water.png]] [[Water]]
|[[Image:Water.png]] [[Water]]
|<code>$13</code>
|[[Image:Force floor E.png]] [[Force floor]] (E)
|[[Image:Force floor E.png]] [[Force floor]] (E)
|<code>$23</code>
|[[Image:Green button.png]] [[Green button]]
|[[Image:Green button.png]] [[Green button]]
|[[Image:Drowned Chip.png]] [[Drowned Chip]] <ref name="invalid">This tile is an [[invalid tile|implementation detail]], not an intended game element.</ref>
|<code>$33</code>
|[[Image:Drowned Chip.png]] <s>[[Drowned Chip]]</s>
|<code>$43</code>
|[[Image:Bug E.png]] [[Bug]] (E)
|[[Image:Bug E.png]] [[Bug]] (E)
|<code>$53</code>
|[[Image:Glider E.png]] [[Glider]] (E)
|[[Image:Glider E.png]] [[Glider]] (E)
|<code>$63</code>
|[[Image:Paramecium WE.png]] [[Paramecium]] (E)
|[[Image:Paramecium WE.png]] [[Paramecium]] (E)
|-
|-
!<code>$_4</code>
|<code>$04</code>
|[[Image:Fire.png]] [[Fire]]
|[[Image:Fire.png]] [[Fire]]
|<code>$14</code>
|[[Image:Force floor W.png]] [[Force floor]] (W)
|[[Image:Force floor W.png]] [[Force floor]] (W)
|<code>$24</code>
|[[Image:Red button.png]] [[Red button]]
|[[Image:Red button.png]] [[Red button]]
|[[Image:Chip in Fire.png]] [[Burned Chip]] <ref name="invalid"/>
|<code>$34</code>
|[[Image:Chip in Fire.png]] <s>[[Burned Chip]]</s>
|<code>$44</code>
|[[Image:Fireball.png]] [[Fireball]] (N)
|[[Image:Fireball.png]] [[Fireball]] (N)
|<code>$54</code>
|[[Image:Teeth N.png]] [[Teeth]] (N)
|[[Image:Teeth N.png]] [[Teeth]] (N)
|<code>$64</code>
|[[Image:Blue key.png]] [[Blue key]]
|[[Image:Blue key.png]] [[Blue key]]
|-
|-
!<code>$_5</code>
|<code>$05</code>
|[[Image:Invisible wall.png]] [[Invisible wall]]
|[[Image:Invisible wall.png]] [[Invisible wall]]
|<code>$15</code>
|[[Image:Exit.png]] [[Exit]]
|[[Image:Exit.png]] [[Exit]]
|<code>$25</code>
|[[Image:Toggle wall Closed.png]] [[Toggle wall]]
|[[Image:Toggle wall Closed.png]] [[Toggle wall]]
|[[Image:Burned Chip.png]] [[Burned Chip]] <ref name="invalid"/>
|<code>$35</code>
|[[Image:Burned Chip.png]] <s>[[Burned Chip]]</s>
|<code>$45</code>
|[[Image:Fireball.png]] [[Fireball]] (W)
|[[Image:Fireball.png]] [[Fireball]] (W)
|<code>$55</code>
|[[Image:Teeth W.png]] [[Teeth]] (W)
|[[Image:Teeth W.png]] [[Teeth]] (W)
|<code>$65</code>
|[[Image:Red key.png]] [[Red key]]
|[[Image:Red key.png]] [[Red key]]
|-
|-
!<code>$_6</code>
|<code>$06</code>
|[[Image:Thin wall N.png]] [[Thin wall]] (N)
|[[Image:Thin wall N.png]] [[Thin wall]] (N)
|<code>$16</code>
|[[Image:Blue lock.png]] [[Blue lock]]
|[[Image:Blue lock.png]] [[Blue lock]]
|<code>$26</code>
|[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]]
|[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]]
|''unused'' <ref name="unused">This byte does not correspond to any defined tile, but acts like an invisible wall.</ref>
|<code>$36</code>
|''unused''<br><small>(acts as invisible wall)</small>
|<code>$46</code>
|[[Image:Fireball.png]] [[Fireball]] (S)
|[[Image:Fireball.png]] [[Fireball]] (S)
|<code>$56</code>
|[[Image:Teeth S.png]] [[Teeth]] (S)
|[[Image:Teeth S.png]] [[Teeth]] (S)
|<code>$66</code>
|[[Image:Green key.png]] [[Green key]]
|[[Image:Green key.png]] [[Green key]]
|-
|-
!<code>$_7</code>
|<code>$07</code>
|[[Image:Thin wall W.png]] [[Thin wall]] (W)
|[[Image:Thin wall W.png]] [[Thin wall]] (W)
|<code>$17</code>
|[[Image:Red lock.png]] [[Red lock]]
|[[Image:Red lock.png]] [[Red lock]]
|<code>$27</code>
|[[Image:Brown button.png]] [[Brown button]]
|[[Image:Brown button.png]] [[Brown button]]
|''unused'' <ref name="unused"/>
|<code>$37</code>
|''unused''<br><small>(acts as invisible wall)</small>
|<code>$47</code>
|[[Image:Fireball.png]] [[Fireball]] (E)
|[[Image:Fireball.png]] [[Fireball]] (E)
|<code>$57</code>
|[[Image:Teeth E.png]] [[Teeth]] (E)
|[[Image:Teeth E.png]] [[Teeth]] (E)
|<code>$67</code>
|[[Image:Yellow key.png]] [[Yellow key]]
|[[Image:Yellow key.png]] [[Yellow key]]
|-
|-
!<code>$_8</code>
|<code>$08</code>
|[[Image:Thin wall S.png]] [[Thin wall]] (S)
|[[Image:Thin wall S.png]] [[Thin wall]] (S)
|<code>$18</code>
|[[Image:Green lock.png]] [[Green lock]]
|[[Image:Green lock.png]] [[Green lock]]
|<code>$28</code>
|[[Image:Blue button.png]] [[Blue button]]
|[[Image:Blue button.png]] [[Blue button]]
|''unused'' <ref name="unused"/> <ref>In the pgchip hack, this byte is used to indicate an [[ice block]].</ref>
|<code>$38</code>
|''unused''<br><small>(acts as invisible wall)</small><br><small>([[Ice block]] in [[pgchip]])</small>
|<code>$48</code>
|[[Image:Pink ball.png]] [[Ball]] (N)
|[[Image:Pink ball.png]] [[Ball]] (N)
|<code>$58</code>
|[[Image:Walker NS.png]] [[Walker]] (N)
|[[Image:Walker NS.png]] [[Walker]] (N)
|<code>$68</code>
|[[Image:Flippers.png]] [[Flippers]]
|[[Image:Flippers.png]] [[Flippers]]
|-
|-
!<code>$_9</code>
|<code>$09</code>
|[[Image:Thin wall E.png]] [[Thin wall]] (E)
|[[Image:Thin wall E.png]] [[Thin wall]] (E)
|<code>$19</code>
|[[Image:Yellow lock.png]] [[Yellow lock]]
|[[Image:Yellow lock.png]] [[Yellow lock]]
|<code>$29</code>
|[[Image:Teleport.png]] [[Teleporter]]
|[[Image:Teleport.png]] [[Teleporter]]
|[[Image:Chip in Exit.png]] [[Fake exit]] <ref name="invalid"/>
|<code>$39</code>
|[[Image:Chip in Exit.png]] <s>[[Fake exit]]</s>
|<code>$49</code>
|[[Image:Pink ball.png]] [[Ball]] (W)
|[[Image:Pink ball.png]] [[Ball]] (W)
|<code>$59</code>
|[[Image:Walker WE.png]] [[Walker]] (W)
|[[Image:Walker WE.png]] [[Walker]] (W)
|<code>$69</code>
|[[Image:Fire boots.png]] [[Fire boots]]
|[[Image:Fire boots.png]] [[Fire boots]]
|-
|-
!<code>$_a</code>
|<code>$0a</code>
|[[Image:Block.png]] [[Dirt block]]
|[[Image:Block.png]] [[Dirt block]]
|<code>$1a</code>
|[[Image:Ice NW.png]] [[Ice corner]] (NW)
|[[Image:Ice NW.png]] [[Ice corner]] (NW)
|<code>$2a</code>
|[[Image:Bomb.png]] [[Bomb]]
|[[Image:Bomb.png]] [[Bomb]]
|[[Image:Exit2.png]] [[Fake exit]] <ref name="invalid"/>
|<code>$3a</code>
|[[Image:Exit2.png]] <s>[[Fake exit]]</s>
|<code>$4a</code>
|[[Image:Pink ball.png]] [[Ball]] (S)
|[[Image:Pink ball.png]] [[Ball]] (S)
|<code>$5a</code>
|[[Image:Walker NS.png]] [[Walker]] (S)
|[[Image:Walker NS.png]] [[Walker]] (S)
|<code>$6a</code>
|[[Image:Ice skates.png]] [[Ice skates]]
|[[Image:Ice skates.png]] [[Ice skates]]
|-
|-
!<code>$_b</code>
|<code>$0b</code>
|[[Image:Dirt.png]] [[Dirt]]
|[[Image:Dirt.png]] [[Dirt]]
|<code>$1b</code>
|[[Image:Ice NE.png]] [[Ice corner]] (NE)
|[[Image:Ice NE.png]] [[Ice corner]] (NE)
|<code>$2b</code>
|[[Image:Trap.png]] [[Trap]]
|[[Image:Trap.png]] [[Trap]]
|[[Image:Exit3.png]] [[Fake exit]] <ref name="invalid"/>
|<code>$3b</code>
|[[Image:Exit3.png]] <s>[[Fake exit]]</s>
|<code>$4b</code>
|[[Image:Pink ball.png]] [[Ball]] (E)
|[[Image:Pink ball.png]] [[Ball]] (E)
|<code>$5b</code>
|[[Image:Walker WE.png]] [[Walker]] (E)
|[[Image:Walker WE.png]] [[Walker]] (E)
|<code>$6b</code>
|[[Image:Suction boots.png]] [[Suction boots]]
|[[Image:Suction boots.png]] [[Suction boots]]
|-
|-
!<code>$_c</code>
|<code>$0c</code>
|[[Image:Ice.png]] [[Ice]]
|[[Image:Ice.png]] [[Ice]]
|<code>$1c</code>
|[[Image:Ice SE.png]] [[Ice corner]] (SE)
|[[Image:Ice SE.png]] [[Ice corner]] (SE)
|<code>$2c</code>
|[[Image:Hidden wall.png]] [[Hidden wall]]
|[[Image:Hidden wall.png]] [[Hidden wall]]
|[[Image:Swimming Chip N.png]] [[Swimming Chip]] (N) <ref name="invalid"/>
|<code>$3c</code>
|[[Image:Swimming Chip N.png]] <s>[[Swimming Chip]] (N)</s>
|<code>$4c</code>
|[[Image:Tank N.png]] [[Tank]] (N)
|[[Image:Tank N.png]] [[Tank]] (N)
|<code>$5c</code>
|[[Image:Blob.png]] [[Blob]] (N)
|[[Image:Blob.png]] [[Blob]] (N)
|<code>$6c</code>
|[[Image:Chip N.png]] [[Chip]] (N)
|[[Image:Chip N.png]] [[Chip]] (N)
|-
|-
!<code>$_d</code>
|<code>$0d</code>
|[[Image:Force floor S.png]] [[Force floor]] (S)
|[[Image:Force floor S.png]] [[Force floor]] (S)
|<code>$1d</code>
|[[Image:Ice SW.png]] [[Ice corner]] (SW)
|[[Image:Ice SW.png]] [[Ice corner]] (SW)
|<code>$2d</code>
|[[Image:Gravel.png]] [[Gravel]]
|[[Image:Gravel.png]] [[Gravel]]
|[[Image:Swimming Chip W.png]] [[Swimming Chip]] (W) <ref name="invalid"/>
|<code>$3d</code>
|[[Image:Swimming Chip W.png]] <s>[[Swimming Chip]] (W)</s>
|<code>$4d</code>
|[[Image:Tank W.png]] [[Tank]] (W)
|[[Image:Tank W.png]] [[Tank]] (W)
|<code>$5d</code>
|[[Image:Blob.png]] [[Blob]] (W)
|[[Image:Blob.png]] [[Blob]] (W)
|<code>$6d</code>
|[[Image:Chip W.png]] [[Chip]] (W)
|[[Image:Chip W.png]] [[Chip]] (W)
|-
|-
!<code>$_e</code>
|<code>$0e</code>
|[[Image:Clone block N.png]] [[Clone block]] (N) <ref name="clone-block"/>
|[[Image:Clone block N.png]] [[Clone block]] (N)
|<code>$1e</code>
|[[Image:Blue wall.png]] Fake [[blue wall]]
|[[Image:Blue wall.png]] Fake [[blue wall]]
|<code>$2e</code>
|[[Image:Recessed wall.png]] [[Recessed wall]]
|[[Image:Recessed wall.png]] [[Recessed wall]]
|[[Image:Swimming Chip S.png]] [[Swimming Chip]] (S) <ref name="invalid"/>
|<code>$3e</code>
|[[Image:Swimming Chip S.png]] <s>[[Swimming Chip]] (S)</s>
|<code>$4e</code>
|[[Image:Tank S.png]] [[Tank]] (S)
|[[Image:Tank S.png]] [[Tank]] (S)
|<code>$5e</code>
|[[Image:Blob.png]] [[Blob]] (S)
|[[Image:Blob.png]] [[Blob]] (S)
|<code>$6e</code>
|[[Image:Chip S.png]] [[Chip]] (S)
|[[Image:Chip S.png]] [[Chip]] (S)
|-
|-
!<code>$_f</code>
|<code>$0f</code>
|[[Image:Clone block W.png]] [[Clone block]] (W) <ref name="clone-block"/>
|[[Image:Clone block W.png]] [[Clone block]] (W)
|<code>$1f</code>
|[[Image:Blue wall.png]] Real [[blue wall]]
|[[Image:Blue wall.png]] Real [[blue wall]]
|<code>$2f</code>
|[[Image:Hint.png]] [[Hint]]
|[[Image:Hint.png]] [[Hint]]
|[[Image:Swimming Chip E.png]] [[Swimming Chip]] (E) <ref name="invalid"/>
|<code>$3f</code>
|[[Image:Swimming Chip E.png]] <s>[[Swimming Chip]] (E)</s>
|<code>$4f</code>
|[[Image:Tank E.png]] [[Tank]] (E)
|[[Image:Tank E.png]] [[Tank]] (E)
|<code>$5f</code>
|[[Image:Blob.png]] [[Blob]] (E)
|[[Image:Blob.png]] [[Blob]] (E)
|<code>$6f</code>
|[[Image:Chip E.png]] [[Chip]] (E)
|[[Image:Chip E.png]] [[Chip]] (E)
|}
|}
<references />


=== Level metadata chunks ===
=== Level metadata chunks ===
Line 309: Line 409:
|$02
|$02
|?
|?
|Map title.  Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL).  Should generally be ASCII, though some programs interpret this as Latin-1 or Windows-1252.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|Map title.  Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL).  Should generally be ASCII, though Tile World appears to interpret this as Latin-1.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|}
|}


Line 403: Line 503:
|$02
|$02
|?
|?
|[[Hint]] text.  Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL).  Should generally be ASCII, though some programs interpret this as Latin-1 or Windows-1252.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|[[Hint]] text.  Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL).  Should generally be ASCII, though Tile World appears to interpret this as Latin-1.  <!-- XXX what does MSCC do with a long title or byte over 128? -->
|}
|}


Line 412: Line 512:
==== 10: Monster list ====
==== 10: Monster list ====


Contains zero or more of the following structure.  As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 127 moving monsters in a level.
Contains zero or more of the following structure.  As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 128 moving monsters in a level.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 420: Line 520:
|-
|-
|$00
|$00
|1
|2
|x-coordinate of monster
|x-coordinate of monster
|-
|-
|$02
|$02
|1
|2
|y-coordinate of monster
|y-coordinate of monster
|}
|}
Line 431: Line 531:


Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal.
Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal.
==== 9: Author ====
{| class="wikitable" border="1"
!Offset
!Bytes
!Content
|-
|$02
|?
|Author's name.  Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL).  Typically encoded as Windows-1252 or Latin-1.
|}
This chunk is not present in the original game, and was later created as a community extension to include author info without relying on other files. This chunk is ignored by MSCC and early Tile World versions.


== See also ==
== See also ==


* [[C2M]], the more flexible format used in [[Chip's Challenge 2]]
* [[C2M]], the more flexible format used in [[Chip's Challenge 2]]
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level)
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>]


== External Links ==
== External Links ==
* [http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format]
 
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level)
[http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format]
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>]


[[Category:Terminology]]
[[Category:Terminology]]
[[Category:File formats]]
[[Category:File formats]]
Please note that all contributions to Chip's Challenge Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Chip's Challenge Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)
Your changes will be visible immediately.
  • If you want to test editing, try the sandbox.
  • On talk pages, please sign your posts by typing four tildes (~~~~).