<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dsibrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pbsds</id>
	<title>DSiBrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dsibrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pbsds"/>
	<link rel="alternate" type="text/html" href="https://dsibrew.org/wiki/Special:Contributions/Pbsds"/>
	<updated>2026-04-30T08:41:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2098834</id>
		<title>User:Pbsds/PPMtool</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2098834"/>
		<updated>2017-01-08T18:42:07Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Icon.png]]&lt;br /&gt;
&lt;br /&gt;
This is a command line program that is able to read info from PPM files(Flipnotes) and even convert the preview image into an BMP.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:PPMtool.rar|here]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;br /&gt;
Don&#039;t use this one! I rewrote it in python. and that one supports frame extractions too!&lt;br /&gt;
&lt;br /&gt;
http://www.mediafire.com/?clt4ad2wcmh&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:24, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;br /&gt;
woah, this page existed! This is the newest code: https://github.com/pbsds/Hatenatools&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 20:42, 8 January 2017 (CET)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2098833</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2098833"/>
		<updated>2017-01-08T18:39:13Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound data section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
/private/ds/app/4B475545/001 - North American location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 2&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0002&lt;br /&gt;
| 2&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
        {&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
        }&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
                                        {&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
                                        }&lt;br /&gt;
					else&lt;br /&gt;
                                        {&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
                                        }&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
                {&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
                }&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Framecount&lt;br /&gt;
