Post Reply 
A peak at the PTF format
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #1
A peak at the PTF format
Just managed to have a look at the PTF format that Sony introduces with their release of 3.70.

Haven't had the time to look through everything, but I think I've got the basic file structure (it's not very difficult ;)).  It seems to contain a lot of RLZ compressed files (they all appear to actually be GIM images).

Anyways, on with the structure, for anyone interested :P

The real data starts at 0x100 - before that, well, it's just ASCII and null characters... >_>

At 0x100, there's the 0x20 byte PTF header - all it contains are pointers to the various sections of the file.  Currently, only 5 sections exist (thus 5 pointers).

Now, for each section, there's a 0x20 byte header, with 4 values, taking up 0xC bytes (the rest of the 0x20 bytes are just nulls).  [the first section obviously appears at 0x100+0x20 = 0x120]
0x00: Appears to be the number of the current section (ie, first section = 0x00, second section = 0x01, etc)
0x02: Number of entries in the current section
0x04: Offset to the first Entry header in the next section, relative to the absolute offset of the first Entry header of the current section
0x08: Absolute offset of the first entry in the current section

Now under each section, there's a number of entries.  Each entry has a 0x20 header, followed by the data, which is RLZ compressed.  The header has 4 values, taking up 0x10 bytes (again, the rest is just nulls).  [the first entry obviously appears at 0x100+0x20+0x20 = 0x140]
0x00: Icon ID
0x04: Image type - exactly the same as the image type flag for image resources in RCO files:
  • 0x00 = PNG
  • 0x01 = JPEG
  • 0x02 = TIFF
  • 0x03 = GIF
  • 0x04 = BMP
  • 0x05 = GIM
Note that only GIMs are ever used, and a BMP for the background.  The other file types don't appear in PTF files.  Unfortunately, only GIM transparency is supported.
0x06: Compression flag?  0x01 = RLZ compressed, 0x00 = uncompressed?
0x08: Size of the data (compressed)
0x0C: Size of the data (uncompressed)




Attached is a PTF to RCO converter.  Note that this does NOT generate flashable RCOs.  After conversion, you'll need to run the RCO through Resurssiklunssi to decompress it.  After that, you can view and extract the contents, but there's really little other use.
Have fun :P
UPDATE: do not use below file, use this instead

.rar  ptf2rco.rar (Size: 8.83 KB / Downloads: 5401)


Alternatively, you may wish to download a hexed copy (with two messages replaced) of the program, which includes a (what seems to be) modified (probably SFO/PNGs replaced) version of Resurssiklunssi from QJ.
Or, if you to stick your own name in the program, the source file is included.  However, if you lack the knowledge on how to compile the program, you can hex the program yourself - the "By" line is at 0x2230 in the EXE, the "conversion complete" message is stored at 0x25D4.  Happy hexing! :)

