Post Reply 
A peak at the PTF format
Author Message
bstronga
Vimperator

Posts: 457.2241
Threads: 19
Joined: 11th Mar 2007
Reputation: -5.33618
E-Pigs: 22.6748
Offline
Post: #51
RE: A peak at the PTF format
ZiNgA BuRgA Wrote:
bstronga Wrote:by the way something i haven't really looked at.
can you tell something about the order of the data?
You mean how the PSP knows which icon is which?  It's done by the ID of each entry :P

yeh, just wanted it more specific... but nevermind just looked at your src :>
14/09/2007 02:29 PM
Find all posts by this user Quote this message in a reply
Ac_K
I See K

Posts: 141.5490
Threads: 5
Joined: 9th Jun 2007
Reputation: -3.19624
E-Pigs: 12.2039
Offline
Post: #52
RE: A peak at the PTF format

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
int pspDecompress(const u8 *inbuf, u8 *outbuf, u32 outcapacity)
{
	int k1 = pspSdkSetK1(0);
	int retsize;
	
	if (inbuf[0] == 0x1F && inbuf[1] == 0x8B)
	{
		retsize = sceKernelGzipDecompress(outbuf, outcapacity, inbuf, NULL);
	}
	else if (memcmp(inbuf, "2RLZ", 4) == 0) // 2RLZ
	{
		u32 arg[4];

		arg[0] = (u32)outbuf;
		arg[1] = outcapacity;
		arg[2] = (u32)(inbuf+4);
		arg[3] = 0;
		
		retsize = sceKernelExtendKernelStack(0x2000, (void *)sceKernelLzrcDecode_, arg);
	}
	else
	{
		retsize = -1;
	}

	pspSdkSetK1(k1);
	return retsize;
}


It's here I think...

Code:
1
2
3
4
5
6
7
8
9
10
11
	else if (memcmp(inbuf, "2RLZ", 4) == 0) // 2RLZ
	{
		u32 arg[4];

		arg[0] = (u32)outbuf;
		arg[1] = outcapacity;
		arg[2] = (u32)(inbuf+4);
		arg[3] = 0;
		
		retsize = sceKernelExtendKernelStack(0x2000, (void *)sceKernelLzrcDecode_, arg);
	}

14/09/2007 02:31 PM
Find all posts by this user Quote this message in a reply
afiser
Paradigmatic Apprentice

Posts: 44.1835
Threads: 0
Joined: 13th Apr 2007
Reputation: 0
E-Pigs: 0.5304
Offline
Post: #53
RE: A peak at the PTF format
Maxime Wrote:Good job Zinga ;)
I just can't wait for a PTF Maker, Sony's theme manager actually rocks!

PS : I can test it on my 3.70 Slim if you want ;)

hopefully sony's theme maker will use RLZ compression also, and maybe it can be disassembled so wee can compress rlz on pc :yipi:
14/09/2007 02:47 PM
Find all posts by this user Quote this message in a reply
Pirata Nervo
NervOS Developer

Posts: 699.4765
Threads: 39
Joined: 20th Jun 2007
Reputation: -0.79225
E-Pigs: 19.2466
Offline
Post: #54
RE: A peak at the PTF format
ok Ac_K, bstrong and zinga, how do you know where a mig starts and ends?

14/09/2007 03:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Ac_K
I See K

Posts: 141.5490
Threads: 5
Joined: 9th Jun 2007
Reputation: -3.19624
E-Pigs: 12.2039
Offline
Post: #55
RE: A peak at the PTF format
See the first page of this topic if you want know that...
ZiNgA have updated...
14/09/2007 06:15 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #56
RE: A peak at the PTF format
Ac_K Wrote:Hum... Interesting ZiNgA !
For the RLZ compression...
See the new PSARDumper by M33 !

In the source... I've saw a function for decrypt RLZ...
But, It's use a PSP Function... So RLZ could be decrypt just on PSP !

Look At Here ;) !
RLZ decompression has been known for a while - older versions of PSAR dumper have it.  In fact, PRXDecrypter, and Z33's tool do the same thing.
As you've said though, RLZ compression is currently unavailable.
In RCOs, deflate was suffice, but looking at the compression flags here, only RLZ is supported... >_>

Pirata Nervo Wrote:ok Ac_K, bstrong and zinga, how do you know where a mig starts and ends?
You just have to be able to figure it out by looking at it in a hex editor.  There's no magic way - this is all about hacking and figuring out how the PTF file format works.
14/09/2007 07:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pirata Nervo
NervOS Developer

Posts: 699.4765
Threads: 39
Joined: 20th Jun 2007
Reputation: -0.79225
E-Pigs: 19.2466
Offline
Post: #57
RE: A peak at the PTF format
o ok, so they are compressed in rlz compression, so after i CUT the correct block of data, and make a new file with that data, can i use the app with the weird name to decompress it?

15/09/2007 12:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #58
RE: A peak at the PTF format
^ There's a bit more work involved than that...
15/09/2007 12:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Pirata Nervo
NervOS Developer

Posts: 699.4765
Threads: 39
Joined: 20th Jun 2007
Reputation: -0.79225
E-Pigs: 19.2466
Offline
Post: #59
RE: A peak at the PTF format
lol ok

15/09/2007 05:18 AM
Visit this user's website Find all posts by this user Quote this message in a reply
SchmilK
Noob

Posts: 4,698.2833
Threads: 359
Joined: 16th Apr 2007
Reputation: 0.38918
E-Pigs: 82.0546
Offline
Post: #60
RE: A peak at the PTF format
Zingaburger your tool worked perfect :)

Funny seeing that they removed that 'wierd grandient images' on the right and bottom of the icons that wee always deleted ;)

And sysconf icons are now in the topmenu along with some other new ones.  

Making some 3.52 and 3.60 versions of all sony themes now :D

Zinga and bstronga... BIG PROPS MY FRIENDS!!!!

**Wierd**
Using RcoEdit to extract all and replace all didnt import the images for many icons.  But using the upgraderco batches/rcotool those problem icons went through no problem!

:D  now i have sony 3.71 themes on my 3.52 and 3.60 :D

*wierder*

Oh and there is a background.png file that comes up from rcotool -A each file, but photoshop/paint/preview won't open it.  :-/

Also....
They renamed the tex_podcast to tex_cnf_podcast
They renamed the tex_premo to tex_cnf_premo
They renamed the tex_lftv to tex_cnf_lftv
So batch scripts don't work on those files at this time..but that will be updated after i get home tonight  ;)  

I have to go out for family functions today.

limneosgreen Wrote:Take my advice, don't try to install custom themes ... it's possible to brick ur psp.. why just don't change wallpaper
(This post was last modified: 15/09/2007 07:19 AM by SchmilK.)
15/09/2007 06:47 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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

 Quick Theme: