<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hedgedocs.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arg%21%21</id>
	<title>HedgeDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://hedgedocs.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arg%21%21"/>
	<link rel="alternate" type="text/html" href="https://hedgedocs.com/wiki/Special:Contributions/Arg!!"/>
	<updated>2026-11-11T13:21:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://hedgedocs.com/index.php?title=Games&amp;diff=1603</id>
		<title>Games</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=Games&amp;diff=1603"/>
		<updated>2026-11-05T10:38:54Z</updated>

		<summary type="html">&lt;p&gt;Arg!!: Added Version number for Golden Axe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section lists games by their engine, alongside their internal name. In this page, you can access each game&#039;s own wiki page, containing game-specific guides, tools, and documentation.&lt;br /&gt;
&lt;br /&gt;
This section may also list non-Sonic games, but there is no intent on documenting these games on this wiki, as they&#039;re listed for research purposes only.&lt;br /&gt;
&lt;br /&gt;
== Hedgehog Engine ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Game Name&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Year&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Unleashed|Sonic Unleashed (Sonic World Adventure)]]&lt;br /&gt;
|SWA&lt;br /&gt;
|2008&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Colors]]&lt;br /&gt;
|sonic2010&lt;br /&gt;
|2010&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Generations]]&lt;br /&gt;
|BlueBlur&lt;br /&gt;
|2011&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Lost World]]&lt;br /&gt;
|sonic2013&lt;br /&gt;
|2013&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Colors: Ultimate*&lt;br /&gt;
|Rainbow&lt;br /&gt;
|2021&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Generations (SONIC X SHADOW GENERATIONS)&lt;br /&gt;
|miller_g&lt;br /&gt;
|2024&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&amp;lt;small&amp;gt;* Sonic Colors: Ultimate also makes use of a forked version of Godot 3.&amp;lt;/small&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Hedgehog Engine 2 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Game Name&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Year&lt;br /&gt;
|-&lt;br /&gt;
|[[Mario &amp;amp; Sonic at the Rio 2016 Olympic Games]]&lt;br /&gt;
|unison&lt;br /&gt;
|2016&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Forces]]&lt;br /&gt;
|wars&lt;br /&gt;
|2017&lt;br /&gt;
|-&lt;br /&gt;
|Olympic Games Tokyo 2020 - The Official Video Game&lt;br /&gt;
|musashi&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |2019&lt;br /&gt;
|-&lt;br /&gt;
|Mario &amp;amp; Sonic at the Tokyo 2020 Olympic Games&lt;br /&gt;
|rings&lt;br /&gt;
|-&lt;br /&gt;
|(New) Sakura Wars&lt;br /&gt;
|arukas&lt;br /&gt;
|-&lt;br /&gt;
|Puyo Puyo Tetris 2&lt;br /&gt;
|tenpex&lt;br /&gt;
|2020&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Origins]]*&lt;br /&gt;
|hite&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |2022&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Frontiers]]&lt;br /&gt;
|rangers&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Frontiers: Digital Art Book with Mini Digital Soundtrack&lt;br /&gt;
|rangers_artbook&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic Origins|Sonic Origins Plus]]*&lt;br /&gt;
|hiteplus&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |2023&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Superstars - Digital Artbook and mini-OST&lt;br /&gt;
|orion_artbook&lt;br /&gt;
|-&lt;br /&gt;
|[[Shadow Generations]] / SONIC X SHADOW GENERATIONS&lt;br /&gt;
|miller&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |2024&lt;br /&gt;
|-&lt;br /&gt;
|SONIC X SHADOW GENERATIONS: Art Book with Mini Soundtrack&lt;br /&gt;
|miller_das&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&amp;lt;small&amp;gt;* Sonic Origins (Plus) also makes use of Retro Engine v5U.&amp;lt;/small&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acroarts ==&lt;br /&gt;
&#039;&#039;&#039;Acroarts&#039;&#039;&#039; is a proprietary graphics middleware developed by SEGA Games before ownership was transferred to CRI in 2016.&amp;lt;ref&amp;gt;SEGA Press Release (June 22, 2016). [https://web.archive.org/web/20260114134140/https://www.sega.co.jp/release/sega-games/images/160622_01.pdf SEGA Games and CRI Agree to Transfer the &amp;quot;Acroarts&amp;quot; Graphics Middleware Business].&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Game Name&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Version&lt;br /&gt;
!Year&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic the Hedgehog (2006)]]&lt;br /&gt;
|Marathon&lt;br /&gt;
|Ver20060209 R1&lt;br /&gt;
|2006&lt;br /&gt;
|-&lt;br /&gt;
|Rambo&lt;br /&gt;
|Clarith&lt;br /&gt;
|Ver20050809 R2&lt;br /&gt;
|2008&lt;br /&gt;
|-&lt;br /&gt;
|Mushiking Battle Gacchu Guts!!&lt;br /&gt;
|mk4exp&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |Ver20100108 R1&lt;br /&gt;
|2010&lt;br /&gt;
|-&lt;br /&gt;
|Transformers: Human Alliance&lt;br /&gt;
|TF_Gun&lt;br /&gt;
|2013&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NN ==&lt;br /&gt;
&#039;&#039;&#039;NN&#039;&#039;&#039; is a proprietary graphics library developed by SEGA Creative Center&#039;s Graphics Section.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Game Name&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Version&lt;br /&gt;
!Year&lt;br /&gt;
|-&lt;br /&gt;
|Sega Ages 2500 Series Vol. 5: Golden Axe&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;&amp;gt;Argx2121 (2020-2025). [https://github.com/Argx2121/Sega_NN_tools/blob/master/io/nn_import_data.py Sega NN Tools import data].&amp;lt;/ref&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.04.03 for PlayStation2&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |2003&lt;br /&gt;
|-&lt;br /&gt;
|Dabi Tsuku 3 - Derby-ba o Tsukurou!&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.07.02 for GAMECUBE&amp;lt;br&amp;gt;1.07.04l for PlayStation2&lt;br /&gt;
|-&lt;br /&gt;
|Sega Superstars&lt;br /&gt;
|&lt;br /&gt;
|1.13.00 for PlayStation2&lt;br /&gt;
|2004&lt;br /&gt;
|-&lt;br /&gt;
|The House of the Dead 4&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.03.03 for Lindbergh&lt;br /&gt;
|2005&lt;br /&gt;
|-&lt;br /&gt;
|Phantasy Star Universe&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
| rowspan=&amp;quot;5&amp;quot; |2006&lt;br /&gt;
|-&lt;br /&gt;
|[[Sonic the Hedgehog (2006)]]&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|Marathon&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Riders&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|SonicR&lt;br /&gt;
|1.18.43 for PlayStation2&amp;lt;br&amp;gt;1.18.43 for DirectX G1.1&amp;lt;br&amp;gt;1.18.52 for Xbox&lt;br /&gt;
|-&lt;br /&gt;
|Bleach: Shattered Blade&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|nigo&lt;br /&gt;
|1.19.095 for GAMECUBE&lt;br /&gt;
|-&lt;br /&gt;
|Super Monkey Ball: Banana Blitz&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.19.09 for GAMECUBE&lt;br /&gt;
|-&lt;br /&gt;
|Sonic and the Secret Rings&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|SonicWildFire&lt;br /&gt;
|1.19.095 for GAMECUBE&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |2007&lt;br /&gt;
|-&lt;br /&gt;
|Too Spicy&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.04.03 for LINDBERGH&lt;br /&gt;
|-&lt;br /&gt;
|Ghost Squad&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.20.02 for GAMECUBE&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Riders: Zero Gravity&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|SR2&lt;br /&gt;
|1.20.04 for GAMECUBE&amp;lt;br&amp;gt;1.18.56 for PlayStation2&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |2008&lt;br /&gt;
|-&lt;br /&gt;
|Rambo&lt;br /&gt;
|Clarith&lt;br /&gt;
|1.04.04 for LINDBERGH&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Unleashed (Sonic World Adventure) (Wii/PS2)&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.20.14 for GAMECUBE&amp;lt;br&amp;gt;1.18.56 for PlayStation2&lt;br /&gt;
|-&lt;br /&gt;
|Sonic and the Black Knight&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.20.20 for Wii&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |2009&lt;br /&gt;
|-&lt;br /&gt;
|Loving Deads: The House of the Dead EX&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|Super Monkey Ball: Step &amp;amp; Roll&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.20.20 for Wii&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; |2010&lt;br /&gt;
|-&lt;br /&gt;
|Mushiking Battle Gacchu Guts!!&lt;br /&gt;
|mk4exp&lt;br /&gt;
|1.01.06 for DirectX G2.0&lt;br /&gt;
|-&lt;br /&gt;
|K-On! After School Live!!&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|Sonic the Hedgehog 4: Episode I&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|hog&lt;br /&gt;
|1.01.05 for DirectX G2.0&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Free Riders&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|SRN&lt;br /&gt;
|1.01.06 for DirectX G2.0 on XBOX360&lt;br /&gt;
|-&lt;br /&gt;
|Sega Golden Gun&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.01.06 for DirectX G2.0&lt;br /&gt;
|-&lt;br /&gt;
|Super Monkey Ball: Ticket Blitz&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.01.06 for DirectX G2.0&lt;br /&gt;
|2011&lt;br /&gt;
|-&lt;br /&gt;
|The House of the Dead 4 (PSN)&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|?&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |2012&lt;br /&gt;
|-&lt;br /&gt;
|Sonic the Hedgehog 4: Episode II&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.01.06b for DirectX G2.0&lt;br /&gt;
|-&lt;br /&gt;
|Let&#039;s Go Safari&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.01.06 for DirectX G2.0&lt;br /&gt;
|-&lt;br /&gt;
|K.O. Drive&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|1.01.06 for DirectX G2.0&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |2013&lt;br /&gt;
|-&lt;br /&gt;
|Transformers: Human Alliance&amp;lt;ref name=&amp;quot;ref_sega_nn_tools&amp;quot;/&amp;gt;&lt;br /&gt;
|TF_Gun&lt;br /&gt;
|1.01.06 for DirectX G2.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Unity ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Game Name&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Version&lt;br /&gt;
!Year&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Dash&lt;br /&gt;
|&lt;br /&gt;
|6000.0.58f2&lt;br /&gt;
|2013&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Runners&lt;br /&gt;
|&lt;br /&gt;
|4.6.9f1&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |2015&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Boom Dash (Sonic Dash 2: Sonic Boom Run)&lt;br /&gt;
|&lt;br /&gt;
|6000.0.68f1&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Forces: Speed Battle&lt;br /&gt;
|sprint&lt;br /&gt;
|6000.0.58f2&lt;br /&gt;
|2017&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Racing&lt;br /&gt;
|&lt;br /&gt;
|2018.4.16f1&lt;br /&gt;
|2019&lt;br /&gt;
|-&lt;br /&gt;
|The Murder of Sonic the Hedgehog&lt;br /&gt;
|&lt;br /&gt;
|2021.3.9f1&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |2023&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Superstars&lt;br /&gt;
|orion&lt;br /&gt;
|2021.3.25f1&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Dream Team&lt;br /&gt;
|&lt;br /&gt;
|2022.3.54f1&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Rumble Party&lt;br /&gt;
|&lt;br /&gt;
|2022.3.64f1&lt;br /&gt;
|2025&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Unreal Engine ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Game Name&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Version&lt;br /&gt;
!Year&lt;br /&gt;
|-&lt;br /&gt;
|Sonic Racing: CrossWorlds&lt;br /&gt;
|UNION&lt;br /&gt;
|5.4&lt;br /&gt;
|2025&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Arg!!</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=NN_Chunk_Format&amp;diff=1601</id>
		<title>NN Chunk Format</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=NN_Chunk_Format&amp;diff=1601"/>
		<updated>2026-11-02T08:41:55Z</updated>

		<summary type="html">&lt;p&gt;Arg!!: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Notice|type=warn|content=This page is still a work in progress! Any additions and updates are greatly appreciated!}}{{Notice|type=info|content=HedgeDocs&#039; initial NN documentation was written by: &amp;lt;b&amp;gt;Radfordhound&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
Thanks to:&lt;br /&gt;
* &amp;lt;b&amp;gt;ItsEasyActually&amp;lt;/b&amp;gt;: For sharing his NN findings with me, which helped immensely in getting me started on my journey to reverse-engineer and document all of NN across all of its many crazy iterations and platforms.&lt;br /&gt;
* &amp;lt;b&amp;gt;ArMM1998&amp;lt;/b&amp;gt;: For sharing his documentation on some more obscure NN file types with me (specifically Puyo Puyo stuff, including DS games that used NN which I didn&#039;t know was a thing); I never would&#039;ve known about these otherwise!&lt;br /&gt;
* &amp;lt;b&amp;gt;TGE&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;WamWooWam&amp;lt;/b&amp;gt;: For decompiling SEGA&#039;s &amp;lt;s&amp;gt;unholy&amp;lt;/s&amp;gt; port of Sonic 4 Episode I to Windows Phone 7, which used the NN library, and just-so-happened to include complete symbols for everything (even enum values)! I can&#039;t understate how much this information has helped me!&lt;br /&gt;
* &amp;lt;b&amp;gt;Shadowth117&amp;lt;/b&amp;gt; for a ton of extremely useful information and help throughout, especially with regards to the PSO2 variants of the formats!&lt;br /&gt;
* &amp;lt;b&amp;gt;SEGA&amp;lt;/b&amp;gt;: For making these games, and for letting us freely mod them. Seriously, not many companies let us do this stuff openly, and I think it&#039;s awesome. (Also, for releasing that awful version of Sonic 4 Episode I on Windows Phone 7 which had all the symbols in it. Thanks guys, you&#039;re the best!! &amp;lt;3)}}&lt;br /&gt;
The NN Chunk Format is a generic &amp;quot;container&amp;quot; format developed by SEGA Creative Center&#039;s Graphics Section.&lt;br /&gt;
&lt;br /&gt;
The format is heavily based on the older &amp;quot;SEGA Ninja Chunk Model&amp;quot; format, which was originally developed for the SEGA Dreamcast and was utilized in many Dreamcast games (it was even included as part of the Dreamcast&#039;s &amp;quot;Katana&amp;quot; SDK).&lt;br /&gt;
&lt;br /&gt;
While the exact meaning of the &amp;quot;NN&amp;quot; is still currently unknown, given that it is so heavily based off of the older Ninja format, it&#039;s almost certainly an acronym for something like &amp;quot;New Ninja&amp;quot; or &amp;quot;Ninja Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Common Definitions ==&lt;br /&gt;
Please see the [[NN Chunk Format - Common Definitions|Common Definitions]] page for a list of definitions (structs, enums, etc.) that are referenced throughout this specification.&lt;br /&gt;
&lt;br /&gt;
== Platforms ==&lt;br /&gt;
The NN Chunk Format, much like the older Ninja format it&#039;s based on, is designed heavily around the specific hardware/software requirements of whatever platform it is intended to be used on.&lt;br /&gt;
&lt;br /&gt;
Unlike the older Ninja format, however (which only supports one platform: the SEGA Dreamcast), the NN Chunk Format is &amp;quot;multi-platform&amp;quot;, and therefore comes in many different platform-specific variants.&lt;br /&gt;
&lt;br /&gt;
All known used platforms are listed in the following chart:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!ID&lt;br /&gt;
!CC&lt;br /&gt;
!Used on&lt;br /&gt;
!Endianness&lt;br /&gt;
!Alignment&lt;br /&gt;
!NN Library Version&lt;br /&gt;
|-&lt;br /&gt;
|NS&lt;br /&gt;
|s&lt;br /&gt;
|PlayStation 2&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|PlayStation2&lt;br /&gt;
|-&lt;br /&gt;
|NG&lt;br /&gt;
|g&lt;br /&gt;
|GameCube/Wii&lt;br /&gt;
|Big&lt;br /&gt;
|32&lt;br /&gt;
|GAMECUBE/Wii&lt;br /&gt;
|-&lt;br /&gt;
|NX&lt;br /&gt;
|x&lt;br /&gt;
|Xbox/Xbox 360/Windows&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G1.1&lt;br /&gt;
|-&lt;br /&gt;
|NY&lt;br /&gt;
|y&lt;br /&gt;
|Xbox&lt;br /&gt;
|Big&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G1.1&lt;br /&gt;
|-&lt;br /&gt;
|NL&lt;br /&gt;
|l&lt;br /&gt;
|SEGA Lindbergh&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|LINDBERGH&lt;br /&gt;
|-&lt;br /&gt;
|NU&lt;br /&gt;
|u&lt;br /&gt;
|PlayStation Portable&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|PSP&lt;br /&gt;
|-&lt;br /&gt;
|NC&lt;br /&gt;
|c&lt;br /&gt;
|PlayStation 3&lt;br /&gt;
|Big&lt;br /&gt;
|16&lt;br /&gt;
|PS3&lt;br /&gt;
|-&lt;br /&gt;
|NE&lt;br /&gt;
|e&lt;br /&gt;
|Xbox 360&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G2.0 on XBOX360&lt;br /&gt;
|-&lt;br /&gt;
|NZ&lt;br /&gt;
|z&lt;br /&gt;
|Windows&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G2.0 on WINDOWS&lt;br /&gt;
|-&lt;br /&gt;
|NI&lt;br /&gt;
|i&lt;br /&gt;
|iOS/Android/Windows Phone&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|OpenGL ES 1.1&lt;br /&gt;
|-&lt;br /&gt;
|DS&lt;br /&gt;
|?&lt;br /&gt;
|Nintendo DS/3DS&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Chunks ==&lt;br /&gt;
As the name implies, files in the NN Chunk Format are comprised of a series of one or more &amp;quot;data chunks&amp;quot;, one after another.&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;data chunk&amp;quot; is simply a block of data (structs, arrays, strings, etc.) that represents a single resource of a specific type.&lt;br /&gt;
&lt;br /&gt;
All known data chunk types are listed in the following chart:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!ID&lt;br /&gt;
!CC&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|TL&lt;br /&gt;
|t&lt;br /&gt;
|[[NN Chunk Format - TEXLIST|TEXLIST]]&lt;br /&gt;
|A list of textures.&lt;br /&gt;
|-&lt;br /&gt;
|EF&lt;br /&gt;
|e&lt;br /&gt;
|EFFECTLIST&lt;br /&gt;
|A list of effects (shaders).&lt;br /&gt;
|-&lt;br /&gt;
|NN&lt;br /&gt;
|a&lt;br /&gt;
|[[NN Chunk Format - NODENAMELIST|NODENAMELIST]]&lt;br /&gt;
|A list of names for the nodes (bones) within an object (a model).&lt;br /&gt;
|-&lt;br /&gt;
|MN&lt;br /&gt;
|u&lt;br /&gt;
|[[NN Chunk Format - MATERIALNAMELIST|MATERIALNAMELIST]]&lt;br /&gt;
|A list of names for the materials within an object (a model).&lt;br /&gt;
|-&lt;br /&gt;
|TN&lt;br /&gt;
|h&lt;br /&gt;
|MTNAMELIST&lt;br /&gt;
|A list of names for the morph targets within an object (a model).&lt;br /&gt;
|-&lt;br /&gt;
|OB&lt;br /&gt;
|j/o&lt;br /&gt;
|OBJECT&lt;br /&gt;
|A model. Sometimes uses &#039;j&#039; as its CC if there is no TEXLIST is embedded, and uses &#039;o&#039; otherwise.&lt;br /&gt;
|-&lt;br /&gt;
|MO&lt;br /&gt;
|m&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A node (bone) animation.&lt;br /&gt;
|-&lt;br /&gt;
|MM&lt;br /&gt;
|f&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A morph animation.&lt;br /&gt;
|-&lt;br /&gt;
|MC&lt;br /&gt;
|d&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A camera animation.&lt;br /&gt;
|-&lt;br /&gt;
|ML&lt;br /&gt;
|i&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A light animation.&lt;br /&gt;
|-&lt;br /&gt;
|MA&lt;br /&gt;
|v&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A material animation.&lt;br /&gt;
|-&lt;br /&gt;
|LI&lt;br /&gt;
|i/l&lt;br /&gt;
|LIGHT&lt;br /&gt;
|A light. Uses &#039;i&#039; as its CC if its animation is embedded, and &#039;l&#039; otherwise.&lt;br /&gt;
|-&lt;br /&gt;
|CA&lt;br /&gt;
|c/d&lt;br /&gt;
|CAMERA&lt;br /&gt;
|A camera. Uses &#039;d&#039; as its CC if its animation is embedded, and &#039;c&#039; otherwise.&lt;br /&gt;
|-&lt;br /&gt;
|MT&lt;br /&gt;
|g&lt;br /&gt;
|MORPH&lt;br /&gt;
|A morph target.&lt;br /&gt;
|-&lt;br /&gt;
|NT&lt;br /&gt;
|p&lt;br /&gt;
|NODE_TREE_OBJECT&lt;br /&gt;
|A list of nodes (bones) for a model.&lt;br /&gt;
|-&lt;br /&gt;
|ME&lt;br /&gt;
|q&lt;br /&gt;
|MESH_OBJECT&lt;br /&gt;
|A list of meshes and materials for a model.&lt;br /&gt;
|-&lt;br /&gt;
|SF&lt;br /&gt;
|?&lt;br /&gt;
|SHADERFILE&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|SI&lt;br /&gt;
|?&lt;br /&gt;
|SHADERIDX&lt;br /&gt;
|?&lt;br /&gt;
|}&lt;br /&gt;
Each data chunk has a &amp;quot;root struct&amp;quot; associated with it, which is the starting point for the data in the chunk, and usually references other data (structs, arrays, strings, etc.).&lt;br /&gt;
&lt;br /&gt;
For information on the formats of the data contained within these data chunk types, please refer to the linked pages in the above chart.&lt;br /&gt;
&lt;br /&gt;
== File Types ==&lt;br /&gt;
Just like with the older Ninja format, NN chunk files come in two forms:&lt;br /&gt;
&lt;br /&gt;
* [[NN Chunk Format#Binary-Form File Format|Binary-Form]]&lt;br /&gt;
* [[NN Chunk Format#Text-Form File Format|Text-Form]] (aka &amp;quot;Ascii-Form&amp;quot;)&lt;br /&gt;
{{Notice|type=info|content=&amp;lt;b&amp;gt;The vast majority of NN chunk files in released games are in binary-form.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To our knowledge, all released games using NN don&#039;t support loading text-form files at runtime, meaning that &amp;lt;b&amp;gt;all NN text-form files found in the games are unused developer leftovers!&amp;lt;/b&amp;gt;}}&lt;br /&gt;
Both of these forms represent the same thing: A series of one or more data chunks. However, they do so in different ways.&lt;br /&gt;
&lt;br /&gt;
File extensions for NN chunk files typically consist of three characters:&lt;br /&gt;
&lt;br /&gt;
# The &amp;quot;CC&amp;quot; (character-code) of the [[NN Chunk Format#Platforms|platform]].&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for [[NN Chunk Format#Binary-Form File Format|Binary-Form]] files, or &amp;lt;code&amp;gt;t&amp;lt;/code&amp;gt; for [[NN Chunk Format#Text-Form File Format|Text-Form]] files.&lt;br /&gt;
# The &amp;quot;CC&amp;quot; (character-code) of the last [[NN Chunk Format#Data Chunks|data chunk]] contained within the file.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Extension&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|.xno&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Xbox | Binary-Form | OBJECT&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|.gno&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Gamecube | Binary-Form | OBJECT&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|.xtv&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Xbox | Text-Form | MOTION (material)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|.snt&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;PlayStation 2 | Binary-Form | TEXLIST&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Binary-Form File Format ==&lt;br /&gt;
Binary-Form NN chunk files are represented as a series of consecutive &amp;quot;binary chunks&amp;quot;, each of which begins with the following data:&lt;br /&gt;
{{Notice|type=note|content=All instances of this struct (and ONLY this struct) are represented in &amp;lt;B&amp;gt;little-endian&amp;lt;/b&amp;gt;, regardless of the endianness specified by the [[#Platforms|platform]]. &amp;lt;b&amp;gt;Everything else&amp;lt;/b&amp;gt; in Binary-Form NN chunk files is represented in the endianness specified by the [[#Platforms|platform]].}}{{Notice|type=note|content=A struct type with this name does not actually exist (to my knowledge) in real Sega NN implementations; these fields are just embedded directly within every NNS_BINCNK_ struct. This is just an easier way to think about it for our purposes.}}&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_HEADER&lt;br /&gt;
{&lt;br /&gt;
  // The four-character identifier for this binary chunk;&lt;br /&gt;
  // specifies what type of binary chunk this is.&lt;br /&gt;
  uint32_t Id;&lt;br /&gt;
&lt;br /&gt;
  // The offset to the next four-character identifier in the&lt;br /&gt;
  // file, relative to the end of this struct (such that after&lt;br /&gt;
  // doing `fread(&amp;amp;OfsNextId, sizeof(OfsNextId), 1, file)`&lt;br /&gt;
  // you can just do `fseek(file, OfsNextId, SEEK_CUR)`.&lt;br /&gt;
  int32_t OfsNextId;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this struct comes all of the data (structs, strings, etc.) required to represent the binary chunk. The format of this data depends on the value of the Id field.&lt;br /&gt;
&lt;br /&gt;
After each binary chunk (including all of its data) has been written, the file is padded (with null bytes) to a position that is divisible by the &amp;quot;alignment&amp;quot; specified by the [[NN Chunk Format#Platforms|platform]] (usually it&#039;s 16, but notably, it&#039;s 32 on Gamecube/Wii).&lt;br /&gt;
&lt;br /&gt;
What follows is documentation for all known binary chunk types, in the order that they appear within binary-form NN chunk files.&lt;br /&gt;
&lt;br /&gt;
=== Info Chunk ===&lt;br /&gt;
{{Notice|type=note|content=&amp;lt;b&amp;gt;This chunk is required to be present at the beginning of all binary-form NN chunk files!&amp;lt;/b&amp;gt; The Sega NN games I&#039;ve checked actually rely on this behavior, so you can too.}}&lt;br /&gt;
This binary chunk serves as the header for a binary-form NN chunk file, and contains info needed to parse the file. It is represented as the following struct:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_FILEHEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to &amp;quot;**IF&amp;quot;, where &amp;quot;**&amp;quot; is the &amp;quot;ID&amp;quot; of&lt;br /&gt;
  // the platform (e.g. &amp;quot;NGIF&amp;quot; for Gamecube binary chunk headers).&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // The number of data chunks in the file.&lt;br /&gt;
  int32_t nChunk;&lt;br /&gt;
&lt;br /&gt;
  // The absolute offset to the first data chunk in the file.&lt;br /&gt;
  int32_t OfsData;&lt;br /&gt;
&lt;br /&gt;
  // The combined size of all of the data chunks in the file, in bytes, including any padding.&lt;br /&gt;
  int32_t SizeData;&lt;br /&gt;
&lt;br /&gt;
  // The absolute offset to the (required) NOF0 binary chunk.&lt;br /&gt;
  int32_t OfsNOF0;&lt;br /&gt;
&lt;br /&gt;
  // Size of the (required) NOF0 binary chunk, including its header.&lt;br /&gt;
  // Depending on the variant of the format, this size either includes&lt;br /&gt;
  // the padding that comes after the NOF0 binary chunk, or it doesn&#039;t.&lt;br /&gt;
  // &lt;br /&gt;
  // TODO: Figure out exactly which versions include padding.&lt;br /&gt;
  // It seems PSP files and .[x]ncp files don&#039;t count the padding,&lt;br /&gt;
  // but everything else does??&lt;br /&gt;
  int32_t SizeNOF0;&lt;br /&gt;
&lt;br /&gt;
  // 1 in most files, 0 in some newer variants.&lt;br /&gt;
  // (Maybe they just stopped using this value?)&lt;br /&gt;
  int32_t Version;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;{{Notice|type=note|content=Further research NIFL header chunks and add info on those.}}&lt;br /&gt;
&lt;br /&gt;
=== Data Chunk Header ===&lt;br /&gt;
After the [[NN Chunk Format#Info Chunk|Info Chunk]], comes the main contents of the file: A sequence of one or more [[NN Chunk Format#Data Chunks|data chunks]].&lt;br /&gt;
&lt;br /&gt;
In binary-form NN chunk files, each data chunk begins with the following struct:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_DATAHEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to the &amp;quot;ID&amp;quot; of the platform, followed&lt;br /&gt;
  // by the &amp;quot;ID&amp;quot; of the data chunk type being written (e.g.&lt;br /&gt;
  // &amp;quot;NXOB&amp;quot; for Xbox OBJECT data chunks).&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // The offset to the root struct that makes up this data chunk&lt;br /&gt;
  // (e.g. an offset to a NNS_NODENAMELIST if the chunk type indicates&lt;br /&gt;
  // that this is a NODE_NAME data chunk), relative to the&lt;br /&gt;
  // position specified by the [OfsData] field from the info chunk.&lt;br /&gt;
  //&lt;br /&gt;
  // Please refer to the linked pages in the data chunks chart&lt;br /&gt;
  // to learn about their root structs.&lt;br /&gt;
  int32_t OfsMainData;&lt;br /&gt;
&lt;br /&gt;
  // Always 0 in every file I&#039;ve seen thus far.&lt;br /&gt;
  int32_t Version;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this struct comes all of the data (structs, strings, etc.) required to represent the data chunk. The format of this data depends on the value of the Id field.&lt;br /&gt;
&lt;br /&gt;
See the linked pages in the [[NN Chunk Format#Data Chunks|data chunks chart]].&lt;br /&gt;
&lt;br /&gt;
=== Offsets List Chunk ===&lt;br /&gt;
{{Notice|type=note|content=&amp;lt;b&amp;gt;This chunk is required to be present in all binary-form NN chunk files!&amp;lt;/b&amp;gt;}}&lt;br /&gt;
After all of the data chunks, comes the offsets list chunk.&lt;br /&gt;
&lt;br /&gt;
This binary chunk represents a list of positions for all of the pointers (&amp;quot;offsets&amp;quot;) in all of the data chunks in the file, relative to the value of the &amp;lt;code&amp;gt;[OfsData]&amp;lt;/code&amp;gt; field from the info chunk.&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_NOF0HEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  // &lt;br /&gt;
  // The chunk ID is set to &amp;quot;NOF0&amp;quot;.&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // The number of pointer positions listed within this chunk.&lt;br /&gt;
  int32_t nData;&lt;br /&gt;
&lt;br /&gt;
  // Padding; must always be 0 in files.&lt;br /&gt;
  //&lt;br /&gt;
  // This is because some games use this value as a marker that states&lt;br /&gt;
  // whether or not the pointers have been &amp;quot;fixed&amp;quot;.&lt;br /&gt;
  //&lt;br /&gt;
  // In those games, after they&#039;re done &amp;quot;fixing&amp;quot; all of the pointers&lt;br /&gt;
  // listed within this chunk, they will set this value to 1 in memory.&lt;br /&gt;
  int32_t Pad;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this struct comes an array of &amp;lt;code&amp;gt;uint32_t&amp;lt;/code&amp;gt; values of size &amp;lt;code&amp;gt;[nData]&amp;lt;/code&amp;gt;. These values represent the positions of every pointer in all of the data chunks in the file, relative to the &amp;lt;code&amp;gt;[OfsData]&amp;lt;/code&amp;gt; field from the info chunk.&lt;br /&gt;
&lt;br /&gt;
Most NN games use this chunk to quickly &amp;quot;fix&amp;quot; all of the pointers within the data chunks (that is, to convert all of the offsets into absolute memory addresses that can then just be used as normal pointers).&lt;br /&gt;
&lt;br /&gt;
Some games, however, (namely: Sonic 4 Episode I for Windows Phone) ignore the values in this chunk, and instead, just manually add &amp;lt;code&amp;gt;[OfsData]&amp;lt;/code&amp;gt; to each offset to get an absolute file position whenever they need to jump there.&lt;br /&gt;
&lt;br /&gt;
Regardless of whether the data is actually used or not, it is always present in valid files.&lt;br /&gt;
{{Notice|type=note|content=Add pseudo-code for &amp;quot;fixing&amp;quot; the offsets listed in this chunk.}}&lt;br /&gt;
&lt;br /&gt;
=== File Name Chunk ===&lt;br /&gt;
{{Notice|type=info|content=&amp;lt;b&amp;gt;This chunk is completely optional&amp;lt;/b&amp;gt; and seems to only be used for debugging/internal-tooling purposes.}}&lt;br /&gt;
This chunk simply states the name and extension (without the path) of the file it&#039;s contained in.&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_NFN0HEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to &amp;quot;NFN0&amp;quot;.&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // Padding; always 0 in files.&lt;br /&gt;
  uint32_t Pad[2];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this header comes a null-terminated string which represents the file&#039;s name and extension (without its path).&lt;br /&gt;
&lt;br /&gt;
=== End Chunk ===&lt;br /&gt;
{{Notice|type=note|content=&amp;lt;b&amp;gt;This chunk is required to be present in all binary-form NN chunk files!&amp;lt;/b&amp;gt;}}&lt;br /&gt;
This is the last chunk in all binary-form NN chunk files. It exists purely to indicate that there are no more chunks left in the file, so that you know when to stop reading if you&#039;re reading the file sequentially, one chunk at a time.&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_NENDHEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to &amp;quot;NEND&amp;quot;.&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // Padding; always 0 in files.&lt;br /&gt;
  uint32_t Pad[2];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Text-Form File Format ==&lt;br /&gt;
Text-form NN chunk files, just like the text-form Ninja chunk model files that precede them, are text files comprised of code in what is actually a very limited subset of the C programming language, heavily utilizing special NN types/preprocessor defines, which are, presumably, defined within the official NN SDK.&lt;br /&gt;
&lt;br /&gt;
This allows them to both be parsable by tooling (it is unclear if they actually do this), and to be directly &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt;d within the C or C++ files which make up their game&#039;s source code, embedding the data directly within the game&#039;s executable!&lt;br /&gt;
&lt;br /&gt;
Their general layout is as follows:&lt;br /&gt;
{{Notice|type=note|content=Replace these special phrases in all of the following &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; snippets as follows:&lt;br /&gt;
&lt;br /&gt;
* \t: Replace with one or more tab characters (&amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; spaces), used to align the text.&lt;br /&gt;
* TYPE: Replace with the name of the type currently being written.&lt;br /&gt;
* NAME: Replace with the name of whatever you&#039;re currently writing.}}&lt;br /&gt;
&lt;br /&gt;
# A (required?) &amp;quot;header&amp;quot; comment that is comprised of the following, in order:&lt;br /&gt;
## The name and version number of the tool used to create this file.&lt;br /&gt;
## &amp;lt;code&amp;gt;Create\t:&amp;lt;/code&amp;gt; followed by the date this file was created in the &amp;lt;code&amp;gt;ddd MMM dd HH:mm:ss yyyy&amp;lt;/code&amp;gt; .NET DateTime format.&lt;br /&gt;
## The names of each of the root structs for every data chunk in the file, in this format: &amp;lt;code&amp;gt;TYPE\t: NAME&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; refers to the root struct&#039;s type (e.g. &amp;lt;code&amp;gt;NNS_TEXFILELIST&amp;lt;/code&amp;gt;). See the linked pages in the [[NN Chunk Format#Data Chunks|data chunks chart]].&lt;br /&gt;
# One or more data chunks, each of which is comprised of the following, in order:&lt;br /&gt;
## A comment with the text: &amp;lt;code&amp;gt;TYPE START&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; refers to the [[NN Chunk Format#Data Chunks|data chunk&#039;s type]] (e.g. &amp;lt;code&amp;gt;TEXLIST&amp;lt;/code&amp;gt;).&lt;br /&gt;
## All of the data used by this data chunk, represented as C code comprised heavily of special NN preprocessor macros. See the linked pages in the [[NN Chunk Format#Data Chunks|data chunks chart]].&lt;br /&gt;
## A comment with the text: &amp;lt;code&amp;gt;TYPE END&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; refers to the [[NN Chunk Format#Data Chunks|data chunk&#039;s type]] (e.g. &amp;lt;code&amp;gt;TEXLIST&amp;lt;/code&amp;gt;).&lt;br /&gt;
# A (required?) comment with the text: &amp;lt;code&amp;gt;End of File&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The files also always use tab characters (&amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt;) for indentation, rather than spaces.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample Text-form NN chunk file, to better understand the format:&lt;br /&gt;
{{Notice|type=example|content=&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
    Sample NN Exporter Version 1.00.00&lt;br /&gt;
    Create  : Wed Feb 08 21:06:46 2023&lt;br /&gt;
    NNS_TEXFILELIST : nntexfilelist_SampleFile&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* TEXLIST START */&lt;br /&gt;
&lt;br /&gt;
NNS_TEXFILE nntexfile_SampleFile[] =&lt;br /&gt;
{&lt;br /&gt;
    TEXFILE(&lt;br /&gt;
        TF_FILENAME( &amp;quot;SampleTex_dif.dds&amp;quot; ),&lt;br /&gt;
        TF_FILTER( NND_MIN_LINEAR_MIPMAP_NEAREST, NND_MAG_LINEAR )&lt;br /&gt;
    ),&lt;br /&gt;
    TEXFILE(&lt;br /&gt;
        TF_FILENAME( &amp;quot;SampleTex_spec.dds&amp;quot; ),&lt;br /&gt;
        TF_FILTER( NND_MIN_LINEAR_MIPMAP_NEAREST, NND_MAG_LINEAR )&lt;br /&gt;
    ),&lt;br /&gt;
    TEXFILE(&lt;br /&gt;
        TF_FILENAME( &amp;quot;SampleTex_norm.dds&amp;quot; ),&lt;br /&gt;
        TF_FILTER( NND_MIN_LINEAR_MIPMAP_NEAREST, NND_MAG_LINEAR )&lt;br /&gt;
    ),&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
NNS_TEXFILELIST nntexfilelist_SampleFile[] =&lt;br /&gt;
{&lt;br /&gt;
    TEXFILELIST(&lt;br /&gt;
        TFL_N_TEXFILE( 3 ),&lt;br /&gt;
        TFL_TEXFILE( nntexfile_SampleFile )&lt;br /&gt;
    )&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
/* TEXLIST END */&lt;br /&gt;
&lt;br /&gt;
/* End of File */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}{{Notice|type=info|content=All of the following in the above example are type/preprocessor defines from the NN library:&lt;br /&gt;
&lt;br /&gt;
* NNS_TEXFILE&lt;br /&gt;
* TEXFILE&lt;br /&gt;
* TF_FILENAME&lt;br /&gt;
* TF_FILTER&lt;br /&gt;
* NND_MIN_LINEAR_MIPMAP_NEAREST&lt;br /&gt;
* NND_MAG_LINEAR&lt;br /&gt;
* NNS_TEXFILELIST&lt;br /&gt;
* TEXFILELIST&lt;br /&gt;
* TFL_N_TEXFILE&lt;br /&gt;
* TFL_TEXFILE&lt;br /&gt;
&lt;br /&gt;
For a complete list of all of these defines, please refer to the individual pages linked in the [[#Data Chunks|data chunks chart]] (for the ones used in this example, refer to the [[NN Chunk Format - TEXTLIST|TEXLIST]] documentation).}}&lt;br /&gt;
Note that in C, code is parsed sequentially: left-to-right, top-to-bottom.&lt;br /&gt;
&lt;br /&gt;
If a name is used in the file before it has been declared, that&#039;s an error.&lt;br /&gt;
&lt;br /&gt;
Thus, the ordering of the data within each data chunk is generally written to the file in &amp;quot;reverse&amp;quot; order, such that any reference to a value will not be written until &#039;&#039;after&#039;&#039; the value it is referencing has been written, avoiding this problem.&lt;br /&gt;
&lt;br /&gt;
In some cases, the NN exporters will instead declare the value early, and define it later on in the file, using an extern declaration like so:&lt;br /&gt;
{{Notice|type=example|content=Here, the &amp;lt;code&amp;gt;nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye&amp;lt;/code&amp;gt; value is declared so that it can be referenced by the &amp;lt;code&amp;gt;VTX_LISTPTR&amp;lt;/code&amp;gt; field in &amp;lt;code&amp;gt;nnvertexdesc_plb_op_en_Kyozoress_head_l__2_w2_Eye&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
extern NNS_VTXTYPE_XB_PW4INCT nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye[];&lt;br /&gt;
&lt;br /&gt;
NNS_VTXLIST_DX_DESC nnvertexdesc_plb_op_en_Kyozoress_head_l__2_w2_Eye[] =&lt;br /&gt;
{&lt;br /&gt;
    VTXDESC(&lt;br /&gt;
        /* ... */&lt;br /&gt;
        VTX_LISTPTR( nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye ),&lt;br /&gt;
        /* ... */&lt;br /&gt;
    ),&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, later on in the file, the referenced &amp;lt;code&amp;gt;nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye&amp;lt;/code&amp;gt; value is defined as usual (contents redacted due to extreme length):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
NNS_VTXTYPE_XB_PW4INCT nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye[] =&lt;br /&gt;
{&lt;br /&gt;
    /* ... */&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>Arg!!</name></author>
	</entry>
	<entry>
		<id>https://hedgedocs.com/index.php?title=NN_Chunk_Format&amp;diff=1600</id>
		<title>NN Chunk Format</title>
		<link rel="alternate" type="text/html" href="https://hedgedocs.com/index.php?title=NN_Chunk_Format&amp;diff=1600"/>
		<updated>2026-11-02T03:53:03Z</updated>

		<summary type="html">&lt;p&gt;Arg!!: Updated information for some NN chunks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Notice|type=warn|content=This page is still a work in progress! Any additions and updates are greatly appreciated!}}{{Notice|type=info|content=HedgeDocs&#039; initial NN documentation was written by: &amp;lt;b&amp;gt;Radfordhound&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
Thanks to:&lt;br /&gt;
* &amp;lt;b&amp;gt;ItsEasyActually&amp;lt;/b&amp;gt;: For sharing his NN findings with me, which helped immensely in getting me started on my journey to reverse-engineer and document all of NN across all of its many crazy iterations and platforms.&lt;br /&gt;
* &amp;lt;b&amp;gt;ArMM1998&amp;lt;/b&amp;gt;: For sharing his documentation on some more obscure NN file types with me (specifically Puyo Puyo stuff, including DS games that used NN which I didn&#039;t know was a thing); I never would&#039;ve known about these otherwise!&lt;br /&gt;
* &amp;lt;b&amp;gt;TGE&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;WamWooWam&amp;lt;/b&amp;gt;: For decompiling SEGA&#039;s &amp;lt;s&amp;gt;unholy&amp;lt;/s&amp;gt; port of Sonic 4 Episode I to Windows Phone 7, which used the NN library, and just-so-happened to include complete symbols for everything (even enum values)! I can&#039;t understate how much this information has helped me!&lt;br /&gt;
* &amp;lt;b&amp;gt;Shadowth117&amp;lt;/b&amp;gt; for a ton of extremely useful information and help throughout, especially with regards to the PSO2 variants of the formats!&lt;br /&gt;
* &amp;lt;b&amp;gt;SEGA&amp;lt;/b&amp;gt;: For making these games, and for letting us freely mod them. Seriously, not many companies let us do this stuff openly, and I think it&#039;s awesome. (Also, for releasing that awful version of Sonic 4 Episode I on Windows Phone 7 which had all the symbols in it. Thanks guys, you&#039;re the best!! &amp;lt;3)}}&lt;br /&gt;
The NN Chunk Format is a generic &amp;quot;container&amp;quot; format developed by SEGA Creative Center&#039;s Graphics Section.&lt;br /&gt;
&lt;br /&gt;
The format is heavily based on the older &amp;quot;SEGA Ninja Chunk Model&amp;quot; format, which was originally developed for the SEGA Dreamcast and was utilized in many Dreamcast games (it was even included as part of the Dreamcast&#039;s &amp;quot;Katana&amp;quot; SDK).&lt;br /&gt;
&lt;br /&gt;
While the exact meaning of the &amp;quot;NN&amp;quot; is still currently unknown, given that it is so heavily based off of the older Ninja format, it&#039;s almost certainly an acronym for something like &amp;quot;New Ninja&amp;quot; or &amp;quot;Ninja Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Common Definitions ==&lt;br /&gt;
Please see the [[NN Chunk Format - Common Definitions|Common Definitions]] page for a list of definitions (structs, enums, etc.) that are referenced throughout this specification.&lt;br /&gt;
&lt;br /&gt;
== Platforms ==&lt;br /&gt;
The NN Chunk Format, much like the older Ninja format it&#039;s based on, is designed heavily around the specific hardware/software requirements of whatever platform it is intended to be used on.&lt;br /&gt;
&lt;br /&gt;
Unlike the older Ninja format, however (which only supports one platform: the SEGA Dreamcast), the NN Chunk Format is &amp;quot;multi-platform&amp;quot;, and therefore comes in many different platform-specific variants.&lt;br /&gt;
&lt;br /&gt;
All known used platforms are listed in the following chart:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!ID&lt;br /&gt;
!CC&lt;br /&gt;
!Used on&lt;br /&gt;
!Endianness&lt;br /&gt;
!Alignment&lt;br /&gt;
!NN Library Version&lt;br /&gt;
|-&lt;br /&gt;
|NS&lt;br /&gt;
|s&lt;br /&gt;
|PlayStation 2&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|PlayStation2&lt;br /&gt;
|-&lt;br /&gt;
|NG&lt;br /&gt;
|g&lt;br /&gt;
|GameCube/Wii&lt;br /&gt;
|Big&lt;br /&gt;
|32&lt;br /&gt;
|GAMECUBE/Wii&lt;br /&gt;
|-&lt;br /&gt;
|NX&lt;br /&gt;
|x&lt;br /&gt;
|Xbox/Xbox 360/Windows&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G1.1&lt;br /&gt;
|-&lt;br /&gt;
|NY&lt;br /&gt;
|y&lt;br /&gt;
|Xbox&lt;br /&gt;
|Big&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G1.1&lt;br /&gt;
|-&lt;br /&gt;
|NL&lt;br /&gt;
|l&lt;br /&gt;
|SEGA Lindbergh&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|LINDBERGH&lt;br /&gt;
|-&lt;br /&gt;
|NU&lt;br /&gt;
|u&lt;br /&gt;
|PlayStation Portable&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|PSP&lt;br /&gt;
|-&lt;br /&gt;
|NC&lt;br /&gt;
|c&lt;br /&gt;
|PlayStation 3&lt;br /&gt;
|Big&lt;br /&gt;
|16&lt;br /&gt;
|PS3&lt;br /&gt;
|-&lt;br /&gt;
|NE&lt;br /&gt;
|e&lt;br /&gt;
|Xbox 360&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G2.0 on XBOX360&lt;br /&gt;
|-&lt;br /&gt;
|NZ&lt;br /&gt;
|z&lt;br /&gt;
|Windows&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|DirectX G2.0 on WINDOWS&lt;br /&gt;
|-&lt;br /&gt;
|NI&lt;br /&gt;
|i&lt;br /&gt;
|iOS/Android/Windows Phone&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|OpenGL ES 1.1&lt;br /&gt;
|-&lt;br /&gt;
|DS&lt;br /&gt;
|?&lt;br /&gt;
|Nintendo DS/3DS&lt;br /&gt;
|Little&lt;br /&gt;
|16&lt;br /&gt;
|?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Chunks ==&lt;br /&gt;
As the name implies, files in the NN Chunk Format are comprised of a series of one or more &amp;quot;data chunks&amp;quot;, one after another.&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;data chunk&amp;quot; is simply a block of data (structs, arrays, strings, etc.) that represents a single resource of a specific type.&lt;br /&gt;
&lt;br /&gt;
All known data chunk types are listed in the following chart:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!ID&lt;br /&gt;
!CC&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|TL&lt;br /&gt;
|t&lt;br /&gt;
|[[NN Chunk Format - TEXLIST|TEXLIST]]&lt;br /&gt;
|A list of textures.&lt;br /&gt;
|-&lt;br /&gt;
|EF&lt;br /&gt;
|e&lt;br /&gt;
|EFFECTLIST&lt;br /&gt;
|A list of effects (shaders).&lt;br /&gt;
|-&lt;br /&gt;
|NN&lt;br /&gt;
|a&lt;br /&gt;
|[[NN Chunk Format - NODENAMELIST|NODENAMELIST]]&lt;br /&gt;
|A list of names for the nodes (bones) within an object (a model).&lt;br /&gt;
|-&lt;br /&gt;
|MN&lt;br /&gt;
|u&lt;br /&gt;
|[[NN Chunk Format - MATERIALNAMELIST|MATERIALNAMELIST]]&lt;br /&gt;
|A list of names for the materials within an object (a model).&lt;br /&gt;
|-&lt;br /&gt;
|TN&lt;br /&gt;
|?&lt;br /&gt;
|MTNAMELIST&lt;br /&gt;
|A list of names for the morph targets within an object (a model).&lt;br /&gt;
|-&lt;br /&gt;
|OB&lt;br /&gt;
|j/o&lt;br /&gt;
|OBJECT&lt;br /&gt;
|A model. Sometimes uses &#039;j&#039; as its CC if there is no TEXLIST is embedded, and uses &#039;o&#039; otherwise.&lt;br /&gt;
|-&lt;br /&gt;
|MO&lt;br /&gt;
|m&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A node (bone) animation.&lt;br /&gt;
|-&lt;br /&gt;
|MM&lt;br /&gt;
|f&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A morph animation.&lt;br /&gt;
|-&lt;br /&gt;
|MC&lt;br /&gt;
|d&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A camera animation.&lt;br /&gt;
|-&lt;br /&gt;
|ML&lt;br /&gt;
|i&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A light animation.&lt;br /&gt;
|-&lt;br /&gt;
|MA&lt;br /&gt;
|v&lt;br /&gt;
|[[NN Chunk Format - MOTION|MOTION]]&lt;br /&gt;
|A material animation.&lt;br /&gt;
|-&lt;br /&gt;
|LI&lt;br /&gt;
|i/l&lt;br /&gt;
|LIGHT&lt;br /&gt;
|A light. Uses &#039;i&#039; as its CC if its animation is embedded, and &#039;l&#039; otherwise.&lt;br /&gt;
|-&lt;br /&gt;
|CA&lt;br /&gt;
|c/d&lt;br /&gt;
|CAMERA&lt;br /&gt;
|A camera. Uses &#039;d&#039; as its CC if its animation is embedded, and &#039;c&#039; otherwise.&lt;br /&gt;
|-&lt;br /&gt;
|MT&lt;br /&gt;
|g&lt;br /&gt;
|MORPH&lt;br /&gt;
|A morph target.&lt;br /&gt;
|-&lt;br /&gt;
|NT&lt;br /&gt;
|p&lt;br /&gt;
|NODE_TREE_OBJECT&lt;br /&gt;
|A list of nodes (bones) for a model.&lt;br /&gt;
|-&lt;br /&gt;
|ME&lt;br /&gt;
|q&lt;br /&gt;
|MESH_OBJECT&lt;br /&gt;
|A list of meshes and materials for a model.&lt;br /&gt;
|-&lt;br /&gt;
|SF&lt;br /&gt;
|?&lt;br /&gt;
|SHADERFILE&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|SI&lt;br /&gt;
|?&lt;br /&gt;
|SHADERIDX&lt;br /&gt;
|?&lt;br /&gt;
|}&lt;br /&gt;
Each data chunk has a &amp;quot;root struct&amp;quot; associated with it, which is the starting point for the data in the chunk, and usually references other data (structs, arrays, strings, etc.).&lt;br /&gt;
&lt;br /&gt;
For information on the formats of the data contained within these data chunk types, please refer to the linked pages in the above chart.&lt;br /&gt;
&lt;br /&gt;
== File Types ==&lt;br /&gt;
Just like with the older Ninja format, NN chunk files come in two forms:&lt;br /&gt;
&lt;br /&gt;
* [[NN Chunk Format#Binary-Form File Format|Binary-Form]]&lt;br /&gt;
* [[NN Chunk Format#Text-Form File Format|Text-Form]] (aka &amp;quot;Ascii-Form&amp;quot;)&lt;br /&gt;
{{Notice|type=info|content=&amp;lt;b&amp;gt;The vast majority of NN chunk files in released games are in binary-form.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To our knowledge, all released games using NN don&#039;t support loading text-form files at runtime, meaning that &amp;lt;b&amp;gt;all NN text-form files found in the games are unused developer leftovers!&amp;lt;/b&amp;gt;}}&lt;br /&gt;
Both of these forms represent the same thing: A series of one or more data chunks. However, they do so in different ways.&lt;br /&gt;
&lt;br /&gt;
File extensions for NN chunk files typically consist of three characters:&lt;br /&gt;
&lt;br /&gt;
# The &amp;quot;CC&amp;quot; (character-code) of the [[NN Chunk Format#Platforms|platform]].&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for [[NN Chunk Format#Binary-Form File Format|Binary-Form]] files, or &amp;lt;code&amp;gt;t&amp;lt;/code&amp;gt; for [[NN Chunk Format#Text-Form File Format|Text-Form]] files.&lt;br /&gt;
# The &amp;quot;CC&amp;quot; (character-code) of the last [[NN Chunk Format#Data Chunks|data chunk]] contained within the file.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Extension&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|.xno&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Xbox | Binary-Form | OBJECT&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|.gno&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Gamecube | Binary-Form | OBJECT&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|.xtv&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Xbox | Text-Form | MOTION (material)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|.snt&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;PlayStation 2 | Binary-Form | TEXLIST&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Binary-Form File Format ==&lt;br /&gt;
Binary-Form NN chunk files are represented as a series of consecutive &amp;quot;binary chunks&amp;quot;, each of which begins with the following data:&lt;br /&gt;
{{Notice|type=note|content=All instances of this struct (and ONLY this struct) are represented in &amp;lt;B&amp;gt;little-endian&amp;lt;/b&amp;gt;, regardless of the endianness specified by the [[#Platforms|platform]]. &amp;lt;b&amp;gt;Everything else&amp;lt;/b&amp;gt; in Binary-Form NN chunk files is represented in the endianness specified by the [[#Platforms|platform]].}}{{Notice|type=note|content=A struct type with this name does not actually exist (to my knowledge) in real Sega NN implementations; these fields are just embedded directly within every NNS_BINCNK_ struct. This is just an easier way to think about it for our purposes.}}&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_HEADER&lt;br /&gt;
{&lt;br /&gt;
  // The four-character identifier for this binary chunk;&lt;br /&gt;
  // specifies what type of binary chunk this is.&lt;br /&gt;
  uint32_t Id;&lt;br /&gt;
&lt;br /&gt;
  // The offset to the next four-character identifier in the&lt;br /&gt;
  // file, relative to the end of this struct (such that after&lt;br /&gt;
  // doing `fread(&amp;amp;OfsNextId, sizeof(OfsNextId), 1, file)`&lt;br /&gt;
  // you can just do `fseek(file, OfsNextId, SEEK_CUR)`.&lt;br /&gt;
  int32_t OfsNextId;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this struct comes all of the data (structs, strings, etc.) required to represent the binary chunk. The format of this data depends on the value of the Id field.&lt;br /&gt;
&lt;br /&gt;
After each binary chunk (including all of its data) has been written, the file is padded (with null bytes) to a position that is divisible by the &amp;quot;alignment&amp;quot; specified by the [[NN Chunk Format#Platforms|platform]] (usually it&#039;s 16, but notably, it&#039;s 32 on Gamecube/Wii).&lt;br /&gt;
&lt;br /&gt;
What follows is documentation for all known binary chunk types, in the order that they appear within binary-form NN chunk files.&lt;br /&gt;
&lt;br /&gt;
=== Info Chunk ===&lt;br /&gt;
{{Notice|type=note|content=&amp;lt;b&amp;gt;This chunk is required to be present at the beginning of all binary-form NN chunk files!&amp;lt;/b&amp;gt; The Sega NN games I&#039;ve checked actually rely on this behavior, so you can too.}}&lt;br /&gt;
This binary chunk serves as the header for a binary-form NN chunk file, and contains info needed to parse the file. It is represented as the following struct:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_FILEHEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to &amp;quot;**IF&amp;quot;, where &amp;quot;**&amp;quot; is the &amp;quot;ID&amp;quot; of&lt;br /&gt;
  // the platform (e.g. &amp;quot;NGIF&amp;quot; for Gamecube binary chunk headers).&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // The number of data chunks in the file.&lt;br /&gt;
  int32_t nChunk;&lt;br /&gt;
&lt;br /&gt;
  // The absolute offset to the first data chunk in the file.&lt;br /&gt;
  int32_t OfsData;&lt;br /&gt;
&lt;br /&gt;
  // The combined size of all of the data chunks in the file, in bytes, including any padding.&lt;br /&gt;
  int32_t SizeData;&lt;br /&gt;
&lt;br /&gt;
  // The absolute offset to the (required) NOF0 binary chunk.&lt;br /&gt;
  int32_t OfsNOF0;&lt;br /&gt;
&lt;br /&gt;
  // Size of the (required) NOF0 binary chunk, including its header.&lt;br /&gt;
  // Depending on the variant of the format, this size either includes&lt;br /&gt;
  // the padding that comes after the NOF0 binary chunk, or it doesn&#039;t.&lt;br /&gt;
  // &lt;br /&gt;
  // TODO: Figure out exactly which versions include padding.&lt;br /&gt;
  // It seems PSP files and .[x]ncp files don&#039;t count the padding,&lt;br /&gt;
  // but everything else does??&lt;br /&gt;
  int32_t SizeNOF0;&lt;br /&gt;
&lt;br /&gt;
  // 1 in most files, 0 in some newer variants.&lt;br /&gt;
  // (Maybe they just stopped using this value?)&lt;br /&gt;
  int32_t Version;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;{{Notice|type=note|content=Further research NIFL header chunks and add info on those.}}&lt;br /&gt;
&lt;br /&gt;
=== Data Chunk Header ===&lt;br /&gt;
After the [[NN Chunk Format#Info Chunk|Info Chunk]], comes the main contents of the file: A sequence of one or more [[NN Chunk Format#Data Chunks|data chunks]].&lt;br /&gt;
&lt;br /&gt;
In binary-form NN chunk files, each data chunk begins with the following struct:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_DATAHEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to the &amp;quot;ID&amp;quot; of the platform, followed&lt;br /&gt;
  // by the &amp;quot;ID&amp;quot; of the data chunk type being written (e.g.&lt;br /&gt;
  // &amp;quot;NXOB&amp;quot; for Xbox OBJECT data chunks).&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // The offset to the root struct that makes up this data chunk&lt;br /&gt;
  // (e.g. an offset to a NNS_NODENAMELIST if the chunk type indicates&lt;br /&gt;
  // that this is a NODE_NAME data chunk), relative to the&lt;br /&gt;
  // position specified by the [OfsData] field from the info chunk.&lt;br /&gt;
  //&lt;br /&gt;
  // Please refer to the linked pages in the data chunks chart&lt;br /&gt;
  // to learn about their root structs.&lt;br /&gt;
  int32_t OfsMainData;&lt;br /&gt;
&lt;br /&gt;
  // Always 0 in every file I&#039;ve seen thus far.&lt;br /&gt;
  int32_t Version;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this struct comes all of the data (structs, strings, etc.) required to represent the data chunk. The format of this data depends on the value of the Id field.&lt;br /&gt;
&lt;br /&gt;
See the linked pages in the [[NN Chunk Format#Data Chunks|data chunks chart]].&lt;br /&gt;
&lt;br /&gt;
=== Offsets List Chunk ===&lt;br /&gt;
{{Notice|type=note|content=&amp;lt;b&amp;gt;This chunk is required to be present in all binary-form NN chunk files!&amp;lt;/b&amp;gt;}}&lt;br /&gt;
After all of the data chunks, comes the offsets list chunk.&lt;br /&gt;
&lt;br /&gt;
This binary chunk represents a list of positions for all of the pointers (&amp;quot;offsets&amp;quot;) in all of the data chunks in the file, relative to the value of the &amp;lt;code&amp;gt;[OfsData]&amp;lt;/code&amp;gt; field from the info chunk.&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_NOF0HEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  // &lt;br /&gt;
  // The chunk ID is set to &amp;quot;NOF0&amp;quot;.&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // The number of pointer positions listed within this chunk.&lt;br /&gt;
  int32_t nData;&lt;br /&gt;
&lt;br /&gt;
  // Padding; must always be 0 in files.&lt;br /&gt;
  //&lt;br /&gt;
  // This is because some games use this value as a marker that states&lt;br /&gt;
  // whether or not the pointers have been &amp;quot;fixed&amp;quot;.&lt;br /&gt;
  //&lt;br /&gt;
  // In those games, after they&#039;re done &amp;quot;fixing&amp;quot; all of the pointers&lt;br /&gt;
  // listed within this chunk, they will set this value to 1 in memory.&lt;br /&gt;
  int32_t Pad;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this struct comes an array of &amp;lt;code&amp;gt;uint32_t&amp;lt;/code&amp;gt; values of size &amp;lt;code&amp;gt;[nData]&amp;lt;/code&amp;gt;. These values represent the positions of every pointer in all of the data chunks in the file, relative to the &amp;lt;code&amp;gt;[OfsData]&amp;lt;/code&amp;gt; field from the info chunk.&lt;br /&gt;
&lt;br /&gt;
Most NN games use this chunk to quickly &amp;quot;fix&amp;quot; all of the pointers within the data chunks (that is, to convert all of the offsets into absolute memory addresses that can then just be used as normal pointers).&lt;br /&gt;
&lt;br /&gt;
Some games, however, (namely: Sonic 4 Episode I for Windows Phone) ignore the values in this chunk, and instead, just manually add &amp;lt;code&amp;gt;[OfsData]&amp;lt;/code&amp;gt; to each offset to get an absolute file position whenever they need to jump there.&lt;br /&gt;
&lt;br /&gt;
Regardless of whether the data is actually used or not, it is always present in valid files.&lt;br /&gt;
{{Notice|type=note|content=Add pseudo-code for &amp;quot;fixing&amp;quot; the offsets listed in this chunk.}}&lt;br /&gt;
&lt;br /&gt;
=== File Name Chunk ===&lt;br /&gt;
{{Notice|type=info|content=&amp;lt;b&amp;gt;This chunk is completely optional&amp;lt;/b&amp;gt; and seems to only be used for debugging/internal-tooling purposes.}}&lt;br /&gt;
This chunk simply states the name and extension (without the path) of the file it&#039;s contained in.&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_NFN0HEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to &amp;quot;NFN0&amp;quot;.&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // Padding; always 0 in files.&lt;br /&gt;
  uint32_t Pad[2];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Immediately following this header comes a null-terminated string which represents the file&#039;s name and extension (without its path).&lt;br /&gt;
&lt;br /&gt;
=== End Chunk ===&lt;br /&gt;
{{Notice|type=note|content=&amp;lt;b&amp;gt;This chunk is required to be present in all binary-form NN chunk files!&amp;lt;/b&amp;gt;}}&lt;br /&gt;
This is the last chunk in all binary-form NN chunk files. It exists purely to indicate that there are no more chunks left in the file, so that you know when to stop reading if you&#039;re reading the file sequentially, one chunk at a time.&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NNS_BINCNK_NENDHEADER&lt;br /&gt;
{&lt;br /&gt;
  // Binary chunk header; must be present at the beginning of all binary chunks.&lt;br /&gt;
  //&lt;br /&gt;
  // The chunk ID is set to &amp;quot;NEND&amp;quot;.&lt;br /&gt;
  NNS_BINCNK_HEADER ChunkHeader;&lt;br /&gt;
&lt;br /&gt;
  // Padding; always 0 in files.&lt;br /&gt;
  uint32_t Pad[2];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Text-Form File Format ==&lt;br /&gt;
Text-form NN chunk files, just like the text-form Ninja chunk model files that precede them, are text files comprised of code in what is actually a very limited subset of the C programming language, heavily utilizing special NN types/preprocessor defines, which are, presumably, defined within the official NN SDK.&lt;br /&gt;
&lt;br /&gt;
This allows them to both be parsable by tooling (it is unclear if they actually do this), and to be directly &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt;d within the C or C++ files which make up their game&#039;s source code, embedding the data directly within the game&#039;s executable!&lt;br /&gt;
&lt;br /&gt;
Their general layout is as follows:&lt;br /&gt;
{{Notice|type=note|content=Replace these special phrases in all of the following &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; snippets as follows:&lt;br /&gt;
&lt;br /&gt;
* \t: Replace with one or more tab characters (&amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; spaces), used to align the text.&lt;br /&gt;
* TYPE: Replace with the name of the type currently being written.&lt;br /&gt;
* NAME: Replace with the name of whatever you&#039;re currently writing.}}&lt;br /&gt;
&lt;br /&gt;
# A (required?) &amp;quot;header&amp;quot; comment that is comprised of the following, in order:&lt;br /&gt;
## The name and version number of the tool used to create this file.&lt;br /&gt;
## &amp;lt;code&amp;gt;Create\t:&amp;lt;/code&amp;gt; followed by the date this file was created in the &amp;lt;code&amp;gt;ddd MMM dd HH:mm:ss yyyy&amp;lt;/code&amp;gt; .NET DateTime format.&lt;br /&gt;
## The names of each of the root structs for every data chunk in the file, in this format: &amp;lt;code&amp;gt;TYPE\t: NAME&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; refers to the root struct&#039;s type (e.g. &amp;lt;code&amp;gt;NNS_TEXFILELIST&amp;lt;/code&amp;gt;). See the linked pages in the [[NN Chunk Format#Data Chunks|data chunks chart]].&lt;br /&gt;
# One or more data chunks, each of which is comprised of the following, in order:&lt;br /&gt;
## A comment with the text: &amp;lt;code&amp;gt;TYPE START&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; refers to the [[NN Chunk Format#Data Chunks|data chunk&#039;s type]] (e.g. &amp;lt;code&amp;gt;TEXLIST&amp;lt;/code&amp;gt;).&lt;br /&gt;
## All of the data used by this data chunk, represented as C code comprised heavily of special NN preprocessor macros. See the linked pages in the [[NN Chunk Format#Data Chunks|data chunks chart]].&lt;br /&gt;
## A comment with the text: &amp;lt;code&amp;gt;TYPE END&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; refers to the [[NN Chunk Format#Data Chunks|data chunk&#039;s type]] (e.g. &amp;lt;code&amp;gt;TEXLIST&amp;lt;/code&amp;gt;).&lt;br /&gt;
# A (required?) comment with the text: &amp;lt;code&amp;gt;End of File&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The files also always use tab characters (&amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt;) for indentation, rather than spaces.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample Text-form NN chunk file, to better understand the format:&lt;br /&gt;
{{Notice|type=example|content=&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
    Sample NN Exporter Version 1.00.00&lt;br /&gt;
    Create  : Wed Feb 08 21:06:46 2023&lt;br /&gt;
    NNS_TEXFILELIST : nntexfilelist_SampleFile&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/* TEXLIST START */&lt;br /&gt;
&lt;br /&gt;
NNS_TEXFILE nntexfile_SampleFile[] =&lt;br /&gt;
{&lt;br /&gt;
    TEXFILE(&lt;br /&gt;
        TF_FILENAME( &amp;quot;SampleTex_dif.dds&amp;quot; ),&lt;br /&gt;
        TF_FILTER( NND_MIN_LINEAR_MIPMAP_NEAREST, NND_MAG_LINEAR )&lt;br /&gt;
    ),&lt;br /&gt;
    TEXFILE(&lt;br /&gt;
        TF_FILENAME( &amp;quot;SampleTex_spec.dds&amp;quot; ),&lt;br /&gt;
        TF_FILTER( NND_MIN_LINEAR_MIPMAP_NEAREST, NND_MAG_LINEAR )&lt;br /&gt;
    ),&lt;br /&gt;
    TEXFILE(&lt;br /&gt;
        TF_FILENAME( &amp;quot;SampleTex_norm.dds&amp;quot; ),&lt;br /&gt;
        TF_FILTER( NND_MIN_LINEAR_MIPMAP_NEAREST, NND_MAG_LINEAR )&lt;br /&gt;
    ),&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
NNS_TEXFILELIST nntexfilelist_SampleFile[] =&lt;br /&gt;
{&lt;br /&gt;
    TEXFILELIST(&lt;br /&gt;
        TFL_N_TEXFILE( 3 ),&lt;br /&gt;
        TFL_TEXFILE( nntexfile_SampleFile )&lt;br /&gt;
    )&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
/* TEXLIST END */&lt;br /&gt;
&lt;br /&gt;
/* End of File */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}{{Notice|type=info|content=All of the following in the above example are type/preprocessor defines from the NN library:&lt;br /&gt;
&lt;br /&gt;
* NNS_TEXFILE&lt;br /&gt;
* TEXFILE&lt;br /&gt;
* TF_FILENAME&lt;br /&gt;
* TF_FILTER&lt;br /&gt;
* NND_MIN_LINEAR_MIPMAP_NEAREST&lt;br /&gt;
* NND_MAG_LINEAR&lt;br /&gt;
* NNS_TEXFILELIST&lt;br /&gt;
* TEXFILELIST&lt;br /&gt;
* TFL_N_TEXFILE&lt;br /&gt;
* TFL_TEXFILE&lt;br /&gt;
&lt;br /&gt;
For a complete list of all of these defines, please refer to the individual pages linked in the [[#Data Chunks|data chunks chart]] (for the ones used in this example, refer to the [[NN Chunk Format - TEXTLIST|TEXLIST]] documentation).}}&lt;br /&gt;
Note that in C, code is parsed sequentially: left-to-right, top-to-bottom.&lt;br /&gt;
&lt;br /&gt;
If a name is used in the file before it has been declared, that&#039;s an error.&lt;br /&gt;
&lt;br /&gt;
Thus, the ordering of the data within each data chunk is generally written to the file in &amp;quot;reverse&amp;quot; order, such that any reference to a value will not be written until &#039;&#039;after&#039;&#039; the value it is referencing has been written, avoiding this problem.&lt;br /&gt;
&lt;br /&gt;
In some cases, the NN exporters will instead declare the value early, and define it later on in the file, using an extern declaration like so:&lt;br /&gt;
{{Notice|type=example|content=Here, the &amp;lt;code&amp;gt;nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye&amp;lt;/code&amp;gt; value is declared so that it can be referenced by the &amp;lt;code&amp;gt;VTX_LISTPTR&amp;lt;/code&amp;gt; field in &amp;lt;code&amp;gt;nnvertexdesc_plb_op_en_Kyozoress_head_l__2_w2_Eye&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
extern NNS_VTXTYPE_XB_PW4INCT nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye[];&lt;br /&gt;
&lt;br /&gt;
NNS_VTXLIST_DX_DESC nnvertexdesc_plb_op_en_Kyozoress_head_l__2_w2_Eye[] =&lt;br /&gt;
{&lt;br /&gt;
    VTXDESC(&lt;br /&gt;
        /* ... */&lt;br /&gt;
        VTX_LISTPTR( nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye ),&lt;br /&gt;
        /* ... */&lt;br /&gt;
    ),&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, later on in the file, the referenced &amp;lt;code&amp;gt;nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye&amp;lt;/code&amp;gt; value is defined as usual (contents redacted due to extreme length):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
NNS_VTXTYPE_XB_PW4INCT nnvertex_plb_op_en_Kyozoress_head_l__2_w2_Eye[] =&lt;br /&gt;
{&lt;br /&gt;
    /* ... */&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>Arg!!</name></author>
	</entry>
</feed>