| Sound effect usage.&lt;br /&gt;
| Each byte represents a frame. bit #1(from Right to Left) represents Sound effect 1, bit #2 represents Sound effect 2 and bit #3 represents Sound effect 3. the last 5 bits is padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 3&lt;br /&gt;
| Padding&lt;br /&gt;
| 0x00 * (0 to 3). Makes the offset to the next value dividable by 4.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the background music.&lt;br /&gt;
| The size of the background music in bytes in the audio data below. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #1&lt;br /&gt;
| The size of the sound effect #1 in bytes in the audio data below, max size is 0x2000. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #2&lt;br /&gt;
| The size of the sound effect #3 in bytes in the audio data below, max size is 0x2000. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #3&lt;br /&gt;
| The size of the sound effect #3 in bytes in the audio data below, max size is 0x2000. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Current Framespeed. &lt;br /&gt;
| This is the speed of the flipnote. It&#039;s in the range of 1-8. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Given Framespeed when BGM was recorded.&lt;br /&gt;
| This is the speed of the flipnote when the BGM was recorded/modified. It&#039;s in the range of 1-8. This is used to resample the sound to the new speed. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Padding&lt;br /&gt;
| 0x00 * 14&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Then comes the audio data.&lt;br /&gt;
&lt;br /&gt;
*First comes the BGM(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #1(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #2(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #3(if used)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sound data is 4bit ADPCM with reversed nibbles @ 8kHz.&lt;br /&gt;
&lt;br /&gt;
You can decode the sound yourself with &amp;quot;sox -t ima -N [input] [output]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Signature==&lt;br /&gt;
&lt;br /&gt;
The last 0x10-bytes in a PPM are all-zero. The 0x80 bytes before that is a RSA-1024 SHA-1 signature over the whole PPM, excluding the last 0x90 bytes with the signature.&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=DSi_exploits&amp;diff=2098832</id>
		<title>DSi exploits</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=DSi_exploits&amp;diff=2098832"/>
		<updated>2017-01-08T18:38:01Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* List of ideas for exploitation/hacking of the latest DSi system version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is dedicated to the listing of exploits for the Nintendo DSi. Anyone may contribute to this list. This page my not, however be deleted in any way, this ensures that that development of this page is not slowed down. Due to the fact that this page has not changed for over a year due to resets, no more resets.&lt;br /&gt;
&lt;br /&gt;
== DSi-mode exploits ==&lt;br /&gt;
Team Twiizers released a DSi-mode exploit called [[Sudokuhax]] that loads homebrew from the SD card in DSi-mode. The exploit requires that you have purchased EA&#039;s Sudoku game. More details and download: [http://hackmii.com/2011/01/sudokuhax-release/]. Additionally more DSiWare savegame exploits were released for the last time: [http://hackmii.com/2011/08/final-dsiwarehax/]. Copying these savegame exploits to NAND via system settings is [[System_Menu_1.4.2#Global_Update|blocked]] on the latest system version.&lt;br /&gt;
&lt;br /&gt;
Team Twiizers also have found a DSi-mode exploit in cooking coach and have managed to use it to run DSi-mode homebrew. However it has not yet been released. More details at: [http://hackmii.com/2009/07/dsi-mode-homebrew-anyone/] The additional hardware is just required to get a connection to a computer so that things like ram dumps can be created.&lt;br /&gt;
&lt;br /&gt;
Wintermute has made available an open source DSi hack. The exploit works on DSi enhanced games, allowing you to run custom code from a save file. Instructions for using the exploit can be found here: [http://drunkencoders.com/2009/08/dsi-hack-update/]&lt;br /&gt;
&lt;br /&gt;
The cooking coach and classic word games savegame exploits are [[System_Menu_1.4.4|blocked]] on the latest system version. Therefore, the only way to get DSi-mode homebrew running with the latest system version, is with a hardware workaround for the blocked DSi-mode gamecard exploits. Additionally, one could solder the NAND [[Hardware#NAND_pinout|pins]] to a MMC reader/writer, then extract dev.kp for DSiWareHax.&lt;br /&gt;
&lt;br /&gt;
It is also possible for homebrew to be loaded through an Action Replay DSi flashcart. If an nds file is saved onto a micro SD card, and then that micro SD is inserted into the Action Replay, the file can be executed by going to the Files menu.&lt;br /&gt;
&lt;br /&gt;
== DS-mode exploits ==&lt;br /&gt;
&lt;br /&gt;
This type of exploit is undesirable because all DSi functionality, such as usage of the [[cameras]], is unavailable to homebrew.&lt;br /&gt;
&lt;br /&gt;
Blasteh (Blasty) has posted a [http://www.youtube.com/watch?v=7QHO7ctWuZ8 video on Youtube] showing code being run in DS mode on the DSi using [http://en.wikipedia.org/wiki/Fifa_08 Fifa &#039;08].&lt;br /&gt;
&lt;br /&gt;
== List of ideas for exploitation/hacking of the latest DSi system version ==&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
→Do not remove ideas, only add&lt;br /&gt;
&lt;br /&gt;
→Do not delete this section&lt;br /&gt;
&lt;br /&gt;
→If your idea is &#039;Epic&#039; mark it with * [only do this if it will certainly work]&lt;br /&gt;
&lt;br /&gt;
→You must research whether your idea will work or not&lt;br /&gt;
 &lt;br /&gt;
Just an idea, but couldn&#039;t we make a .gif file that flipnote could read, then the gif could crash flipnote and somehow load up the dsi homebrew?&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2098737</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2098737"/>
		<updated>2014-11-17T20:17:54Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: PCM to ADPCM&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
/private/ds/app/4B475545/001 - North American location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 2&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0002&lt;br /&gt;
| 2&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
        {&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
        }&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
                                        {&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
                                        }&lt;br /&gt;
					else&lt;br /&gt;
                                        {&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
                                        }&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
                {&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
                }&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Framecount&lt;br /&gt;
| Sound effect usage.&lt;br /&gt;
| Each byte represents a frame. bit #1(from Right to Left) represents Sound effect 1, bit #2 represents Sound effect 2 and bit #3 represents Sound effect 3. the last 5 bits is padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 3&lt;br /&gt;
| Padding&lt;br /&gt;
| 0x00 * (0 to 3). Makes the offset to the next value dividable by 4.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the background music.&lt;br /&gt;
| The size of the background music in bytes in the audio data below. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #1&lt;br /&gt;
| The size of the sound effect #1 in bytes in the audio data below, max size is 0x2000. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #2&lt;br /&gt;
| The size of the sound effect #3 in bytes in the audio data below, max size is 0x2000. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #3&lt;br /&gt;
| The size of the sound effect #3 in bytes in the audio data below, max size is 0x2000. 0x0 if not used/empty.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Current Framespeed. &lt;br /&gt;
| This is the speed of the flipnote. It&#039;s in the range of 1-8. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Given Framespeed when BGM was recorded.&lt;br /&gt;
| This is the speed of the flipnote when the BGM was recorded/modified. It&#039;s in the range of 1-8. This is used to resample the sound to the new speed. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Padding&lt;br /&gt;
| 0x00 * 14&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Then comes the audio data.&lt;br /&gt;
&lt;br /&gt;
*First comes the BGM(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #1(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #2(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #3(if used)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sound data seems to be a variant of VOX ADPCM @ around 8KHz.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out how to get rid of the noice when decoding sound...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Signature==&lt;br /&gt;
&lt;br /&gt;
The last 0x10-bytes in a PPM are all-zero. The 0x80 bytes before that is a RSA-1024 SHA-1 signature over the whole PPM, excluding the last 0x90 bytes with the signature.&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=DSi_exploits&amp;diff=1534785</id>
		<title>DSi exploits</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=DSi_exploits&amp;diff=1534785"/>
		<updated>2014-02-25T22:00:48Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* List of ideas for exploitation/hacking of the latest DSi system version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is dedicated to the listing of exploits for the Nintendo DSi. Anyone may contribute to this list. This page my not, however be deleted in any way, this ensures that that development of this page is not slowed down. Due to the fact that this page has not changed for over a year due to resets, no more resets.&lt;br /&gt;
&lt;br /&gt;
== DSi-mode exploits ==&lt;br /&gt;
Team Twiizers released a DSi-mode exploit called [[Sudokuhax]] that loads homebrew from the SD card in DSi-mode. The exploit requires that you have purchased EA&#039;s Sudoku game. More details and download: [http://hackmii.com/2011/01/sudokuhax-release/]. Additionally more DSiWare savegame exploits were released for the last time: [http://hackmii.com/2011/08/final-dsiwarehax/]. Copying these savegame exploits to NAND via system settings is [[System_Menu_1.4.2#Global_Update|blocked]] on the latest system version.&lt;br /&gt;
&lt;br /&gt;
Team Twiizers also have found a DSi-mode exploit in cooking coach and have managed to use it to run DSi-mode homebrew. However it has not yet been released. More details at: [http://hackmii.com/2009/07/dsi-mode-homebrew-anyone/] The additional hardware is just required to get a connection to a computer so that things like ram dumps can be created.&lt;br /&gt;
&lt;br /&gt;
Wintermute has made available an open source DSi hack. The exploit works on DSi enhanced games, allowing you to run custom code from a save file. Instructions for using the exploit can be found here: [http://drunkencoders.com/2009/08/dsi-hack-update/]&lt;br /&gt;
&lt;br /&gt;
The cooking coach and classic word games savegame exploits are [[System_Menu_1.4.4|blocked]] on the latest system version. Therefore, the only way to get DSi-mode homebrew running with the latest system version, is with a hardware workaround for the blocked DSi-mode gamecard exploits. Additionally, one could solder the NAND [[Hardware#NAND_pinout|pins]] to a MMC reader/writer, then extract dev.kp for DSiWareHax.&lt;br /&gt;
&lt;br /&gt;
== DS-mode exploits ==&lt;br /&gt;
&lt;br /&gt;
This type of exploit is undesirable because all DSi functionality, such as usage of the [[cameras]], is unavailable to homebrew.&lt;br /&gt;
&lt;br /&gt;
Blasteh (Blasty) has posted a [http://www.youtube.com/watch?v=7QHO7ctWuZ8 video on Youtube] showing code being run in DS mode on the DSi using [http://en.wikipedia.org/wiki/Fifa_08 Fifa &#039;08].&lt;br /&gt;
&lt;br /&gt;
== List of ideas for exploitation/hacking of the latest DSi system version ==&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
→Do not remove ideas, only add&lt;br /&gt;
&lt;br /&gt;
→Do not delete this section&lt;br /&gt;
&lt;br /&gt;
→If your idea is &#039;Epic&#039; mark it with * [only do this if it will certainly work]&lt;br /&gt;
&lt;br /&gt;
→You must research whether your idea will work or not&lt;br /&gt;
 &lt;br /&gt;
Just an idea, but couldn&#039;t we make a .gif file that flipnote could read, then the gif could crash flipnote and somehow load up the dsi homebrew?&lt;br /&gt;
&lt;br /&gt;
*I&#039;ve found a reproduceable crash in Flipnote Studio based around a unexpected string in the UGO format. There&#039;s lots of space to possibly inject custom code into. I don&#039;t have the skillset to make this code. Contact me if you&#039;d like to work on this --[[User:Pbsds|pbsds]] 00:00, 26 February 2014 (CET)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=1534309</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=1534309"/>
		<updated>2014-02-25T21:33:23Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My site: http://pbsds.net&lt;br /&gt;
=== Stuff I&#039;ve made: ===&lt;br /&gt;
* Hatenatools: [http://pbsds.net/projects/hatenatools]&lt;br /&gt;
* Hatena server: [https://github.com/pbsds/hatena-server]&lt;br /&gt;
* TPL.py: [http://pbsds.net/projects/tpl]&lt;br /&gt;
* Wii n DSi.au3: [http://pbsds.net/files/Wii%20n%20DSi.au3.rar]&lt;br /&gt;
&lt;br /&gt;
=== People who&#039;ve helped me ===&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven - documenting the most of [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* JSAfive - supplied me with UGO and TMB files.&lt;br /&gt;
* YAGCD&#039;s contributors - Awesome documentations!&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=380791</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=380791"/>
		<updated>2013-12-19T23:17:51Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My site: http://pbsds.net&lt;br /&gt;
=== Stuff I&#039;ve made: ===&lt;br /&gt;
*PPMtool: [[/PPMtool]]&lt;br /&gt;
*PPM.py: [http://www.mediafire.com/?clt4ad2wcmh]&lt;br /&gt;
*TPL.py: [http://www.mediafire.com/?mlwtmzmzjwz]&lt;br /&gt;
*Wii n DSi.au3 (Not released, but E-Mail might work ;) ) &lt;br /&gt;
&lt;br /&gt;
=== People who&#039;ve helped me ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin developing.&lt;br /&gt;
* Jacol - Giving some advice in the begining when i made EWES.&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven - documenting the most of [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* YAGCD&#039;s contributors - Awesome documentations!&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Main_Page&amp;diff=380761</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Main_Page&amp;diff=380761"/>
		<updated>2013-12-19T23:15:39Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:Main Page/Header}}&lt;br /&gt;
{{:Main Page/Welcome}}&lt;br /&gt;
{{:Main Page/Current events}}&lt;br /&gt;
{{:Main Page/Navigation}}&lt;br /&gt;
__NOTOC____NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=3297</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=3297"/>
		<updated>2011-01-01T00:36:43Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 14 years old boy who has always dreamed of making something that others can use/enjoy.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*PPMtool: [[/PPMtool]]&lt;br /&gt;
*PPM.py: [http://www.mediafire.com/?clt4ad2wcmh]&lt;br /&gt;
*TPL.py: [http://www.mediafire.com/?mlwtmzmzjwz]&lt;br /&gt;
*EWES: [http://www.mediafire.com/?mz1my1zkxqy]&lt;br /&gt;
*Wii n DSi.au3 (Not released, but E-Mail might work ;) ) &lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin developing.&lt;br /&gt;
* Jacol - Giving some advice in the begining when i made EWES.&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven - documenting the most of [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* YAGCD&#039;s contributors - Awesome documentations!&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;br /&gt;
&lt;br /&gt;
=== How to reach me: ===&lt;br /&gt;
&lt;br /&gt;
E-Mail: pbsds@hotmail.com (No spambots please!)&lt;br /&gt;
&lt;br /&gt;
Most preferred forum: http://wadder.freeforums.org/&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2997</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2997"/>
		<updated>2010-07-15T20:42:45Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Regional Flipnotes */  typo + gramatic fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
:Also, adresses 0x0088, 0x009A, and 0x009B change every save. The hash changes every save, too. EDIT: 0x0088 increases by 1 every save. --[[User:Matt|Matt]] 01:11, 21 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind that! this is what those bits does:&lt;br /&gt;
if Unknown1 &amp;amp; 0x2 is true then there are two bytes after the color byte and before the line encoding which says how to move the previous frame horizontally before mixing it with the new frame.&lt;br /&gt;
if those are set to  F7 00 then the last picture is shifted 8 pixels left( 247 - 256 = -8)&lt;br /&gt;
and i think that if Unknown1 &amp;amp; 0x1 is true then there are two more bytes but these are for the vertical position.--[[User:Pbsds|pbsds]] 17:57, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry, i concluded this before finding more samples. this is currently not 100&amp;amp; correct, but if this bit is set to 0x2, then there will be to more bytes!&lt;br /&gt;
And this do have something to do with moving the previous frame.--[[User:Pbsds|pbsds]] 20:40, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PPM.py ==&lt;br /&gt;
&lt;br /&gt;
I just wanted to say that i rewrote PPMTool in python and renamed it PPM.py&lt;br /&gt;
&lt;br /&gt;
This one has support for extracting frames too(i fixed the NewFrame problem ;) )&lt;br /&gt;
&lt;br /&gt;
Download: http://www.mediafire.com/?clt4ad2wcmh&lt;br /&gt;
&lt;br /&gt;
@Steven: Could you please update the documentation with my way of fixing the NewFrame stuff? I&#039;m not that good with documentations... KTHXBAI! :D&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:49, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Regional Flipnotes ==&lt;br /&gt;
&lt;br /&gt;
As of now, there is virtually no [normal] way of downloading flipnotes from a different region from Flipnote Hatena. But, hypothetically, couldn&#039;t you just save them to an SD card, copy the entire &amp;quot;private&amp;quot; directory, download to your computer, and post to the internet (as a .zip or .rar)?&lt;br /&gt;
&lt;br /&gt;
Then the other could download, copy to SD card, and have flipnotes from the other region!&lt;br /&gt;
&lt;br /&gt;
I will attempt to upload some of mine. (as a .zip)&lt;br /&gt;
&lt;br /&gt;
-Austin --[[User:Austinburk|Austinburk]] 21:44, 2 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would work, but only if you rename the folder which contains the flipnotes.&lt;br /&gt;
&lt;br /&gt;
you would have to rename it to &amp;quot;4B4755XX&amp;quot; replacing the XX with your region.(Region codes can be found here: http://www.dsibrew.org/wiki/Title_list#Region_Codes)&lt;br /&gt;
--[[User:Pbsds|pbsds]] 11:14, 5 July 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2996</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2996"/>
		<updated>2010-07-15T20:41:27Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound data section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
					else&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Framecount&lt;br /&gt;
| Sound effect usage.&lt;br /&gt;
| Each byte represents a frame. bit #1(from Right to Left) represents Sound effect 1, bit #2 represents Sound effect 2 and bit #3 represents Sound effect 3. the last 5 bits is padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 3&lt;br /&gt;
| Padding&lt;br /&gt;
| 0x00 * (0 to 3). Makes the offset to the next value dividable by 4.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the background music.&lt;br /&gt;
| The size of the background music in bytes in the audio data below. 0x0000000 if not used/emtpy.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #1&lt;br /&gt;
| The size of the sound effect #1 in bytes in the audio data below. 0x0000000 if not used/emtpy.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #2&lt;br /&gt;
| The size of the sound effect #3 in bytes in the audio data below. 0x0000000 if not used/emtpy.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #3&lt;br /&gt;
| The size of the sound effect #3 in bytes in the audio data below. 0x0000000 if not used/emtpy.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Given Framespeed. &lt;br /&gt;
| This is the speed of the flipnote. It&#039;s in the range of 1-8. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Current Framespeed when BGM was recorded.&lt;br /&gt;
| This is the speed of the flipnote when the BGM was recorded/modified. It&#039;s in the range of 1-8. This is used to resample the sound to the new speed. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Padding&lt;br /&gt;
| 0x00 * 14&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Then comes the audio data.&lt;br /&gt;
&lt;br /&gt;
*First comes the BGM(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #1(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #2(if used)&lt;br /&gt;
&lt;br /&gt;
*Then comes sound effect #3(if used)&lt;br /&gt;
&lt;br /&gt;
To decode the sound data, you must multiply each byte by 16 and run it as 32000Hz PCM data.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out how to get rid of the noice when decoding sound...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2967</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2967"/>
		<updated>2010-07-05T18:40:59Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
:Also, adresses 0x0088, 0x009A, and 0x009B change every save. The hash changes every save, too. EDIT: 0x0088 increases by 1 every save. --[[User:Matt|Matt]] 01:11, 21 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind that! this is what those bits does:&lt;br /&gt;
if Unknown1 &amp;amp; 0x2 is true then there are two bytes after the color byte and before the line encoding which says how to move the previous frame horizontally before mixing it with the new frame.&lt;br /&gt;
if those are set to  F7 00 then the last picture is shifted 8 pixels left( 247 - 256 = -8)&lt;br /&gt;
and i think that if Unknown1 &amp;amp; 0x1 is true then there are two more bytes but these are for the vertical position.--[[User:Pbsds|pbsds]] 17:57, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry, i concluded this before finding more samples. this is currently not 100&amp;amp; correct, but if this bit is set to 0x2, then there will be to more bytes!&lt;br /&gt;
And this do have something to do with moving the previous frame.--[[User:Pbsds|pbsds]] 20:40, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PPM.py ==&lt;br /&gt;
&lt;br /&gt;
I just wanted to say that i rewrote PPMTool in python and renamed it PPM.py&lt;br /&gt;
&lt;br /&gt;
This one has support for extracting frames too(i fixed the NewFrame problem ;) )&lt;br /&gt;
&lt;br /&gt;
Download: http://www.mediafire.com/?clt4ad2wcmh&lt;br /&gt;
&lt;br /&gt;
@Steven: Could you please update the documentation with my way of fixing the NewFrame stuff? I&#039;m not that good with documentations... KTHXBAI! :D&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:49, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Regional Flipnotes ==&lt;br /&gt;
&lt;br /&gt;
As of now, there is virtually no [normal] way of downloading flipnotes from a different region from Flipnote Hatena. But, hypothetically, couldn&#039;t you just save them to an SD card, copy the entire &amp;quot;private&amp;quot; directory, download to your computer, and post to the internet (as a .zip or .rar)?&lt;br /&gt;
&lt;br /&gt;
Then the other could download, copy to SD card, and have flipnotes from the other region!&lt;br /&gt;
&lt;br /&gt;
I will attempt to upload some of mine. (as a .zip)&lt;br /&gt;
&lt;br /&gt;
-Austin --[[User:Austinburk|Austinburk]] 21:44, 2 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would work, but only if you rename the folder which contains the flipnotes.&lt;br /&gt;
&lt;br /&gt;
you would have to rename it to &amp;quot;4B4755XX&amp;quot; replacing the XX with you region.(found here: http://www.dsibrew.org/wiki/Title_list#Region_Codes)&lt;br /&gt;
--[[User:Pbsds|pbsds]] 11:14, 5 July 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2966</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2966"/>
		<updated>2010-07-05T09:14:24Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Regional Flipnotes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
:Also, adresses 0x0088, 0x009A, and 0x009B change every save. The hash changes every save, too. EDIT: 0x0088 increases by 1 every save. --[[User:Matt|Matt]] 01:11, 21 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind that! this is what those bits does:&lt;br /&gt;
if Unknown1 &amp;amp; 0x2 is true then there are two bytes after the color byte and before the line encoding which says how to move the previous frame horizontally before mixing it with the new frame.&lt;br /&gt;
if those are set to  F7 00 then the last picture is shifted 8 pixels left( 247 - 256 = -8)&lt;br /&gt;
and i think that if Unknown1 &amp;amp; 0x1 is true then there are two more bytes but these are for the vertical position.--[[User:Pbsds|pbsds]] 17:57, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PPM.py ==&lt;br /&gt;
&lt;br /&gt;
I just wanted to say that i rewrote PPMTool in python and renamed it PPM.py&lt;br /&gt;
&lt;br /&gt;
This one has support for extracting frames too(i fixed the NewFrame problem ;) )&lt;br /&gt;
&lt;br /&gt;
Download: http://www.mediafire.com/?clt4ad2wcmh&lt;br /&gt;
&lt;br /&gt;
@Steven: Could you please update the documentation with my way of fixing the NewFrame stuff? I&#039;m not that good with documentations... KTHXBAI! :D&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:49, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Regional Flipnotes ==&lt;br /&gt;
&lt;br /&gt;
As of now, there is virtually no [normal] way of downloading flipnotes from a different region from Flipnote Hatena. But, hypothetically, couldn&#039;t you just save them to an SD card, copy the entire &amp;quot;private&amp;quot; directory, download to your computer, and post to the internet (as a .zip or .rar)?&lt;br /&gt;
&lt;br /&gt;
Then the other could download, copy to SD card, and have flipnotes from the other region!&lt;br /&gt;
&lt;br /&gt;
I will attempt to upload some of mine. (as a .zip)&lt;br /&gt;
&lt;br /&gt;
-Austin --[[User:Austinburk|Austinburk]] 21:44, 2 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It would work, but only if you rename the folder which contains the flipnotes.&lt;br /&gt;
&lt;br /&gt;
you would have to rename it to &amp;quot;4B4755XX&amp;quot; replacing the XX with you region.(found here: http://www.dsibrew.org/wiki/Title_list#Region_Codes)&lt;br /&gt;
--[[User:Pbsds|pbsds]] 11:14, 5 July 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2930</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2930"/>
		<updated>2010-06-20T09:19:47Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound data section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
					else&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Frame count&lt;br /&gt;
| Sound effect usage. Each byte represents a frame, and bit #1 represents Sound effect 1, bit #2 represents Sound effect 2 and bit #3 represents Sound effect 3.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 3&lt;br /&gt;
| Padding - Makes the offset to the next four bytes dividable by 4&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the background music(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #1(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #2(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of sound effect #3(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Frame speed. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Unknown - Used for sound decoding? (samplerate, compression, etc)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out the sound decoding...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2929</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2929"/>
		<updated>2010-06-20T09:17:36Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound data section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
					else&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Frame count&lt;br /&gt;
| Sound effect usage. Each byte represents a frame, and bit #1 represents Sound effect 1, bit #2 represents Sound effect 2 and bit #3 represents Sound effect 3.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 3&lt;br /&gt;
| Padding - Makes the offset to the next four bytes dividable by 4&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Background music(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 1(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 2(0x0000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 3(0x000000 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Framerate. To get the correct value, you must take 8, and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Unknown - Used for sound decoding? (samplerate, compression, etc)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out the sound decoding...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2928</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2928"/>
		<updated>2010-06-18T19:55:48Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound data section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
					else&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| FrameCount&lt;br /&gt;
| Sound effect usage. Each byte is a frame, and bit number one represents Sound 1, bit number two represents Sound 2 and bit number three represents Sound 3&lt;br /&gt;
|-&lt;br /&gt;
| ???&lt;br /&gt;
| Padding - only used if FrameCount isn&#039;t dividable by 4&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Background music(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 1(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 2(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 3(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Framerate, you must take 8 and subtract the decimal value of this byte.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Unknown - Used for sound decoding? (samplerate, compression, etc)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out the sound decoding...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2913</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2913"/>
		<updated>2010-06-09T15:05:52Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 14 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*PPMtool: [[/PPMtool]]&lt;br /&gt;
*PPM.py: [http://www.mediafire.com/?clt4ad2wcmh]&lt;br /&gt;
*TPL.py: [http://www.mediafire.com/?mlwtmzmzjwz]&lt;br /&gt;
*EWES: [http://www.mediafire.com/?mz1my1zkxqy]&lt;br /&gt;
*Wii n DSi.au3 (Not released, but E-Mail might work ;) ) &lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin developing.&lt;br /&gt;
* Jacol - Giving some advice in the begining when i made EWES.&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven - documenting the most of [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* YAGCD&#039;s contributors - Awesome documentations!&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;br /&gt;
&lt;br /&gt;
=== How to reach me: ===&lt;br /&gt;
&lt;br /&gt;
E-Mail: pbsds@hotmail.com (No spambots please!)&lt;br /&gt;
&lt;br /&gt;
Most preferred forum: http://wadder.freeforums.org/&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2912</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2912"/>
		<updated>2010-06-08T18:40:03Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* Sound data section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
					else&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| FrameCount&lt;br /&gt;
| Sound effect usage. Each byte is a frame, and bit number one represents Sound 1, bit number two represents Sound 2 and bit number three represents Sound 3&lt;br /&gt;
|-&lt;br /&gt;
| ???&lt;br /&gt;
| Padding - only used if FrameCount isn&#039;t dividable by 4&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Background music(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 1(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 2(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 3(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Unknown - Used for sound decoding? (speed, compression, etc...)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out the decoding...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2911</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2911"/>
		<updated>2010-06-07T13:50:32Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
IDK if the link is wrong but it leads me to a download of an exe called TPL. [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Oh, sorry! Here is the source: http://www.mediafire.com/?mkjyyykd2n3 --[[User:Pbsds|pbsds]] 11:47, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
BTW, could you e-mail me the mac compile at pbsds@hotmail.com? KTHXBAI!--[[User:Pbsds|pbsds]] 20:28, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
On your machine, the python code compiles and runs, right? ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Yes, with no problems! Got errors?--[[User:Pbsds|pbsds]] 14:36, 20 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I fixed most of them but I&#039;m having trouble with the arguments. --[[User:Matt|Matt]] 22:27, 20 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Google &amp;quot;Mac command line arguments help&amp;quot;--[[User:Pbsds|pbsds]] 17:09, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks! I got it - just testing it out now. --[[User:Matt|Matt]] 20:46, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Would you mind giving me a mac compile from this version(newer): http://www.mediafire.com/?clt4ad2wcmh (PyInstaller rev 700+ works with PIL)--[[User:Pbsds|pbsds]] 15:50, 7 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2910</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2910"/>
		<updated>2010-06-06T18:21:53Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: /* PPM.py */ Change the link to the most current version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
:Also, adresses 0x0088, 0x009A, and 0x009B change every save. The hash changes every save, too. EDIT: 0x0088 increases by 1 every save. --[[User:Matt|Matt]] 01:11, 21 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind that! this is what those bits does:&lt;br /&gt;
if Unknown1 &amp;amp; 0x2 is true then there are two bytes after the color byte and before the line encoding which says how to move the previous frame horizontally before mixing it with the new frame.&lt;br /&gt;
if those are set to  F7 00 then the last picture is shifted 8 pixels left( 247 - 256 = -8)&lt;br /&gt;
and i think that if Unknown1 &amp;amp; 0x1 is true then there are two more bytes but these are for the vertical position.--[[User:Pbsds|pbsds]] 17:57, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PPM.py ==&lt;br /&gt;
&lt;br /&gt;
I just wanted to say that i rewrote PPMTool in python and renamed it PPM.py&lt;br /&gt;
&lt;br /&gt;
This one has support for extracting frames too(i fixed the NewFrame problem ;) )&lt;br /&gt;
&lt;br /&gt;
Download: http://www.mediafire.com/?clt4ad2wcmh&lt;br /&gt;
&lt;br /&gt;
@Steven: Could you please update the documentation with my way of fixing the NewFrame stuff? I&#039;m not that good with documentations... KTHXBAI! :D&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:49, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2909</id>
		<title>Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Flipnote_Files/PPM&amp;diff=2909"/>
		<updated>2010-06-06T15:38:56Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flipnotes animation files are normally stored on the SD card in the following folder:&lt;br /&gt;
&lt;br /&gt;
/private/ds/app/4B475556/001 - European location&lt;br /&gt;
&lt;br /&gt;
You can save your images in a user folder as long as it&#039;s on the same level as the 001 folder.  Clicking on the Choose Folder icon on the top of the View Flipnote / SD Card option gives you a list of normal folders, and you can swap to user folders by selecting the normal button again.  This could possibly be to overcome a limitation in one of the files (possibly the dirmemo2.lst file).&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (should be PARA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0004&lt;br /&gt;
| 4&lt;br /&gt;
| Size of animation data&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008&lt;br /&gt;
| 4&lt;br /&gt;
| size of audio data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C&lt;br /&gt;
| 2&lt;br /&gt;
| # of frames&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown - all files looked at so far has this field set to 24 00 hex.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0010&lt;br /&gt;
| 2&lt;br /&gt;
| Lock - 0 open, 1 locked&lt;br /&gt;
|-&lt;br /&gt;
| 0x0012&lt;br /&gt;
| 2&lt;br /&gt;
| Preview frame number&lt;br /&gt;
|-&lt;br /&gt;
| 0x0014&lt;br /&gt;
| 22&lt;br /&gt;
| Original author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x002A&lt;br /&gt;
| 22&lt;br /&gt;
| Last Edited By Author name (UCS-2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0040&lt;br /&gt;
| 22&lt;br /&gt;
| User name (UCS-2)&lt;br /&gt;
|- &lt;br /&gt;
| 0x0056&lt;br /&gt;
| 8&lt;br /&gt;
| Original author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x005E&lt;br /&gt;
| 8&lt;br /&gt;
| Edit Author ID - the last user to save the file&lt;br /&gt;
|- &lt;br /&gt;
| 0x0066&lt;br /&gt;
| 18&lt;br /&gt;
| Original File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x0078&lt;br /&gt;
| 18&lt;br /&gt;
| File-name - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x008A&lt;br /&gt;
| 8&lt;br /&gt;
| Previous Editing Author ID&lt;br /&gt;
|- &lt;br /&gt;
| 0x0092&lt;br /&gt;
| 8&lt;br /&gt;
| Partial File name? - see notes on format&lt;br /&gt;
|- &lt;br /&gt;
| 0x009A&lt;br /&gt;
| 4&lt;br /&gt;
| Date stored as the number of seconds since midnight 1 Jan 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x009E&lt;br /&gt;
| 2&lt;br /&gt;
| Filler - 00 00&lt;br /&gt;
|-&lt;br /&gt;
| 0x00A0&lt;br /&gt;
| 1536&lt;br /&gt;
| Preview Bitmap (4 bits/pixel).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file name seems to be stored in the file header 3 times:&lt;br /&gt;
*Original file name 0x0066&lt;br /&gt;
*Current file name 0x0078&lt;br /&gt;
*Partial file name 0x0092&lt;br /&gt;
&lt;br /&gt;
The file name is stored in 3 parts:&lt;br /&gt;
*3 hex bytes, the first byte&#039;s high nibble is not the same as the first byte of the file name&lt;br /&gt;
*13 bytes for the central part of the file name&lt;br /&gt;
*2 bytes for the last part of the file name.&lt;br /&gt;
&lt;br /&gt;
For the file name : G35B20_0909841CDBEB1_002&lt;br /&gt;
*First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00&lt;br /&gt;
*Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00&lt;br /&gt;
*Last location: D3 5B 20 09 09 84 1C DB&lt;br /&gt;
&lt;br /&gt;
The 3 sections of the file name seem to be stored as:&lt;br /&gt;
*Last 6 digits of your Flipnote Studio ID&lt;br /&gt;
*A random number, possibly generated from a date stamp&lt;br /&gt;
*The version number of the file&lt;br /&gt;
&lt;br /&gt;
===Palette===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Hex&lt;br /&gt;
! Color&lt;br /&gt;
! DS RGB Approximation&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Not used / White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Dark Grey&lt;br /&gt;
| 10, 10, 10&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| White&lt;br /&gt;
| 31, 31, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| Light Grey&lt;br /&gt;
| 20, 20, 20&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Pure Red&lt;br /&gt;
| 31, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Dark Red&lt;br /&gt;
| 15, 0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Light Red / Pink&lt;br /&gt;
| 31, 15, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Pure Blue&lt;br /&gt;
| 0, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Dark Blue&lt;br /&gt;
| 0, 0, 15&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Light Blue&lt;br /&gt;
| 15, 15, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| Magenta / Purple&lt;br /&gt;
| 31, 0, 31&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| Pure Green&lt;br /&gt;
| 0, 31, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The preview image is a 64x48 image stored in a 16 colour tile format, with each 8x8 tile taking up 32 bytes of the file.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a photo taken of the altered preview image, reduced to about the correct size.&lt;br /&gt;
&lt;br /&gt;
[[Image:Palpic_actsize.png|{{Image:Palpic_actsize.png}}]]&lt;br /&gt;
&lt;br /&gt;
[[Media:Palpic_big.JPG|Link to the original picture, warning image is 2,048 × 1,536.]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s two preview images that blasty decoded from some PPM files.&lt;br /&gt;
&lt;br /&gt;
[[Image:ppm_1.png]] [[Image:ppm_2.png]]&lt;br /&gt;
&lt;br /&gt;
You can use pbsds&#039;s [[User:Pbsds/PPMtool|PPMtool]] to extract the preview image yourself&lt;br /&gt;
&lt;br /&gt;
==Animation Data Section==&lt;br /&gt;
The animation section starts at offset 0x06A0, with a header section.&lt;br /&gt;
&lt;br /&gt;
===Animation Sequence Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 4&lt;br /&gt;
| Size of the offset table&lt;br /&gt;
|-&lt;br /&gt;
| 0004&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0008&lt;br /&gt;
| 4 * number of frames&lt;br /&gt;
| A list of offsets to the frames in the order to play them.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The offsets are all relative to the end of the offset list, and the frames are not stored in any specific format in the file, so you have to read this table for the next offset as I&#039;ve seen the list point to a frame at 00023572 and the next frame was at 00000000.&lt;br /&gt;
&lt;br /&gt;
===Animation Frame===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0000&lt;br /&gt;
| 1&lt;br /&gt;
| Pen and Paper information&lt;br /&gt;
|-&lt;br /&gt;
| 0001&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 1 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0031&lt;br /&gt;
| 48&lt;br /&gt;
| Layer 2 line encoding&lt;br /&gt;
|-&lt;br /&gt;
| 0061&lt;br /&gt;
| ?&lt;br /&gt;
| The frame data stored layer 1 then layer 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pen and paper byte at the start is encoded as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:paperpeninfo.png]]&lt;br /&gt;
&lt;br /&gt;
The paper bit indicates what color the paper is - 0 for black and 1 for white.&lt;br /&gt;
&lt;br /&gt;
The Frame encoding is 0 for a change between last frame and this one, and 1 for a totally new frame.&lt;br /&gt;
&lt;br /&gt;
The Layer 1 pen and Layer 2 pen information is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Not used&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Invert Paper (black on white or white on black)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Red&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line encoding is compacted from the 192 lines on the screen down to 48 bytes per layer, each byte within the layer encoding section is stored as 2 bits per line, and 4 lines to the byte.  The lines are stored in the same order as the bits in the byte, i.e. line 0 uses bit 0-1, line 1 uses bit 2-3, line 2 uses bit 4-5, line 3 uses bit 6-7.  The value for the line encoding determins how many bytes you need to read at a minimum: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Skip this line - there is no data for this line&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Coded line&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Inverted coded line&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Raw line data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before I explain how to read the line data you must understand that the way flipnote works is in layers, each layer is a bit map of on or off, with on being the pen colour, and off being the paper colour.&lt;br /&gt;
&lt;br /&gt;
The coded and inverted coded lines are stored with a 4 byte header that is used to indicate how many extra bytes to read, and what part of the line they represent.  Each byte after the first 4 is then read in a reverse order, i.e. pixel 0 of 8 is bit 0, etc.  To understand this you first take the 256 pixels of the line, and divide it by 8 to give 32, this is the maximum number of bytes a line encoding will ever use, and it&#039;s also the number of bits in 4 bytes.  The first 8 pixels of the line are used only when the bit 0x80000000 is set in the initial 4 bytes.&lt;br /&gt;
&lt;br /&gt;
For example the line is encoded as type 1, and the bytes that&#039;s stored is 80 00 00 00 20.&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes is indicating that there is 1 byte effacted in this line, and that it&#039;s the first 8 pixels in the line.  The next byte is read and once it&#039;s expanded the 6&#039;th byte of the line is set to the pen colour.  If on the other hand the line was encoded with type 2, that one pixel would be the paper colour and every other pixel would be the pen colour.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s some code to show how to decode the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
u32 decodeLine( u8 *outB, u8 *inB, u32 useByte, u8 paper, u8 pen, u8 invflag )&lt;br /&gt;
{&lt;br /&gt;
	u32 offset = 0;&lt;br /&gt;
	u16 x = 0, i;&lt;br /&gt;
	u8 data;&lt;br /&gt;
&lt;br /&gt;
	if( useByte == 0 ) // Set the full line to the current paper colour&lt;br /&gt;
		memset( outB, paper, 256 );&lt;br /&gt;
	else // Bytes in this line, read and deal with them&lt;br /&gt;
	{&lt;br /&gt;
		while( useByte != 0 )&lt;br /&gt;
		{&lt;br /&gt;
			if( ( useByte &amp;amp; 0x80000000 ) == 0x80000000 )&lt;br /&gt;
			{&lt;br /&gt;
				// This byte exists...&lt;br /&gt;
				data = inB[ offset++ ];&lt;br /&gt;
&lt;br /&gt;
				for( i = 0; i &amp;lt; 8; i ++ )&lt;br /&gt;
				{&lt;br /&gt;
					if( ( data &amp;amp; 0x01 ) == 0x01 )&lt;br /&gt;
						outB[ x ] = invflag == 0 ? pen : paper;&lt;br /&gt;
					else&lt;br /&gt;
						outB[ x ] = invflag == 0 ? paper : pen;&lt;br /&gt;
&lt;br /&gt;
					x ++;&lt;br /&gt;
&lt;br /&gt;
					data &amp;gt;&amp;gt;= 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				memset( &amp;amp;outB[ x ], paper, 8 );&lt;br /&gt;
				x += 8;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			useByte &amp;lt;&amp;lt;= 1;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if( x &amp;lt; 256 )&lt;br /&gt;
			memset( &amp;amp;outB[ x ], paper, 256 - x );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return offset;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outB and inB are pointers to pre-allocated memory blocks, the inB is a pointer to the file, and the outB is the output data block.  The useByte is the 4 bytes that is at the start of the line, if your reading a type 3 line (full raw data) just pass in 0xFFFFFFFF.  The pen and paper values are what was read from the pen and paper information block.&lt;br /&gt;
&lt;br /&gt;
==Sound data section==&lt;br /&gt;
&lt;br /&gt;
The position of the sound header is 0x6A0 + AnimationDataSize&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #ddd;&amp;quot;&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| FrameCount&lt;br /&gt;
| Sound effect usage. Each byte is a frame, and bit number one represents Sound 1, bit number two represents Sound 2 and bit number three represents Sound 3&lt;br /&gt;
|-&lt;br /&gt;
| ???&lt;br /&gt;
| Padding - only used if FrameCount isn&#039;t dividable by 4&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Background music(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 1(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 2(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Size of Sound effect 3(0 if not used)&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Tags. Used for sound decoding? (speed, compression, etc...)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I have yet to figure out the decoding...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2908</id>
		<title>User:Pbsds/PPMtool</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2908"/>
		<updated>2010-06-05T17:47:25Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: New link with source&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Icon.png]]&lt;br /&gt;
&lt;br /&gt;
This is a command line program that is able to read info from PPM files(Flipnotes) and even convert the preview image into an BMP.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:PPMtool.rar|here]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;br /&gt;
Don&#039;t use this one! I rewrote it in python. and that one supports frame extractions too!&lt;br /&gt;
&lt;br /&gt;
http://www.mediafire.com/?clt4ad2wcmh&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:24, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2907</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2907"/>
		<updated>2010-06-05T17:43:59Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 14 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*PPMtool: [[/PPMtool]]&lt;br /&gt;
*PPM.py: [http://www.mediafire.com/?clt4ad2wcmh]&lt;br /&gt;
*TPL.py: [http://www.mediafire.com/?mlwtmzmzjwz]&lt;br /&gt;
*EWES: [http://www.mediafire.com/?mz1my1zkxqy]&lt;br /&gt;
*Wii n DSi.au3 (Not released, but E-Mail might work ;) ) &lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin developing.&lt;br /&gt;
* Jacol - Giving some advice in the begining when i made EWES.&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven - documenting the most of [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* YAGCD&#039;s contributors - Awesome documentations!&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to reach me: ===&lt;br /&gt;
&lt;br /&gt;
E-Mail: pbsds@hotmail.com (No spambots please!)&lt;br /&gt;
Most preferred forum: http://wadder.freeforums.org/&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2902</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2902"/>
		<updated>2010-05-26T15:57:27Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
:Also, adresses 0x0088, 0x009A, and 0x009B change every save. The hash changes every save, too. EDIT: 0x0088 increases by 1 every save. --[[User:Matt|Matt]] 01:11, 21 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind that! this is what those bits does:&lt;br /&gt;
if Unknown1 &amp;amp; 0x2 is true then there are two bytes after the color byte and before the line encoding which says how to move the previous frame horizontally before mixing it with the new frame.&lt;br /&gt;
if those are set to  F7 00 then the last picture is shifted 8 pixels left( 247 - 256 = -8)&lt;br /&gt;
and i think that if Unknown1 &amp;amp; 0x1 is true then there are two more bytes but these are for the vertical position.--[[User:Pbsds|pbsds]] 17:57, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PPM.py ==&lt;br /&gt;
&lt;br /&gt;
I just wanted to say that i rewrote PPMTool in python and renamed it PPM.py&lt;br /&gt;
&lt;br /&gt;
This one has support for extracting frames too(i fixed the NewFrame problem ;) )&lt;br /&gt;
&lt;br /&gt;
Source: http://www.mediafire.com/?mkjyyykd2n3&lt;br /&gt;
&lt;br /&gt;
Exe: http://www.mediafire.com/?ngmdmmyzztj&lt;br /&gt;
&lt;br /&gt;
@Steven: Could you please update the documentation with my way of fixing the NewFrame stuff? I&#039;m not that good with documentations... KTHXBAI! :D&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:49, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2901</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2901"/>
		<updated>2010-05-26T15:09:59Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
IDK if the link is wrong but it leads me to a download of an exe called TPL. [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Oh, sorry! Here is the source: http://www.mediafire.com/?mkjyyykd2n3 --[[User:Pbsds|pbsds]] 11:47, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
BTW, could you e-mail me the mac compile at pbsds@hotmail.com? KTHXBAI!--[[User:Pbsds|pbsds]] 20:28, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
On your machine, the python code compiles and runs, right? ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Yes, with no problems! Got errors?--[[User:Pbsds|pbsds]] 14:36, 20 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I fixed most of them but I&#039;m having trouble with the arguments. --[[User:Matt|Matt]] 22:27, 20 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Google &amp;quot;Mac command line arguments help&amp;quot;--[[User:Pbsds|pbsds]] 17:09, 26 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2900</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2900"/>
		<updated>2010-05-26T15:09:49Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
IDK if the link is wrong but it leads me to a download of an exe called TPL. [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Oh, sorry! Here is the source: http://www.mediafire.com/?mkjyyykd2n3 --[[User:Pbsds|pbsds]] 11:47, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
BTW, could you e-mail me the mac compile at pbsds@hotmail.com? KTHXBAI!--[[User:Pbsds|pbsds]] 20:28, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
On your machine, the python code compiles and runs, right? ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Yes, with no problems! Got errors?--[[User:Pbsds|pbsds]] 14:36, 20 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think I fixed most of them but I&#039;m having trouble with the arguments. --[[User:Matt|Matt]] 22:27, 20 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Google &amp;quot;Mac command line arguments help&amp;quot;&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2885</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2885"/>
		<updated>2010-05-20T12:36:26Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
IDK if the link is wrong but it leads me to a download of an exe called TPL. [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Oh, sorry! Here is the source: http://www.mediafire.com/?mkjyyykd2n3 --[[User:Pbsds|pbsds]] 11:47, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
BTW, could you e-mail me the mac compile at pbsds@hotmail.com? KTHXBAI!--[[User:Pbsds|pbsds]] 20:28, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
On your machine, the python code compiles and runs, right? ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Yes, with no problems! Got errors?--[[User:Pbsds|pbsds]] 14:36, 20 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2876</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2876"/>
		<updated>2010-05-19T18:28:39Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
IDK if the link is wrong but it leads me to a download of an exe called TPL. [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Oh, sorry! Here is the source: http://www.mediafire.com/?mkjyyykd2n3 --[[User:Pbsds|pbsds]] 11:47, 19 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
BTW, could you e-mail me the mac compile at pbsds@hotmail.com? KTHXBAI!--[[User:Pbsds|pbsds]] 20:28, 19 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Pbsds&amp;diff=2875</id>
		<title>User talk:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Pbsds&amp;diff=2875"/>
		<updated>2010-05-19T09:48:19Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The person that documented the PPM files is definatly a bloke - as I wrote a load of that :), oh and there&#039;s still a few things that need to be documented, like the exact way the animation pages are stored (semi done) and the sound files if you think you are up to the challenge. [[User:Steven|Steven]] 15:38, 28 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
im a noob when it comes to sound. im not too good for the rest either but i can try :)--[[User:Pbsds|pbsds]] 16:35, 28 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Hey, I really would like to use the PPMTool, but as I have a Mac, I can&#039;t. Could you maybe post the source code? ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
@[[User:Matt|Matt]]: It&#039;s written in AutoIt which is windows only. But i have rewritten it in Python, supporting frames, not only the preview image ;)&lt;br /&gt;
&lt;br /&gt;
I&#039;m working on the newframe part now, i think i have figured it out, just need to add it to the code.--[[User:Pbsds|pbsds]] 13:25, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I couldn&#039;t get the PPM.py working, it took me to a link (on MediaFire) to download PPM.exe ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Check you own talk page ;)--[[User:Pbsds|pbsds]] 11:48, 19 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2874</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2874"/>
		<updated>2010-05-19T09:47:28Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
IDK if the link is wrong but it leads me to a download of an exe called TPL. [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
Oh, sorry! Here is the source: http://www.mediafire.com/?mkjyyykd2n3 --[[User:Pbsds|pbsds]] 11:47, 19 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2863</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2863"/>
		<updated>2010-05-18T16:32:36Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2862</id>
		<title>User talk:Matt</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Matt&amp;diff=2862"/>
		<updated>2010-05-18T16:32:25Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: New page: You can&amp;#039;t get the source for PPMTool, it wouldn&amp;#039;t help you anyway. It&amp;#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can&#039;t get the source for PPMTool, it wouldn&#039;t help you anyway. It&#039;s written in AutoIt(Windows only). But, i have ported it to Python, and this version supports frame extraction! Check my user page for the download of a EXE, and here is the source: http://www.mediafire.com/?ydzynn21yu1 &lt;br /&gt;
&lt;br /&gt;
It would be awesome if you could hive me a mac compile :) KTHXBAI!--[[User:Pbsds|pbsds]] 18:32, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2861</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2861"/>
		<updated>2010-05-18T16:27:46Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 14 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*PPMtool: [[/PPMtool]]&lt;br /&gt;
*PPM.py: [http://www.mediafire.com/?ngmdmmyzztj]&lt;br /&gt;
*TPL.py: [http://www.mediafire.com/?ydzynn21yu1]&lt;br /&gt;
*EWES: [http://www.mediafire.com/?mz1my1zkxqy]&lt;br /&gt;
*Wii n DSi.au3 (Not released, but PM might work ;) ) &lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin developing.&lt;br /&gt;
* Jacol - Giving some advice in the begining when i made EWES.&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven - documenting the most of [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* YAGCD&#039;s contributors - Awesome documentations!&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2860</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2860"/>
		<updated>2010-05-18T13:49:46Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PPM.py ==&lt;br /&gt;
&lt;br /&gt;
I just wanted to say that i rewrote PPMTool in python and renamed it PPM.py&lt;br /&gt;
&lt;br /&gt;
This one has support for extracting frames too(i fixed the NewFrame problem ;) )&lt;br /&gt;
&lt;br /&gt;
Source: http://www.mediafire.com/?mkjyyykd2n3&lt;br /&gt;
&lt;br /&gt;
Exe: http://www.mediafire.com/?ngmdmmyzztj&lt;br /&gt;
&lt;br /&gt;
@Steven: Could you please update the documentation with my way of fixing the NewFrame stuff? I&#039;m not that good with documentations... KTHXBAI! :D&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:49, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2859</id>
		<title>User:Pbsds/PPMtool</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2859"/>
		<updated>2010-05-18T13:25:39Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Icon.png]]&lt;br /&gt;
&lt;br /&gt;
This is a command line program that is able to read info from PPM files(Flipnotes) and even convert the preview image into an BMP.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:PPMtool.rar|here]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;br /&gt;
Don&#039;t use this one! I rewrote it in python. and that one supports frame extractions too!&lt;br /&gt;
&lt;br /&gt;
http://www.mediafire.com/download.php?ngmdmmyzztj&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:24, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2858</id>
		<title>User:Pbsds/PPMtool</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds/PPMtool&amp;diff=2858"/>
		<updated>2010-05-18T13:24:53Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Icon.png]]&lt;br /&gt;
&lt;br /&gt;
This is a command line program that is able to read info from PPM files(Flipnotes) and even convert the preview image into an BMP.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:PPMtool.rar|here]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;br /&gt;
Don&#039;t use this one! I rewrote it in python. and that one supports frame extractions too!&lt;br /&gt;
&lt;br /&gt;
http://www.mediafire.com/myfiles.php&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:24, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User_talk:Pbsds&amp;diff=2857</id>
		<title>User talk:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User_talk:Pbsds&amp;diff=2857"/>
		<updated>2010-05-18T11:25:08Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The person that documented the PPM files is definatly a bloke - as I wrote a load of that :), oh and there&#039;s still a few things that need to be documented, like the exact way the animation pages are stored (semi done) and the sound files if you think you are up to the challenge. [[User:Steven|Steven]] 15:38, 28 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
im a noob when it comes to sound. im not too good for the rest either but i can try :)--[[User:Pbsds|pbsds]] 16:35, 28 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Hey, I really would like to use the PPMTool, but as I have a Mac, I can&#039;t. Could you maybe post the source code? ~ [[User:Matt|Matt]]&lt;br /&gt;
&lt;br /&gt;
@[[User:Matt|Matt]]: It&#039;s written in AutoIt which is windows only. But i have rewritten it in Python, supporting frames, not only the preview image ;)&lt;br /&gt;
&lt;br /&gt;
I&#039;m working on the newframe part now, i think i have figured it out, just need to add it to the code.--[[User:Pbsds|pbsds]] 13:25, 18 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2834</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2834"/>
		<updated>2010-04-21T18:43:25Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 14 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*[[/PPMtool|PPMtool]]&lt;br /&gt;
*EWES&lt;br /&gt;
*Wii n DSi.au3 (Not released yet tho...)&lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin coding&lt;br /&gt;
* Jacol - Giving some advice when i made EWES&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven for documenting [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2808</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2808"/>
		<updated>2010-03-25T21:01:30Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 13 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*[[/PPMtool|PPMtool]]&lt;br /&gt;
*EWES&lt;br /&gt;
*Wii n DSi.au3 (Not released yet tho...)&lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin coding&lt;br /&gt;
* Jacol - Giving some advice when i made EWES&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven for documenting [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2807</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2807"/>
		<updated>2010-03-25T21:01:11Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 13 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
My blog: http://pbsds.blogspot.com/&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*[[/PPMtool|PPMtool]]&lt;br /&gt;
*EWES&lt;br /&gt;
*Wii n DSi.au3 (Not released yet tho...)&lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin coding&lt;br /&gt;
* Jacol - Giving some advice when i made EWES&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven for documenting [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2805</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2805"/>
		<updated>2010-03-25T14:52:49Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The last 144 bytes of the file are a hash / encypted block that changes for every minor change in the file.  When I was originally working on this with someone else (forgot his nick on here) we said that it could possibly be an AES cypher key or data block, I don&#039;t know if anything else was worked out behond this as I&#039;ve not looked at the files since I worked out the basic file structure.  If your thinking of using FlipNote as an entry into the DSi for homebrew then the files do not seem to have any way to break them due to the lack of strings in the file.&lt;br /&gt;
:Actually the last 144 bytes are split into 128 bytes of hash and 16 bytes of 0x00.&lt;br /&gt;
:[[User:Steven|Steven]] 06:26, 11 February 2010 (UTC)&lt;br /&gt;
::Has someone any idea what this checksum is? ;-) --[[User:Endres|Endres]] 18:29, 15 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
I think i have found out a little about the sounds.&lt;br /&gt;
&lt;br /&gt;
i think that in the first byte in a animation frame has an index for which sound to play.&lt;br /&gt;
&lt;br /&gt;
Something like this: [[Image:Temp.png]]&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 15:52, 25 March 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=File:Temp.png&amp;diff=2804</id>
		<title>File:Temp.png</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=File:Temp.png&amp;diff=2804"/>
		<updated>2010-03-25T14:51:34Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2739</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2739"/>
		<updated>2010-02-20T22:01:12Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 13 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*[[/PPMtool|PPMtool]]&lt;br /&gt;
*EWES&lt;br /&gt;
*Wii n DSi.au3 (Not released yet tho...)&lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin coding&lt;br /&gt;
* Jacol - Giving some advice when i made EWES&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven for documenting [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2697</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2697"/>
		<updated>2010-02-10T13:19:20Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2696</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2696"/>
		<updated>2010-02-10T13:19:05Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.--[[User:Pbsds|pbsds]] 14:19, 10 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2695</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2695"/>
		<updated>2010-02-10T13:18:51Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;br /&gt;
I don&#039;t know much about that but i think there is a hash in there.&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2660</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2660"/>
		<updated>2010-01-14T13:53:50Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Modifying the file? ==&lt;br /&gt;
&lt;br /&gt;
Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings.&lt;br /&gt;
[[User:Chronic667|Chronic667]] 20:40, 13 January 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2651</id>
		<title>User:Pbsds</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=User:Pbsds&amp;diff=2651"/>
		<updated>2010-01-11T14:29:37Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Im just a 13 years old boy who has always dreamed of making something that others can use.(music, programs &#039;n games)&lt;br /&gt;
&lt;br /&gt;
=== Shit I made: ===&lt;br /&gt;
*[[/PPMtool|PPMtool]]&lt;br /&gt;
*EWES&lt;br /&gt;
&lt;br /&gt;
=== People to thanks ===&lt;br /&gt;
* Xuzz/IceFire - you inspired me to begin coding&lt;br /&gt;
* Jacol - Giving some advice when i made EWES&lt;br /&gt;
* Remark - Helped with 8x8 tiling when i made PPMtool&lt;br /&gt;
* Steven for documenting [[Flipnote_Files/PPM|PPM files]]&lt;br /&gt;
* You - for (hopefully) using my stuff. :D&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2646</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2646"/>
		<updated>2010-01-05T14:15:31Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Thanks!--[[User:Pbsds|pbsds]] 15:15, 5 January 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
	<entry>
		<id>https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2644</id>
		<title>Talk:Flipnote Files/PPM</title>
		<link rel="alternate" type="text/html" href="https://dsibrew.org/w/index.php?title=Talk:Flipnote_Files/PPM&amp;diff=2644"/>
		<updated>2010-01-05T12:32:47Z</updated>

		<summary type="html">&lt;p&gt;Pbsds: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: [[Image:FlipnoteImageDecodedByPBSDS.png]]--[[User:Pbsds|pbsds]] 09:29, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
See [[User:Remark/Icon2ppm.c]]. -- [[User:Remark|Remark]] 09:45, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks:)--[[User:Pbsds|pbsds]] 09:55, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;t work! Here is the code im using(i had to transelate it):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;&amp;quot;&amp;gt;Dim $ImageOutput[4072]&lt;br /&gt;
for $x=0 to 46 step 1&lt;br /&gt;
	for $y=0 to 7 step 1&lt;br /&gt;
		for $z=0 To 7 Step 1&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]&lt;br /&gt;
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]&lt;br /&gt;
		Next&lt;br /&gt;
	Next&lt;br /&gt;
Next&amp;lt;/source&amp;gt;&lt;br /&gt;
Output: [[Image:Test2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
You made a typo here:&lt;br /&gt;
 for x=0 to 46 step &lt;br /&gt;
-[[User:Remark|Remark]] 18:42, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Made no difference...--[[User:Pbsds|pbsds]] 21:08, 24 December 2009 (UTC)&lt;br /&gt;
----&lt;br /&gt;
If you would&#039;ve used a sane language, you would&#039;ve gotten a segfault. :-)&lt;br /&gt;
&lt;br /&gt;
Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.&lt;br /&gt;
&lt;br /&gt;
- [[User:Remark|Remark]] 21:52, 24 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.&lt;br /&gt;
&lt;br /&gt;
I think i&#039;ll try again tomorrow. but now im off to bed:)--[[User:Pbsds|pbsds]] 00:39, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
WooHoo! im really close now!: [[Image:Test3.png]]--[[User:Pbsds|pbsds]] 14:43, 25 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finaly got it!: [[Image:Test4.png]]--[[User:Pbsds|pbsds]] 21:26, 27 December 2009 (UTC)&lt;br /&gt;
== Pallete ==&lt;br /&gt;
i don&#039;t think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --[[User:Pbsds|pbsds]] 01:03, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe i should post my pallete so you guys can check if its wrong:&lt;br /&gt;
&lt;br /&gt;
0 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
1 = 525252&lt;br /&gt;
&lt;br /&gt;
2 = FFFFFF&lt;br /&gt;
&lt;br /&gt;
3 = A4A4A4&lt;br /&gt;
&lt;br /&gt;
4 = FF0000&lt;br /&gt;
&lt;br /&gt;
5 = 7B0000&lt;br /&gt;
&lt;br /&gt;
6 = FF7B7B&lt;br /&gt;
&lt;br /&gt;
7 = 00FF00&lt;br /&gt;
&lt;br /&gt;
8 = 0000FF&lt;br /&gt;
&lt;br /&gt;
9 = 00007B&lt;br /&gt;
&lt;br /&gt;
A = 7B7BFF&lt;br /&gt;
&lt;br /&gt;
B = 00FF00&lt;br /&gt;
&lt;br /&gt;
C = FF00FF&lt;br /&gt;
&lt;br /&gt;
D = 00FF00&lt;br /&gt;
&lt;br /&gt;
E = 00FF00&lt;br /&gt;
&lt;br /&gt;
F = 00FF00&lt;br /&gt;
&lt;br /&gt;
--[[User:Pbsds|pbsds]] 10:52, 4 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Use the following formula:&lt;br /&gt;
(x / 32) * 256&lt;br /&gt;
To convert between the scales 0-31 and 0-255.&lt;br /&gt;
&lt;br /&gt;
Oh... i thought that 31 was the higest and calculated out from that. :| thanks!--[[User:Pbsds|pbsds]] 13:32, 5 January 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pbsds</name></author>
	</entry>
</feed>