<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yuv422</id>
	<title>ModdingWiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yuv422"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/Yuv422"/>
	<updated>2026-05-15T04:54:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Winter_Challenge&amp;diff=9343</id>
		<title>Winter Challenge</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Winter_Challenge&amp;diff=9343"/>
		<updated>2021-01-07T22:33:46Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Added link to tools to extract / repack the game data files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = No&lt;br /&gt;
 | Tiles = No&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
{{NoModdingInfo}}&lt;br /&gt;
&lt;br /&gt;
== Game logic ==&lt;br /&gt;
&lt;br /&gt;
The game executable WINTER.EXE is packed, [[UNLZEXE]] unpacks it. The game data asset files are stored in an archive package concatenated to the end of the executable file.&lt;br /&gt;
&lt;br /&gt;
Some executable logic is loaded dynamically from overlay files. These live in the game data archive. They are named &amp;lt;code&amp;gt;OVLn.COD&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;OVLn.REL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Game Archive ==&lt;br /&gt;
&lt;br /&gt;
Game data is stored at the end of the WINTER.EXE file after the executable section. By default Disk 1 contains the VGA version of the game. The EGA version is contained on Disk 2 in the file WINTER2.BIN This data is loaded into WINTER.EXE as part of the installation process. &lt;br /&gt;
&lt;br /&gt;
The game data archive has the following structure:&lt;br /&gt;
&lt;br /&gt;
* [[INT16LE]] identifier (&amp;lt;code&amp;gt;0x424D&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [[INT16LE]] number of following records:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| INT32LE || length || Length of file&lt;br /&gt;
|-&lt;br /&gt;
| INT32LE || offset || Offset to file&lt;br /&gt;
|-&lt;br /&gt;
| CHAR || name[14] || Name of file, zero-terminated, decipher each char by subtracting &amp;lt;code&amp;gt;0x60&amp;lt;/code&amp;gt; from it&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note : most of the files are compressed with what appears to be a form of RLE compression.&lt;br /&gt;
&lt;br /&gt;
Compressed files are identified by the letter &#039;P&#039; at the start of the extension. eg. SKI.PM3 compressed or SKI.M3D uncompressed.&lt;br /&gt;
&lt;br /&gt;
In-game, you can install the game permanently to the hard drive with a &#039;&#039;Fast Load&#039;&#039; option; doing so will result in an executable twice the original size with most assets stored in their decompressed form.&lt;br /&gt;
&lt;br /&gt;
== Game Tools ==&lt;br /&gt;
You can extract and repack the game data files with [https://github.com/yuv422/winter_challenge_util winter_challenge_util]&lt;br /&gt;
&lt;br /&gt;
[[Category:Accolade]]&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:Sports]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Winter_Challenge&amp;diff=9341</id>
		<title>Winter Challenge</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Winter_Challenge&amp;diff=9341"/>
		<updated>2021-01-06T11:48:40Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Fixed the order of the fields in the file header. Added some more detail about how the game data is stored.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = No&lt;br /&gt;
 | Tiles = No&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
{{NoModdingInfo}}&lt;br /&gt;
&lt;br /&gt;
== Game logic ==&lt;br /&gt;
&lt;br /&gt;
The game executable WINTER.EXE is packed, [[UNLZEXE]] unpacks it. The game data asset files are stored in an archive package concatenated to the end of the executable file.&lt;br /&gt;
&lt;br /&gt;
Some executable logic is loaded dynamically from overlay files. These live in the game data archive. They are named &amp;lt;code&amp;gt;OVLn.COD&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;OVLn.REL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Game Archive ==&lt;br /&gt;
&lt;br /&gt;
Game data is stored at the end of the WINTER.EXE file after the executable section. By default Disk 1 contains the VGA version of the game. The EGA version is contained on Disk 2 in the file WINTER2.BIN This data is loaded into WINTER.EXE as part of the installation process. &lt;br /&gt;
&lt;br /&gt;
The game data archive has the following structure:&lt;br /&gt;
&lt;br /&gt;
* [[INT16LE]] identifier (&amp;lt;code&amp;gt;0x424D&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [[INT16LE]] number of following records:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| INT32LE || length || Length of file&lt;br /&gt;
|-&lt;br /&gt;
| INT32LE || offset || Offset to file&lt;br /&gt;
|-&lt;br /&gt;
| CHAR || name[14] || Name of file, zero-terminated, decipher each char by subtracting &amp;lt;code&amp;gt;0x60&amp;lt;/code&amp;gt; from it&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note : most of the files are compressed with what appears to be a form of RLE compression.&lt;br /&gt;
&lt;br /&gt;
Compressed files are identified by the letter &#039;P&#039; at the start of the extension. eg. SKI.PM3 compressed or SKI.M3D uncompressed.&lt;br /&gt;
&lt;br /&gt;
In-game, you can install the game permanently to the hard drive with a &#039;&#039;Fast Load&#039;&#039; option; doing so will result in an executable twice the original size with most assets stored in their decompressed form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Accolade]]&lt;br /&gt;
[[Category:3D]]&lt;br /&gt;
[[Category:Sports]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=8417</id>
		<title>Cosmo&#039;s Cosmic Adventure</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=8417"/>
		<updated>2019-03-16T02:31:42Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Added game screenshot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Title = Cosmo&#039;s_Cosmic_Adventure.gif&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Cosmo&#039;s Cosmic Adventure&#039;&#039;&#039;, also known simply as Cosmo, is a three part series chronicling the adventures of Cosmo, a small, green sucker-handed alien boy who is seeking his parents after a comet collision forces them to land their ship on a dangerous and uncharted planet.&lt;br /&gt;
&lt;br /&gt;
The Cosmo engine was later updated and used for [[Duke Nukem II]], so the two games share a number of file formats.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosedit.zip CosEdit]&lt;br /&gt;
| Platform = DOS GUI&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://dl.dropbox.com/u/3940020/COSGRAPH-working.zip Cosgraph]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = Edit&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosmedit10.zip Cosmo Edit]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/textract.zip TExtract]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = View&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = View&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = View&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Game Engines ==&lt;br /&gt;
[https://github.com/yuv422/cosmo-engine Cosmo-Engine] - An open source game engine for playing Cosmo&#039;s Cosmic Adventure on modern systems.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (32,000 bytes)&lt;br /&gt;
 | Format = [[Raw EGA data#Planar|Full-screen planar EGA]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 320&amp;amp;times;200 full-screen images (in four planes: blue, green, red, intensity)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (4,000 bytes)&lt;br /&gt;
 | Format = [[B800 Text]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Text screens shown at exit&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = actors.mni&amp;lt;br/&amp;gt;bd*.mni&amp;lt;br/&amp;gt;cartoon.mni&amp;lt;br/&amp;gt;masktile.mni&amp;lt;br/&amp;gt;players.mni&amp;lt;br/&amp;gt;tiles.mni&lt;br /&gt;
 | Format = [[Cosmo Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tilesets with 8&amp;amp;times;8 tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = tileattr.mni&lt;br /&gt;
 | Format = [[Cosmo Tile Attributes]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tile properties&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.stn&amp;lt;br/&amp;gt;cosmo*.vol&lt;br /&gt;
 | Format = [[VOL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Archive file storing the game data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = a*.mni&lt;br /&gt;
 | Format = [[Cosmo Level Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = m*.mni&amp;lt;br/&amp;gt;(except masktile.mni)&lt;br /&gt;
 | Format = [[IMF Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music - see [[#Notes]] below&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = sounds*.mni&lt;br /&gt;
 | Format = [[Inverse Frequency Sound format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = PC speaker sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.sv*&lt;br /&gt;
 | Format = [[Cosmo Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Saved games.  &amp;lt;tt&amp;gt;cosmo?.svt&amp;lt;/tt&amp;gt; is a temporary save written at the start of each level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *info.mni&lt;br /&gt;
 | Format = [[Cosmo Tileinfo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = How to lay out the actor tiles into complete frames&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = prevdemo.mni&lt;br /&gt;
 | Format = [[Cosmo Demo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game demo format&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.cfg&lt;br /&gt;
 | Format = [[Cosmo Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game configuration format&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Graphics limitations and glitches:&lt;br /&gt;
** The masktile graphics can be corrupted by a buffer overflow by the addition of a large enough IMF music file to the [[:Category:Group Files|group file]] (usually around 40KB). (That is, the music goes over it&#039;s intended memory boundary.) This is not permanent, and will only occur until the offending file is removed or a smaller or less-complex file is imported in its place. &lt;br /&gt;
** Actor graphics can be corrupted by a self-contained arithmetic overflow by the addition of too many sprites. (that is, it writes to the end of the allocated block, then back around to the beginning, where it overwrites the header data.) Again, this is not permanent unless the user does not change the data in the group file.&lt;br /&gt;
** If an actor (a good example would be Cosmo himself) is behind a masked tile with the foreground bit set on it, any transparent regions of the tile overlapping the actor will remove those regions on the actor, showing the background instead.&lt;br /&gt;
&lt;br /&gt;
*Directory miscellany:&lt;br /&gt;
** The game reads from the VOL and STN archive files in preference to the current directory, but will read from the current directory if the archive files are not present.  Any game files in the current directory will not be read while the VOL/STN files are present.  To modify a file, it will either need to be imported back into the VOL/STN, or the VOL/STN should have its entire contents extracted into the game folder and then be removed or renamed.&lt;br /&gt;
** A directory path (relative to the current directory) can be given on the command line.  Any files that the game writes (saved games, high scores, etc.) will be written to this folder instead.  This is probably to allow running the game directly from read-only media like a CD.&lt;br /&gt;
&lt;br /&gt;
*Game Engine Glitches:&lt;br /&gt;
**In editing levels, if two or more blue moving platforms collide, the tiles that overlap will disappear. Furthermore, if Cosmo stands anywhere on any one of these platforms when they collide, he will literally be deleted from the level, and the game engine will treat him as if he had died or fallen off the bottom of the screen, restarting the level over again.&lt;br /&gt;
**If a player actor is not specified in a level file, a unique event can occur. The level coordinates of the player from the previous level (or any level, if using the warp cheat) carry over, meaning that the player can enter the level in a very different spot than what was intended before, even entering the level trapped inside a wall!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventures/Mods&amp;diff=8406</id>
		<title>Cosmo&#039;s Cosmic Adventures/Mods</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventures/Mods&amp;diff=8406"/>
		<updated>2019-03-09T03:27:29Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Yuv422 moved page Cosmo&amp;#039;s Cosmic Adventures/Mods to Cosmo&amp;#039;s Cosmic Adventure/Mods: Fixed typo in game name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Cosmo&#039;s Cosmic Adventure/Mods]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure/Mods&amp;diff=8405</id>
		<title>Cosmo&#039;s Cosmic Adventure/Mods</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure/Mods&amp;diff=8405"/>
		<updated>2019-03-09T03:27:29Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Yuv422 moved page Cosmo&amp;#039;s Cosmic Adventures/Mods to Cosmo&amp;#039;s Cosmic Adventure/Mods: Fixed typo in game name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 90%; border:1px solid gray; border-collapse: collapse; text-align: center; width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Title&lt;br /&gt;
! Download(s)&lt;br /&gt;
! Release date&lt;br /&gt;
! Modder(s)&lt;br /&gt;
! # of levels&lt;br /&gt;
! Protagonist&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Lingyan203&#039;s Cosmo Expansion Pack&lt;br /&gt;
| [http://www.shikadi.net/wiki/files/moddingwiki/mods/cosmos-cosmic-adventures/mod.cosmo.lingyan203.expack.2008.zip final]&lt;br /&gt;
| [https://www.youtube.com/watch?v=XkScFCWjnBo 2008-08-25]&lt;br /&gt;
| Lingyan203&lt;br /&gt;
| All?&lt;br /&gt;
| Cosmo&lt;br /&gt;
| Level only mod, based on original levels with some changes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Mods by game]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventures/Cheats&amp;diff=8404</id>
		<title>Cosmo&#039;s Cosmic Adventures/Cheats</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventures/Cheats&amp;diff=8404"/>
		<updated>2019-03-09T03:27:29Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Yuv422 moved page Cosmo&amp;#039;s Cosmic Adventures/Cheats to Cosmo&amp;#039;s Cosmic Adventure/Cheats: Fixed typo in game name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Cosmo&#039;s Cosmic Adventure/Cheats]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure/Cheats&amp;diff=8403</id>
		<title>Cosmo&#039;s Cosmic Adventure/Cheats</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure/Cheats&amp;diff=8403"/>
		<updated>2019-03-09T03:27:29Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Yuv422 moved page Cosmo&amp;#039;s Cosmic Adventures/Cheats to Cosmo&amp;#039;s Cosmic Adventure/Cheats: Fixed typo in game name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Full-Inventory Cheat ==&lt;br /&gt;
&lt;br /&gt;
* Hold down &#039;&#039;&#039;C&#039;&#039;&#039;, &#039;&#039;&#039;0&#039;&#039;&#039; (zero), and &#039;&#039;&#039;F10&#039;&#039;&#039; to fill up your health, and bomb inventory.  This cheat was supposed to work only once per game, but you can use this cheat as many times as you like if you save the game &#039;&#039;each time&#039;&#039; after using the cheat.&lt;br /&gt;
&lt;br /&gt;
== Debug Cheats ==&lt;br /&gt;
&lt;br /&gt;
Hold down &#039;&#039;&#039;Tab&#039;&#039;&#039;, &#039;&#039;&#039;F12&#039;&#039;&#039;, and &#039;&#039;&#039;Delete&#039;&#039;&#039; to activate debug mode.  The following keys will then work:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;F10 + G&#039;&#039;&#039; will activate God Mode. This means that Cosmo cannot be harmed by enemies or hazards. He can, however, die by falling off the bottom of the screen.&lt;br /&gt;
* &#039;&#039;&#039;F10 + W&#039;&#039;&#039; will bring up a window where you can type in which level you would like to go to. &lt;br /&gt;
* &#039;&#039;&#039;F10 + M&#039;&#039;&#039; will bring up a status window showing how much memory (in kB) is free, how much total memory is being used, how large the level is, and how many actors (Cosmo, enemies, objects, and obstacles) are in the level.&lt;br /&gt;
* &#039;&#039;&#039;F10 + P&#039;&#039;&#039; will pause the game without showing &#039;Game Paused&#039;&lt;br /&gt;
* &#039;&#039;&#039;F10 + E + N + D&#039;&#039;&#039; will skip to the end-of-episode cutscenes.&lt;br /&gt;
* &#039;&#039;&#039;F11&#039;&#039;&#039; Pressing F11 on the main menu will cause the game to go into demo recording mode. The recorded demo will be saved into the file &#039;&#039;&#039;PREVDEMO.MNI&#039;&#039;&#039;. Press &#039;&#039;&#039;X&#039;&#039;&#039; while recording the demo to advance to the next level.&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheat Codes]]&lt;br /&gt;
[[Category:Cosmo&#039;s Cosmic Adventures]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventures&amp;diff=8402</id>
		<title>Cosmo&#039;s Cosmic Adventures</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventures&amp;diff=8402"/>
		<updated>2019-03-09T03:27:29Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Yuv422 moved page Cosmo&amp;#039;s Cosmic Adventures to Cosmo&amp;#039;s Cosmic Adventure: Fixed typo in game name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Cosmo&#039;s Cosmic Adventure]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=8401</id>
		<title>Cosmo&#039;s Cosmic Adventure</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=8401"/>
		<updated>2019-03-09T03:27:28Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Yuv422 moved page Cosmo&amp;#039;s Cosmic Adventures to Cosmo&amp;#039;s Cosmic Adventure: Fixed typo in game name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Cosmo&#039;s Cosmic Adventure&#039;&#039;&#039;, also known simply as Cosmo, is a three part series chronicling the adventures of Cosmo, a small, green sucker-handed alien boy who is seeking his parents after a comet collision forces them to land their ship on a dangerous and uncharted planet.&lt;br /&gt;
&lt;br /&gt;
The Cosmo engine was later updated and used for [[Duke Nukem II]], so the two games share a number of file formats.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosedit.zip CosEdit]&lt;br /&gt;
| Platform = DOS GUI&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://dl.dropbox.com/u/3940020/COSGRAPH-working.zip Cosgraph]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = Edit&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosmedit10.zip Cosmo Edit]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/textract.zip TExtract]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = View&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = View&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = View&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Game Engines ==&lt;br /&gt;
[https://github.com/yuv422/cosmo-engine Cosmo-Engine] - An open source game engine for playing Cosmo&#039;s Cosmic Adventure on modern systems.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (32,000 bytes)&lt;br /&gt;
 | Format = [[Raw EGA data#Planar|Full-screen planar EGA]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 320&amp;amp;times;200 full-screen images (in four planes: blue, green, red, intensity)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (4,000 bytes)&lt;br /&gt;
 | Format = [[B800 Text]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Text screens shown at exit&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = actors.mni&amp;lt;br/&amp;gt;bd*.mni&amp;lt;br/&amp;gt;cartoon.mni&amp;lt;br/&amp;gt;masktile.mni&amp;lt;br/&amp;gt;players.mni&amp;lt;br/&amp;gt;tiles.mni&lt;br /&gt;
 | Format = [[Cosmo Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tilesets with 8&amp;amp;times;8 tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = tileattr.mni&lt;br /&gt;
 | Format = [[Cosmo Tile Attributes]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tile properties&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.stn&amp;lt;br/&amp;gt;cosmo*.vol&lt;br /&gt;
 | Format = [[VOL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Archive file storing the game data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = a*.mni&lt;br /&gt;
 | Format = [[Cosmo Level Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = m*.mni&amp;lt;br/&amp;gt;(except masktile.mni)&lt;br /&gt;
 | Format = [[IMF Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music - see [[#Notes]] below&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = sounds*.mni&lt;br /&gt;
 | Format = [[Inverse Frequency Sound format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = PC speaker sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.sv*&lt;br /&gt;
 | Format = [[Cosmo Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Saved games.  &amp;lt;tt&amp;gt;cosmo?.svt&amp;lt;/tt&amp;gt; is a temporary save written at the start of each level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *info.mni&lt;br /&gt;
 | Format = [[Cosmo Tileinfo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = How to lay out the actor tiles into complete frames&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = prevdemo.mni&lt;br /&gt;
 | Format = [[Cosmo Demo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game demo format&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.cfg&lt;br /&gt;
 | Format = [[Cosmo Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game configuration format&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Graphics limitations and glitches:&lt;br /&gt;
** The masktile graphics can be corrupted by a buffer overflow by the addition of a large enough IMF music file to the [[:Category:Group Files|group file]] (usually around 40KB). (That is, the music goes over it&#039;s intended memory boundary.) This is not permanent, and will only occur until the offending file is removed or a smaller or less-complex file is imported in its place. &lt;br /&gt;
** Actor graphics can be corrupted by a self-contained arithmetic overflow by the addition of too many sprites. (that is, it writes to the end of the allocated block, then back around to the beginning, where it overwrites the header data.) Again, this is not permanent unless the user does not change the data in the group file.&lt;br /&gt;
** If an actor (a good example would be Cosmo himself) is behind a masked tile with the foreground bit set on it, any transparent regions of the tile overlapping the actor will remove those regions on the actor, showing the background instead.&lt;br /&gt;
&lt;br /&gt;
*Directory miscellany:&lt;br /&gt;
** The game reads from the VOL and STN archive files in preference to the current directory, but will read from the current directory if the archive files are not present.  Any game files in the current directory will not be read while the VOL/STN files are present.  To modify a file, it will either need to be imported back into the VOL/STN, or the VOL/STN should have its entire contents extracted into the game folder and then be removed or renamed.&lt;br /&gt;
** A directory path (relative to the current directory) can be given on the command line.  Any files that the game writes (saved games, high scores, etc.) will be written to this folder instead.  This is probably to allow running the game directly from read-only media like a CD.&lt;br /&gt;
&lt;br /&gt;
*Game Engine Glitches:&lt;br /&gt;
**In editing levels, if two or more blue moving platforms collide, the tiles that overlap will disappear. Furthermore, if Cosmo stands anywhere on any one of these platforms when they collide, he will literally be deleted from the level, and the game engine will treat him as if he had died or fallen off the bottom of the screen, restarting the level over again.&lt;br /&gt;
**If a player actor is not specified in a level file, a unique event can occur. The level coordinates of the player from the previous level (or any level, if using the warp cheat) carry over, meaning that the player can enter the level in a very different spot than what was intended before, even entering the level trapped inside a wall!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=8400</id>
		<title>Cosmo&#039;s Cosmic Adventure</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=8400"/>
		<updated>2019-03-09T03:21:36Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Added link to Cosmo-Engine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Cosmo&#039;s Cosmic Adventure&#039;&#039;&#039;, also known simply as Cosmo, is a three part series chronicling the adventures of Cosmo, a small, green sucker-handed alien boy who is seeking his parents after a comet collision forces them to land their ship on a dangerous and uncharted planet.&lt;br /&gt;
&lt;br /&gt;
The Cosmo engine was later updated and used for [[Duke Nukem II]], so the two games share a number of file formats.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosedit.zip CosEdit]&lt;br /&gt;
| Platform = DOS GUI&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://dl.dropbox.com/u/3940020/COSGRAPH-working.zip Cosgraph]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = Edit&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosmedit10.zip Cosmo Edit]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/textract.zip TExtract]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = View&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = View&lt;br /&gt;
| sfx = View&lt;br /&gt;
| txt = View&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Game Engines ==&lt;br /&gt;
[https://github.com/yuv422/cosmo-engine Cosmo-Engine] - An open source game engine for playing Cosmo&#039;s Cosmic Adventure on modern systems.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (32,000 bytes)&lt;br /&gt;
 | Format = [[Raw EGA data#Planar|Full-screen planar EGA]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 320&amp;amp;times;200 full-screen images (in four planes: blue, green, red, intensity)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (4,000 bytes)&lt;br /&gt;
 | Format = [[B800 Text]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Text screens shown at exit&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = actors.mni&amp;lt;br/&amp;gt;bd*.mni&amp;lt;br/&amp;gt;cartoon.mni&amp;lt;br/&amp;gt;masktile.mni&amp;lt;br/&amp;gt;players.mni&amp;lt;br/&amp;gt;tiles.mni&lt;br /&gt;
 | Format = [[Cosmo Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tilesets with 8&amp;amp;times;8 tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = tileattr.mni&lt;br /&gt;
 | Format = [[Cosmo Tile Attributes]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tile properties&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.stn&amp;lt;br/&amp;gt;cosmo*.vol&lt;br /&gt;
 | Format = [[VOL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Archive file storing the game data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = a*.mni&lt;br /&gt;
 | Format = [[Cosmo Level Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = m*.mni&amp;lt;br/&amp;gt;(except masktile.mni)&lt;br /&gt;
 | Format = [[IMF Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music - see [[#Notes]] below&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = sounds*.mni&lt;br /&gt;
 | Format = [[Inverse Frequency Sound format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = PC speaker sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.sv*&lt;br /&gt;
 | Format = [[Cosmo Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Saved games.  &amp;lt;tt&amp;gt;cosmo?.svt&amp;lt;/tt&amp;gt; is a temporary save written at the start of each level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *info.mni&lt;br /&gt;
 | Format = [[Cosmo Tileinfo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = How to lay out the actor tiles into complete frames&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = prevdemo.mni&lt;br /&gt;
 | Format = [[Cosmo Demo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game demo format&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.cfg&lt;br /&gt;
 | Format = [[Cosmo Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game configuration format&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Graphics limitations and glitches:&lt;br /&gt;
** The masktile graphics can be corrupted by a buffer overflow by the addition of a large enough IMF music file to the [[:Category:Group Files|group file]] (usually around 40KB). (That is, the music goes over it&#039;s intended memory boundary.) This is not permanent, and will only occur until the offending file is removed or a smaller or less-complex file is imported in its place. &lt;br /&gt;
** Actor graphics can be corrupted by a self-contained arithmetic overflow by the addition of too many sprites. (that is, it writes to the end of the allocated block, then back around to the beginning, where it overwrites the header data.) Again, this is not permanent unless the user does not change the data in the group file.&lt;br /&gt;
** If an actor (a good example would be Cosmo himself) is behind a masked tile with the foreground bit set on it, any transparent regions of the tile overlapping the actor will remove those regions on the actor, showing the background instead.&lt;br /&gt;
&lt;br /&gt;
*Directory miscellany:&lt;br /&gt;
** The game reads from the VOL and STN archive files in preference to the current directory, but will read from the current directory if the archive files are not present.  Any game files in the current directory will not be read while the VOL/STN files are present.  To modify a file, it will either need to be imported back into the VOL/STN, or the VOL/STN should have its entire contents extracted into the game folder and then be removed or renamed.&lt;br /&gt;
** A directory path (relative to the current directory) can be given on the command line.  Any files that the game writes (saved games, high scores, etc.) will be written to this folder instead.  This is probably to allow running the game directly from read-only media like a CD.&lt;br /&gt;
&lt;br /&gt;
*Game Engine Glitches:&lt;br /&gt;
**In editing levels, if two or more blue moving platforms collide, the tiles that overlap will disappear. Furthermore, if Cosmo stands anywhere on any one of these platforms when they collide, he will literally be deleted from the level, and the game engine will treat him as if he had died or fallen off the bottom of the screen, restarting the level over again.&lt;br /&gt;
**If a player actor is not specified in a level file, a unique event can occur. The level coordinates of the player from the previous level (or any level, if using the warp cheat) carry over, meaning that the player can enter the level in a very different spot than what was intended before, even entering the level trapped inside a wall!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=7389</id>
		<title>Cosmo&#039;s Cosmic Adventure</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=7389"/>
		<updated>2017-12-31T02:09:18Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Cosmo config file format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Cosmo&#039;s Cosmic Adventure&#039;&#039;&#039;, also known simply as Cosmo, is a three part series chronicling the adventures of Cosmo, a small, green sucker-handed alien boy who is seeking his parents after a comet collision forces them to land their ship on a dangerous and uncharted planet.&lt;br /&gt;
&lt;br /&gt;
The Cosmo engine was later updated and used for [[Duke Nukem II]], so the two games share a number of file formats.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosedit.zip CosEdit]&lt;br /&gt;
| Platform = DOS GUI&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://dl.dropbox.com/u/3940020/COSGRAPH-working.zip Cosgraph]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = Edit&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosmedit10.zip Cosmo Edit]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/textract.zip TExtract]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (32,000 bytes)&lt;br /&gt;
 | Format = [[Raw EGA data#Planar|Full-screen planar EGA]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 320&amp;amp;times;200 full-screen images (in four planes: blue, green, red, intensity)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (4,000 bytes)&lt;br /&gt;
 | Format = [[B800 Text]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Text screens shown at exit&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = actors.mni&amp;lt;br/&amp;gt;bd*.mni&amp;lt;br/&amp;gt;cartoon.mni&amp;lt;br/&amp;gt;masktile.mni&amp;lt;br/&amp;gt;players.mni&amp;lt;br/&amp;gt;tiles.mni&lt;br /&gt;
 | Format = [[Cosmo Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tilesets with 8&amp;amp;times;8 tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = tileattr.mni&lt;br /&gt;
 | Format = [[Cosmo Tile Attributes]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tile properties&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.stn&amp;lt;br/&amp;gt;cosmo*.vol&lt;br /&gt;
 | Format = [[VOL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Archive file storing the game data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = a*.mni&lt;br /&gt;
 | Format = [[Cosmo Level Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = m*.mni&amp;lt;br/&amp;gt;(except masktile.mni)&lt;br /&gt;
 | Format = [[IMF Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music - see [[#Notes]] below&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = sounds*.mni&lt;br /&gt;
 | Format = [[Inverse Frequency Sound format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = PC speaker sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.sv*&lt;br /&gt;
 | Format = [[Cosmo Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Saved games.  &amp;lt;tt&amp;gt;cosmo?.svt&amp;lt;/tt&amp;gt; is a temporary save written at the start of each level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *info.mni&lt;br /&gt;
 | Format = [[Cosmo Tileinfo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = How to lay out the actor tiles into complete frames&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = prevdemo.mni&lt;br /&gt;
 | Format = [[Cosmo Demo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game demo format&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.cfg&lt;br /&gt;
 | Format = [[Cosmo Config Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game configuration format&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Graphics limitations and glitches:&lt;br /&gt;
** The masktile graphics can be corrupted by a buffer overflow by the addition of a large enough IMF music file to the [[:Category:Group Files|group file]] (usually around 40KB). (That is, the music goes over it&#039;s intended memory boundary.) This is not permanent, and will only occur until the offending file is removed or a smaller or less-complex file is imported in its place. &lt;br /&gt;
** Actor graphics can be corrupted by a self-contained arithmetic overflow by the addition of too many sprites. (that is, it writes to the end of the allocated block, then back around to the beginning, where it overwrites the header data.) Again, this is not permanent unless the user does not change the data in the group file.&lt;br /&gt;
** If an actor (a good example would be Cosmo himself) is behind a masked tile with the foreground bit set on it, any transparent regions of the tile overlapping the actor will remove those regions on the actor, showing the background instead.&lt;br /&gt;
&lt;br /&gt;
*Directory miscellany:&lt;br /&gt;
** The game reads from the VOL and STN archive files in preference to the current directory, but will read from the current directory if the archive files are not present.  Any game files in the current directory will not be read while the VOL/STN files are present.  To modify a file, it will either need to be imported back into the VOL/STN, or the VOL/STN should have its entire contents extracted into the game folder and then be removed or renamed.&lt;br /&gt;
** A directory path (relative to the current directory) can be given on the command line.  Any files that the game writes (saved games, high scores, etc.) will be written to this folder instead.  This is probably to allow running the game directly from read-only media like a CD.&lt;br /&gt;
&lt;br /&gt;
*Game Engine Glitches:&lt;br /&gt;
**In editing levels, if two or more blue moving platforms collide, the tiles that overlap will disappear. Furthermore, if Cosmo stands anywhere on any one of these platforms when they collide, he will literally be deleted from the level, and the game engine will treat him as if he had died or fallen off the bottom of the screen, restarting the level over again.&lt;br /&gt;
**If a player actor is not specified in a level file, a unique event can occur. The level coordinates of the player from the previous level (or any level, if using the warp cheat) carry over, meaning that the player can enter the level in a very different spot than what was intended before, even entering the level trapped inside a wall!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Config_Format&amp;diff=7388</id>
		<title>Cosmo Config Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Config_Format&amp;diff=7388"/>
		<updated>2017-12-31T01:59:02Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Cosmo config file format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This file is used to store the configuration and high scores for Cosmo.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Up key || The scancode for the mapped up key&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Down key || The scancode for the mapped down key&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Left key || The scancode for the mapped left key&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Right key || The scancode for the mapped right key&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Jump key || The scancode for the mapped jump key&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Bomb key || The scancode for the mapped bomb key&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Music on flag || Flag indicating whether music is enabled. 1 = music on, 0 = music off&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Sound effects on flag || Flag indicating whether sound effects are enabled. 1 = sfx on, 0 = sfx off&lt;br /&gt;
|-&lt;br /&gt;
| HIGHSCORE highScores[10] || High score table || Each record is a string in the format &amp;quot;score name&amp;quot; terminated with a LineFeed 0xA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Yuv422|Yuv422]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Cosmo&#039;s Cosmic Adventures]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7369</id>
		<title>Cosmo Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7369"/>
		<updated>2017-11-20T12:10:27Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: /* List of Actor Types */  Projectile hazards&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 3&lt;br /&gt;
 | Tile size = 8&amp;amp;times;8&lt;br /&gt;
 | Viewport = 304&amp;amp;times;144&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Cosmo&#039;s Cosmic Adventures}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
The file is in this basic layout:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iFlags||Flags indicating music, backdrop and other stuff&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapWidth||Map width in tiles&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iActorSize||Number of UINT16 values in the actor block&lt;br /&gt;
|-&lt;br /&gt;
|ACTORDATA actorData[]||Variable-length array of all the actors in the level&lt;br /&gt;
|-&lt;br /&gt;
|BYTE bgLayer[65528]||The map data for the background layer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The iMapWidth values in the original Cosmo levels is either 64, 128, 256 or 512. The &amp;quot;view window&amp;quot; in the game is 304x144 Pixels, so the minimal map width would be 38. However, the width must be a power of 2 to work (from 32 to 2048).&lt;br /&gt;
&lt;br /&gt;
The iActorSize values are reliable for all the original Cosmo level files (Version 1.20).&lt;br /&gt;
&lt;br /&gt;
The map data is actually sized 65528 Bytes or 32764 Words. Each entry in this block is divisable by 8 (see [[#Mapping cell values to tiles]]).&lt;br /&gt;
&lt;br /&gt;
=== Level Flags ===&lt;br /&gt;
&lt;br /&gt;
The structure of the bits in the iFlags value is as follows:&lt;br /&gt;
&lt;br /&gt;
 [ mmmmm | ppp | yxr | bbbbb ]&lt;br /&gt;
 &lt;br /&gt;
 m: music index&lt;br /&gt;
 p: palette animation type&lt;br /&gt;
 y: y-scrolling backdrop&lt;br /&gt;
 x: x-scrolling backdrop&lt;br /&gt;
 r: rain&lt;br /&gt;
 b: backdrop index&lt;br /&gt;
&lt;br /&gt;
The indices for music and backdrop refer to an array of filename strings stored in the executable. You can find them by searching for the first filename in each array. For backdrops, the first filename (index: 0) is &amp;lt;tt&amp;gt;BDBLANK.MNI&amp;lt;/tt&amp;gt;, for music it&#039;s &amp;lt;tt&amp;gt;MCAVES.MNI&amp;lt;/tt&amp;gt;. Note that some backdrop files are not used by the games.  The complete list is:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Backdrop&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bdblank.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bdpipe.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bdredsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bdrocktk.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bdjungle.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bdstar.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bdwierd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bdcave.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || bdice.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || bdshrum.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || bdtechms.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || bdnewsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bdstar2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || bdstar3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || bdforest.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || bdmountn.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || bdguts.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bdbrktec.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || bdclouds.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19 || bdfutcty.mni&lt;br /&gt;
|-&lt;br /&gt;
| 20 || bdice2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 21 || bdcliff.mni&lt;br /&gt;
|-&lt;br /&gt;
| 22 || bdspooky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 23 || bdcrystl.mni&lt;br /&gt;
|-&lt;br /&gt;
| 24 || bdcircut.mni&lt;br /&gt;
|-&lt;br /&gt;
| 25 || bdcircpc.mni&lt;br /&gt;
|-&lt;br /&gt;
| 26-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Music&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || mcaves.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || mscarry.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || mboss.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || mrunaway.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || mcircus.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || mtekwrd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || measylev.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || mrockit.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || mhappy.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || mdevo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || mdadoda.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || mbells.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || mdrums.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || mbanjo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || measy2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || mteck2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || mteck3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || mteck4.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || mzztop.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Animation&amp;lt;br/&amp;gt;value !! Use !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || most levels || no palette changes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || A4 || random lightning (with thunder soundeffect)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || C8-C10 || cycling: red -&amp;gt; yellow -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 3 || A7 || cycling: red -&amp;gt; green -&amp;gt; blue&lt;br /&gt;
|-&lt;br /&gt;
| 4 || A8, B3, B4, B7 || cycling: black -&amp;gt; grey -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 5 || C6, C7 || flashing: red -&amp;gt; magenta -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 6 || C1 || replace dark magenta with black,&amp;lt;br/&amp;gt;no animation unless triggered by a bomb actor.&amp;lt;br/&amp;gt;(ONLY PRESENT IN COSMO3.EXE AT THE MOMENT.)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || None || {{TODO|Unknown}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Background Layer ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;bgLayer&amp;lt;/tt&amp;gt; block contains the grid/cell data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapData[32764]||Actual map data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;element&amp;quot; in &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; refers to the foreground and/or background tile used in a single grid cell.  The grids are arranged left to right, top to bottom, so the index can be calculated by this formula:&lt;br /&gt;
&lt;br /&gt;
 int iIndex = (y * iMapWidth) + x;&lt;br /&gt;
 iMapData[iIndex] = &amp;lt;new value to set at x,y&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map data in the original Cosmo level files is a constant 32764 UINT16LE cells long (65528 bytes), and the engine will never read more than 65535 bytes. However, the game calculates the map height by dividing the width in bytes by 65536:&lt;br /&gt;
&lt;br /&gt;
 int iMapHeight = 32768 / iMapWidth;&lt;br /&gt;
&lt;br /&gt;
Since the width of the map is always a power of 2 (min. 64), you can see that each file is &amp;quot;missing&amp;quot; 8 Bytes (or 4 Words). That means the last line of the map will always be missing the last 4 tiles. The game ignores that last, incomplete line. However, in one level (A8.MNI), there is an actor placed in that last line. Since actors are saved as individual structures instead of a grid, that actor will still be loaded by the game. But for editing a level, you should make sure the last line is visible, so that it&#039;s possible to place actors in that line or remove them from there.&lt;br /&gt;
&lt;br /&gt;
==== Mapping cell values to tiles ====&lt;br /&gt;
&lt;br /&gt;
The method of mapping elements in the &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; structure into tiles is fairly straightforward.  Each cell value is a pixel index into the tilemap.  Imagine the tileset laid out left to right all on the one row.  Since each tile is 8x8 pixels, at 16 pixels into the image, the third tile will begin (x = 0 for first tile, x = 8 for second tile, x = 16 for third tile.)  The cell value is essentially a pixel x-coordinate into the tileset.&lt;br /&gt;
&lt;br /&gt;
Note that in the tileset file, the solid tiles are made up of 2000 4-plane (16-colour) images, and these are followed by 1000 5-plane images (16-colour + transparency.)  Although separate images, they appear to be concatenated when the game loads them, as the cell value will be zero for the first solid tile, it will be eight for the second solid tile, it will be 15992 for the last solid tile, and it will be 16000 for the first masked tile.&lt;br /&gt;
&lt;br /&gt;
This means that if the solid and masked tiles have been treated as separate images, a check will need to be performed so that any cell value below 16000 is loaded from the solid tileset, and any value larger than this is loaded from the masked tileset (after subtracting 16000 from the cell value, to put it at zero for the first masked tile.)  However, for some reason the values for the masked tiles are at multiples of five tiles (tile #0 (x=0) is the first tile, tile #5 (x=40) is the second tile.)  This formula can be used to convert the values into tile numbers once they stray into the masked tile area:&lt;br /&gt;
&lt;br /&gt;
 #define COSMO_TS_SOLID_NUMTILES   2000 // 40x25&lt;br /&gt;
 #define COSMO_TS_MASKED_NUMTILES  1000 // 40x4&lt;br /&gt;
 &lt;br /&gt;
 tile = cell_value / 8&lt;br /&gt;
 if (tile &amp;gt; COSMO_TS_SOLID_NUMTILES) {&lt;br /&gt;
   // Once we&#039;re in the masked tileset it counts up in multiples of five planes&lt;br /&gt;
   tile = COSMO_TS_SOLID_NUMTILES + (tile - COSMO_TS_SOLID_NUMTILES) / 5;&lt;br /&gt;
 }&lt;br /&gt;
 // Now &#039;tile&#039; will be between 0 and 2999 inclusive&lt;br /&gt;
&lt;br /&gt;
As an example of a few tile values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cell value !! Tile number !! Tileset !! Index !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || N/A || N/A || See through to map backdrop&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 1 || Solid || 1 || First solid tile, note increment of 8&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 2 || Solid || 2 || Second solid tile, increment of 8 again&lt;br /&gt;
|-&lt;br /&gt;
| 15992 || 1999 || Solid || 1999 || Last solid tile&lt;br /&gt;
|-&lt;br /&gt;
| 16000 || 2000 || Masked || 0 || First masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 16040 || 2001 || Masked || 1 || Second masked tile, note increment of 40&lt;br /&gt;
|-&lt;br /&gt;
| 16080 || 2002 || Masked || 2 || Third masked tile, increment of 40 again&lt;br /&gt;
|-&lt;br /&gt;
| 55960 || 2999 || Masked || 999 || Last masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 56000 || N/A || N/A || N/A || Should never get a value this size or larger&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that while the cell value cannot be out of range for the solid tiles/background layer (since any values larger than 16000 will be loaded from the masked tileset) the cell values for the masked tileset have no such restriction.  (Although obviously out of range tiles will not be drawn correctly by the engine!)&lt;br /&gt;
&lt;br /&gt;
==== Gotchas ====&lt;br /&gt;
&lt;br /&gt;
* The first tile in the solid tileset is used as a transparent tile.  It will appear completely black if drawn (e.g. in a map editor) however the game does not draw this tile, so any cells with this as the background cell will be where the map backdrop shows through.  If you wish to draw the map with the backdrop in-place, remember not to draw tile #0 over the top of the backdrop.&lt;br /&gt;
&lt;br /&gt;
=== Actor data ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;actorData&amp;lt;/tt&amp;gt; block is in the following format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iType||Type of actor&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iX||X-coordinate of actor (in tile units)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iY||Y-coordinate of actor (in tile units)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Because the &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; value in the header is in UINT16s and there are three UINT16s per actor, the number of actors can be obtained quite simply:&lt;br /&gt;
&lt;br /&gt;
 iNumActors = iActorSize / 3&lt;br /&gt;
&lt;br /&gt;
This is assuming &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; is reliable - the original specs from Dave Bollinger indicate this is not always the case for DukeII, but no examples are known at the moment.&lt;br /&gt;
&lt;br /&gt;
==== Mapping Actor Types to image indices ====&lt;br /&gt;
&lt;br /&gt;
For the ActorTypes from 32 to 296 (inclusive), you can get an image index from ACTORS.MNI and ACTRINFO.MNI like this:&lt;br /&gt;
&lt;br /&gt;
 ImageIndex = ActorType - 31&lt;br /&gt;
&lt;br /&gt;
However, this does not work for every ActorType. Some share the same images (e.g.: normal stars and falling stars), some use flipped versions of other images (like the pink eye plants) and some are invisible in the game. In either case, the index in the ACTRINFO.MNI will contain no data. You will either have to include hard-coded info to draw these, or just draw something else (like the actual ActorType as text).&lt;br /&gt;
&lt;br /&gt;
==== List of Actor Types ====&lt;br /&gt;
&lt;br /&gt;
This is a list of all the actor types that can be found in the original levels of the three episodes. There might be more ActorTypes that work in the game. For example, 69 is probably the (falling) &amp;quot;Cyan Fruit&amp;quot; item as you can guess by looking at the numbers 62-68.&lt;br /&gt;
&lt;br /&gt;
   0	PLAYER:	Cosmo (Starting position facing right)&lt;br /&gt;
   1	moving platform (fixed path)&lt;br /&gt;
   2	PLAT/HAZARD:	mud fountain 1 (small)&lt;br /&gt;
   3	PLAT/HAZARD:	mud fountain 2 (normal)&lt;br /&gt;
   4	PLAT/HAZARD:	mud fountain 3 (big)&lt;br /&gt;
   5	PLAT/HAZARD:	mud fountain 4 (huge)&lt;br /&gt;
   6	BRIGHTNESS:	left border of light&lt;br /&gt;
   7	BRIGHTNESS:	light source (top center)&lt;br /&gt;
   8	BRIGHTNESS:	right border of light&lt;br /&gt;
 &lt;br /&gt;
  22	??? (only in A8.MNI, doesn&#039;t seem to be doing anything)&lt;br /&gt;
 &lt;br /&gt;
  32	BONUS:	Star	(200)&lt;br /&gt;
  33	PLAT:	Floor Spring&lt;br /&gt;
  34	HAZARD:	Extending Arrow Spear (from right to left)&lt;br /&gt;
  35	HAZARD:	Extending Arrow Spear (from left to right)&lt;br /&gt;
  36	HAZARD:	Plasma Fireball (from right to left)&lt;br /&gt;
  37	HAZARD:	Plasma Fireball (from left to right)&lt;br /&gt;
  38	Blue Switch (on ceiling)&lt;br /&gt;
  39	Red Switch (on ceiling)&lt;br /&gt;
  40	Green Switch &lt;br /&gt;
  41	Yellow Switch&lt;br /&gt;
  42	Blue Door&lt;br /&gt;
  43	Red Door&lt;br /&gt;
  44	Green Door&lt;br /&gt;
  45	Yellow Door&lt;br /&gt;
 &lt;br /&gt;
  47	OBJECT:	Blue Mobile Trampoline Car&lt;br /&gt;
  48	HAZARD:	Non-Retracting Spikes&lt;br /&gt;
  49	HAZARD:	Retracting Spikes&lt;br /&gt;
 &lt;br /&gt;
  51	HAZARD:	Big Saw Blade&lt;br /&gt;
 &lt;br /&gt;
  55	HAZARD: Activated Bomb&lt;br /&gt;
  56	HAZARD:	Green Pruny Cabbage Ball&lt;br /&gt;
 &lt;br /&gt;
  59	BONUS:	Power Up	(health/12800)&lt;br /&gt;
  60	BARREL:	Power Up	(health/12800)&lt;br /&gt;
 &lt;br /&gt;
  62	CRATE:	Green Tomato&lt;br /&gt;
  63	BONUS:	Green Tomato (falling)&lt;br /&gt;
  64	CRATE:	Tomato		(200)&lt;br /&gt;
  65	BONUS:	Tomato (falling)&lt;br /&gt;
  66	CRATE:	Yellow/Cyan Fruit&lt;br /&gt;
  67	BONUS:	Yellow/Cyan Fruit (falling)&lt;br /&gt;
  68	CRATE:	Cyan Fruit&lt;br /&gt;
 &lt;br /&gt;
  70	OBJECT:	Exit Sign (ends level on touch)&lt;br /&gt;
 &lt;br /&gt;
  72	HAZARD:	Spear (coming down from ceiling)&lt;br /&gt;
  73	HAZARD:	Leaking Green Acid&lt;br /&gt;
  74	HAZARD:	Dripping Green Acid&lt;br /&gt;
  75	ENEMY:	Plasma Energy Sprites (Blue Flame-like creatures)&lt;br /&gt;
  76	HAZARD:	&amp;quot;Two Tons&amp;quot; Weight going down &amp;amp; up&lt;br /&gt;
  77	ENEMY:	Jumping Bulletheads&lt;br /&gt;
  78	ENEMY:	Stone Heads (Only drops when Cosmo is close by)&lt;br /&gt;
  79	ENEMY:	Big Yellow Spike on ceiling&lt;br /&gt;
  80	ENEMY:	Big Yellow Spike on ceiling (falling down)&lt;br /&gt;
  81	ENEMY:	Big Yellow Spike on ground&lt;br /&gt;
  82	ENEMY:	Ghost&lt;br /&gt;
  83	CRATE:	Green thingy&lt;br /&gt;
 &lt;br /&gt;
  85	ENEMY:	Angry Moon (blue floating characters)&lt;br /&gt;
  86	ENEMY:	Small Red Plant&lt;br /&gt;
  87	BARREL:	Bomb	(100)&lt;br /&gt;
  88	BONUS:	Bomb	(100)&lt;br /&gt;
 &lt;br /&gt;
  90	OBJECT: switch (1) (Activates moving platform(s))&lt;br /&gt;
 &lt;br /&gt;
  92	OBJECT: switch (2) (Activates Question Mark Block Wall Generator)&lt;br /&gt;
  93	OBJECT: Question Mark Block (Generates a wall when activated by switch)&lt;br /&gt;
  94	HAZARD: Ground Claw Spikes&lt;br /&gt;
  95	OBJECT: Rubber Wall (can blow it up, throws Cosmo backwards when touched)&lt;br /&gt;
  96	ENEMY:	Mini Ghost (jumps)&lt;br /&gt;
  97	HAZARD:	Flashing ball projectile (Moving South West)&lt;br /&gt;
  98	HAZARD:	Flashing ball projectile (Moving South East)&lt;br /&gt;
  99	HAZARD:	Flashing ball projectile (Moving South)&lt;br /&gt;
 100	CREATURE:	Green Roamer Worm&lt;br /&gt;
 101	PIPE TRANSIT DIRECTION:	Arrow Up&lt;br /&gt;
 102	PIPE TRANSIT DIRECTION:	Arrow Down&lt;br /&gt;
 103	PIPE TRANSIT DIRECTION:	Arrow Left&lt;br /&gt;
 104	PIPE TRANSIT DIRECTION:	Arrow Right&lt;br /&gt;
 105	ENEMY:	Egg Head (special?) -- only 1x: in B2.MNI&lt;br /&gt;
 106	ENEMY:	Egg Head&lt;br /&gt;
 &lt;br /&gt;
 109	ENEMY:	Robotic Spike on ground&lt;br /&gt;
 &lt;br /&gt;
 111	ENEMY:	Robotic Spike on ceiling&lt;br /&gt;
 112	CRATE/BONUS:	Burger&lt;br /&gt;
 &lt;br /&gt;
 114	ENEMY:	Blue/Red plant&lt;br /&gt;
 &lt;br /&gt;
 116	BONUS:	Purple Grapes	(800)&lt;br /&gt;
 117	ENEMY:	Blue Ball&lt;br /&gt;
 118	ENEMY:	Spikes (on left wall)&lt;br /&gt;
 119	ENEMY:	Retracting Spikes (on left wall)&lt;br /&gt;
 120	ENEMY:	Spikes (on right wall)&lt;br /&gt;
 121	ENEMY:	Robot with Blue Vertical Electric Arc&lt;br /&gt;
 122	PLAT:	Blue Platform (splits open when standing on top)&lt;br /&gt;
 123	ENEMY:	Spark&lt;br /&gt;
 &lt;br /&gt;
 125	BONUS:	Cyan Dancing Mushroom	(400)&lt;br /&gt;
 126	DECO:	Pink Eye Plant&lt;br /&gt;
 127	DECO:	Pink Eye Plant (hanging upside down)&lt;br /&gt;
 &lt;br /&gt;
 132	ENEMY:	Big Red Jumper (MAY ONLY WORK IN COSMO2 &amp;amp; COSMO3.EXE. APPEARS TO BE FROZEN IN COSMO1.EXE)&lt;br /&gt;
 133	ENEMY:	BOSS (Purple Alien in Spike-bottomed ship)&lt;br /&gt;
 &lt;br /&gt;
 135	PNEUMATIC PIPES:	Exit&lt;br /&gt;
 136	PNEUMATIC PIPES:	Entrance&lt;br /&gt;
 137	ENEMY:	Suction-Cup-Legged Alien&lt;br /&gt;
 138	OBJECT: Teleporter A&lt;br /&gt;
 139	OBJECT: Teleporter B&lt;br /&gt;
 140	HAZARD:	Flashing ball projectile (Moving West)&lt;br /&gt;
 141	HAZARD:	Flashing ball projectile (Moving East)&lt;br /&gt;
 142	ENEMY:	Cyan Spitting Plant (on left wall)&lt;br /&gt;
 143	ENEMY:	Cyan Spitting Plant (on right wall)&lt;br /&gt;
 144	ENEMY:	Blue Turret Alien&lt;br /&gt;
 145	PLAT:	Hoverboard&lt;br /&gt;
 146	CRATE:	pile of green balls&lt;br /&gt;
 &lt;br /&gt;
 148	BARREL:	Saxophone-like thing&lt;br /&gt;
 149	ENEMY:	Red Chomper Alien&lt;br /&gt;
 150	CRATE:	Salad&lt;br /&gt;
 151	switch (3) (Possibly deactivates Actors 153 &amp;amp; 154; Energy Beams)&lt;br /&gt;
 152	switch (4) (Possibly activates lights, if actors 6,7, &amp;amp; 8 are present in level.)&lt;br /&gt;
 153	HAZARD: Vertical Energy Beam (Deactivated by Switch)&lt;br /&gt;
 154	HAZARD: Horizontal Energy Beam (Deactivated by Switch)&lt;br /&gt;
 155	CREATURE/HAZARD:	Pink slug/Worm (Turns to bubbling goo when jumped upon)&lt;br /&gt;
 156	HINT:	&amp;quot;These hint globes will help you along your journey. Press the up key to reread them.&amp;quot;&lt;br /&gt;
 157	ENEMY:	Silver Robot (pushes player around)&lt;br /&gt;
 158	ENEMY:	Security Robot (shoots flashing bullet, can act as moving floor spring)&lt;br /&gt;
 &lt;br /&gt;
 160	PLAT/HAZARD:	Dragonfly&lt;br /&gt;
 161	Crate/Box (can only be destroyed with bombs)&lt;br /&gt;
 &lt;br /&gt;
 165	BONUS:	Bottle with red liquid&lt;br /&gt;
 166	BONUS:	Green thing&lt;br /&gt;
 167	BONUS:	Blue thing&lt;br /&gt;
 168	BONUS:	Salad?&lt;br /&gt;
 169	BONUS:	Pile of green things&lt;br /&gt;
 170	BONUS:	whatever..&lt;br /&gt;
 &lt;br /&gt;
 172	BONUS:	blue thing&lt;br /&gt;
 &lt;br /&gt;
 174	DECO/BONUS:	Satellite&lt;br /&gt;
 &lt;br /&gt;
 176	ENEMY:	Green Plant&lt;br /&gt;
 177	BONUS:	5 Yellow Grapes	(800)&lt;br /&gt;
 178	BONUS:	Headdress-like object&lt;br /&gt;
 179	CRATE:	with item 178&lt;br /&gt;
 180	DECO:	Jaws &amp;amp; Tongue&lt;br /&gt;
 181	invisible exit marker (go right to exit)&lt;br /&gt;
 182	small flame&lt;br /&gt;
 183	ENEMY:	Big Red Plant (spitting Blue Balls/catapult)&lt;br /&gt;
 &lt;br /&gt;
 185	BONUS:	Blue Crystal (on ground)&lt;br /&gt;
 186	BONUS:	Red Crystal (on ground)&lt;br /&gt;
 187	BARREL:	Red/Green Gem&lt;br /&gt;
 188	BARREL:	Blue Crystal&lt;br /&gt;
 189	BARREL:	Red Crystal&lt;br /&gt;
 190	BONUS:	Green Tomato&lt;br /&gt;
 191	BONUS:	Tomato&lt;br /&gt;
 192	BONUS:	Yellow/Cyan Fruit	(200)&lt;br /&gt;
 193	HAZARD:	Clamp Trap&lt;br /&gt;
 194	PLAT:	Blue Cube (falls down when you walk off)&lt;br /&gt;
 195	MESSAGE:	&amp;quot;What&#039;s happening? Is Cosmo falling to his doom?&amp;quot;&lt;br /&gt;
 196	MESSAGE:	&amp;quot;Is there no end to this pit? An what danger awaits below?!&amp;quot;&lt;br /&gt;
 197	Level End Object?&lt;br /&gt;
 198	CRATE:	Root		(400)&lt;br /&gt;
 199	BONUS:	Root&lt;br /&gt;
 200	CRATE:	4 Brown Berries	(400)&lt;br /&gt;
 201	BONUS:	4 Brown Berries&lt;br /&gt;
 &lt;br /&gt;
 203	BONUS:	Potato-like vegetable&lt;br /&gt;
 204	BARREL:	Green Gem&lt;br /&gt;
 205	BONUS:	Green Gem&lt;br /&gt;
 206	BARREL: Diamond		(3200)&lt;br /&gt;
 207	BONUS:	Diamond&lt;br /&gt;
 208	MESSAGE: Floating score effect (100)&lt;br /&gt;
 209	MESSAGE: Floating score effect (200)&lt;br /&gt;
 210	MESSAGE: Floating score effect (400)&lt;br /&gt;
 211	MESSAGE: Floating score effect (800)&lt;br /&gt;
 212	MESSAGE: Floating score effect (1600)&lt;br /&gt;
 213	MESSAGE: Floating score effect (3200)&lt;br /&gt;
 214	MESSAGE: Floating score effect (6400)&lt;br /&gt;
 215	MESSAGE: Floating score effect (12800)&lt;br /&gt;
 &lt;br /&gt;
 217	ENEMY:	Alien-Eating Space Plant (Exits the current level)&lt;br /&gt;
 218	ENEMY:	Blue Bird&lt;br /&gt;
 219	OBJECT:	Rocket&lt;br /&gt;
 220	BONUS:	Invincibility Cube&lt;br /&gt;
 221	PLAT:	Destructible Pedestal 1 (14 tiles high)&lt;br /&gt;
 222	PLAT:	Destructible Pedestal 2 (20 tiles high)&lt;br /&gt;
 223	PLAT:	Destructible Pedestal 3 (26 tiles high)&lt;br /&gt;
 224	BARREL:	Diamond 2&lt;br /&gt;
 225	BONUS:	Diamond 2 (falling)&lt;br /&gt;
 226	BARREL:	Red Berry&lt;br /&gt;
 227	BONUS:	Red Berry (falling)&lt;br /&gt;
 228	BARREL:	Crystal		(800)&lt;br /&gt;
 229	BONUS:	Crystal (falling)&lt;br /&gt;
 230	BARREL:	Blue Gem&lt;br /&gt;
 231	BONUS:	Blue Gem (falling)&lt;br /&gt;
 &lt;br /&gt;
 233	DECO:	Rocket Exhaust&lt;br /&gt;
 234	EXIT:	Teleporter&lt;br /&gt;
 235	HINT:	&amp;quot;Bump head into switch above!&amp;quot;&lt;br /&gt;
 236	HINT:	&amp;quot;The ice in this cave is very, very slippery.&amp;quot;&lt;br /&gt;
 237	HINT:	&amp;quot;Use this shield for temporary invincibility.&amp;quot;&lt;br /&gt;
 238	HINT:	&amp;quot;You found a secret area!!! Good Job!&amp;quot;&lt;br /&gt;
 239	HINT:	&amp;quot;In hight places look up to find bonus objects.&amp;quot;&lt;br /&gt;
 240	HINT:	&amp;quot;Out of Order...&amp;quot;&lt;br /&gt;
 241	HINT:	&amp;quot;This might be a good time to save your game!&amp;quot;&lt;br /&gt;
 242	HINT:	&amp;quot;Press your up key to use the transporter.&amp;quot;&lt;br /&gt;
 243	HINT:	&amp;quot;(1) FOR...&amp;quot;&lt;br /&gt;
 244	BONUS:	Diamond 2&lt;br /&gt;
 245	BONUS:	Red Berry&lt;br /&gt;
 246	BONUS:	Crystal&lt;br /&gt;
 247	BONUS:	Blue Gem	(800)&lt;br /&gt;
 248	PLAT:	Ceiling Spring&lt;br /&gt;
 249	BARREL:	Headphones&lt;br /&gt;
 250	BONUS:	Headphones&lt;br /&gt;
 251	BONUS:	Headphones (falling)&lt;br /&gt;
 252	OBJECT:	Frozen Duke NukUm&lt;br /&gt;
 &lt;br /&gt;
 254	BONUS:	3 Bananas	(800)&lt;br /&gt;
 255	CRATE:	Alien Raisin&lt;br /&gt;
 256	BONUS:	Alien Raisin	(400)&lt;br /&gt;
 &lt;br /&gt;
 258	CRATE:	Brown Pear&lt;br /&gt;
 259	BONUS:	Brown Pear&lt;br /&gt;
 &lt;br /&gt;
 261	CRATE:	Alien Chili Pepper&lt;br /&gt;
 262	BONUS:	Alien Chili Pepper (400)&lt;br /&gt;
 &lt;br /&gt;
 264	DANGER:	Flame (&amp;lt;-)&lt;br /&gt;
 265	DANGER:	Flame (-&amp;gt;)&lt;br /&gt;
 266	MESSAGE: &amp;quot;OUCH!&amp;quot; (Speech bubble)&lt;br /&gt;
 267	HAZARD:	Leaking Red acid&lt;br /&gt;
 268	HAZARD:	Dripping Red Acid&lt;br /&gt;
 269	HINT:	&amp;quot;(2) EXTRA...&amp;quot;&lt;br /&gt;
 270	HINT:	&amp;quot;(3) POINTS,...&amp;quot;&lt;br /&gt;
 271	HINT:	&amp;quot;(4) DESTROY...&amp;quot;&lt;br /&gt;
 272	HINT:	&amp;quot;(5) HINT...&amp;quot;&lt;br /&gt;
 273	HINT:	&amp;quot;(6) GLOBES!!!&amp;quot;&lt;br /&gt;
 274	HINT:	&amp;quot;The Clam Plants won&#039;t hurt you if their mouths are closed.&amp;quot;+Clam Sprite&lt;br /&gt;
 275	MESSAGE: &amp;quot;WHOA!&amp;quot; (Speech bubble)&lt;br /&gt;
 276	MESSAGE: &amp;quot;UMPH!&amp;quot; (Speech bubble)&lt;br /&gt;
 277	MESSAGE: &amp;quot;WOW! 50,000 POINTS!&amp;quot; (Speech bubble)&lt;br /&gt;
 278	DECO:	Big Mouth (end of E1/start of E2)&lt;br /&gt;
 279	DECO:	Normal Smoke Rising&lt;br /&gt;
 280	DECO:	Big Smoke rising&lt;br /&gt;
 281	EXIT: 	Horizontal Exit Marker (Invisible)&lt;br /&gt;
 &lt;br /&gt;
 283	BONUS:	Red Crystal on ceiling&lt;br /&gt;
 284	HINT:	&amp;quot;Collect the STARS to advance to BONUS STAGES.&amp;quot;&lt;br /&gt;
 285	HINT:	&amp;quot;Some creatures require more than one pounce to defeat!&amp;quot;&lt;br /&gt;
 286	HINT:	&amp;quot;Cosmo can climb wall&#039;s with his suction hands.&amp;quot;+CosmoWallSprite&lt;br /&gt;
 &lt;br /&gt;
 294	BONUS:	Power Up Module (falling)	(health/12800)&lt;br /&gt;
 295	BONUS:	Star (falling)	(200)&lt;br /&gt;
 296	end of episode 2 trigger?&lt;br /&gt;
&lt;br /&gt;
The hint texts are the messages you get in episode 1, the other episodes have different (and less!) messages. The later hint globes probably don&#039;t work in those episodes.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/ Dave Bollinger].  Most of this info came from the [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/dn2specs.txt Duke II specs on his website], with [[User:Malvineous|Malvineous]] working out which bits to remove to read Cosmo maps.  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7368</id>
		<title>Cosmo Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7368"/>
		<updated>2017-11-16T11:04:10Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: /* List of Actor Types */ Floating score effect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 3&lt;br /&gt;
 | Tile size = 8&amp;amp;times;8&lt;br /&gt;
 | Viewport = 304&amp;amp;times;144&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Cosmo&#039;s Cosmic Adventures}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
The file is in this basic layout:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iFlags||Flags indicating music, backdrop and other stuff&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapWidth||Map width in tiles&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iActorSize||Number of UINT16 values in the actor block&lt;br /&gt;
|-&lt;br /&gt;
|ACTORDATA actorData[]||Variable-length array of all the actors in the level&lt;br /&gt;
|-&lt;br /&gt;
|BYTE bgLayer[65528]||The map data for the background layer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The iMapWidth values in the original Cosmo levels is either 64, 128, 256 or 512. The &amp;quot;view window&amp;quot; in the game is 304x144 Pixels, so the minimal map width would be 38. However, the width must be a power of 2 to work (from 32 to 2048).&lt;br /&gt;
&lt;br /&gt;
The iActorSize values are reliable for all the original Cosmo level files (Version 1.20).&lt;br /&gt;
&lt;br /&gt;
The map data is actually sized 65528 Bytes or 32764 Words. Each entry in this block is divisable by 8 (see [[#Mapping cell values to tiles]]).&lt;br /&gt;
&lt;br /&gt;
=== Level Flags ===&lt;br /&gt;
&lt;br /&gt;
The structure of the bits in the iFlags value is as follows:&lt;br /&gt;
&lt;br /&gt;
 [ mmmmm | ppp | yxr | bbbbb ]&lt;br /&gt;
 &lt;br /&gt;
 m: music index&lt;br /&gt;
 p: palette animation type&lt;br /&gt;
 y: y-scrolling backdrop&lt;br /&gt;
 x: x-scrolling backdrop&lt;br /&gt;
 r: rain&lt;br /&gt;
 b: backdrop index&lt;br /&gt;
&lt;br /&gt;
The indices for music and backdrop refer to an array of filename strings stored in the executable. You can find them by searching for the first filename in each array. For backdrops, the first filename (index: 0) is &amp;lt;tt&amp;gt;BDBLANK.MNI&amp;lt;/tt&amp;gt;, for music it&#039;s &amp;lt;tt&amp;gt;MCAVES.MNI&amp;lt;/tt&amp;gt;. Note that some backdrop files are not used by the games.  The complete list is:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Backdrop&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bdblank.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bdpipe.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bdredsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bdrocktk.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bdjungle.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bdstar.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bdwierd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bdcave.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || bdice.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || bdshrum.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || bdtechms.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || bdnewsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bdstar2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || bdstar3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || bdforest.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || bdmountn.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || bdguts.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bdbrktec.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || bdclouds.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19 || bdfutcty.mni&lt;br /&gt;
|-&lt;br /&gt;
| 20 || bdice2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 21 || bdcliff.mni&lt;br /&gt;
|-&lt;br /&gt;
| 22 || bdspooky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 23 || bdcrystl.mni&lt;br /&gt;
|-&lt;br /&gt;
| 24 || bdcircut.mni&lt;br /&gt;
|-&lt;br /&gt;
| 25 || bdcircpc.mni&lt;br /&gt;
|-&lt;br /&gt;
| 26-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Music&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || mcaves.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || mscarry.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || mboss.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || mrunaway.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || mcircus.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || mtekwrd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || measylev.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || mrockit.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || mhappy.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || mdevo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || mdadoda.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || mbells.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || mdrums.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || mbanjo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || measy2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || mteck2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || mteck3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || mteck4.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || mzztop.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Animation&amp;lt;br/&amp;gt;value !! Use !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || most levels || no palette changes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || A4 || random lightning (with thunder soundeffect)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || C8-C10 || cycling: red -&amp;gt; yellow -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 3 || A7 || cycling: red -&amp;gt; green -&amp;gt; blue&lt;br /&gt;
|-&lt;br /&gt;
| 4 || A8, B3, B4, B7 || cycling: black -&amp;gt; grey -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 5 || C6, C7 || flashing: red -&amp;gt; magenta -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 6 || C1 || replace dark magenta with black,&amp;lt;br/&amp;gt;no animation unless triggered by a bomb actor.&amp;lt;br/&amp;gt;(ONLY PRESENT IN COSMO3.EXE AT THE MOMENT.)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || None || {{TODO|Unknown}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Background Layer ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;bgLayer&amp;lt;/tt&amp;gt; block contains the grid/cell data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapData[32764]||Actual map data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;element&amp;quot; in &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; refers to the foreground and/or background tile used in a single grid cell.  The grids are arranged left to right, top to bottom, so the index can be calculated by this formula:&lt;br /&gt;
&lt;br /&gt;
 int iIndex = (y * iMapWidth) + x;&lt;br /&gt;
 iMapData[iIndex] = &amp;lt;new value to set at x,y&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map data in the original Cosmo level files is a constant 32764 UINT16LE cells long (65528 bytes), and the engine will never read more than 65535 bytes. However, the game calculates the map height by dividing the width in bytes by 65536:&lt;br /&gt;
&lt;br /&gt;
 int iMapHeight = 32768 / iMapWidth;&lt;br /&gt;
&lt;br /&gt;
Since the width of the map is always a power of 2 (min. 64), you can see that each file is &amp;quot;missing&amp;quot; 8 Bytes (or 4 Words). That means the last line of the map will always be missing the last 4 tiles. The game ignores that last, incomplete line. However, in one level (A8.MNI), there is an actor placed in that last line. Since actors are saved as individual structures instead of a grid, that actor will still be loaded by the game. But for editing a level, you should make sure the last line is visible, so that it&#039;s possible to place actors in that line or remove them from there.&lt;br /&gt;
&lt;br /&gt;
==== Mapping cell values to tiles ====&lt;br /&gt;
&lt;br /&gt;
The method of mapping elements in the &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; structure into tiles is fairly straightforward.  Each cell value is a pixel index into the tilemap.  Imagine the tileset laid out left to right all on the one row.  Since each tile is 8x8 pixels, at 16 pixels into the image, the third tile will begin (x = 0 for first tile, x = 8 for second tile, x = 16 for third tile.)  The cell value is essentially a pixel x-coordinate into the tileset.&lt;br /&gt;
&lt;br /&gt;
Note that in the tileset file, the solid tiles are made up of 2000 4-plane (16-colour) images, and these are followed by 1000 5-plane images (16-colour + transparency.)  Although separate images, they appear to be concatenated when the game loads them, as the cell value will be zero for the first solid tile, it will be eight for the second solid tile, it will be 15992 for the last solid tile, and it will be 16000 for the first masked tile.&lt;br /&gt;
&lt;br /&gt;
This means that if the solid and masked tiles have been treated as separate images, a check will need to be performed so that any cell value below 16000 is loaded from the solid tileset, and any value larger than this is loaded from the masked tileset (after subtracting 16000 from the cell value, to put it at zero for the first masked tile.)  However, for some reason the values for the masked tiles are at multiples of five tiles (tile #0 (x=0) is the first tile, tile #5 (x=40) is the second tile.)  This formula can be used to convert the values into tile numbers once they stray into the masked tile area:&lt;br /&gt;
&lt;br /&gt;
 #define COSMO_TS_SOLID_NUMTILES   2000 // 40x25&lt;br /&gt;
 #define COSMO_TS_MASKED_NUMTILES  1000 // 40x4&lt;br /&gt;
 &lt;br /&gt;
 tile = cell_value / 8&lt;br /&gt;
 if (tile &amp;gt; COSMO_TS_SOLID_NUMTILES) {&lt;br /&gt;
   // Once we&#039;re in the masked tileset it counts up in multiples of five planes&lt;br /&gt;
   tile = COSMO_TS_SOLID_NUMTILES + (tile - COSMO_TS_SOLID_NUMTILES) / 5;&lt;br /&gt;
 }&lt;br /&gt;
 // Now &#039;tile&#039; will be between 0 and 2999 inclusive&lt;br /&gt;
&lt;br /&gt;
As an example of a few tile values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cell value !! Tile number !! Tileset !! Index !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || N/A || N/A || See through to map backdrop&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 1 || Solid || 1 || First solid tile, note increment of 8&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 2 || Solid || 2 || Second solid tile, increment of 8 again&lt;br /&gt;
|-&lt;br /&gt;
| 15992 || 1999 || Solid || 1999 || Last solid tile&lt;br /&gt;
|-&lt;br /&gt;
| 16000 || 2000 || Masked || 0 || First masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 16040 || 2001 || Masked || 1 || Second masked tile, note increment of 40&lt;br /&gt;
|-&lt;br /&gt;
| 16080 || 2002 || Masked || 2 || Third masked tile, increment of 40 again&lt;br /&gt;
|-&lt;br /&gt;
| 55960 || 2999 || Masked || 999 || Last masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 56000 || N/A || N/A || N/A || Should never get a value this size or larger&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that while the cell value cannot be out of range for the solid tiles/background layer (since any values larger than 16000 will be loaded from the masked tileset) the cell values for the masked tileset have no such restriction.  (Although obviously out of range tiles will not be drawn correctly by the engine!)&lt;br /&gt;
&lt;br /&gt;
==== Gotchas ====&lt;br /&gt;
&lt;br /&gt;
* The first tile in the solid tileset is used as a transparent tile.  It will appear completely black if drawn (e.g. in a map editor) however the game does not draw this tile, so any cells with this as the background cell will be where the map backdrop shows through.  If you wish to draw the map with the backdrop in-place, remember not to draw tile #0 over the top of the backdrop.&lt;br /&gt;
&lt;br /&gt;
=== Actor data ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;actorData&amp;lt;/tt&amp;gt; block is in the following format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iType||Type of actor&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iX||X-coordinate of actor (in tile units)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iY||Y-coordinate of actor (in tile units)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Because the &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; value in the header is in UINT16s and there are three UINT16s per actor, the number of actors can be obtained quite simply:&lt;br /&gt;
&lt;br /&gt;
 iNumActors = iActorSize / 3&lt;br /&gt;
&lt;br /&gt;
This is assuming &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; is reliable - the original specs from Dave Bollinger indicate this is not always the case for DukeII, but no examples are known at the moment.&lt;br /&gt;
&lt;br /&gt;
==== Mapping Actor Types to image indices ====&lt;br /&gt;
&lt;br /&gt;
For the ActorTypes from 32 to 296 (inclusive), you can get an image index from ACTORS.MNI and ACTRINFO.MNI like this:&lt;br /&gt;
&lt;br /&gt;
 ImageIndex = ActorType - 31&lt;br /&gt;
&lt;br /&gt;
However, this does not work for every ActorType. Some share the same images (e.g.: normal stars and falling stars), some use flipped versions of other images (like the pink eye plants) and some are invisible in the game. In either case, the index in the ACTRINFO.MNI will contain no data. You will either have to include hard-coded info to draw these, or just draw something else (like the actual ActorType as text).&lt;br /&gt;
&lt;br /&gt;
==== List of Actor Types ====&lt;br /&gt;
&lt;br /&gt;
This is a list of all the actor types that can be found in the original levels of the three episodes. There might be more ActorTypes that work in the game. For example, 69 is probably the (falling) &amp;quot;Cyan Fruit&amp;quot; item as you can guess by looking at the numbers 62-68.&lt;br /&gt;
&lt;br /&gt;
   0	PLAYER:	Cosmo (Starting position facing right)&lt;br /&gt;
   1	moving platform (fixed path)&lt;br /&gt;
   2	PLAT/HAZARD:	mud fountain 1 (small)&lt;br /&gt;
   3	PLAT/HAZARD:	mud fountain 2 (normal)&lt;br /&gt;
   4	PLAT/HAZARD:	mud fountain 3 (big)&lt;br /&gt;
   5	PLAT/HAZARD:	mud fountain 4 (huge)&lt;br /&gt;
   6	BRIGHTNESS:	left border of light&lt;br /&gt;
   7	BRIGHTNESS:	light source (top center)&lt;br /&gt;
   8	BRIGHTNESS:	right border of light&lt;br /&gt;
 &lt;br /&gt;
  22	??? (only in A8.MNI, doesn&#039;t seem to be doing anything)&lt;br /&gt;
 &lt;br /&gt;
  32	BONUS:	Star	(200)&lt;br /&gt;
  33	PLAT:	Floor Spring&lt;br /&gt;
  34	HAZARD:	Extending Arrow Spear (from right to left)&lt;br /&gt;
  35	HAZARD:	Extending Arrow Spear (from left to right)&lt;br /&gt;
  36	HAZARD:	Plasma Fireball (from right to left)&lt;br /&gt;
  37	HAZARD:	Plasma Fireball (from left to right)&lt;br /&gt;
  38	Blue Switch (on ceiling)&lt;br /&gt;
  39	Red Switch (on ceiling)&lt;br /&gt;
  40	Green Switch &lt;br /&gt;
  41	Yellow Switch&lt;br /&gt;
  42	Blue Door&lt;br /&gt;
  43	Red Door&lt;br /&gt;
  44	Green Door&lt;br /&gt;
  45	Yellow Door&lt;br /&gt;
 &lt;br /&gt;
  47	OBJECT:	Blue Mobile Trampoline Car&lt;br /&gt;
  48	HAZARD:	Non-Retracting Spikes&lt;br /&gt;
  49	HAZARD:	Retracting Spikes&lt;br /&gt;
 &lt;br /&gt;
  51	HAZARD:	Big Saw Blade&lt;br /&gt;
 &lt;br /&gt;
  55	HAZARD: Activated Bomb&lt;br /&gt;
  56	HAZARD:	Green Pruny Cabbage Ball&lt;br /&gt;
 &lt;br /&gt;
  59	BONUS:	Power Up	(health/12800)&lt;br /&gt;
  60	BARREL:	Power Up	(health/12800)&lt;br /&gt;
 &lt;br /&gt;
  62	CRATE:	Green Tomato&lt;br /&gt;
  63	BONUS:	Green Tomato (falling)&lt;br /&gt;
  64	CRATE:	Tomato		(200)&lt;br /&gt;
  65	BONUS:	Tomato (falling)&lt;br /&gt;
  66	CRATE:	Yellow/Cyan Fruit&lt;br /&gt;
  67	BONUS:	Yellow/Cyan Fruit (falling)&lt;br /&gt;
  68	CRATE:	Cyan Fruit&lt;br /&gt;
 &lt;br /&gt;
  70	OBJECT:	Exit Sign (ends level on touch)&lt;br /&gt;
 &lt;br /&gt;
  72	HAZARD:	Spear (coming down from ceiling)&lt;br /&gt;
  73	HAZARD:	Leaking Green Acid&lt;br /&gt;
  74	HAZARD:	Dripping Green Acid&lt;br /&gt;
  75	ENEMY:	Plasma Energy Sprites (Blue Flame-like creatures)&lt;br /&gt;
  76	HAZARD:	&amp;quot;Two Tons&amp;quot; Weight going down &amp;amp; up&lt;br /&gt;
  77	ENEMY:	Jumping Bulletheads&lt;br /&gt;
  78	ENEMY:	Stone Heads (Only drops when Cosmo is close by)&lt;br /&gt;
  79	ENEMY:	Big Yellow Spike on ceiling&lt;br /&gt;
  80	ENEMY:	Big Yellow Spike on ceiling (falling down)&lt;br /&gt;
  81	ENEMY:	Big Yellow Spike on ground&lt;br /&gt;
  82	ENEMY:	Ghost&lt;br /&gt;
  83	CRATE:	Green thingy&lt;br /&gt;
 &lt;br /&gt;
  85	ENEMY:	Angry Moon (blue floating characters)&lt;br /&gt;
  86	ENEMY:	Small Red Plant&lt;br /&gt;
  87	BARREL:	Bomb	(100)&lt;br /&gt;
  88	BONUS:	Bomb	(100)&lt;br /&gt;
 &lt;br /&gt;
  90	OBJECT: switch (1) (Activates moving platform(s))&lt;br /&gt;
 &lt;br /&gt;
  92	OBJECT: switch (2) (Activates Question Mark Block Wall Generator)&lt;br /&gt;
  93	OBJECT: Question Mark Block (Generates a wall when activated by switch)&lt;br /&gt;
  94	HAZARD: Ground Claw Spikes&lt;br /&gt;
  95	OBJECT: Rubber Wall (can blow it up, throws Cosmo backwards when touched)&lt;br /&gt;
  96	ENEMY:	Mini Ghost (jumps)&lt;br /&gt;
 &lt;br /&gt;
 100	CREATURE:	Green Roamer Worm&lt;br /&gt;
 101	PIPE TRANSIT DIRECTION:	Arrow Up&lt;br /&gt;
 102	PIPE TRANSIT DIRECTION:	Arrow Down&lt;br /&gt;
 103	PIPE TRANSIT DIRECTION:	Arrow Left&lt;br /&gt;
 104	PIPE TRANSIT DIRECTION:	Arrow Right&lt;br /&gt;
 105	ENEMY:	Egg Head (special?) -- only 1x: in B2.MNI&lt;br /&gt;
 106	ENEMY:	Egg Head&lt;br /&gt;
 &lt;br /&gt;
 109	ENEMY:	Robotic Spike on ground&lt;br /&gt;
 &lt;br /&gt;
 111	ENEMY:	Robotic Spike on ceiling&lt;br /&gt;
 112	CRATE/BONUS:	Burger&lt;br /&gt;
 &lt;br /&gt;
 114	ENEMY:	Blue/Red plant&lt;br /&gt;
 &lt;br /&gt;
 116	BONUS:	Purple Grapes	(800)&lt;br /&gt;
 117	ENEMY:	Blue Ball&lt;br /&gt;
 118	ENEMY:	Spikes (on left wall)&lt;br /&gt;
 119	ENEMY:	Retracting Spikes (on left wall)&lt;br /&gt;
 120	ENEMY:	Spikes (on right wall)&lt;br /&gt;
 121	ENEMY:	Robot with Blue Vertical Electric Arc&lt;br /&gt;
 122	PLAT:	Blue Platform (splits open when standing on top)&lt;br /&gt;
 123	ENEMY:	Spark&lt;br /&gt;
 &lt;br /&gt;
 125	BONUS:	Cyan Dancing Mushroom	(400)&lt;br /&gt;
 126	DECO:	Pink Eye Plant&lt;br /&gt;
 127	DECO:	Pink Eye Plant (hanging upside down)&lt;br /&gt;
 &lt;br /&gt;
 132	ENEMY:	Big Red Jumper (MAY ONLY WORK IN COSMO2 &amp;amp; COSMO3.EXE. APPEARS TO BE FROZEN IN COSMO1.EXE)&lt;br /&gt;
 133	ENEMY:	BOSS (Purple Alien in Spike-bottomed ship)&lt;br /&gt;
 &lt;br /&gt;
 135	PNEUMATIC PIPES:	Exit&lt;br /&gt;
 136	PNEUMATIC PIPES:	Entrance&lt;br /&gt;
 137	ENEMY:	Suction-Cup-Legged Alien&lt;br /&gt;
 138	OBJECT: Teleporter A&lt;br /&gt;
 139	OBJECT: Teleporter B&lt;br /&gt;
 &lt;br /&gt;
 142	ENEMY:	Cyan Spitting Plant (on left wall)&lt;br /&gt;
 143	ENEMY:	Cyan Spitting Plant (on right wall)&lt;br /&gt;
 144	ENEMY:	Blue Turret Alien&lt;br /&gt;
 145	PLAT:	Hoverboard&lt;br /&gt;
 146	CRATE:	pile of green balls&lt;br /&gt;
 &lt;br /&gt;
 148	BARREL:	Saxophone-like thing&lt;br /&gt;
 149	ENEMY:	Red Chomper Alien&lt;br /&gt;
 150	CRATE:	Salad&lt;br /&gt;
 151	switch (3) (Possibly deactivates Actors 153 &amp;amp; 154; Energy Beams)&lt;br /&gt;
 152	switch (4) (Possibly activates lights, if actors 6,7, &amp;amp; 8 are present in level.)&lt;br /&gt;
 153	HAZARD: Vertical Energy Beam (Deactivated by Switch)&lt;br /&gt;
 154	HAZARD: Horizontal Energy Beam (Deactivated by Switch)&lt;br /&gt;
 155	CREATURE/HAZARD:	Pink slug/Worm (Turns to bubbling goo when jumped upon)&lt;br /&gt;
 156	HINT:	&amp;quot;These hint globes will help you along your journey. Press the up key to reread them.&amp;quot;&lt;br /&gt;
 157	ENEMY:	Silver Robot (pushes player around)&lt;br /&gt;
 158	ENEMY:	Security Robot (shoots flashing bullet, can act as moving floor spring)&lt;br /&gt;
 &lt;br /&gt;
 160	PLAT/HAZARD:	Dragonfly&lt;br /&gt;
 161	Crate/Box (can only be destroyed with bombs)&lt;br /&gt;
 &lt;br /&gt;
 165	BONUS:	Bottle with red liquid&lt;br /&gt;
 166	BONUS:	Green thing&lt;br /&gt;
 167	BONUS:	Blue thing&lt;br /&gt;
 168	BONUS:	Salad?&lt;br /&gt;
 169	BONUS:	Pile of green things&lt;br /&gt;
 170	BONUS:	whatever..&lt;br /&gt;
 &lt;br /&gt;
 172	BONUS:	blue thing&lt;br /&gt;
 &lt;br /&gt;
 174	DECO/BONUS:	Satellite&lt;br /&gt;
 &lt;br /&gt;
 176	ENEMY:	Green Plant&lt;br /&gt;
 177	BONUS:	5 Yellow Grapes	(800)&lt;br /&gt;
 178	BONUS:	Headdress-like object&lt;br /&gt;
 179	CRATE:	with item 178&lt;br /&gt;
 180	DECO:	Jaws &amp;amp; Tongue&lt;br /&gt;
 181	invisible exit marker (go right to exit)&lt;br /&gt;
 182	small flame&lt;br /&gt;
 183	ENEMY:	Big Red Plant (spitting Blue Balls/catapult)&lt;br /&gt;
 &lt;br /&gt;
 185	BONUS:	Blue Crystal (on ground)&lt;br /&gt;
 186	BONUS:	Red Crystal (on ground)&lt;br /&gt;
 187	BARREL:	Red/Green Gem&lt;br /&gt;
 188	BARREL:	Blue Crystal&lt;br /&gt;
 189	BARREL:	Red Crystal&lt;br /&gt;
 190	BONUS:	Green Tomato&lt;br /&gt;
 191	BONUS:	Tomato&lt;br /&gt;
 192	BONUS:	Yellow/Cyan Fruit	(200)&lt;br /&gt;
 193	HAZARD:	Clamp Trap&lt;br /&gt;
 194	PLAT:	Blue Cube (falls down when you walk off)&lt;br /&gt;
 195	MESSAGE:	&amp;quot;What&#039;s happening? Is Cosmo falling to his doom?&amp;quot;&lt;br /&gt;
 196	MESSAGE:	&amp;quot;Is there no end to this pit? An what danger awaits below?!&amp;quot;&lt;br /&gt;
 197	Level End Object?&lt;br /&gt;
 198	CRATE:	Root		(400)&lt;br /&gt;
 199	BONUS:	Root&lt;br /&gt;
 200	CRATE:	4 Brown Berries	(400)&lt;br /&gt;
 201	BONUS:	4 Brown Berries&lt;br /&gt;
 &lt;br /&gt;
 203	BONUS:	Potato-like vegetable&lt;br /&gt;
 204	BARREL:	Green Gem&lt;br /&gt;
 205	BONUS:	Green Gem&lt;br /&gt;
 206	BARREL: Diamond		(3200)&lt;br /&gt;
 207	BONUS:	Diamond&lt;br /&gt;
 208	MESSAGE: Floating score effect (100)&lt;br /&gt;
 209	MESSAGE: Floating score effect (200)&lt;br /&gt;
 210	MESSAGE: Floating score effect (400)&lt;br /&gt;
 211	MESSAGE: Floating score effect (800)&lt;br /&gt;
 212	MESSAGE: Floating score effect (1600)&lt;br /&gt;
 213	MESSAGE: Floating score effect (3200)&lt;br /&gt;
 214	MESSAGE: Floating score effect (6400)&lt;br /&gt;
 215	MESSAGE: Floating score effect (12800)&lt;br /&gt;
 &lt;br /&gt;
 217	ENEMY:	Alien-Eating Space Plant (Exits the current level)&lt;br /&gt;
 218	ENEMY:	Blue Bird&lt;br /&gt;
 219	OBJECT:	Rocket&lt;br /&gt;
 220	BONUS:	Invincibility Cube&lt;br /&gt;
 221	PLAT:	Destructible Pedestal 1 (14 tiles high)&lt;br /&gt;
 222	PLAT:	Destructible Pedestal 2 (20 tiles high)&lt;br /&gt;
 223	PLAT:	Destructible Pedestal 3 (26 tiles high)&lt;br /&gt;
 224	BARREL:	Diamond 2&lt;br /&gt;
 225	BONUS:	Diamond 2 (falling)&lt;br /&gt;
 226	BARREL:	Red Berry&lt;br /&gt;
 227	BONUS:	Red Berry (falling)&lt;br /&gt;
 228	BARREL:	Crystal		(800)&lt;br /&gt;
 229	BONUS:	Crystal (falling)&lt;br /&gt;
 230	BARREL:	Blue Gem&lt;br /&gt;
 231	BONUS:	Blue Gem (falling)&lt;br /&gt;
 &lt;br /&gt;
 233	DECO:	Rocket Exhaust&lt;br /&gt;
 234	EXIT:	Teleporter&lt;br /&gt;
 235	HINT:	&amp;quot;Bump head into switch above!&amp;quot;&lt;br /&gt;
 236	HINT:	&amp;quot;The ice in this cave is very, very slippery.&amp;quot;&lt;br /&gt;
 237	HINT:	&amp;quot;Use this shield for temporary invincibility.&amp;quot;&lt;br /&gt;
 238	HINT:	&amp;quot;You found a secret area!!! Good Job!&amp;quot;&lt;br /&gt;
 239	HINT:	&amp;quot;In hight places look up to find bonus objects.&amp;quot;&lt;br /&gt;
 240	HINT:	&amp;quot;Out of Order...&amp;quot;&lt;br /&gt;
 241	HINT:	&amp;quot;This might be a good time to save your game!&amp;quot;&lt;br /&gt;
 242	HINT:	&amp;quot;Press your up key to use the transporter.&amp;quot;&lt;br /&gt;
 243	HINT:	&amp;quot;(1) FOR...&amp;quot;&lt;br /&gt;
 244	BONUS:	Diamond 2&lt;br /&gt;
 245	BONUS:	Red Berry&lt;br /&gt;
 246	BONUS:	Crystal&lt;br /&gt;
 247	BONUS:	Blue Gem	(800)&lt;br /&gt;
 248	PLAT:	Ceiling Spring&lt;br /&gt;
 249	BARREL:	Headphones&lt;br /&gt;
 250	BONUS:	Headphones&lt;br /&gt;
 251	BONUS:	Headphones (falling)&lt;br /&gt;
 252	OBJECT:	Frozen Duke NukUm&lt;br /&gt;
 &lt;br /&gt;
 254	BONUS:	3 Bananas	(800)&lt;br /&gt;
 255	CRATE:	Alien Raisin&lt;br /&gt;
 256	BONUS:	Alien Raisin	(400)&lt;br /&gt;
 &lt;br /&gt;
 258	CRATE:	Brown Pear&lt;br /&gt;
 259	BONUS:	Brown Pear&lt;br /&gt;
 &lt;br /&gt;
 261	CRATE:	Alien Chili Pepper&lt;br /&gt;
 262	BONUS:	Alien Chili Pepper (400)&lt;br /&gt;
 &lt;br /&gt;
 264	DANGER:	Flame (&amp;lt;-)&lt;br /&gt;
 265	DANGER:	Flame (-&amp;gt;)&lt;br /&gt;
 266	MESSAGE: &amp;quot;OUCH!&amp;quot; (Speech bubble)&lt;br /&gt;
 267	HAZARD:	Leaking Red acid&lt;br /&gt;
 268	HAZARD:	Dripping Red Acid&lt;br /&gt;
 269	HINT:	&amp;quot;(2) EXTRA...&amp;quot;&lt;br /&gt;
 270	HINT:	&amp;quot;(3) POINTS,...&amp;quot;&lt;br /&gt;
 271	HINT:	&amp;quot;(4) DESTROY...&amp;quot;&lt;br /&gt;
 272	HINT:	&amp;quot;(5) HINT...&amp;quot;&lt;br /&gt;
 273	HINT:	&amp;quot;(6) GLOBES!!!&amp;quot;&lt;br /&gt;
 274	HINT:	&amp;quot;The Clam Plants won&#039;t hurt you if their mouths are closed.&amp;quot;+Clam Sprite&lt;br /&gt;
 275	MESSAGE: &amp;quot;WHOA!&amp;quot; (Speech bubble)&lt;br /&gt;
 276	MESSAGE: &amp;quot;UMPH!&amp;quot; (Speech bubble)&lt;br /&gt;
 277	MESSAGE: &amp;quot;WOW! 50,000 POINTS!&amp;quot; (Speech bubble)&lt;br /&gt;
 278	DECO:	Big Mouth (end of E1/start of E2)&lt;br /&gt;
 279	DECO:	Normal Smoke Rising&lt;br /&gt;
 280	DECO:	Big Smoke rising&lt;br /&gt;
 281	EXIT: 	Horizontal Exit Marker (Invisible)&lt;br /&gt;
 &lt;br /&gt;
 283	BONUS:	Red Crystal on ceiling&lt;br /&gt;
 284	HINT:	&amp;quot;Collect the STARS to advance to BONUS STAGES.&amp;quot;&lt;br /&gt;
 285	HINT:	&amp;quot;Some creatures require more than one pounce to defeat!&amp;quot;&lt;br /&gt;
 286	HINT:	&amp;quot;Cosmo can climb wall&#039;s with his suction hands.&amp;quot;+CosmoWallSprite&lt;br /&gt;
 &lt;br /&gt;
 294	BONUS:	Power Up Module (falling)	(health/12800)&lt;br /&gt;
 295	BONUS:	Star (falling)	(200)&lt;br /&gt;
 296	end of episode 2 trigger?&lt;br /&gt;
&lt;br /&gt;
The hint texts are the messages you get in episode 1, the other episodes have different (and less!) messages. The later hint globes probably don&#039;t work in those episodes.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/ Dave Bollinger].  Most of this info came from the [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/dn2specs.txt Duke II specs on his website], with [[User:Malvineous|Malvineous]] working out which bits to remove to read Cosmo maps.  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7367</id>
		<title>Cosmo Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7367"/>
		<updated>2017-11-16T10:37:15Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: /* List of Actor Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 3&lt;br /&gt;
 | Tile size = 8&amp;amp;times;8&lt;br /&gt;
 | Viewport = 304&amp;amp;times;144&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Cosmo&#039;s Cosmic Adventures}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
The file is in this basic layout:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iFlags||Flags indicating music, backdrop and other stuff&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapWidth||Map width in tiles&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iActorSize||Number of UINT16 values in the actor block&lt;br /&gt;
|-&lt;br /&gt;
|ACTORDATA actorData[]||Variable-length array of all the actors in the level&lt;br /&gt;
|-&lt;br /&gt;
|BYTE bgLayer[65528]||The map data for the background layer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The iMapWidth values in the original Cosmo levels is either 64, 128, 256 or 512. The &amp;quot;view window&amp;quot; in the game is 304x144 Pixels, so the minimal map width would be 38. However, the width must be a power of 2 to work (from 32 to 2048).&lt;br /&gt;
&lt;br /&gt;
The iActorSize values are reliable for all the original Cosmo level files (Version 1.20).&lt;br /&gt;
&lt;br /&gt;
The map data is actually sized 65528 Bytes or 32764 Words. Each entry in this block is divisable by 8 (see [[#Mapping cell values to tiles]]).&lt;br /&gt;
&lt;br /&gt;
=== Level Flags ===&lt;br /&gt;
&lt;br /&gt;
The structure of the bits in the iFlags value is as follows:&lt;br /&gt;
&lt;br /&gt;
 [ mmmmm | ppp | yxr | bbbbb ]&lt;br /&gt;
 &lt;br /&gt;
 m: music index&lt;br /&gt;
 p: palette animation type&lt;br /&gt;
 y: y-scrolling backdrop&lt;br /&gt;
 x: x-scrolling backdrop&lt;br /&gt;
 r: rain&lt;br /&gt;
 b: backdrop index&lt;br /&gt;
&lt;br /&gt;
The indices for music and backdrop refer to an array of filename strings stored in the executable. You can find them by searching for the first filename in each array. For backdrops, the first filename (index: 0) is &amp;lt;tt&amp;gt;BDBLANK.MNI&amp;lt;/tt&amp;gt;, for music it&#039;s &amp;lt;tt&amp;gt;MCAVES.MNI&amp;lt;/tt&amp;gt;. Note that some backdrop files are not used by the games.  The complete list is:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Backdrop&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bdblank.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bdpipe.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bdredsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bdrocktk.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bdjungle.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bdstar.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bdwierd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bdcave.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || bdice.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || bdshrum.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || bdtechms.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || bdnewsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bdstar2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || bdstar3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || bdforest.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || bdmountn.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || bdguts.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bdbrktec.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || bdclouds.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19 || bdfutcty.mni&lt;br /&gt;
|-&lt;br /&gt;
| 20 || bdice2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 21 || bdcliff.mni&lt;br /&gt;
|-&lt;br /&gt;
| 22 || bdspooky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 23 || bdcrystl.mni&lt;br /&gt;
|-&lt;br /&gt;
| 24 || bdcircut.mni&lt;br /&gt;
|-&lt;br /&gt;
| 25 || bdcircpc.mni&lt;br /&gt;
|-&lt;br /&gt;
| 26-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Music&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || mcaves.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || mscarry.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || mboss.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || mrunaway.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || mcircus.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || mtekwrd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || measylev.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || mrockit.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || mhappy.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || mdevo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || mdadoda.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || mbells.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || mdrums.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || mbanjo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || measy2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || mteck2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || mteck3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || mteck4.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || mzztop.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Animation&amp;lt;br/&amp;gt;value !! Use !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || most levels || no palette changes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || A4 || random lightning (with thunder soundeffect)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || C8-C10 || cycling: red -&amp;gt; yellow -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 3 || A7 || cycling: red -&amp;gt; green -&amp;gt; blue&lt;br /&gt;
|-&lt;br /&gt;
| 4 || A8, B3, B4, B7 || cycling: black -&amp;gt; grey -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 5 || C6, C7 || flashing: red -&amp;gt; magenta -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 6 || C1 || replace dark magenta with black,&amp;lt;br/&amp;gt;no animation unless triggered by a bomb actor.&amp;lt;br/&amp;gt;(ONLY PRESENT IN COSMO3.EXE AT THE MOMENT.)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || None || {{TODO|Unknown}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Background Layer ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;bgLayer&amp;lt;/tt&amp;gt; block contains the grid/cell data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapData[32764]||Actual map data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;element&amp;quot; in &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; refers to the foreground and/or background tile used in a single grid cell.  The grids are arranged left to right, top to bottom, so the index can be calculated by this formula:&lt;br /&gt;
&lt;br /&gt;
 int iIndex = (y * iMapWidth) + x;&lt;br /&gt;
 iMapData[iIndex] = &amp;lt;new value to set at x,y&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map data in the original Cosmo level files is a constant 32764 UINT16LE cells long (65528 bytes), and the engine will never read more than 65535 bytes. However, the game calculates the map height by dividing the width in bytes by 65536:&lt;br /&gt;
&lt;br /&gt;
 int iMapHeight = 32768 / iMapWidth;&lt;br /&gt;
&lt;br /&gt;
Since the width of the map is always a power of 2 (min. 64), you can see that each file is &amp;quot;missing&amp;quot; 8 Bytes (or 4 Words). That means the last line of the map will always be missing the last 4 tiles. The game ignores that last, incomplete line. However, in one level (A8.MNI), there is an actor placed in that last line. Since actors are saved as individual structures instead of a grid, that actor will still be loaded by the game. But for editing a level, you should make sure the last line is visible, so that it&#039;s possible to place actors in that line or remove them from there.&lt;br /&gt;
&lt;br /&gt;
==== Mapping cell values to tiles ====&lt;br /&gt;
&lt;br /&gt;
The method of mapping elements in the &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; structure into tiles is fairly straightforward.  Each cell value is a pixel index into the tilemap.  Imagine the tileset laid out left to right all on the one row.  Since each tile is 8x8 pixels, at 16 pixels into the image, the third tile will begin (x = 0 for first tile, x = 8 for second tile, x = 16 for third tile.)  The cell value is essentially a pixel x-coordinate into the tileset.&lt;br /&gt;
&lt;br /&gt;
Note that in the tileset file, the solid tiles are made up of 2000 4-plane (16-colour) images, and these are followed by 1000 5-plane images (16-colour + transparency.)  Although separate images, they appear to be concatenated when the game loads them, as the cell value will be zero for the first solid tile, it will be eight for the second solid tile, it will be 15992 for the last solid tile, and it will be 16000 for the first masked tile.&lt;br /&gt;
&lt;br /&gt;
This means that if the solid and masked tiles have been treated as separate images, a check will need to be performed so that any cell value below 16000 is loaded from the solid tileset, and any value larger than this is loaded from the masked tileset (after subtracting 16000 from the cell value, to put it at zero for the first masked tile.)  However, for some reason the values for the masked tiles are at multiples of five tiles (tile #0 (x=0) is the first tile, tile #5 (x=40) is the second tile.)  This formula can be used to convert the values into tile numbers once they stray into the masked tile area:&lt;br /&gt;
&lt;br /&gt;
 #define COSMO_TS_SOLID_NUMTILES   2000 // 40x25&lt;br /&gt;
 #define COSMO_TS_MASKED_NUMTILES  1000 // 40x4&lt;br /&gt;
 &lt;br /&gt;
 tile = cell_value / 8&lt;br /&gt;
 if (tile &amp;gt; COSMO_TS_SOLID_NUMTILES) {&lt;br /&gt;
   // Once we&#039;re in the masked tileset it counts up in multiples of five planes&lt;br /&gt;
   tile = COSMO_TS_SOLID_NUMTILES + (tile - COSMO_TS_SOLID_NUMTILES) / 5;&lt;br /&gt;
 }&lt;br /&gt;
 // Now &#039;tile&#039; will be between 0 and 2999 inclusive&lt;br /&gt;
&lt;br /&gt;
As an example of a few tile values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cell value !! Tile number !! Tileset !! Index !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || N/A || N/A || See through to map backdrop&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 1 || Solid || 1 || First solid tile, note increment of 8&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 2 || Solid || 2 || Second solid tile, increment of 8 again&lt;br /&gt;
|-&lt;br /&gt;
| 15992 || 1999 || Solid || 1999 || Last solid tile&lt;br /&gt;
|-&lt;br /&gt;
| 16000 || 2000 || Masked || 0 || First masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 16040 || 2001 || Masked || 1 || Second masked tile, note increment of 40&lt;br /&gt;
|-&lt;br /&gt;
| 16080 || 2002 || Masked || 2 || Third masked tile, increment of 40 again&lt;br /&gt;
|-&lt;br /&gt;
| 55960 || 2999 || Masked || 999 || Last masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 56000 || N/A || N/A || N/A || Should never get a value this size or larger&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that while the cell value cannot be out of range for the solid tiles/background layer (since any values larger than 16000 will be loaded from the masked tileset) the cell values for the masked tileset have no such restriction.  (Although obviously out of range tiles will not be drawn correctly by the engine!)&lt;br /&gt;
&lt;br /&gt;
==== Gotchas ====&lt;br /&gt;
&lt;br /&gt;
* The first tile in the solid tileset is used as a transparent tile.  It will appear completely black if drawn (e.g. in a map editor) however the game does not draw this tile, so any cells with this as the background cell will be where the map backdrop shows through.  If you wish to draw the map with the backdrop in-place, remember not to draw tile #0 over the top of the backdrop.&lt;br /&gt;
&lt;br /&gt;
=== Actor data ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;actorData&amp;lt;/tt&amp;gt; block is in the following format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iType||Type of actor&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iX||X-coordinate of actor (in tile units)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iY||Y-coordinate of actor (in tile units)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Because the &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; value in the header is in UINT16s and there are three UINT16s per actor, the number of actors can be obtained quite simply:&lt;br /&gt;
&lt;br /&gt;
 iNumActors = iActorSize / 3&lt;br /&gt;
&lt;br /&gt;
This is assuming &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; is reliable - the original specs from Dave Bollinger indicate this is not always the case for DukeII, but no examples are known at the moment.&lt;br /&gt;
&lt;br /&gt;
==== Mapping Actor Types to image indices ====&lt;br /&gt;
&lt;br /&gt;
For the ActorTypes from 32 to 296 (inclusive), you can get an image index from ACTORS.MNI and ACTRINFO.MNI like this:&lt;br /&gt;
&lt;br /&gt;
 ImageIndex = ActorType - 31&lt;br /&gt;
&lt;br /&gt;
However, this does not work for every ActorType. Some share the same images (e.g.: normal stars and falling stars), some use flipped versions of other images (like the pink eye plants) and some are invisible in the game. In either case, the index in the ACTRINFO.MNI will contain no data. You will either have to include hard-coded info to draw these, or just draw something else (like the actual ActorType as text).&lt;br /&gt;
&lt;br /&gt;
==== List of Actor Types ====&lt;br /&gt;
&lt;br /&gt;
This is a list of all the actor types that can be found in the original levels of the three episodes. There might be more ActorTypes that work in the game. For example, 69 is probably the (falling) &amp;quot;Cyan Fruit&amp;quot; item as you can guess by looking at the numbers 62-68.&lt;br /&gt;
&lt;br /&gt;
   0	PLAYER:	Cosmo (Starting position facing right)&lt;br /&gt;
   1	moving platform (fixed path)&lt;br /&gt;
   2	PLAT/HAZARD:	mud fountain 1 (small)&lt;br /&gt;
   3	PLAT/HAZARD:	mud fountain 2 (normal)&lt;br /&gt;
   4	PLAT/HAZARD:	mud fountain 3 (big)&lt;br /&gt;
   5	PLAT/HAZARD:	mud fountain 4 (huge)&lt;br /&gt;
   6	BRIGHTNESS:	left border of light&lt;br /&gt;
   7	BRIGHTNESS:	light source (top center)&lt;br /&gt;
   8	BRIGHTNESS:	right border of light&lt;br /&gt;
 &lt;br /&gt;
  22	??? (only in A8.MNI, doesn&#039;t seem to be doing anything)&lt;br /&gt;
 &lt;br /&gt;
  32	BONUS:	Star	(200)&lt;br /&gt;
  33	PLAT:	Floor Spring&lt;br /&gt;
  34	HAZARD:	Extending Arrow Spear (from right to left)&lt;br /&gt;
  35	HAZARD:	Extending Arrow Spear (from left to right)&lt;br /&gt;
  36	HAZARD:	Plasma Fireball (from right to left)&lt;br /&gt;
  37	HAZARD:	Plasma Fireball (from left to right)&lt;br /&gt;
  38	Blue Switch (on ceiling)&lt;br /&gt;
  39	Red Switch (on ceiling)&lt;br /&gt;
  40	Green Switch &lt;br /&gt;
  41	Yellow Switch&lt;br /&gt;
  42	Blue Door&lt;br /&gt;
  43	Red Door&lt;br /&gt;
  44	Green Door&lt;br /&gt;
  45	Yellow Door&lt;br /&gt;
 &lt;br /&gt;
  47	OBJECT:	Blue Mobile Trampoline Car&lt;br /&gt;
  48	HAZARD:	Non-Retracting Spikes&lt;br /&gt;
  49	HAZARD:	Retracting Spikes&lt;br /&gt;
 &lt;br /&gt;
  51	HAZARD:	Big Saw Blade&lt;br /&gt;
 &lt;br /&gt;
  55	HAZARD: Activated Bomb&lt;br /&gt;
  56	HAZARD:	Green Pruny Cabbage Ball&lt;br /&gt;
 &lt;br /&gt;
  59	BONUS:	Power Up	(health/12800)&lt;br /&gt;
  60	BARREL:	Power Up	(health/12800)&lt;br /&gt;
 &lt;br /&gt;
  62	CRATE:	Green Tomato&lt;br /&gt;
  63	BONUS:	Green Tomato (falling)&lt;br /&gt;
  64	CRATE:	Tomato		(200)&lt;br /&gt;
  65	BONUS:	Tomato (falling)&lt;br /&gt;
  66	CRATE:	Yellow/Cyan Fruit&lt;br /&gt;
  67	BONUS:	Yellow/Cyan Fruit (falling)&lt;br /&gt;
  68	CRATE:	Cyan Fruit&lt;br /&gt;
 &lt;br /&gt;
  70	OBJECT:	Exit Sign (ends level on touch)&lt;br /&gt;
 &lt;br /&gt;
  72	HAZARD:	Spear (coming down from ceiling)&lt;br /&gt;
  73	HAZARD:	Leaking Green Acid&lt;br /&gt;
  74	HAZARD:	Dripping Green Acid&lt;br /&gt;
  75	ENEMY:	Plasma Energy Sprites (Blue Flame-like creatures)&lt;br /&gt;
  76	HAZARD:	&amp;quot;Two Tons&amp;quot; Weight going down &amp;amp; up&lt;br /&gt;
  77	ENEMY:	Jumping Bulletheads&lt;br /&gt;
  78	ENEMY:	Stone Heads (Only drops when Cosmo is close by)&lt;br /&gt;
  79	ENEMY:	Big Yellow Spike on ceiling&lt;br /&gt;
  80	ENEMY:	Big Yellow Spike on ceiling (falling down)&lt;br /&gt;
  81	ENEMY:	Big Yellow Spike on ground&lt;br /&gt;
  82	ENEMY:	Ghost&lt;br /&gt;
  83	CRATE:	Green thingy&lt;br /&gt;
 &lt;br /&gt;
  85	ENEMY:	Angry Moon (blue floating characters)&lt;br /&gt;
  86	ENEMY:	Small Red Plant&lt;br /&gt;
  87	BARREL:	Bomb	(100)&lt;br /&gt;
  88	BONUS:	Bomb	(100)&lt;br /&gt;
 &lt;br /&gt;
  90	OBJECT: switch (1) (Activates moving platform(s))&lt;br /&gt;
 &lt;br /&gt;
  92	OBJECT: switch (2) (Activates Question Mark Block Wall Generator)&lt;br /&gt;
  93	OBJECT: Question Mark Block (Generates a wall when activated by switch)&lt;br /&gt;
  94	HAZARD: Ground Claw Spikes&lt;br /&gt;
  95	OBJECT: Rubber Wall (can blow it up, throws Cosmo backwards when touched)&lt;br /&gt;
  96	ENEMY:	Mini Ghost (jumps)&lt;br /&gt;
 &lt;br /&gt;
 100	CREATURE:	Green Roamer Worm&lt;br /&gt;
 101	PIPE TRANSIT DIRECTION:	Arrow Up&lt;br /&gt;
 102	PIPE TRANSIT DIRECTION:	Arrow Down&lt;br /&gt;
 103	PIPE TRANSIT DIRECTION:	Arrow Left&lt;br /&gt;
 104	PIPE TRANSIT DIRECTION:	Arrow Right&lt;br /&gt;
 105	ENEMY:	Egg Head (special?) -- only 1x: in B2.MNI&lt;br /&gt;
 106	ENEMY:	Egg Head&lt;br /&gt;
 &lt;br /&gt;
 109	ENEMY:	Robotic Spike on ground&lt;br /&gt;
 &lt;br /&gt;
 111	ENEMY:	Robotic Spike on ceiling&lt;br /&gt;
 112	CRATE/BONUS:	Burger&lt;br /&gt;
 &lt;br /&gt;
 114	ENEMY:	Blue/Red plant&lt;br /&gt;
 &lt;br /&gt;
 116	BONUS:	Purple Grapes	(800)&lt;br /&gt;
 117	ENEMY:	Blue Ball&lt;br /&gt;
 118	ENEMY:	Spikes (on left wall)&lt;br /&gt;
 119	ENEMY:	Retracting Spikes (on left wall)&lt;br /&gt;
 120	ENEMY:	Spikes (on right wall)&lt;br /&gt;
 121	ENEMY:	Robot with Blue Vertical Electric Arc&lt;br /&gt;
 122	PLAT:	Blue Platform (splits open when standing on top)&lt;br /&gt;
 123	ENEMY:	Spark&lt;br /&gt;
 &lt;br /&gt;
 125	BONUS:	Cyan Dancing Mushroom	(400)&lt;br /&gt;
 126	DECO:	Pink Eye Plant&lt;br /&gt;
 127	DECO:	Pink Eye Plant (hanging upside down)&lt;br /&gt;
 &lt;br /&gt;
 132	ENEMY:	Big Red Jumper (MAY ONLY WORK IN COSMO2 &amp;amp; COSMO3.EXE. APPEARS TO BE FROZEN IN COSMO1.EXE)&lt;br /&gt;
 133	ENEMY:	BOSS (Purple Alien in Spike-bottomed ship)&lt;br /&gt;
 &lt;br /&gt;
 135	PNEUMATIC PIPES:	Exit&lt;br /&gt;
 136	PNEUMATIC PIPES:	Entrance&lt;br /&gt;
 137	ENEMY:	Suction-Cup-Legged Alien&lt;br /&gt;
 138	OBJECT: Teleporter A&lt;br /&gt;
 139	OBJECT: Teleporter B&lt;br /&gt;
 &lt;br /&gt;
 142	ENEMY:	Cyan Spitting Plant (on left wall)&lt;br /&gt;
 143	ENEMY:	Cyan Spitting Plant (on right wall)&lt;br /&gt;
 144	ENEMY:	Blue Turret Alien&lt;br /&gt;
 145	PLAT:	Hoverboard&lt;br /&gt;
 146	CRATE:	pile of green balls&lt;br /&gt;
 &lt;br /&gt;
 148	BARREL:	Saxophone-like thing&lt;br /&gt;
 149	ENEMY:	Red Chomper Alien&lt;br /&gt;
 150	CRATE:	Salad&lt;br /&gt;
 151	switch (3) (Possibly deactivates Actors 153 &amp;amp; 154; Energy Beams)&lt;br /&gt;
 152	switch (4) (Possibly activates lights, if actors 6,7, &amp;amp; 8 are present in level.)&lt;br /&gt;
 153	HAZARD: Vertical Energy Beam (Deactivated by Switch)&lt;br /&gt;
 154	HAZARD: Horizontal Energy Beam (Deactivated by Switch)&lt;br /&gt;
 155	CREATURE/HAZARD:	Pink slug/Worm (Turns to bubbling goo when jumped upon)&lt;br /&gt;
 156	HINT:	&amp;quot;These hint globes will help you along your journey. Press the up key to reread them.&amp;quot;&lt;br /&gt;
 157	ENEMY:	Silver Robot (pushes player around)&lt;br /&gt;
 158	ENEMY:	Security Robot (shoots flashing bullet, can act as moving floor spring)&lt;br /&gt;
 &lt;br /&gt;
 160	PLAT/HAZARD:	Dragonfly&lt;br /&gt;
 161	Crate/Box (can only be destroyed with bombs)&lt;br /&gt;
 &lt;br /&gt;
 165	BONUS:	Bottle with red liquid&lt;br /&gt;
 166	BONUS:	Green thing&lt;br /&gt;
 167	BONUS:	Blue thing&lt;br /&gt;
 168	BONUS:	Salad?&lt;br /&gt;
 169	BONUS:	Pile of green things&lt;br /&gt;
 170	BONUS:	whatever..&lt;br /&gt;
 &lt;br /&gt;
 172	BONUS:	blue thing&lt;br /&gt;
 &lt;br /&gt;
 174	DECO/BONUS:	Satellite&lt;br /&gt;
 &lt;br /&gt;
 176	ENEMY:	Green Plant&lt;br /&gt;
 177	BONUS:	5 Yellow Grapes	(800)&lt;br /&gt;
 178	BONUS:	Headdress-like object&lt;br /&gt;
 179	CRATE:	with item 178&lt;br /&gt;
 180	DECO:	Jaws &amp;amp; Tongue&lt;br /&gt;
 181	invisible exit marker (go right to exit)&lt;br /&gt;
 182	small flame&lt;br /&gt;
 183	ENEMY:	Big Red Plant (spitting Blue Balls/catapult)&lt;br /&gt;
 &lt;br /&gt;
 185	BONUS:	Blue Crystal (on ground)&lt;br /&gt;
 186	BONUS:	Red Crystal (on ground)&lt;br /&gt;
 187	BARREL:	Red/Green Gem&lt;br /&gt;
 188	BARREL:	Blue Crystal&lt;br /&gt;
 189	BARREL:	Red Crystal&lt;br /&gt;
 190	BONUS:	Green Tomato&lt;br /&gt;
 191	BONUS:	Tomato&lt;br /&gt;
 192	BONUS:	Yellow/Cyan Fruit	(200)&lt;br /&gt;
 193	HAZARD:	Clamp Trap&lt;br /&gt;
 194	PLAT:	Blue Cube (falls down when you walk off)&lt;br /&gt;
 195	MESSAGE:	&amp;quot;What&#039;s happening? Is Cosmo falling to his doom?&amp;quot;&lt;br /&gt;
 196	MESSAGE:	&amp;quot;Is there no end to this pit? An what danger awaits below?!&amp;quot;&lt;br /&gt;
 197	Level End Object?&lt;br /&gt;
 198	CRATE:	Root		(400)&lt;br /&gt;
 199	BONUS:	Root&lt;br /&gt;
 200	CRATE:	4 Brown Berries	(400)&lt;br /&gt;
 201	BONUS:	4 Brown Berries&lt;br /&gt;
 &lt;br /&gt;
 203	BONUS:	Potato-like vegetable&lt;br /&gt;
 204	BARREL:	Green Gem&lt;br /&gt;
 205	BONUS:	Green Gem&lt;br /&gt;
 206	BARREL: Diamond		(3200)&lt;br /&gt;
 207	BONUS:	Diamond&lt;br /&gt;
 &lt;br /&gt;
 217	ENEMY:	Alien-Eating Space Plant (Exits the current level)&lt;br /&gt;
 218	ENEMY:	Blue Bird&lt;br /&gt;
 219	OBJECT:	Rocket&lt;br /&gt;
 220	BONUS:	Invincibility Cube&lt;br /&gt;
 221	PLAT:	Destructible Pedestal 1 (14 tiles high)&lt;br /&gt;
 222	PLAT:	Destructible Pedestal 2 (20 tiles high)&lt;br /&gt;
 223	PLAT:	Destructible Pedestal 3 (26 tiles high)&lt;br /&gt;
 224	BARREL:	Diamond 2&lt;br /&gt;
 225	BONUS:	Diamond 2 (falling)&lt;br /&gt;
 226	BARREL:	Red Berry&lt;br /&gt;
 227	BONUS:	Red Berry (falling)&lt;br /&gt;
 228	BARREL:	Crystal		(800)&lt;br /&gt;
 229	BONUS:	Crystal (falling)&lt;br /&gt;
 230	BARREL:	Blue Gem&lt;br /&gt;
 231	BONUS:	Blue Gem (falling)&lt;br /&gt;
 &lt;br /&gt;
 233	DECO:	Rocket Exhaust&lt;br /&gt;
 234	EXIT:	Teleporter&lt;br /&gt;
 235	HINT:	&amp;quot;Bump head into switch above!&amp;quot;&lt;br /&gt;
 236	HINT:	&amp;quot;The ice in this cave is very, very slippery.&amp;quot;&lt;br /&gt;
 237	HINT:	&amp;quot;Use this shield for temporary invincibility.&amp;quot;&lt;br /&gt;
 238	HINT:	&amp;quot;You found a secret area!!! Good Job!&amp;quot;&lt;br /&gt;
 239	HINT:	&amp;quot;In hight places look up to find bonus objects.&amp;quot;&lt;br /&gt;
 240	HINT:	&amp;quot;Out of Order...&amp;quot;&lt;br /&gt;
 241	HINT:	&amp;quot;This might be a good time to save your game!&amp;quot;&lt;br /&gt;
 242	HINT:	&amp;quot;Press your up key to use the transporter.&amp;quot;&lt;br /&gt;
 243	HINT:	&amp;quot;(1) FOR...&amp;quot;&lt;br /&gt;
 244	BONUS:	Diamond 2&lt;br /&gt;
 245	BONUS:	Red Berry&lt;br /&gt;
 246	BONUS:	Crystal&lt;br /&gt;
 247	BONUS:	Blue Gem	(800)&lt;br /&gt;
 248	PLAT:	Ceiling Spring&lt;br /&gt;
 249	BARREL:	Headphones&lt;br /&gt;
 250	BONUS:	Headphones&lt;br /&gt;
 251	BONUS:	Headphones (falling)&lt;br /&gt;
 252	OBJECT:	Frozen Duke NukUm&lt;br /&gt;
 &lt;br /&gt;
 254	BONUS:	3 Bananas	(800)&lt;br /&gt;
 255	CRATE:	Alien Raisin&lt;br /&gt;
 256	BONUS:	Alien Raisin	(400)&lt;br /&gt;
 &lt;br /&gt;
 258	CRATE:	Brown Pear&lt;br /&gt;
 259	BONUS:	Brown Pear&lt;br /&gt;
 &lt;br /&gt;
 261	CRATE:	Alien Chili Pepper&lt;br /&gt;
 262	BONUS:	Alien Chili Pepper (400)&lt;br /&gt;
 &lt;br /&gt;
 264	DANGER:	Flame (&amp;lt;-)&lt;br /&gt;
 265	DANGER:	Flame (-&amp;gt;)&lt;br /&gt;
 266    MESSAGE: &amp;quot;OUCH!&amp;quot; (Speech bubble)&lt;br /&gt;
 267	HAZARD:	Leaking Red acid&lt;br /&gt;
 268	HAZARD:	Dripping Red Acid&lt;br /&gt;
 269	HINT:	&amp;quot;(2) EXTRA...&amp;quot;&lt;br /&gt;
 270	HINT:	&amp;quot;(3) POINTS,...&amp;quot;&lt;br /&gt;
 271	HINT:	&amp;quot;(4) DESTROY...&amp;quot;&lt;br /&gt;
 272	HINT:	&amp;quot;(5) HINT...&amp;quot;&lt;br /&gt;
 273	HINT:	&amp;quot;(6) GLOBES!!!&amp;quot;&lt;br /&gt;
 274	HINT:	&amp;quot;The Clam Plants won&#039;t hurt you if their mouths are closed.&amp;quot;+Clam Sprite&lt;br /&gt;
 275    MESSAGE: &amp;quot;WHOA!&amp;quot; (Speech bubble)&lt;br /&gt;
 276    MESSAGE: &amp;quot;UMPH!&amp;quot; (Speech bubble)&lt;br /&gt;
 277    MESSAGE: &amp;quot;WOW! 50,000 POINTS!&amp;quot; (Speech bubble)&lt;br /&gt;
 278	DECO:	Big Mouth (end of E1/start of E2)&lt;br /&gt;
 279	DECO:	Normal Smoke Rising&lt;br /&gt;
 280	DECO:	Big Smoke rising&lt;br /&gt;
 281	EXIT: 	Horizontal Exit Marker (Invisible)&lt;br /&gt;
 &lt;br /&gt;
 283	BONUS:	Red Crystal on ceiling&lt;br /&gt;
 284	HINT:	&amp;quot;Collect the STARS to advance to BONUS STAGES.&amp;quot;&lt;br /&gt;
 285	HINT:	&amp;quot;Some creatures require more than one pounce to defeat!&amp;quot;&lt;br /&gt;
 286	HINT:	&amp;quot;Cosmo can climb wall&#039;s with his suction hands.&amp;quot;+CosmoWallSprite&lt;br /&gt;
 &lt;br /&gt;
 294	BONUS:	Power Up Module (falling)	(health/12800)&lt;br /&gt;
 295	BONUS:	Star (falling)	(200)&lt;br /&gt;
 296	end of episode 2 trigger?&lt;br /&gt;
&lt;br /&gt;
The hint texts are the messages you get in episode 1, the other episodes have different (and less!) messages. The later hint globes probably don&#039;t work in those episodes.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/ Dave Bollinger].  Most of this info came from the [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/dn2specs.txt Duke II specs on his website], with [[User:Malvineous|Malvineous]] working out which bits to remove to read Cosmo maps.  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=7175</id>
		<title>Cosmo&#039;s Cosmic Adventure</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure&amp;diff=7175"/>
		<updated>2017-08-05T02:42:44Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Added link to prevdemo.mni format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game Infobox&lt;br /&gt;
 | Levels = Edit&lt;br /&gt;
 | Tiles = Edit&lt;br /&gt;
 | Sprites = Edit&lt;br /&gt;
 | Fullscreen = Edit&lt;br /&gt;
 | Sound = Edit&lt;br /&gt;
 | Music = Edit&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Cosmo&#039;s Cosmic Adventure&#039;&#039;&#039;, also known simply as Cosmo, is a three part series chronicling the adventures of Cosmo, a small, green sucker-handed alien boy who is seeking his parents after a comet collision forces them to land their ship on a dangerous and uncharted planet.&lt;br /&gt;
&lt;br /&gt;
The Cosmo engine was later updated and used for [[Duke Nukem II]], so the two games share a number of file formats.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosedit.zip CosEdit]&lt;br /&gt;
| Platform = DOS GUI&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [https://dl.dropbox.com/u/3940020/COSGRAPH-working.zip Cosgraph]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = Edit&lt;br /&gt;
| mus = Edit&lt;br /&gt;
| sfx = Edit&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/cosmedit10.zip Cosmo Edit]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = No&lt;br /&gt;
| map = Edit&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [http://www.shikadi.net/wiki/files/moddingwiki/tools/cosmo/textract.zip TExtract]&lt;br /&gt;
| Platform = DOS console&lt;br /&gt;
| grp = Read&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Wombat]]&lt;br /&gt;
| Platform = Windows GUI&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = View&lt;br /&gt;
| gfx = View&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (32,000 bytes)&lt;br /&gt;
 | Format = [[Raw EGA data#Planar|Full-screen planar EGA]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = 320&amp;amp;times;200 full-screen images (in four planes: blue, green, red, intensity)&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mni (4,000 bytes)&lt;br /&gt;
 | Format = [[B800 Text]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Text screens shown at exit&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = actors.mni&amp;lt;br/&amp;gt;bd*.mni&amp;lt;br/&amp;gt;cartoon.mni&amp;lt;br/&amp;gt;masktile.mni&amp;lt;br/&amp;gt;players.mni&amp;lt;br/&amp;gt;tiles.mni&lt;br /&gt;
 | Format = [[Cosmo Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tilesets with 8&amp;amp;times;8 tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = tileattr.mni&lt;br /&gt;
 | Format = [[Cosmo Tile Attributes]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Tile properties&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.stn&amp;lt;br/&amp;gt;cosmo*.vol&lt;br /&gt;
 | Format = [[VOL Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Archive file storing the game data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = a*.mni&lt;br /&gt;
 | Format = [[Cosmo Level Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = m*.mni&amp;lt;br/&amp;gt;(except masktile.mni)&lt;br /&gt;
 | Format = [[IMF Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background music - see [[#Notes]] below&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = sounds*.mni&lt;br /&gt;
 | Format = [[Inverse Frequency Sound format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = PC speaker sound effects&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = cosmo*.sv*&lt;br /&gt;
 | Format = [[Cosmo Savegame Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Saved games.  &amp;lt;tt&amp;gt;cosmo?.svt&amp;lt;/tt&amp;gt; is a temporary save written at the start of each level&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *info.mni&lt;br /&gt;
 | Format = [[Cosmo Tileinfo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = How to lay out the actor tiles into complete frames&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = prevdemo.mni&lt;br /&gt;
 | Format = [[Cosmo Demo Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game demo format&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Graphics limitations and glitches:&lt;br /&gt;
** The masktile graphics can be corrupted by a buffer overflow by the addition of a large enough IMF music file to the [[:Category:Group Files|group file]] (usually around 40KB). (That is, the music goes over it&#039;s intended memory boundary.) This is not permanent, and will only occur until the offending file is removed or a smaller or less-complex file is imported in its place. &lt;br /&gt;
** Actor graphics can be corrupted by a self-contained arithmetic overflow by the addition of too many sprites. (that is, it writes to the end of the allocated block, then back around to the beginning, where it overwrites the header data.) Again, this is not permanent unless the user does not change the data in the group file.&lt;br /&gt;
** If an actor (a good example would be Cosmo himself) is behind a masked tile with the foreground bit set on it, any transparent regions of the tile overlapping the actor will remove those regions on the actor, showing the background instead.&lt;br /&gt;
&lt;br /&gt;
*Directory miscellany:&lt;br /&gt;
** The game reads from the VOL and STN archive files in preference to the current directory, but will read from the current directory if the archive files are not present.  Any game files in the current directory will not be read while the VOL/STN files are present.  To modify a file, it will either need to be imported back into the VOL/STN, or the VOL/STN should have its entire contents extracted into the game folder and then be removed or renamed.&lt;br /&gt;
** A directory path (relative to the current directory) can be given on the command line.  Any files that the game writes (saved games, high scores, etc.) will be written to this folder instead.  This is probably to allow running the game directly from read-only media like a CD.&lt;br /&gt;
&lt;br /&gt;
*Game Engine Glitches:&lt;br /&gt;
**In editing levels, if two or more blue moving platforms collide, the tiles that overlap will disappear. Furthermore, if Cosmo stands anywhere on any one of these platforms when they collide, he will literally be deleted from the level, and the game engine will treat him as if he had died or fallen off the bottom of the screen, restarting the level over again.&lt;br /&gt;
**If a player actor is not specified in a level file, a unique event can occur. The level coordinates of the player from the previous level (or any level, if using the warp cheat) carry over, meaning that the player can enter the level in a very different spot than what was intended before, even entering the level trapped inside a wall!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Apogee]]&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Demo_Format&amp;diff=7174</id>
		<title>Cosmo Demo Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Demo_Format&amp;diff=7174"/>
		<updated>2017-08-05T02:39:38Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Cosmo demo file format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This file is used to store the control inputs for Cosmo when playing the demo game. An entry is stored for each game frame. Up to 4999 entries can be recorded.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || numEntries || The number of entries in the file. The maximum number allowed is 4999&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][...] || demoInputData || demo input values (see below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each entry in the file is packed into a [[UINT8]] in the following way. The input is active when the corresponding bit is set.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Proceed to next level&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Drop bomb&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Jump&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Cosmo down&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Cosmo up&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cosmo right&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cosmo left&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Yuv422|Yuv422]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Cosmo&#039;s Cosmic Adventures]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7172</id>
		<title>Cosmo Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo_Level_Format&amp;diff=7172"/>
		<updated>2017-08-03T11:48:17Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: Added Actor 55, Activated Bomb&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 3&lt;br /&gt;
 | Tile size = 8&amp;amp;times;8&lt;br /&gt;
 | Viewport = 304&amp;amp;times;144&lt;br /&gt;
 | Games = &lt;br /&gt;
   {{Game|Cosmo&#039;s Cosmic Adventures}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
The file is in this basic layout:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iFlags||Flags indicating music, backdrop and other stuff&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapWidth||Map width in tiles&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iActorSize||Number of UINT16 values in the actor block&lt;br /&gt;
|-&lt;br /&gt;
|ACTORDATA actorData[]||Variable-length array of all the actors in the level&lt;br /&gt;
|-&lt;br /&gt;
|BYTE bgLayer[65528]||The map data for the background layer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The iMapWidth values in the original Cosmo levels is either 64, 128, 256 or 512. The &amp;quot;view window&amp;quot; in the game is 304x144 Pixels, so the minimal map width would be 38. However, the width must be a power of 2 to work (from 32 to 2048).&lt;br /&gt;
&lt;br /&gt;
The iActorSize values are reliable for all the original Cosmo level files (Version 1.20).&lt;br /&gt;
&lt;br /&gt;
The map data is actually sized 65528 Bytes or 32764 Words. Each entry in this block is divisable by 8 (see [[#Mapping cell values to tiles]]).&lt;br /&gt;
&lt;br /&gt;
=== Level Flags ===&lt;br /&gt;
&lt;br /&gt;
The structure of the bits in the iFlags value is as follows:&lt;br /&gt;
&lt;br /&gt;
 [ mmmmm | ppp | yxr | bbbbb ]&lt;br /&gt;
 &lt;br /&gt;
 m: music index&lt;br /&gt;
 p: palette animation type&lt;br /&gt;
 y: y-scrolling backdrop&lt;br /&gt;
 x: x-scrolling backdrop&lt;br /&gt;
 r: rain&lt;br /&gt;
 b: backdrop index&lt;br /&gt;
&lt;br /&gt;
The indices for music and backdrop refer to an array of filename strings stored in the executable. You can find them by searching for the first filename in each array. For backdrops, the first filename (index: 0) is &amp;lt;tt&amp;gt;BDBLANK.MNI&amp;lt;/tt&amp;gt;, for music it&#039;s &amp;lt;tt&amp;gt;MCAVES.MNI&amp;lt;/tt&amp;gt;. Note that some backdrop files are not used by the games.  The complete list is:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Backdrop&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bdblank.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bdpipe.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bdredsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bdrocktk.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bdjungle.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bdstar.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bdwierd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bdcave.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || bdice.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || bdshrum.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || bdtechms.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || bdnewsky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bdstar2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || bdstar3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || bdforest.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || bdmountn.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || bdguts.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bdbrktec.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || bdclouds.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19 || bdfutcty.mni&lt;br /&gt;
|-&lt;br /&gt;
| 20 || bdice2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 21 || bdcliff.mni&lt;br /&gt;
|-&lt;br /&gt;
| 22 || bdspooky.mni&lt;br /&gt;
|-&lt;br /&gt;
| 23 || bdcrystl.mni&lt;br /&gt;
|-&lt;br /&gt;
| 24 || bdcircut.mni&lt;br /&gt;
|-&lt;br /&gt;
| 25 || bdcircpc.mni&lt;br /&gt;
|-&lt;br /&gt;
| 26-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Music&amp;lt;br/&amp;gt;value !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || mcaves.mni&lt;br /&gt;
|-&lt;br /&gt;
| 1 || mscarry.mni&lt;br /&gt;
|-&lt;br /&gt;
| 2 || mboss.mni&lt;br /&gt;
|-&lt;br /&gt;
| 3 || mrunaway.mni&lt;br /&gt;
|-&lt;br /&gt;
| 4 || mcircus.mni&lt;br /&gt;
|-&lt;br /&gt;
| 5 || mtekwrd.mni&lt;br /&gt;
|-&lt;br /&gt;
| 6 || measylev.mni&lt;br /&gt;
|-&lt;br /&gt;
| 7 || mrockit.mni&lt;br /&gt;
|-&lt;br /&gt;
| 8 || mhappy.mni&lt;br /&gt;
|-&lt;br /&gt;
| 9 || mdevo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 10 || mdadoda.mni&lt;br /&gt;
|-&lt;br /&gt;
| 11 || mbells.mni&lt;br /&gt;
|-&lt;br /&gt;
| 12 || mdrums.mni&lt;br /&gt;
|-&lt;br /&gt;
| 13 || mbanjo.mni&lt;br /&gt;
|-&lt;br /&gt;
| 14 || measy2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 15 || mteck2.mni&lt;br /&gt;
|-&lt;br /&gt;
| 16 || mteck3.mni&lt;br /&gt;
|-&lt;br /&gt;
| 17 || mteck4.mni&lt;br /&gt;
|-&lt;br /&gt;
| 18 || mzztop.mni&lt;br /&gt;
|-&lt;br /&gt;
| 19-31 || &#039;&#039;Unused&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: left;&amp;quot;&lt;br /&gt;
! Animation&amp;lt;br/&amp;gt;value !! Use !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || most levels || no palette changes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || A4 || random lightning (with thunder soundeffect)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || C8-C10 || cycling: red -&amp;gt; yellow -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 3 || A7 || cycling: red -&amp;gt; green -&amp;gt; blue&lt;br /&gt;
|-&lt;br /&gt;
| 4 || A8, B3, B4, B7 || cycling: black -&amp;gt; grey -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 5 || C6, C7 || flashing: red -&amp;gt; magenta -&amp;gt; white&lt;br /&gt;
|-&lt;br /&gt;
| 6 || C1 || replace dark magenta with black,&amp;lt;br/&amp;gt;no animation unless triggered by a bomb actor.&amp;lt;br/&amp;gt;(ONLY PRESENT IN COSMO3.EXE AT THE MOMENT.)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || None || {{TODO|Unknown}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Background Layer ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;bgLayer&amp;lt;/tt&amp;gt; block contains the grid/cell data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iMapData[32764]||Actual map data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;element&amp;quot; in &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; refers to the foreground and/or background tile used in a single grid cell.  The grids are arranged left to right, top to bottom, so the index can be calculated by this formula:&lt;br /&gt;
&lt;br /&gt;
 int iIndex = (y * iMapWidth) + x;&lt;br /&gt;
 iMapData[iIndex] = &amp;lt;new value to set at x,y&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map data in the original Cosmo level files is a constant 32764 UINT16LE cells long (65528 bytes), and the engine will never read more than 65535 bytes. However, the game calculates the map height by dividing the width in bytes by 65536:&lt;br /&gt;
&lt;br /&gt;
 int iMapHeight = 32768 / iMapWidth;&lt;br /&gt;
&lt;br /&gt;
Since the width of the map is always a power of 2 (min. 64), you can see that each file is &amp;quot;missing&amp;quot; 8 Bytes (or 4 Words). That means the last line of the map will always be missing the last 4 tiles. The game ignores that last, incomplete line. However, in one level (A8.MNI), there is an actor placed in that last line. Since actors are saved as individual structures instead of a grid, that actor will still be loaded by the game. But for editing a level, you should make sure the last line is visible, so that it&#039;s possible to place actors in that line or remove them from there.&lt;br /&gt;
&lt;br /&gt;
==== Mapping cell values to tiles ====&lt;br /&gt;
&lt;br /&gt;
The method of mapping elements in the &amp;lt;tt&amp;gt;iMapData&amp;lt;/tt&amp;gt; structure into tiles is fairly straightforward.  Each cell value is a pixel index into the tilemap.  Imagine the tileset laid out left to right all on the one row.  Since each tile is 8x8 pixels, at 16 pixels into the image, the third tile will begin (x = 0 for first tile, x = 8 for second tile, x = 16 for third tile.)  The cell value is essentially a pixel x-coordinate into the tileset.&lt;br /&gt;
&lt;br /&gt;
Note that in the tileset file, the solid tiles are made up of 2000 4-plane (16-colour) images, and these are followed by 1000 5-plane images (16-colour + transparency.)  Although separate images, they appear to be concatenated when the game loads them, as the cell value will be zero for the first solid tile, it will be eight for the second solid tile, it will be 15992 for the last solid tile, and it will be 16000 for the first masked tile.&lt;br /&gt;
&lt;br /&gt;
This means that if the solid and masked tiles have been treated as separate images, a check will need to be performed so that any cell value below 16000 is loaded from the solid tileset, and any value larger than this is loaded from the masked tileset (after subtracting 16000 from the cell value, to put it at zero for the first masked tile.)  However, for some reason the values for the masked tiles are at multiples of five tiles (tile #0 (x=0) is the first tile, tile #5 (x=40) is the second tile.)  This formula can be used to convert the values into tile numbers once they stray into the masked tile area:&lt;br /&gt;
&lt;br /&gt;
 #define COSMO_TS_SOLID_NUMTILES   2000 // 40x25&lt;br /&gt;
 #define COSMO_TS_MASKED_NUMTILES  1000 // 40x4&lt;br /&gt;
 &lt;br /&gt;
 tile = cell_value / 8&lt;br /&gt;
 if (tile &amp;gt; COSMO_TS_SOLID_NUMTILES) {&lt;br /&gt;
   // Once we&#039;re in the masked tileset it counts up in multiples of five planes&lt;br /&gt;
   tile = COSMO_TS_SOLID_NUMTILES + (tile - COSMO_TS_SOLID_NUMTILES) / 5;&lt;br /&gt;
 }&lt;br /&gt;
 // Now &#039;tile&#039; will be between 0 and 2999 inclusive&lt;br /&gt;
&lt;br /&gt;
As an example of a few tile values:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cell value !! Tile number !! Tileset !! Index !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || N/A || N/A || See through to map backdrop&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 1 || Solid || 1 || First solid tile, note increment of 8&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 2 || Solid || 2 || Second solid tile, increment of 8 again&lt;br /&gt;
|-&lt;br /&gt;
| 15992 || 1999 || Solid || 1999 || Last solid tile&lt;br /&gt;
|-&lt;br /&gt;
| 16000 || 2000 || Masked || 0 || First masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 16040 || 2001 || Masked || 1 || Second masked tile, note increment of 40&lt;br /&gt;
|-&lt;br /&gt;
| 16080 || 2002 || Masked || 2 || Third masked tile, increment of 40 again&lt;br /&gt;
|-&lt;br /&gt;
| 55960 || 2999 || Masked || 999 || Last masked tile&lt;br /&gt;
|-&lt;br /&gt;
| 56000 || N/A || N/A || N/A || Should never get a value this size or larger&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that while the cell value cannot be out of range for the solid tiles/background layer (since any values larger than 16000 will be loaded from the masked tileset) the cell values for the masked tileset have no such restriction.  (Although obviously out of range tiles will not be drawn correctly by the engine!)&lt;br /&gt;
&lt;br /&gt;
==== Gotchas ====&lt;br /&gt;
&lt;br /&gt;
* The first tile in the solid tileset is used as a transparent tile.  It will appear completely black if drawn (e.g. in a map editor) however the game does not draw this tile, so any cells with this as the background cell will be where the map backdrop shows through.  If you wish to draw the map with the backdrop in-place, remember not to draw tile #0 over the top of the backdrop.&lt;br /&gt;
&lt;br /&gt;
=== Actor data ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;actorData&amp;lt;/tt&amp;gt; block is in the following format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iType||Type of actor&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iX||X-coordinate of actor (in tile units)&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE iY||Y-coordinate of actor (in tile units)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Because the &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; value in the header is in UINT16s and there are three UINT16s per actor, the number of actors can be obtained quite simply:&lt;br /&gt;
&lt;br /&gt;
 iNumActors = iActorSize / 3&lt;br /&gt;
&lt;br /&gt;
This is assuming &amp;lt;tt&amp;gt;iActorSize&amp;lt;/tt&amp;gt; is reliable - the original specs from Dave Bollinger indicate this is not always the case for DukeII, but no examples are known at the moment.&lt;br /&gt;
&lt;br /&gt;
==== Mapping Actor Types to image indices ====&lt;br /&gt;
&lt;br /&gt;
For the ActorTypes from 32 to 296 (inclusive), you can get an image index from ACTORS.MNI and ACTRINFO.MNI like this:&lt;br /&gt;
&lt;br /&gt;
 ImageIndex = ActorType - 31&lt;br /&gt;
&lt;br /&gt;
However, this does not work for every ActorType. Some share the same images (e.g.: normal stars and falling stars), some use flipped versions of other images (like the pink eye plants) and some are invisible in the game. In either case, the index in the ACTRINFO.MNI will contain no data. You will either have to include hard-coded info to draw these, or just draw something else (like the actual ActorType as text).&lt;br /&gt;
&lt;br /&gt;
==== List of Actor Types ====&lt;br /&gt;
&lt;br /&gt;
This is a list of all the actor types that can be found in the original levels of the three episodes. There might be more ActorTypes that work in the game. For example, 69 is probably the (falling) &amp;quot;Cyan Fruit&amp;quot; item as you can guess by looking at the numbers 62-68.&lt;br /&gt;
&lt;br /&gt;
   0	PLAYER:	Cosmo (Starting position facing right)&lt;br /&gt;
   1	moving platform (fixed path)&lt;br /&gt;
   2	PLAT/HAZARD:	mud fountain 1 (small)&lt;br /&gt;
   3	PLAT/HAZARD:	mud fountain 2 (normal)&lt;br /&gt;
   4	PLAT/HAZARD:	mud fountain 3 (big)&lt;br /&gt;
   5	PLAT/HAZARD:	mud fountain 4 (huge)&lt;br /&gt;
   6	BRIGHTNESS:	left border of light&lt;br /&gt;
   7	BRIGHTNESS:	light source (top center)&lt;br /&gt;
   8	BRIGHTNESS:	right border of light&lt;br /&gt;
 &lt;br /&gt;
  22	??? (only in A8.MNI, doesn&#039;t seem to be doing anything)&lt;br /&gt;
 &lt;br /&gt;
  32	BONUS:	Star	(200)&lt;br /&gt;
  33	PLAT:	Floor Spring&lt;br /&gt;
  34	HAZARD:	Extending Arrow Spear (from right to left)&lt;br /&gt;
  35	HAZARD:	Extending Arrow Spear (from left to right)&lt;br /&gt;
  36	HAZARD:	Plasma Fireball (from right to left)&lt;br /&gt;
  37	HAZARD:	Plasma Fireball (from left to right)&lt;br /&gt;
  38	Blue Switch (on ceiling)&lt;br /&gt;
  39	Red Switch (on ceiling)&lt;br /&gt;
  40	Green Switch &lt;br /&gt;
  41	Yellow Switch&lt;br /&gt;
  42	Blue Door&lt;br /&gt;
  43	Red Door&lt;br /&gt;
  44	Green Door&lt;br /&gt;
  45	Yellow Door&lt;br /&gt;
 &lt;br /&gt;
  47	OBJECT:	Blue Mobile Trampoline Car&lt;br /&gt;
  48	HAZARD:	Non-Retracting Spikes&lt;br /&gt;
  49	HAZARD:	Retracting Spikes&lt;br /&gt;
 &lt;br /&gt;
  51	HAZARD:	Big Saw Blade&lt;br /&gt;
 &lt;br /&gt;
  55	HAZARD: Activated Bomb&lt;br /&gt;
  56	HAZARD:	Green Pruny Cabbage Ball&lt;br /&gt;
 &lt;br /&gt;
  59	BONUS:	Power Up	(health/12800)&lt;br /&gt;
  60	BARREL:	Power Up	(health/12800)&lt;br /&gt;
 &lt;br /&gt;
  62	CRATE:	Green Tomato&lt;br /&gt;
  63	BONUS:	Green Tomato (falling)&lt;br /&gt;
  64	CRATE:	Tomato		(200)&lt;br /&gt;
  65	BONUS:	Tomato (falling)&lt;br /&gt;
  66	CRATE:	Yellow/Cyan Fruit&lt;br /&gt;
  67	BONUS:	Yellow/Cyan Fruit (falling)&lt;br /&gt;
  68	CRATE:	Cyan Fruit&lt;br /&gt;
 &lt;br /&gt;
  70	OBJECT:	Exit Sign (ends level on touch)&lt;br /&gt;
 &lt;br /&gt;
  72	HAZARD:	Spear (coming down from ceiling)&lt;br /&gt;
  73	HAZARD:	Leaking Green Acid&lt;br /&gt;
  74	HAZARD:	Dripping Green Acid&lt;br /&gt;
  75	ENEMY:	Plasma Energy Sprites (Blue Flame-like creatures)&lt;br /&gt;
  76	HAZARD:	&amp;quot;Two Tons&amp;quot; Weight going down &amp;amp; up&lt;br /&gt;
  77	ENEMY:	Jumping Bulletheads&lt;br /&gt;
  78	ENEMY:	Stone Heads (Only drops when Cosmo is close by)&lt;br /&gt;
  79	ENEMY:	Big Yellow Spike on ceiling&lt;br /&gt;
  80	ENEMY:	Big Yellow Spike on ceiling (falling down)&lt;br /&gt;
  81	ENEMY:	Big Yellow Spike on ground&lt;br /&gt;
  82	ENEMY:	Ghost&lt;br /&gt;
  83	CRATE:	Green thingy&lt;br /&gt;
 &lt;br /&gt;
  85	ENEMY:	Angry Moon (blue floating characters)&lt;br /&gt;
  86	ENEMY:	Small Red Plant&lt;br /&gt;
  87	BARREL:	Bomb	(100)&lt;br /&gt;
  88	BONUS:	Bomb	(100)&lt;br /&gt;
 &lt;br /&gt;
  90	OBJECT: switch (1) (Activates moving platform(s))&lt;br /&gt;
 &lt;br /&gt;
  92	OBJECT: switch (2) (Activates Question Mark Block Wall Generator)&lt;br /&gt;
  93	OBJECT: Question Mark Block (Generates a wall when activated by switch)&lt;br /&gt;
  94	HAZARD: Ground Claw Spikes&lt;br /&gt;
  95	OBJECT: Rubber Wall (can blow it up, throws Cosmo backwards when touched)&lt;br /&gt;
  96	ENEMY:	Mini Ghost (jumps)&lt;br /&gt;
 &lt;br /&gt;
 100	CREATURE:	Green Roamer Worm&lt;br /&gt;
 101	PIPE TRANSIT DIRECTION:	Arrow Up&lt;br /&gt;
 102	PIPE TRANSIT DIRECTION:	Arrow Down&lt;br /&gt;
 103	PIPE TRANSIT DIRECTION:	Arrow Left&lt;br /&gt;
 104	PIPE TRANSIT DIRECTION:	Arrow Right&lt;br /&gt;
 105	ENEMY:	Egg Head (special?) -- only 1x: in B2.MNI&lt;br /&gt;
 106	ENEMY:	Egg Head&lt;br /&gt;
 &lt;br /&gt;
 109	ENEMY:	Robotic Spike on ground&lt;br /&gt;
 &lt;br /&gt;
 111	ENEMY:	Robotic Spike on ceiling&lt;br /&gt;
 112	CRATE/BONUS:	Burger&lt;br /&gt;
 &lt;br /&gt;
 114	ENEMY:	Blue/Red plant&lt;br /&gt;
 &lt;br /&gt;
 116	BONUS:	Purple Grapes	(800)&lt;br /&gt;
 117	ENEMY:	Blue Ball&lt;br /&gt;
 118	ENEMY:	Spikes (on left wall)&lt;br /&gt;
 119	ENEMY:	Retracting Spikes (on left wall)&lt;br /&gt;
 120	ENEMY:	Spikes (on right wall)&lt;br /&gt;
 121	ENEMY:	Robot with Blue Vertical Electric Arc&lt;br /&gt;
 122	PLAT:	Blue Platform (splits open when standing on top)&lt;br /&gt;
 123	ENEMY:	Spark&lt;br /&gt;
 &lt;br /&gt;
 125	BONUS:	Cyan Dancing Mushroom	(400)&lt;br /&gt;
 126	DECO:	Pink Eye Plant&lt;br /&gt;
 127	DECO:	Pink Eye Plant (hanging upside down)&lt;br /&gt;
 &lt;br /&gt;
 132	ENEMY:	Big Red Jumper (MAY ONLY WORK IN COSMO2 &amp;amp; COSMO3.EXE. APPEARS TO BE FROZEN IN COSMO1.EXE)&lt;br /&gt;
 133	ENEMY:	BOSS (Purple Alien in Spike-bottomed ship)&lt;br /&gt;
 &lt;br /&gt;
 135	PNEUMATIC PIPES:	Exit&lt;br /&gt;
 136	PNEUMATIC PIPES:	Entrance&lt;br /&gt;
 137	ENEMY:	Suction-Cup-Legged Alien&lt;br /&gt;
 138	OBJECT: Teleporter A&lt;br /&gt;
 139	OBJECT: Teleporter B&lt;br /&gt;
 &lt;br /&gt;
 142	ENEMY:	Cyan Spitting Plant (on left wall)&lt;br /&gt;
 143	ENEMY:	Cyan Spitting Plant (on right wall)&lt;br /&gt;
 144	ENEMY:	Blue Turret Alien&lt;br /&gt;
 145	PLAT:	Hoverboard&lt;br /&gt;
 146	CRATE:	pile of green balls&lt;br /&gt;
 &lt;br /&gt;
 148	BARREL:	Saxophone-like thing&lt;br /&gt;
 149	ENEMY:	Red Chomper Alien&lt;br /&gt;
 150	CRATE:	Salad&lt;br /&gt;
 151	switch (3) (Possibly deactivates Actors 153 &amp;amp; 154; Energy Beams)&lt;br /&gt;
 152	switch (4) (Possibly activates lights, if actors 6,7, &amp;amp; 8 are present in level.)&lt;br /&gt;
 153	HAZARD: Vertical Energy Beam (Deactivated by Switch)&lt;br /&gt;
 154	HAZARD: Horizontal Energy Beam (Deactivated by Switch)&lt;br /&gt;
 155	CREATURE/HAZARD:	Pink slug/Worm (Turns to bubbling goo when jumped upon)&lt;br /&gt;
 156	HINT:	&amp;quot;These hint globes will help you along your journey. Press the up key to reread them.&amp;quot;&lt;br /&gt;
 157	ENEMY:	Silver Robot (pushes player around)&lt;br /&gt;
 158	ENEMY:	Security Robot (shoots flashing bullet, can act as moving floor spring)&lt;br /&gt;
 &lt;br /&gt;
 160	PLAT/HAZARD:	Dragonfly&lt;br /&gt;
 161	Crate/Box (can only be destroyed with bombs)&lt;br /&gt;
 &lt;br /&gt;
 165	BONUS:	Bottle with red liquid&lt;br /&gt;
 166	BONUS:	Green thing&lt;br /&gt;
 167	BONUS:	Blue thing&lt;br /&gt;
 168	BONUS:	Salad?&lt;br /&gt;
 169	BONUS:	Pile of green things&lt;br /&gt;
 170	BONUS:	whatever..&lt;br /&gt;
 &lt;br /&gt;
 172	BONUS:	blue thing&lt;br /&gt;
 &lt;br /&gt;
 174	DECO/BONUS:	Satellite&lt;br /&gt;
 &lt;br /&gt;
 176	ENEMY:	Green Plant&lt;br /&gt;
 177	BONUS:	5 Yellow Grapes	(800)&lt;br /&gt;
 178	BONUS:	Headdress-like object&lt;br /&gt;
 179	CRATE:	with item 178&lt;br /&gt;
 180	DECO:	Jaws &amp;amp; Tongue&lt;br /&gt;
 181	invisible exit marker (go right to exit)&lt;br /&gt;
 182	small flame&lt;br /&gt;
 183	ENEMY:	Big Red Plant (spitting Blue Balls/catapult)&lt;br /&gt;
 &lt;br /&gt;
 185	BONUS:	Blue Crystal (on ground)&lt;br /&gt;
 186	BONUS:	Red Crystal (on ground)&lt;br /&gt;
 187	BARREL:	Red/Green Gem&lt;br /&gt;
 188	BARREL:	Blue Crystal&lt;br /&gt;
 189	BARREL:	Red Crystal&lt;br /&gt;
 190	BONUS:	Green Tomato&lt;br /&gt;
 191	BONUS:	Tomato&lt;br /&gt;
 192	BONUS:	Yellow/Cyan Fruit	(200)&lt;br /&gt;
 193	HAZARD:	Clamp Trap&lt;br /&gt;
 194	PLAT:	Blue Cube (falls down when you walk off)&lt;br /&gt;
 195	MESSAGE:	&amp;quot;What&#039;s happening? Is Cosmo falling to his doom?&amp;quot;&lt;br /&gt;
 196	MESSAGE:	&amp;quot;Is there no end to this pit? An what danger awaits below?!&amp;quot;&lt;br /&gt;
 197	Level End Object?&lt;br /&gt;
 198	CRATE:	Root		(400)&lt;br /&gt;
 199	BONUS:	Root&lt;br /&gt;
 200	CRATE:	4 Brown Berries	(400)&lt;br /&gt;
 201	BONUS:	4 Brown Berries&lt;br /&gt;
 &lt;br /&gt;
 203	BONUS:	Potato-like vegetable&lt;br /&gt;
 204	BARREL:	Green Gem&lt;br /&gt;
 205	BONUS:	Green Gem&lt;br /&gt;
 206	BARREL: Diamond		(3200)&lt;br /&gt;
 207	BONUS:	Diamond&lt;br /&gt;
 &lt;br /&gt;
 217	ENEMY:	Alien-Eating Space Plant (Exits the current level)&lt;br /&gt;
 218	ENEMY:	Blue Bird&lt;br /&gt;
 219	OBJECT:	Rocket&lt;br /&gt;
 220	BONUS:	Invincibility Cube&lt;br /&gt;
 221	PLAT:	Destructible Pedestal 1 (14 tiles high)&lt;br /&gt;
 222	PLAT:	Destructible Pedestal 2 (20 tiles high)&lt;br /&gt;
 223	PLAT:	Destructible Pedestal 3 (26 tiles high)&lt;br /&gt;
 224	BARREL:	Diamond 2&lt;br /&gt;
 225	BONUS:	Diamond 2 (falling)&lt;br /&gt;
 226	BARREL:	Red Berry&lt;br /&gt;
 227	BONUS:	Red Berry (falling)&lt;br /&gt;
 228	BARREL:	Crystal		(800)&lt;br /&gt;
 229	BONUS:	Crystal (falling)&lt;br /&gt;
 230	BARREL:	Blue Gem&lt;br /&gt;
 231	BONUS:	Blue Gem (falling)&lt;br /&gt;
 &lt;br /&gt;
 233	DECO:	Rocket Exhaust&lt;br /&gt;
 234	EXIT:	Teleporter&lt;br /&gt;
 235	HINT:	&amp;quot;Bump head into switch above!&amp;quot;&lt;br /&gt;
 236	HINT:	&amp;quot;The ice in this cave is very, very slippery.&amp;quot;&lt;br /&gt;
 237	HINT:	&amp;quot;Use this shield for temporary invincibility.&amp;quot;&lt;br /&gt;
 238	HINT:	&amp;quot;You found a secret area!!! Good Job!&amp;quot;&lt;br /&gt;
 239	HINT:	&amp;quot;In hight places look up to find bonus objects.&amp;quot;&lt;br /&gt;
 240	HINT:	&amp;quot;Out of Order...&amp;quot;&lt;br /&gt;
 241	HINT:	&amp;quot;This might be a good time to save your game!&amp;quot;&lt;br /&gt;
 242	HINT:	&amp;quot;Press your up key to use the transporter.&amp;quot;&lt;br /&gt;
 243	HINT:	&amp;quot;(1) FOR...&amp;quot;&lt;br /&gt;
 244	BONUS:	Diamond 2&lt;br /&gt;
 245	BONUS:	Red Berry&lt;br /&gt;
 246	BONUS:	Crystal&lt;br /&gt;
 247	BONUS:	Blue Gem	(800)&lt;br /&gt;
 248	PLAT:	Ceiling Spring&lt;br /&gt;
 249	BARREL:	Headphones&lt;br /&gt;
 250	BONUS:	Headphones&lt;br /&gt;
 251	BONUS:	Headphones (falling)&lt;br /&gt;
 252	OBJECT:	Frozen Duke NukUm&lt;br /&gt;
 &lt;br /&gt;
 254	BONUS:	3 Bananas	(800)&lt;br /&gt;
 255	CRATE:	Alien Raisin&lt;br /&gt;
 256	BONUS:	Alien Raisin	(400)&lt;br /&gt;
 &lt;br /&gt;
 258	CRATE:	Brown Pear&lt;br /&gt;
 259	BONUS:	Brown Pear&lt;br /&gt;
 &lt;br /&gt;
 261	CRATE:	Alien Chili Pepper&lt;br /&gt;
 262	BONUS:	Alien Chili Pepper (400)&lt;br /&gt;
 &lt;br /&gt;
 264	DANGER:	Flame (&amp;lt;-)&lt;br /&gt;
 265	DANGER:	Flame (-&amp;gt;)&lt;br /&gt;
 &lt;br /&gt;
 267	HAZARD:	Leaking Red acid&lt;br /&gt;
 268	HAZARD:	Dripping Red Acid&lt;br /&gt;
 269	HINT:	&amp;quot;(2) EXTRA...&amp;quot;&lt;br /&gt;
 270	HINT:	&amp;quot;(3) POINTS,...&amp;quot;&lt;br /&gt;
 271	HINT:	&amp;quot;(4) DESTROY...&amp;quot;&lt;br /&gt;
 272	HINT:	&amp;quot;(5) HINT...&amp;quot;&lt;br /&gt;
 273	HINT:	&amp;quot;(6) GLOBES!!!&amp;quot;&lt;br /&gt;
 274	HINT:	&amp;quot;The Clam Plants won&#039;t hurt you if their mouths are closed.&amp;quot;+Clam Sprite&lt;br /&gt;
 &lt;br /&gt;
 278	DECO:	Big Mouth (end of E1/start of E2)&lt;br /&gt;
 279	DECO:	Normal Smoke Rising&lt;br /&gt;
 280	DECO:	Big Smoke rising&lt;br /&gt;
 281	EXIT: 	Horizontal Exit Marker (Invisible)&lt;br /&gt;
 &lt;br /&gt;
 283	BONUS:	Red Crystal on ceiling&lt;br /&gt;
 284	HINT:	&amp;quot;Collect the STARS to advance to BONUS STAGES.&amp;quot;&lt;br /&gt;
 285	HINT:	&amp;quot;Some creatures require more than one pounce to defeat!&amp;quot;&lt;br /&gt;
 286	HINT:	&amp;quot;Cosmo can climb wall&#039;s with his suction hands.&amp;quot;+CosmoWallSprite&lt;br /&gt;
 &lt;br /&gt;
 294	BONUS:	Power Up Module (falling)	(health/12800)&lt;br /&gt;
 295	BONUS:	Star (falling)	(200)&lt;br /&gt;
 296	end of episode 2 trigger?&lt;br /&gt;
&lt;br /&gt;
The hint texts are the messages you get in episode 1, the other episodes have different (and less!) messages. The later hint globes probably don&#039;t work in those episodes.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/ Dave Bollinger].  Most of this info came from the [http://archive.shikadi.net/sites/www.geocities.com/dooknookimklassik/dn2specs.txt Duke II specs on his website], with [[User:Malvineous|Malvineous]] working out which bits to remove to read Cosmo maps.  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure/Cheats&amp;diff=7170</id>
		<title>Cosmo&#039;s Cosmic Adventure/Cheats</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Cosmo%27s_Cosmic_Adventure/Cheats&amp;diff=7170"/>
		<updated>2017-08-02T12:10:41Z</updated>

		<summary type="html">&lt;p&gt;Yuv422: /* Debug Cheats */  Added info about F11 demo recording mode.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Full-Inventory Cheat ==&lt;br /&gt;
&lt;br /&gt;
* Hold down &#039;&#039;&#039;C&#039;&#039;&#039;, &#039;&#039;&#039;0&#039;&#039;&#039; (zero), and &#039;&#039;&#039;F10&#039;&#039;&#039; to fill up your health, and bomb inventory.&lt;br /&gt;
&lt;br /&gt;
== Debug Cheats ==&lt;br /&gt;
&lt;br /&gt;
Hold down &#039;&#039;&#039;Tab&#039;&#039;&#039;, &#039;&#039;&#039;F12&#039;&#039;&#039;, and &#039;&#039;&#039;Delete&#039;&#039;&#039; to activate debug mode.  The following keys will then work:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;F10 + G&#039;&#039;&#039; will activate God Mode. This means that Cosmo cannot be harmed by enemies or hazards. He can, however, die by falling off the bottom of the screen.&lt;br /&gt;
* &#039;&#039;&#039;F10 + W&#039;&#039;&#039; will bring up a window where you can type in which level you would like to go to. &lt;br /&gt;
* &#039;&#039;&#039;F10 + M&#039;&#039;&#039; will bring up a status window showing how much memory (in kB) is free, how much total memory is being used, how large the level is, and how many actors (Cosmo, enemies, objects, and obstacles) are in the level.&lt;br /&gt;
* &#039;&#039;&#039;F10 + E + N + D&#039;&#039;&#039; will skip to the end-of-episode cutscenes.&lt;br /&gt;
* &#039;&#039;&#039;F11&#039;&#039;&#039; Pressing F11 twice on the main title screen will cause the game to go into demo recording mode. The recorded demo will be saved into the file &#039;&#039;&#039;PREVDEMO.MNI&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheat Codes]]&lt;br /&gt;
[[Category:Cosmo&#039;s Cosmic Adventures]]&lt;/div&gt;</summary>
		<author><name>Yuv422</name></author>
	</entry>
</feed>