<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ObsidianX</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ObsidianX"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/ObsidianX"/>
	<updated>2026-04-15T03:31:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15727</id>
		<title>BCFNT</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15727"/>
		<updated>2016-02-01T21:23:53Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=CTR Font Format=&lt;br /&gt;
[[.bcfnt]] files are bitmap fonts made for the 3ds. The system font uses this format too except the header is changed from CFNT to CFNU and all file offsets are changed to absolute in memory offsets.&lt;br /&gt;
&lt;br /&gt;
=== CFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (either CFNT or CFNU or FFNT)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Endianness (0xFEFF = little, 0xFFFE = big)&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Size&lt;br /&gt;
|- &lt;br /&gt;
|  0x08     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Version (observed to be 0x03000000)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x04&lt;br /&gt;
|  File size (the total)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Number of &amp;quot;blocks&amp;quot; to read&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|-&lt;br /&gt;
|  0x09&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C   &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x13&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TGLP Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CMAP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CMAP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code Begin&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code End&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Mapping Method (0 = Direct, 1 = Table, 2 = Scan)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Reserved?&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the mapping method the next bytes are read like so:&lt;br /&gt;
&lt;br /&gt;
Direct:&lt;br /&gt;
IndexOffset = read uint16&lt;br /&gt;
&lt;br /&gt;
Table:&lt;br /&gt;
IndexTable = read uint16 array (CodeEnd - CodeBegin + 1)&lt;br /&gt;
&lt;br /&gt;
Scan:&lt;br /&gt;
Number of Scan Entries = read uint16&lt;br /&gt;
for every scan entry: read uint16 &amp;amp; read uint16&lt;br /&gt;
&lt;br /&gt;
=== CWDH Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CWDH)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Start Index&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  End Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  3 * (EndIndex - StartIndex + 1)&lt;br /&gt;
|  Char Widths (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
[https://github.com/ObsidianX/3dstools] - BFFNT Extractor/Creator.  Creates PNG files from TGLP atlas data and a JSON manifest.&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15722</id>
		<title>BCFNT</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15722"/>
		<updated>2016-01-31T21:07:39Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: /* Version 4 (BFFNT) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=CTR Font Format=&lt;br /&gt;
[[.bcfnt]] files are bitmap fonts made for the 3ds. The system font uses this format too except the header is changed from CFNT to CFNU and all file offsets are changed to absolute in memory offsets.&lt;br /&gt;
&lt;br /&gt;
=== CFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (either CFNT or CFNU or FFNT)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Endianness (0xFEFF = little, 0xFFFE = big)&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Size&lt;br /&gt;
|- &lt;br /&gt;
|  0x08     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Version (observed to be 0x03000000)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x04&lt;br /&gt;
|  File size (the total)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Number of &amp;quot;blocks&amp;quot; to read&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|-&lt;br /&gt;
|  0x09&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C   &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x13&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TGLP Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CMAP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CMAP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code Begin&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code End&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Mapping Method (0 = Direct, 1 = Table, 2 = Scan)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Reserved?&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the mapping method the next bytes are read like so:&lt;br /&gt;
&lt;br /&gt;
Direct:&lt;br /&gt;
IndexOffset = read uint16&lt;br /&gt;
&lt;br /&gt;
Table:&lt;br /&gt;
IndexTable = read uint16 array (CodeEnd - CodeBegin + 1)&lt;br /&gt;
&lt;br /&gt;
Scan:&lt;br /&gt;
Number of Scan Entries = read uint16&lt;br /&gt;
for every scan entry: read uint16 &amp;amp; read uint16&lt;br /&gt;
&lt;br /&gt;
=== CWDH Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CWDH)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Start Index&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  End Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  3 * (EndIndex - StartIndex + 1)&lt;br /&gt;
|  Char Widths (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15703</id>
		<title>BCFNT</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15703"/>
		<updated>2016-01-31T09:53:00Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=CTR Font Format=&lt;br /&gt;
[[.bcfnt]] files are bitmap fonts made for the 3ds. The system font uses this format too except the header is changed from CFNT to CFNU and all file offsets are changed to absolute in memory offsets.&lt;br /&gt;
&lt;br /&gt;
=== CFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (either CFNT or CFNU or FFNT)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Endianness (0xFEFF = little, 0xFFFE = big)&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Size&lt;br /&gt;
|- &lt;br /&gt;
|  0x08     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Version (observed to be 0x03000000)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x04&lt;br /&gt;
|  File size (the total)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Number of &amp;quot;blocks&amp;quot; to read&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|-&lt;br /&gt;
|  0x09&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C   &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x13&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TGLP Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CMAP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CMAP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code Begin&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code End&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Mapping Method (0 = Direct, 1 = Table, 2 = Scan)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Reserved?&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the mapping method the next bytes are read like so:&lt;br /&gt;
&lt;br /&gt;
Direct:&lt;br /&gt;
IndexOffset = read uint16&lt;br /&gt;
&lt;br /&gt;
Table:&lt;br /&gt;
IndexTable = read uint16 array (CodeEnd - CodeBegin + 1)&lt;br /&gt;
&lt;br /&gt;
Scan:&lt;br /&gt;
Number of Scan Entries = read uint16&lt;br /&gt;
for every scan entry: read uint16 &amp;amp; read uint16&lt;br /&gt;
&lt;br /&gt;
=== CWDH Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CWDH)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Start Index&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  End Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  3 * (EndIndex - StartIndex + 1)&lt;br /&gt;
|  Char Widths (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15659</id>
		<title>BCFNT</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15659"/>
		<updated>2016-01-28T07:36:17Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=CTR Font Format=&lt;br /&gt;
[[.bcfnt]] files are bitmap fonts made for the 3ds. The system font uses this format too except the header is changed from CFNT to CFNU and all file offsets are changed to absolute in memory offsets.&lt;br /&gt;
&lt;br /&gt;
=== CFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (either CFNT or CFNU or FFNT)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Endianness (0xFEFF = little, 0xFFFE = big)&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Size&lt;br /&gt;
|- &lt;br /&gt;
|  0x08     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Version (observed to be 0x03000000)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x04&lt;br /&gt;
|  File size (the total)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Number of &amp;quot;blocks&amp;quot; to read&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|-&lt;br /&gt;
|  0x09&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C   &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x13&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TGLP Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet columns&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CMAP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CMAP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code Begin&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code End&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Mapping Method (0 = Direct, 1 = Table, 2 = Scan)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Reserved?&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the mapping method the next bytes are read like so:&lt;br /&gt;
&lt;br /&gt;
Direct:&lt;br /&gt;
IndexOffset = read uint16&lt;br /&gt;
&lt;br /&gt;
Table:&lt;br /&gt;
IndexTable = read uint16 array (CodeEnd - CodeBegin + 1)&lt;br /&gt;
&lt;br /&gt;
Scan:&lt;br /&gt;
Number of Scan Entries = read uint16&lt;br /&gt;
for every scan entry: read uint16 &amp;amp; read uint16&lt;br /&gt;
&lt;br /&gt;
=== CWDH Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CWDH)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Start Index&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  End Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  3 * (EndIndex - StartIndex + 1)&lt;br /&gt;
|  Char Widths (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Category:File_formats&amp;diff=15658</id>
		<title>Category:File formats</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Category:File_formats&amp;diff=15658"/>
		<updated>2016-01-28T05:43:16Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: /* RomFS Related File Formats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of known file formats used by the 3DS.&lt;br /&gt;
&lt;br /&gt;
== [[NCCH]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.[[NCCH#CXI|CXI]] - CTR Executable image - Are either packaged into a CCI/CSU for running off a cartridge, or packaged into a CIA for installing to the SDMC or NAND.&lt;br /&gt;
&lt;br /&gt;
.[[NCCH#CFA|CFA]] - CTR File Archive - Externalized Rom-FS. This is non-executable specialisation of the NCCH container format. Generally used in conjunction with an executable specialisation of the NCCH container format (CXI).&lt;br /&gt;
&lt;br /&gt;
.[[SD Filesystem#title|APP]] - The per-console encrypted form of a NCCH file, used with installed titles, like eShop and CDN downloads.&lt;br /&gt;
&lt;br /&gt;
.CAA - A CXI which uses a raw ELF for the [[ExeFS]] .code section. Also has no plain region.&lt;br /&gt;
&lt;br /&gt;
== [[NCSD]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.[[NCSD|CCI]] - CTR Cart image - Burned into a ROM (or loaded by official debugging hardware). These are also the actual format of ROM dumps, and the response of read requests between a 3DS and a cartridge. This is simply a NCCH container, with a maximum of 8 NCCHs.&lt;br /&gt;
&lt;br /&gt;
.[[NCSD|CSU]] - CTR System Update - Format varies slightly with revisions.&lt;br /&gt;
&lt;br /&gt;
== Descriptor File Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.BSF - Descriptive data used when outputting ICN/BNR files. The .XBSF format used by CiTRUS is based on the concept of .BSF.&lt;br /&gt;
&lt;br /&gt;
.RSF - Descriptive data used when outputting a CCI/CXI file. Specifies options such as: title, save type, and so on. &lt;br /&gt;
&lt;br /&gt;
.DESC - Descriptive data used when outputting a CCI/CXI file. Like the .RSF format, but more complex (more complex in the options which it can specify). The signed NCCH RSA-2048 key pair is taken from this file.&lt;br /&gt;
&lt;br /&gt;
== [[ExeFS]] Related File Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.AXF - Pre-assembled ARM code. Before being linked into the [[ExeFS]] &#039;.code&#039; format. These are ARM specific ELF files. The Plain Region found in the CXI is also obtain from this file.&lt;br /&gt;
&lt;br /&gt;
.BNR - Simply contains a .[[CBMD]] and a .[[BCWAV]]. The .[[CBMD]] has added padding, to make sure the .[[BCWAV]] is aligned to 0x10 bytes. It contains nothing else.(The .[[CBMD]] file&#039;s header is edited to reflect it&#039;s new size)&lt;br /&gt;
&lt;br /&gt;
.[[SMDH|ICN]] - Contains icons, names and flags for an application&lt;br /&gt;
&lt;br /&gt;
== [[RomFS]] Related File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[ARC]] - Archive. A container of files, all compressed with LZ-10.&lt;br /&gt;
&lt;br /&gt;
.[[ARC|BCMA]] - CTR Manual (an ARC file).&lt;br /&gt;
&lt;br /&gt;
.[[SARC]] - Simple(?) Archive. A container of uncompressed files.&lt;br /&gt;
&lt;br /&gt;
.[[BCFNT]] - CTR Font File (version 3).&lt;br /&gt;
&lt;br /&gt;
.[[BCFNT|BFFNT]] - CTR Font File (version 4).&lt;br /&gt;
&lt;br /&gt;
== [[Title Data Structure|Title Installation Related File Formats]] ==&lt;br /&gt;
&lt;br /&gt;
.[[CIA]] - CTR Importable Archive - This format allows the installation titles to the 3DS. CIA files can contain [[NCCH]] files for installation to either the [[SD Filesystem|SDMC]] or CTR NAND. CIA files can also contain .SRL files (format for DS(i) executable images) for installation to the TWL NAND of the 3DS. Anything distributed over Download Play (including card software) are created with this format as well.&lt;br /&gt;
&lt;br /&gt;
.[[TMD]] - Title Meta Data - The format is used with installed/installable titles. Notably they are found in .[[CIA]] files (plain text), on the [[SD Filesystem#title|SD card]] (encrypted), NAND (encrypted) and on Nintendo&#039;s CDN (plain text).&lt;br /&gt;
&lt;br /&gt;
.[[Title Data Structure|CMD]] - Content Meta Data - The format is used to index installed .app files for installed titles. It is encrypted with a console unique [[AES|keyslot]].&lt;br /&gt;
&lt;br /&gt;
.[[Title Data Structure|CTX]] - When beginning eShop app downloads, this file is created. Later this file is written with actual data. When the download is completed, the file is deleted from SD card.(This might then be moved to NAND) This is encrypted with a per-console key. It contains a signed cert followed by unknown data. It is only 1.50kbyte. Here is an example.[http://dl.dropbox.com/u/37418652/00000000.ctx]&lt;br /&gt;
&lt;br /&gt;
== Audio File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[BCWAV|(B)CWAV]] - CTR waveform file format&lt;br /&gt;
&lt;br /&gt;
.[[BCSTM|(B)CSTM]] - CTR stream file format&lt;br /&gt;
&lt;br /&gt;
.[[BCSAR|(B)CSAR]]- CTR adaptation of BRSAR.&lt;br /&gt;
&lt;br /&gt;
== Graphics File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[CBMD]] - CTR Basic Model Data - Archive file before being made into a CTR banner for games or other applications.&lt;br /&gt;
&lt;br /&gt;
.CTPK - CTR Texture PacKage&lt;br /&gt;
&lt;br /&gt;
.CMDL - CTR MoDeL data&lt;br /&gt;
&lt;br /&gt;
.CTEX - CTR TEXture data&lt;br /&gt;
&lt;br /&gt;
.CSKA / .CSKLA - CTR SKeLetal Animation data&lt;br /&gt;
&lt;br /&gt;
.CMATA - CTR MATerial Animation data&lt;br /&gt;
&lt;br /&gt;
.CMDLA - CTR MoDeL Animation data&lt;br /&gt;
&lt;br /&gt;
.CLGT - CTR LiGhT data&lt;br /&gt;
&lt;br /&gt;
.CPTL - CTR ParTicLe data&lt;br /&gt;
&lt;br /&gt;
.CLTS - CTR LookupableSetdata&lt;br /&gt;
&lt;br /&gt;
.CENV - CTR ENVironment data&lt;br /&gt;
&lt;br /&gt;
.CCAM - CTR CAMera data&lt;br /&gt;
&lt;br /&gt;
.CMAT - CTR MATerial&lt;br /&gt;
&lt;br /&gt;
== Other File Formats ==&lt;br /&gt;
&lt;br /&gt;
.NSA - Archive used by several of the communication protocols in the 3DS.&lt;br /&gt;
&lt;br /&gt;
.[[CRO0|CRO]] - This is a CTR &amp;quot;DLL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
.[[CRO0|CRS]] - This contains symbols for CRO &amp;quot;DLLs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
.[[CRR0|CRR]] - This contains data for verifying CRO files.&lt;br /&gt;
&lt;br /&gt;
.[[MPO]] - Multi-Picture Object Format - Document describing the file format used in mpo files: http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-007_E.pdf&lt;br /&gt;
&lt;br /&gt;
.CGRP - CTR GRouP - Used to package several formats like (CWAR, CWAV, CWSD, CBNK, CSEQ, ect...) sort of like the Wii&#039;s MRG format. (they aren&#039;t the same structures but both package together several formats)&lt;br /&gt;
&lt;br /&gt;
== Filesystem ==&lt;br /&gt;
&lt;br /&gt;
The 3DS filesystem requires absolute paths. It can handle either short (8.3) and long (255 char maximum) file names.&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=SARC&amp;diff=15657</id>
		<title>SARC</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=SARC&amp;diff=15657"/>
		<updated>2016-01-28T05:42:07Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: SARC file format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=SARC File Format=&lt;br /&gt;
.sarc files are similar to the [[ARC]] format with a slightly different structure.&lt;br /&gt;
&lt;br /&gt;
== File Format ==&lt;br /&gt;
&lt;br /&gt;
=== SARC Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Magic Bytes &amp;quot;SARC&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Length&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Byte-order marker (0xFFFE = big, 0xFEFF = little)&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x04&lt;br /&gt;
|  File Length&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Data Offset (absolute)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Unknown (always 0x00000100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SFAT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Magic bytes &amp;quot;SFAT&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Length&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Node Count&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Filename Hash Multiplier (usually 0x65)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SFAT Node ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Name Hash&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  SFNT Filename Offset (relative to SFNT data section)&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x04&lt;br /&gt;
|  File Data Start (relative to SARC data start)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  File Data End (relative to SARC data end)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Node hashing function ====&lt;br /&gt;
&lt;br /&gt;
The node hash is calculated via:&lt;br /&gt;
&lt;br /&gt;
Python:&lt;br /&gt;
&lt;br /&gt;
 def calc_hash(name, hash_multiplier):&lt;br /&gt;
     result = 0&lt;br /&gt;
     &lt;br /&gt;
     for c in name:&lt;br /&gt;
         result = ord(c) + (result * hash_multiplier)&lt;br /&gt;
         # ensure the result is a 32-bit value&lt;br /&gt;
         result &amp;amp;= 0xFFFFFFFF&lt;br /&gt;
     &lt;br /&gt;
     return result&lt;br /&gt;
&lt;br /&gt;
C:&lt;br /&gt;
&lt;br /&gt;
 uint32_t calc_hash(char *name, int hash_multiplier) {&lt;br /&gt;
     uint32_t result = 0;&lt;br /&gt;
     &lt;br /&gt;
     for(int i = 0; i &amp;lt; strlen(name); i++) {&lt;br /&gt;
         result = name[i] + (result * hash_multiplier)&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     return result;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== SFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Magic bytes &amp;quot;SFNT&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Length&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Unknown (padding?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SFNT Data ===&lt;br /&gt;
&lt;br /&gt;
SFNT data immediately follows the SFNT header and consists of NULL-terminated ASCII strings.&lt;br /&gt;
&lt;br /&gt;
=== File Data ===&lt;br /&gt;
&lt;br /&gt;
File data begins after SFNT with 0x100 (256) byte alignment with all subsequent files aligned to 0x80 bytes.&lt;br /&gt;
&lt;br /&gt;
== File Sort Order ==&lt;br /&gt;
&lt;br /&gt;
Files are sorted by their hash in the SFAT table.  Games seem to require this sorting as any other sort order prevents them from booting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ObsidianX/3dstools] - SARC Extractor/Creator with TAR-like command line flags.  Can decompress a .zlib SARC file (4-byte size header + ZLIB data).&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15656</id>
		<title>BCFNT</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15656"/>
		<updated>2016-01-28T04:45:33Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: Add BFFNT info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=CTR Font Format=&lt;br /&gt;
[[.bcfnt]] files are bitmap fonts made for the 3ds. The system font uses this format too except the header is changed from CFNT to CFNU and all file offsets are changed to absolute in memory offsets.&lt;br /&gt;
&lt;br /&gt;
=== CFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (either CFNT or CFNU or FFNT)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Endianness (0xFEFF = little, 0xFFFE = big)&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Size&lt;br /&gt;
|- &lt;br /&gt;
|  0x08     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Version (observed to be 0x03000000)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x04&lt;br /&gt;
|  File size (the total)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Number of &amp;quot;blocks&amp;quot; to read&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|-&lt;br /&gt;
|  0x09&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C   &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x13&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C&lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TGLP Header ===&lt;br /&gt;
&lt;br /&gt;
==== Version 3 (BCFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet lines&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Version 4 (BFFNT) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet lines&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CMAP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CMAP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code Begin&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code End&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Mapping Method (0 = Direct, 1 = Table, 2 = Scan)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Reserved?&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the mapping method the next bytes are read like so:&lt;br /&gt;
&lt;br /&gt;
Direct:&lt;br /&gt;
IndexOffset = read uint16&lt;br /&gt;
&lt;br /&gt;
Table:&lt;br /&gt;
IndexTable = read uint16 array (CodeEnd - CodeBegin + 1)&lt;br /&gt;
&lt;br /&gt;
Scan:&lt;br /&gt;
Number of Scan Entries = read uint16&lt;br /&gt;
for every scan entry: read uint16 &amp;amp; read uint16&lt;br /&gt;
&lt;br /&gt;
=== CWDH Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CWDH)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Start Index&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  End Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  3 * (EndIndex - StartIndex + 1)&lt;br /&gt;
|  Char Widths (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Category:File_formats&amp;diff=15655</id>
		<title>Category:File formats</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Category:File_formats&amp;diff=15655"/>
		<updated>2016-01-28T04:32:23Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: Redirect BFFNT to BCFNT since there are only a few minor changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of known file formats used by the 3DS.&lt;br /&gt;
&lt;br /&gt;
== [[NCCH]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.[[NCCH#CXI|CXI]] - CTR Executable image - Are either packaged into a CCI/CSU for running off a cartridge, or packaged into a CIA for installing to the SDMC or NAND.&lt;br /&gt;
&lt;br /&gt;
.[[NCCH#CFA|CFA]] - CTR File Archive - Externalized Rom-FS. This is non-executable specialisation of the NCCH container format. Generally used in conjunction with an executable specialisation of the NCCH container format (CXI).&lt;br /&gt;
&lt;br /&gt;
.[[SD Filesystem#title|APP]] - The per-console encrypted form of a NCCH file, used with installed titles, like eShop and CDN downloads.&lt;br /&gt;
&lt;br /&gt;
.CAA - A CXI which uses a raw ELF for the [[ExeFS]] .code section. Also has no plain region.&lt;br /&gt;
&lt;br /&gt;
== [[NCSD]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.[[NCSD|CCI]] - CTR Cart image - Burned into a ROM (or loaded by official debugging hardware). These are also the actual format of ROM dumps, and the response of read requests between a 3DS and a cartridge. This is simply a NCCH container, with a maximum of 8 NCCHs.&lt;br /&gt;
&lt;br /&gt;
.[[NCSD|CSU]] - CTR System Update - Format varies slightly with revisions.&lt;br /&gt;
&lt;br /&gt;
== Descriptor File Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.BSF - Descriptive data used when outputting ICN/BNR files. The .XBSF format used by CiTRUS is based on the concept of .BSF.&lt;br /&gt;
&lt;br /&gt;
.RSF - Descriptive data used when outputting a CCI/CXI file. Specifies options such as: title, save type, and so on. &lt;br /&gt;
&lt;br /&gt;
.DESC - Descriptive data used when outputting a CCI/CXI file. Like the .RSF format, but more complex (more complex in the options which it can specify). The signed NCCH RSA-2048 key pair is taken from this file.&lt;br /&gt;
&lt;br /&gt;
== [[ExeFS]] Related File Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.AXF - Pre-assembled ARM code. Before being linked into the [[ExeFS]] &#039;.code&#039; format. These are ARM specific ELF files. The Plain Region found in the CXI is also obtain from this file.&lt;br /&gt;
&lt;br /&gt;
.BNR - Simply contains a .[[CBMD]] and a .[[BCWAV]]. The .[[CBMD]] has added padding, to make sure the .[[BCWAV]] is aligned to 0x10 bytes. It contains nothing else.(The .[[CBMD]] file&#039;s header is edited to reflect it&#039;s new size)&lt;br /&gt;
&lt;br /&gt;
.[[SMDH|ICN]] - Contains icons, names and flags for an application&lt;br /&gt;
&lt;br /&gt;
== [[RomFS]] Related File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[ARC]] - Archive. A container of files, all compressed with LZ-10.&lt;br /&gt;
&lt;br /&gt;
.[[ARC|BCMA]] - CTR Manual (an ARC file).&lt;br /&gt;
&lt;br /&gt;
.[[BCFNT]] - CTR Font File (version 3).&lt;br /&gt;
&lt;br /&gt;
.[[BCFNT|BFFNT]] - CTR Font File (version 4).&lt;br /&gt;
&lt;br /&gt;
== [[Title Data Structure|Title Installation Related File Formats]] ==&lt;br /&gt;
&lt;br /&gt;
.[[CIA]] - CTR Importable Archive - This format allows the installation titles to the 3DS. CIA files can contain [[NCCH]] files for installation to either the [[SD Filesystem|SDMC]] or CTR NAND. CIA files can also contain .SRL files (format for DS(i) executable images) for installation to the TWL NAND of the 3DS. Anything distributed over Download Play (including card software) are created with this format as well.&lt;br /&gt;
&lt;br /&gt;
.[[TMD]] - Title Meta Data - The format is used with installed/installable titles. Notably they are found in .[[CIA]] files (plain text), on the [[SD Filesystem#title|SD card]] (encrypted), NAND (encrypted) and on Nintendo&#039;s CDN (plain text).&lt;br /&gt;
&lt;br /&gt;
.[[Title Data Structure|CMD]] - Content Meta Data - The format is used to index installed .app files for installed titles. It is encrypted with a console unique [[AES|keyslot]].&lt;br /&gt;
&lt;br /&gt;
.[[Title Data Structure|CTX]] - When beginning eShop app downloads, this file is created. Later this file is written with actual data. When the download is completed, the file is deleted from SD card.(This might then be moved to NAND) This is encrypted with a per-console key. It contains a signed cert followed by unknown data. It is only 1.50kbyte. Here is an example.[http://dl.dropbox.com/u/37418652/00000000.ctx]&lt;br /&gt;
&lt;br /&gt;
== Audio File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[BCWAV|(B)CWAV]] - CTR waveform file format&lt;br /&gt;
&lt;br /&gt;
.[[BCSTM|(B)CSTM]] - CTR stream file format&lt;br /&gt;
&lt;br /&gt;
.[[BCSAR|(B)CSAR]]- CTR adaptation of BRSAR.&lt;br /&gt;
&lt;br /&gt;
== Graphics File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[CBMD]] - CTR Basic Model Data - Archive file before being made into a CTR banner for games or other applications.&lt;br /&gt;
&lt;br /&gt;
.CTPK - CTR Texture PacKage&lt;br /&gt;
&lt;br /&gt;
.CMDL - CTR MoDeL data&lt;br /&gt;
&lt;br /&gt;
.CTEX - CTR TEXture data&lt;br /&gt;
&lt;br /&gt;
.CSKA / .CSKLA - CTR SKeLetal Animation data&lt;br /&gt;
&lt;br /&gt;
.CMATA - CTR MATerial Animation data&lt;br /&gt;
&lt;br /&gt;
.CMDLA - CTR MoDeL Animation data&lt;br /&gt;
&lt;br /&gt;
.CLGT - CTR LiGhT data&lt;br /&gt;
&lt;br /&gt;
.CPTL - CTR ParTicLe data&lt;br /&gt;
&lt;br /&gt;
.CLTS - CTR LookupableSetdata&lt;br /&gt;
&lt;br /&gt;
.CENV - CTR ENVironment data&lt;br /&gt;
&lt;br /&gt;
.CCAM - CTR CAMera data&lt;br /&gt;
&lt;br /&gt;
.CMAT - CTR MATerial&lt;br /&gt;
&lt;br /&gt;
== Other File Formats ==&lt;br /&gt;
&lt;br /&gt;
.NSA - Archive used by several of the communication protocols in the 3DS.&lt;br /&gt;
&lt;br /&gt;
.[[CRO0|CRO]] - This is a CTR &amp;quot;DLL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
.[[CRO0|CRS]] - This contains symbols for CRO &amp;quot;DLLs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
.[[CRR0|CRR]] - This contains data for verifying CRO files.&lt;br /&gt;
&lt;br /&gt;
.[[MPO]] - Multi-Picture Object Format - Document describing the file format used in mpo files: http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-007_E.pdf&lt;br /&gt;
&lt;br /&gt;
.CGRP - CTR GRouP - Used to package several formats like (CWAR, CWAV, CWSD, CBNK, CSEQ, ect...) sort of like the Wii&#039;s MRG format. (they aren&#039;t the same structures but both package together several formats)&lt;br /&gt;
&lt;br /&gt;
== Filesystem ==&lt;br /&gt;
&lt;br /&gt;
The 3DS filesystem requires absolute paths. It can handle either short (8.3) and long (255 char maximum) file names.&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15654</id>
		<title>BCFNT</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BCFNT&amp;diff=15654"/>
		<updated>2016-01-28T04:29:13Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: Add File Formats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
=CTR Font Format=&lt;br /&gt;
[[.bcfnt]] files are bitmap fonts made for the 3ds. The system font uses this format too except the header is changed from CFNT to CFNU and all file offsets are changed to absolute in memory offsets.&lt;br /&gt;
&lt;br /&gt;
=== CFNT Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (either CFNT or CFNU)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Endianness (0xFEFF = little, 0xFFFE = big)&lt;br /&gt;
|-&lt;br /&gt;
|  0x06&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Header Size&lt;br /&gt;
|- &lt;br /&gt;
|  0x08     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Version (observed to be 0x03000000)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x04&lt;br /&gt;
|  File size (the total)&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Number of &amp;quot;blocks&amp;quot; to read&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TGLP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (TGLP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Width&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Cell Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Baseline Position&lt;br /&gt;
|-&lt;br /&gt;
|  0x0B     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Max Character Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheets&lt;br /&gt;
|-&lt;br /&gt;
|  0x12     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Image Format 0-13: (RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, HILO8, L8, A8, LA4, L4, A4, ETC1, ETC1A4)&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet rows&lt;br /&gt;
|-&lt;br /&gt;
|  0x16     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Number of Sheet lines&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Sheet Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Sheet Data Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FINF Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (FINF)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x01&lt;br /&gt;
|  Font Type&lt;br /&gt;
|- &lt;br /&gt;
|  0x09     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Line Feed&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Alter Char Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x03&lt;br /&gt;
|  Default Width (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Encoding&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  TGLP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x14     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x18     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  CMAP Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Height&lt;br /&gt;
|-&lt;br /&gt;
|  0x1D     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Width&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Ascent&lt;br /&gt;
|-&lt;br /&gt;
|  0x1F     &lt;br /&gt;
|  0x01&lt;br /&gt;
|  Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CMAP Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CMAP)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code Begin&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Code End&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C      &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Mapping Method (0 = Direct, 1 = Table, 2 = Scan)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0E     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  Reserved?&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CMAP Offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the mapping method the next bytes are read like so:&lt;br /&gt;
&lt;br /&gt;
Direct:&lt;br /&gt;
IndexOffset = read uint16&lt;br /&gt;
&lt;br /&gt;
Table:&lt;br /&gt;
IndexTable = read uint16 array (CodeEnd - CodeBegin + 1)&lt;br /&gt;
&lt;br /&gt;
Scan:&lt;br /&gt;
Number of Scan Entries = read uint16&lt;br /&gt;
for every scan entry: read uint16 &amp;amp; read uint16&lt;br /&gt;
&lt;br /&gt;
=== CWDH Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x04 &lt;br /&gt;
|  Magic Header (CWDH)&lt;br /&gt;
|-&lt;br /&gt;
|  0x04&lt;br /&gt;
|  0x04&lt;br /&gt;
|  Section Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x08&lt;br /&gt;
|  0x02&lt;br /&gt;
|  Start Index&lt;br /&gt;
|- &lt;br /&gt;
|  0x0A     &lt;br /&gt;
|  0x02&lt;br /&gt;
|  End Index&lt;br /&gt;
|-&lt;br /&gt;
|  0x0C     &lt;br /&gt;
|  0x04&lt;br /&gt;
|  Next CWDH Offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x10     &lt;br /&gt;
|  3 * (EndIndex - StartIndex + 1)&lt;br /&gt;
|  Char Widths (3 bytes: Left, Glyph Width, Char Width)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Category:File_formats&amp;diff=15653</id>
		<title>Category:File formats</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Category:File_formats&amp;diff=15653"/>
		<updated>2016-01-28T04:28:22Z</updated>

		<summary type="html">&lt;p&gt;ObsidianX: /* RomFS Related File Formats */ Add font formats&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of known file formats used by the 3DS.&lt;br /&gt;
&lt;br /&gt;
== [[NCCH]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.[[NCCH#CXI|CXI]] - CTR Executable image - Are either packaged into a CCI/CSU for running off a cartridge, or packaged into a CIA for installing to the SDMC or NAND.&lt;br /&gt;
&lt;br /&gt;
.[[NCCH#CFA|CFA]] - CTR File Archive - Externalized Rom-FS. This is non-executable specialisation of the NCCH container format. Generally used in conjunction with an executable specialisation of the NCCH container format (CXI).&lt;br /&gt;
&lt;br /&gt;
.[[SD Filesystem#title|APP]] - The per-console encrypted form of a NCCH file, used with installed titles, like eShop and CDN downloads.&lt;br /&gt;
&lt;br /&gt;
.CAA - A CXI which uses a raw ELF for the [[ExeFS]] .code section. Also has no plain region.&lt;br /&gt;
&lt;br /&gt;
== [[NCSD]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.[[NCSD|CCI]] - CTR Cart image - Burned into a ROM (or loaded by official debugging hardware). These are also the actual format of ROM dumps, and the response of read requests between a 3DS and a cartridge. This is simply a NCCH container, with a maximum of 8 NCCHs.&lt;br /&gt;
&lt;br /&gt;
.[[NCSD|CSU]] - CTR System Update - Format varies slightly with revisions.&lt;br /&gt;
&lt;br /&gt;
== Descriptor File Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.BSF - Descriptive data used when outputting ICN/BNR files. The .XBSF format used by CiTRUS is based on the concept of .BSF.&lt;br /&gt;
&lt;br /&gt;
.RSF - Descriptive data used when outputting a CCI/CXI file. Specifies options such as: title, save type, and so on. &lt;br /&gt;
&lt;br /&gt;
.DESC - Descriptive data used when outputting a CCI/CXI file. Like the .RSF format, but more complex (more complex in the options which it can specify). The signed NCCH RSA-2048 key pair is taken from this file.&lt;br /&gt;
&lt;br /&gt;
== [[ExeFS]] Related File Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.AXF - Pre-assembled ARM code. Before being linked into the [[ExeFS]] &#039;.code&#039; format. These are ARM specific ELF files. The Plain Region found in the CXI is also obtain from this file.&lt;br /&gt;
&lt;br /&gt;
.BNR - Simply contains a .[[CBMD]] and a .[[BCWAV]]. The .[[CBMD]] has added padding, to make sure the .[[BCWAV]] is aligned to 0x10 bytes. It contains nothing else.(The .[[CBMD]] file&#039;s header is edited to reflect it&#039;s new size)&lt;br /&gt;
&lt;br /&gt;
.[[SMDH|ICN]] - Contains icons, names and flags for an application&lt;br /&gt;
&lt;br /&gt;
== [[RomFS]] Related File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[ARC]] - Archive. A container of files, all compressed with LZ-10.&lt;br /&gt;
&lt;br /&gt;
.[[ARC|BCMA]] - CTR Manual (an ARC file).&lt;br /&gt;
&lt;br /&gt;
.[[BCFNT]] - CTR Font File (version 3)&lt;br /&gt;
&lt;br /&gt;
.[[BFFNT]] - CTR Font File (version 4)&lt;br /&gt;
&lt;br /&gt;
== [[Title Data Structure|Title Installation Related File Formats]] ==&lt;br /&gt;
&lt;br /&gt;
.[[CIA]] - CTR Importable Archive - This format allows the installation titles to the 3DS. CIA files can contain [[NCCH]] files for installation to either the [[SD Filesystem|SDMC]] or CTR NAND. CIA files can also contain .SRL files (format for DS(i) executable images) for installation to the TWL NAND of the 3DS. Anything distributed over Download Play (including card software) are created with this format as well.&lt;br /&gt;
&lt;br /&gt;
.[[TMD]] - Title Meta Data - The format is used with installed/installable titles. Notably they are found in .[[CIA]] files (plain text), on the [[SD Filesystem#title|SD card]] (encrypted), NAND (encrypted) and on Nintendo&#039;s CDN (plain text).&lt;br /&gt;
&lt;br /&gt;
.[[Title Data Structure|CMD]] - Content Meta Data - The format is used to index installed .app files for installed titles. It is encrypted with a console unique [[AES|keyslot]].&lt;br /&gt;
&lt;br /&gt;
.[[Title Data Structure|CTX]] - When beginning eShop app downloads, this file is created. Later this file is written with actual data. When the download is completed, the file is deleted from SD card.(This might then be moved to NAND) This is encrypted with a per-console key. It contains a signed cert followed by unknown data. It is only 1.50kbyte. Here is an example.[http://dl.dropbox.com/u/37418652/00000000.ctx]&lt;br /&gt;
&lt;br /&gt;
== Audio File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[BCWAV|(B)CWAV]] - CTR waveform file format&lt;br /&gt;
&lt;br /&gt;
.[[BCSTM|(B)CSTM]] - CTR stream file format&lt;br /&gt;
&lt;br /&gt;
.[[BCSAR|(B)CSAR]]- CTR adaptation of BRSAR.&lt;br /&gt;
&lt;br /&gt;
== Graphics File Formats ==&lt;br /&gt;
&lt;br /&gt;
.[[CBMD]] - CTR Basic Model Data - Archive file before being made into a CTR banner for games or other applications.&lt;br /&gt;
&lt;br /&gt;
.CTPK - CTR Texture PacKage&lt;br /&gt;
&lt;br /&gt;
.CMDL - CTR MoDeL data&lt;br /&gt;
&lt;br /&gt;
.CTEX - CTR TEXture data&lt;br /&gt;
&lt;br /&gt;
.CSKA / .CSKLA - CTR SKeLetal Animation data&lt;br /&gt;
&lt;br /&gt;
.CMATA - CTR MATerial Animation data&lt;br /&gt;
&lt;br /&gt;
.CMDLA - CTR MoDeL Animation data&lt;br /&gt;
&lt;br /&gt;
.CLGT - CTR LiGhT data&lt;br /&gt;
&lt;br /&gt;
.CPTL - CTR ParTicLe data&lt;br /&gt;
&lt;br /&gt;
.CLTS - CTR LookupableSetdata&lt;br /&gt;
&lt;br /&gt;
.CENV - CTR ENVironment data&lt;br /&gt;
&lt;br /&gt;
.CCAM - CTR CAMera data&lt;br /&gt;
&lt;br /&gt;
.CMAT - CTR MATerial&lt;br /&gt;
&lt;br /&gt;
== Other File Formats ==&lt;br /&gt;
&lt;br /&gt;
.NSA - Archive used by several of the communication protocols in the 3DS.&lt;br /&gt;
&lt;br /&gt;
.[[CRO0|CRO]] - This is a CTR &amp;quot;DLL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
.[[CRO0|CRS]] - This contains symbols for CRO &amp;quot;DLLs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
.[[CRR0|CRR]] - This contains data for verifying CRO files.&lt;br /&gt;
&lt;br /&gt;
.[[MPO]] - Multi-Picture Object Format - Document describing the file format used in mpo files: http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-007_E.pdf&lt;br /&gt;
&lt;br /&gt;
.CGRP - CTR GRouP - Used to package several formats like (CWAR, CWAV, CWSD, CBNK, CSEQ, ect...) sort of like the Wii&#039;s MRG format. (they aren&#039;t the same structures but both package together several formats)&lt;br /&gt;
&lt;br /&gt;
== Filesystem ==&lt;br /&gt;
&lt;br /&gt;
The 3DS filesystem requires absolute paths. It can handle either short (8.3) and long (255 char maximum) file names.&lt;/div&gt;</summary>
		<author><name>ObsidianX</name></author>
	</entry>
</feed>