(Note, you may want to hex other messages as well to make it seem less obvious)
(This post was last modified: 05/05/2009 05:26 AM by ZiNgA BuRgA.)
12/09/2007 04:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
A peak at the PTF format - ZiNgA BuRgA - 12/09/2007 04:55 AM
RE: A peak at the PTF format - dedat - 12/09/2007, 07:01 AM
RE: A peak at the PTF format - matchung - 12/09/2007, 07:35 AM
RE: A peak at the PTF format - lupus - 12/09/2007, 07:57 AM
RE: A peak at the PTF format - SchmilK - 12/09/2007, 08:55 AM
RE: A peak at the PTF format - lupus - 12/09/2007, 09:18 AM
RE: A peak at the PTF format - u_c_taker - 12/09/2007, 11:01 AM
RE: A peak at the PTF format - SchmilK - 12/09/2007, 11:21 AM
RE: A peak at the PTF format - Chroma - 12/09/2007, 12:45 PM
RE: A peak at the PTF format - afiser - 12/09/2007, 02:08 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 12/09/2007, 04:06 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 12/09/2007, 04:53 PM
RE: A peak at the PTF format - Ketchup - 13/09/2007, 02:33 AM
RE: A peak at the PTF format - SnailsPace - 12/09/2007, 05:58 PM
RE: A peak at the PTF format - Vegetano1 - 13/09/2007, 05:45 AM
RE: A peak at the PTF format - SchmilK - 13/09/2007, 09:29 AM
RE: A peak at the PTF format - u_c_taker - 13/09/2007, 01:11 PM
RE: A peak at the PTF format - roberth - 13/09/2007, 01:40 PM
RE: A peak at the PTF format - bstronga - 13/09/2007, 06:01 PM
RE: A peak at the PTF format - Mr. Shizzy - 14/09/2007, 12:01 AM
RE: A peak at the PTF format - diego - 14/09/2007, 01:09 AM
RE: A peak at the PTF format - Mr. Shizzy - 14/09/2007, 01:36 AM
RE: A peak at the PTF format - diego - 14/09/2007, 01:53 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 03:31 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 14/09/2007, 05:13 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 05:14 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 14/09/2007, 05:21 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 05:26 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 14/09/2007, 05:29 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 07:19 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 05:42 AM
RE: A peak at the PTF format - roberth - 14/09/2007, 05:42 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 14/09/2007, 05:53 AM
RE: A peak at the PTF format - roberth - 14/09/2007, 05:54 AM
RE: A peak at the PTF format - bstronga - 14/09/2007, 06:03 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 14/09/2007, 06:36 AM
RE: A peak at the PTF format - bstronga - 14/09/2007, 02:29 PM
RE: A peak at the PTF format - Vegetano1 - 14/09/2007, 07:32 AM
RE: A peak at the PTF format - roberth - 14/09/2007, 08:07 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 08:12 AM
RE: A peak at the PTF format - diego - 14/09/2007, 08:15 AM
RE: A peak at the PTF format - matchung - 14/09/2007, 08:16 AM
RE: A peak at the PTF format - gsmoke - 14/09/2007, 08:26 AM
RE: A peak at the PTF format - diego - 14/09/2007, 08:39 AM
RE: A peak at the PTF format - Maxime - 14/09/2007, 09:28 AM
RE: A peak at the PTF format - afiser - 14/09/2007, 02:47 PM
RE: A peak at the PTF format - Ac_K - 14/09/2007, 11:09 AM
RE: A peak at the PTF format - Ac_K - 14/09/2007, 02:31 PM
RE: A peak at the PTF format - Ac_K - 14/09/2007, 06:15 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 14/09/2007, 07:32 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 15/09/2007, 12:57 AM
RE: A peak at the PTF format - SchmilK - 15/09/2007, 06:47 AM
RE: A peak at the PTF format - Mr. Shizzy - 15/09/2007, 07:33 AM
RE: A peak at the PTF format - afiser - 15/09/2007, 03:05 PM
RE: A peak at the PTF format - gsmoke - 15/09/2007, 03:13 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 15/09/2007, 07:03 PM
RE: A peak at the PTF format - gerbilboy - 19/09/2007, 03:34 PM
RE: A peak at the PTF format - afiser - 19/09/2007, 07:27 PM
RE: A peak at the PTF format - SchmilK - 20/09/2007, 10:56 AM
RE: A peak at the PTF format - Vegetano1 - 20/09/2007, 11:52 AM
RE: A peak at the PTF format - gerbilboy - 20/09/2007, 03:10 PM
RE: A peak at the PTF format - bboy_sonik - 20/09/2007, 04:02 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 20/09/2007, 11:59 PM
RE: A peak at the PTF format - qwaxys - 21/09/2007, 11:06 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 21/09/2007, 04:26 PM
RE: A peak at the PTF format - roberth - 22/09/2007, 05:10 AM
RE: A peak at the PTF format - vinrose67 - 24/09/2007, 03:06 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 24/09/2007, 03:16 AM
RE: A peak at the PTF format - diego - 25/09/2007, 12:56 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 26/09/2007, 09:30 PM
RE: A peak at the PTF format - yongobongo - 26/09/2007, 11:18 PM
RE: A peak at the PTF format - |-Anubis-| - 26/09/2007, 10:10 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 26/09/2007, 10:24 PM
RE: A peak at the PTF format - matchung - 05/10/2007, 02:38 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 03:00 AM
RE: A peak at the PTF format - matchung - 05/10/2007, 05:31 AM
RE: A peak at the PTF format - diego - 05/10/2007, 04:16 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 05:51 AM
RE: A peak at the PTF format - matchung - 05/10/2007, 07:57 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 08:00 AM
RE: A peak at the PTF format - matchung - 05/10/2007, 08:14 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 08:35 AM
RE: A peak at the PTF format - matchung - 05/10/2007, 08:47 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 05:09 PM
RE: A peak at the PTF format - matchung - 05/10/2007, 06:03 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 06:34 PM
RE: A peak at the PTF format - matchung - 05/10/2007, 06:42 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/10/2007, 07:39 PM
RE: A peak at the PTF format - matchung - 05/10/2007, 10:13 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 06/10/2007, 12:43 AM
RE: A peak at the PTF format - matchung - 06/10/2007, 02:41 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 06/10/2007, 06:13 AM
RE: A peak at the PTF format - kashell - 07/10/2007, 05:32 AM
RE: A peak at the PTF format - matchung - 07/10/2007, 07:25 PM
RE: A peak at the PTF format - Iguanahak - 04/11/2007, 11:30 AM
RE: A peak at the PTF format - Iguanahak - 04/11/2007, 07:19 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 04/11/2007, 07:50 PM
RE: A peak at the PTF format - ZiNgA BuRgA - 06/11/2007, 10:05 PM
RE: A peak at the PTF format - fl0w - 09/08/2008, 11:32 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 10/08/2008, 12:37 AM
RE: A peak at the PTF format - fl0w - 10/08/2008, 05:31 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 10/08/2008, 03:58 PM
RE: A peak at the PTF format - mudbone - 05/05/2009, 05:16 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/05/2009, 05:27 AM
RE: A peak at the PTF format - mudbone - 05/05/2009, 05:37 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 05/05/2009, 07:58 PM
RE: A peak at the PTF format - mudbone - 06/05/2009, 05:34 AM
RE: A peak at the PTF format - SchmilK - 06/05/2009, 05:57 AM
RE: A peak at the PTF format - ZiNgA BuRgA - 06/05/2009, 05:26 PM
RE: A peak at the PTF format - mudbone - 06/05/2009, 06:00 PM
Thread Revived!!! - Necro-Bot - 05/05/2009, 05:16 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: