<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=DKRDS_Tile_Layout_%28File_Format%29</id>
	<title>DKRDS Tile Layout (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=DKRDS_Tile_Layout_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=DKRDS_Tile_Layout_(File_Format)&amp;action=history"/>
	<updated>2026-06-08T21:15:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=DKRDS_Tile_Layout_(File_Format)&amp;diff=664&amp;oldid=prev</id>
		<title>Atlas: Created page with &quot;&#039;&#039;&#039;DKRDS Tile Layout&#039;&#039;&#039; is a nameless file format used in &#039;&#039;[https://en.wikipedia.org/wiki/Diddy_Kong_Racing_DS Diddy Kong Racing DS]&#039;&#039; with the purpose of assembling a set of reusable 32x32-pixel tiles for screen backgrounds, such as minimaps. Each tile is composed of a 4x4 grid of 8x8 character tiles sourced from a DKRDS Texture Tileset file. At least two format variants exist, distinguished by their per-entry size. Other filetypes that are commonly associated with...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=DKRDS_Tile_Layout_(File_Format)&amp;diff=664&amp;oldid=prev"/>
		<updated>2026-05-26T22:01:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;DKRDS Tile Layout&amp;#039;&amp;#039;&amp;#039; is a nameless file format used in &amp;#039;&amp;#039;[https://en.wikipedia.org/wiki/Diddy_Kong_Racing_DS Diddy Kong Racing DS]&amp;#039;&amp;#039; with the purpose of assembling a set of reusable 32x32-pixel tiles for screen backgrounds, such as minimaps. Each tile is composed of a 4x4 grid of 8x8 character tiles sourced from a &lt;a href=&quot;/index.php/DKRDS_Texture_Tileset&quot; class=&quot;mw-redirect&quot; title=&quot;DKRDS Texture Tileset&quot;&gt;DKRDS Texture Tileset&lt;/a&gt; file. At least two format variants exist, distinguished by their per-entry size. Other filetypes that are commonly associated with...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;DKRDS Tile Layout&amp;#039;&amp;#039;&amp;#039; is a nameless file format used in &amp;#039;&amp;#039;[https://en.wikipedia.org/wiki/Diddy_Kong_Racing_DS Diddy Kong Racing DS]&amp;#039;&amp;#039; with the purpose of assembling a set of reusable 32x32-pixel tiles for screen backgrounds, such as minimaps. Each tile is composed of a 4x4 grid of 8x8 character tiles sourced from a [[DKRDS Texture Tileset]] file. At least two format variants exist, distinguished by their per-entry size. Other filetypes that are commonly associated with tile layouts, and necessary to create screen backgrounds, are [[DKRDS Tilemap]] and [[DKRDS Palette Bank]]. Its type identifier in [[assets.bin]] is &amp;#039;&amp;#039;&amp;#039;0x00&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
= File Format =&lt;br /&gt;
The file byte order is always little endian.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
All variants begin with a 4-byte header.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || &amp;#039;&amp;#039;&amp;#039;Number of tiles&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || colspan=2 {{unknown|End of header}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tile Entries ==&lt;br /&gt;
After the header comes the tile entries. The total file size is always &amp;lt;code&amp;gt;4 + &amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039; x &amp;#039;&amp;#039;size&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;, where &amp;#039;&amp;#039;size&amp;#039;&amp;#039; is 32 or 48 depending on the variant.&lt;br /&gt;
&lt;br /&gt;
=== Variant A ===&lt;br /&gt;
The first variant is used when the sub-tiles carry their own palette in each tilemap value (4bpp mode with per-tile palette selection). It contains a single section of 32-byte entries. Each entry describes one 32x32 tile as 16 tilemap references arranged in a 4-column x 4-row grid (row-major, left-to-right then top-to-bottom).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16[16][&amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;] || &amp;#039;&amp;#039;&amp;#039;Sub-tile entries&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sub-tile Entry ====&lt;br /&gt;
Each entry is composed of a reference ID and tile attributes. Only up to 1024 different sub-tile references can be defined. They use the following bit layout:&lt;br /&gt;
&lt;br /&gt;
 A  A  A  A  B  C  D  D  D  D  D  D  D  D  D  D&lt;br /&gt;
 0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bits !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-3 || &amp;#039;&amp;#039;&amp;#039;Palette ID&amp;#039;&amp;#039;&amp;#039;. Selects one of the 16 palettes from the [[DKRDS Palette Bank]] file.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;#039;&amp;#039;&amp;#039;Flip vertical&amp;#039;&amp;#039;&amp;#039;. If 1, it mirrors the 8x8 sub-tile on the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;#039;&amp;#039;&amp;#039;Flip horizontal&amp;#039;&amp;#039;&amp;#039;. If 1, it mirrors the 8x8 sub-tile on the X axis.&lt;br /&gt;
|-&lt;br /&gt;
| 6-15 || &amp;#039;&amp;#039;&amp;#039;Sub-tile ID&amp;#039;&amp;#039;&amp;#039;. This is the index into the [[DKRDS Texture Tileset]] file (0-1023).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Variant B ===&lt;br /&gt;
The second variant is used when palette and flip information is stored separately from the sub-tile references (4bpp or 8bpp mode). The file is divided into two back-to-back sections (32-byte and 16-byte each) rather than interleaved per-entry data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16[16][&amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;] || &amp;#039;&amp;#039;&amp;#039;Sub-tile entries&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039; * 32 || Byte[16][&amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;] || &amp;#039;&amp;#039;&amp;#039;Tile attributes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sub-tile Entry ====&lt;br /&gt;
Each entry contains a direct sub-tile reference. The value here is &amp;#039;&amp;#039;&amp;#039;only&amp;#039;&amp;#039;&amp;#039; a tile index, so up to 65536 different sub-tiles can be referenced in contrast of Variant A&amp;#039;s limit of 1024.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bits !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-15 ||  &amp;#039;&amp;#039;&amp;#039;Sub-tile ID&amp;#039;&amp;#039;&amp;#039;. This is the index into the [[DKRDS Texture Tileset]] file (0-65535).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Tile Attribute ====&lt;br /&gt;
Each byte corresponds to a sub-tile and encodes palette and flip data using the following bit layout:&lt;br /&gt;
&lt;br /&gt;
 A A B B B B C D&lt;br /&gt;
 0 1 2 3 4 5 6 7&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bits !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;. Changing these values seems to produce no visible difference in-game, but existing files still use different values for each sub-tile.}}&lt;br /&gt;
|-&lt;br /&gt;
| 2-5 || &amp;#039;&amp;#039;&amp;#039;Palette ID&amp;#039;&amp;#039;&amp;#039;.  Selects one of the 16 palettes from the [[DKRDS Palette Bank]] file.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;#039;&amp;#039;&amp;#039;Flip vertical&amp;#039;&amp;#039;&amp;#039;. If 1, it mirrors the 8x8 sub-tile on the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || &amp;#039;&amp;#039;&amp;#039;Flip horizontal&amp;#039;&amp;#039;&amp;#039;. If 1, it mirrors the 8x8 sub-tile on the X axis.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle DKRDS Tile Layout:&lt;br /&gt;
* (none)&lt;br /&gt;
&lt;br /&gt;
[[Category:Diddy Kong Racing DS File Formats]]&lt;/div&gt;</summary>
		<author><name>Atlas</name></author>
	</entry>
</feed>