Difference between revisions of "Flipnote Files/PPM"

From DSiBrew
Jump to navigation Jump to search
(New page: {| class="wikitable" |- style="background-color: #ddd;" ! Start ! Length ! Description |- | 0x0000 | 4 | Magic (should be PARA) |- | 0x0004 | 4 | Size of animation data |- | 0x0008 | 4 | s...)
(No difference)

Revision as of 12:00, 21 August 2009

Start Length Description
0x0000 4 Magic (should be PARA)
0x0004 4 Size of animation data
0x0008 4 size of audio data
0x000C 2 # of frames
0x000E 2 Unknown - all files looked at so far has this field set to 24 00 hex.
0x0010 2 Is locked? - 0 open, 1 locked
0x0012 2 Preview frame number
0x0014 22 Original author name (UCS-2)
0x002A 22 Last Edited By Author name (UCS-2)
0x0040 22 User name (UCS-2)
0x0056 8 Original author ID
0x005E 8 Edit Author ID - the last user to save the file
0x0066 18 Original File-name - see notes on format
0x0078 18 File-name - see notes on format
0x008A 8 Previous Editing Author ID
0x0092 8 Partial File name? - see notes on format
0x009A 6 Unknown - possibly date information
0x00A0 1536 Preview Bitmap (4 bits/pixel).
0x06A0 8 + ( 4 * Number of frames) Animation Sequence Header

The file name seems to be stored in the file header 3 times:

  • Original file name 0x0066
  • Current file name 0x0078
  • Partial file name 0x0092

The file name is stored in 3 parts:

  • 3 hex bytes, the first byte's high nibble is not the same as the first byte of the file name
  • 13 bytes for the central part of the file name
  • 2 bytes for the last part of the file name.

For the file name : G35B20_0909841CDBEB1_002

  • First location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 00 00
  • Second location: D3 5B 20 30 39 30 39 38 34 31 43 44 42 45 42 31 02 00
  • Last location: D3 5B 20 09 09 84 1C DB

The 3 sections of the file name seem to be stored as:

  • Last 6 digits of your Flipnote Studio ID
  • A random number, possibly generated from a date stamp
  • The version number of the file

Palette

Hex Color DS RGB Approximation
0x0 Not used / White 31, 31, 31
0x1 Dark Grey 10, 10, 10
0x2 White 31, 31, 31
0x3 Light Grey 20, 20, 20
0x4 Pure Red 31, 0, 0
0x5 Dark Red 15, 0, 0
0x6 Light Red / Pink 31, 15, 15
0x7 Pure Green 0, 31, 0
0x8 Pure Blue 0, 0, 31
0x9 Dark Blue 0, 0, 15
0xA Light Blue 15, 15, 31
0xB Pure Green 0, 31, 0
0xC Magenta / Purple 31, 0, 31
0xD Pure Green 0, 31, 0
0xE Pure Green 0, 31, 0
0xF Pure Green 0, 31, 0

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.

Here's a photo taken of the altered preview image, reduced to about the correct size.

Picture of an altered ppm preview image on the DSi

Link to the original picture, warning image is 2,048 × 1,536.

Here's two preview images that blasty decoded from some PPM files.

Ppm 1.png Ppm 2.png


Animation Data Section