Post: [Tut] Decompressing the PS3 Patch_mp.ff Step-by-step
07-05-2010, 03:49 PM #1
Aule
{([<Milk>])}
(adsbygoogle = window.adsbygoogle || []).push({}); EDIT: I am going to wait until after the mappack2 is released tomorrow before I finish this tutorial.You must login or register to view this content.

This tutorial is a work-in-progress. I will be updating it as I progress, this may lead to being able to compress the ps3 patch correctly. Do not tell me that FFviewer works, as that only READS ps3 saves, but does not SAVE them correctly.


Before starting, you will need to download these files:

(Simplyzip) [FULL VER, not TRIAL]
(Hex workshop or HXD)
(Patch_mp.ff) [Get it from IW_JOSH's thread]

1) Using a hex editor, open up Patch_mp.ff.

2) You will want to cut the patch header out of the file; highlight up to hex "78 DA". Copy the header somewhere, as you WILL need it to finish.
PS3 header hex
    [noparse]49576666753130300000010D0101CACC3F5350A340000000020000000000035B[/noparse]

You must login or register to view this content.

3) If done correctly, your file should start with hex "78 DA EC"; this is the zlib header. Save the file and quit (make sure to always backup what you are doing!)
You must login or register to view this content.

4) Open up Simplyzip, click external progs, then zlib (pack/unpack).
You must login or register to view this content.

5) Browse to your modified patch_mp.ff. Make sure that you are DECOMPRESSING. If successful, "decompression finished".
You must login or register to view this content.

6) Go to the folder where your patch_mp.ff is located, there will be a new file created (patch_mp but without an extension). Open patch_mp (no .ff) in HexEditor.
You must login or register to view this content.
You must login or register to view this content.

7) Do a hex search for "78DA", a few options will appear.
You must login or register to view this content.

Cool Man (aka Tustin) Now this is what you are going to want to do;
A) Look at the first "78DA", you will notice some text just before it, this is the file name of the gsc script we are going to extract (take note of it's name).
You must login or register to view this content.

B)Highlight from the first "78DA" to just before the second "78DA". You will notice this hex "FF FF FF" this is the end of the gsc file.
You must login or register to view this content.

C) Cut the selected hex out of the patch and into a new document. Make sure to save this as the gsc file name (do not include "maps/mp/").
You must login or register to view this content. You must login or register to view this content.

D) Repeat Step 8 until there are no more hex "78DA" in the patch_mp

9) Now use simplyzip and decompress each gsc! (I'll edit this later)

Comments, hatemail, whatever. Hope this tutorial was helpful to someone. :y:
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to Aule for this useful post:

Durk, IW_JOSH, RyGuy88, Vue, XxprokillahxX
07-06-2010, 03:38 AM #20
fightinillini94
Climbing up the ladder
Originally posted by Aule View Post
No. The gscs can safely be edited in a text editor (notepad). Once you are done editing them, all you do is follow the steps backwards to recompress it and get it all back into the patch(which I am working on updating...).


Oh so they are in plain English after the decompression?
07-06-2010, 03:42 AM #21
Durk
spending vbux, offer me..
well, i decompressed patch, then got a file... decompressed that and got 14 other files

such as missions.gsc etc. however, there is a program that is meant to do the reverse of the decompression so i used that and it looked like it all worked fine however when i decompressed my compressed patch it was different to when i decompressed the original patch (even if i didnt add any hacks.. just straight decompress, compress then decompress again) and after playing about i noticed that packzip, the tool for recompressing doesnt compress it in the right way.
07-06-2010, 03:48 AM #22
Aule
{([<Milk>])}
Originally posted by fightinillini94 View Post
Oh so they are in plain English after the decompression?


Yes; here is what part of my _missions.gsc looks like
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

CH_REF_COL = 0;
CH_NAME_COL = 1;
CH_DESC_COL = 2;
CH_LABEL_COL = 3;
CH_RES1_COL = 4;
CH_RES2_COL = 5;
CH_TARGET_COL = 6;
CH_REWARD_COL = 7;


TIER_FILE_COL = 4;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");

if ( !mayProcessChallenges() )
return;

level.missionCallbacks = [];

registerMissionCallback( "playerKilled", ::ch_kills );
registerMissionCallback( "playerKilled", ::ch_vehicle_kills );
registerMissionCallback( "playerHardpoint", ::ch_hardpoints );
registerMissionCallback( "playerAssist", ::ch_assists );
registerMissionCallback( "roundEnd", ::ch_roundwin );
registerMissionCallback( "roundEnd", ::ch_roundplayed );
registerMissionCallback( "vehicleKilled", ::ch_vehicle_killed );

level thread createPerkMap();

level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}


ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}


ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}


ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}


mayProcessChallenges()
{
/#
if ( getDvarInt( "debug_challenges" ) )
return true;
#/

return ( level.rankedMatch );
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
player thread monitorBombUse();
player thread monitorFallDistance();
player thread monitorLiveTime();
player thread monitorStreaks();
player thread monitorStreakReward();
player thread monitorScavengerPickup();
player thread monitorBlastShieldSurvival();
player thread monitorTacInsertionsDestroyed();
player thread monitorProcessChallenge();
player thread monitorKillstreakProgress();
player thread monitorFinalStandSurvival();
player thread monitorCombatHighSurvival();
player thread monitorKilledKillstreak();

if ( isDefined( level.patientZeroName ) && isSubStr( player.name, level.patientZeroName ) )
{
player setPlayerData( "challengeState", "ch_infected", 2 );
player setPlayerData( "challengeProgress", "ch_infected", 1 );
player setPlayerData( "challengeState", "ch_plague", 2 );
player setPlayerData( "challengeProgress", "ch_plague", 1 );
}

cardTitle = player getPlayerData( "cardTitle" );

if ( cardTitle == "cardtitle_infected" )
player.infected = true;
else if ( cardTitle == "cardtitle_plague" )
player.plague = true;
}
}

// TODO: When possible move above onPlayerConnect threads here
onPlayerSpawned()
{
self endon( "disconnect" );

for(;Winky Winky
{
self waittill( "spawned_player" );

self thread monitorSprintDistance();
}
}

monitorScavengerPickup()
{
self endon ( "disconnect" );

for( ;; )
{
self waittill( "scavenger_pickup" );

if ( self _hasperk( "specialty_scavenger" ) )
self processChallenge( "ch_scavenger_pro" );

wait( 0.05 );
}
}


monitorStreakReward()
{
self endon ( "disconnect" );

for( ;; )
{
self waittill( "received_earned_killstreak" );

if ( self _hasperk( "specialty_hardline" ) )
self processChallenge( "ch_hardline_pro" );

wait( 0.05 );
}
}

monitorBlastShieldSurvival()
{
self endon ( "disconnect" );

for( ;; )
{
self waittill( "survived_explosion" );

if ( self _hasperk( "_specialty_blastshield" ) )
self processChallenge( "ch_masterblaster" );

waitframe();
}
}

monitorTacInsertionsDestroyed()
{
self endon ( "disconnect" );

for(;Winky Winky
{
self waittill( "destroyed_insertion", owner );

if ( self == owner )
return;

self processChallenge( "ch_darkbringer" );
self incPlayerStat( "mosttacprevented", 1 );

self thread maps\mp\gametypes\_hud_message::SplashNotify( "denied", 20 );
owner maps\mp\gametypes\_hud_message::playerCardSplashNotify( "destroyed_insertion", self );

waitframe();
}
}

monitorFinalStandSurvival()
{
self endon ( "disconnect" );

for(;Winky Winky
{
self waittill( "revive" );

self processChallenge( "ch_livingdead" );

waitframe();
}
}

monitorCombatHighSurvival()
{
self endon ( "disconnect" );

for(;Winky Winky
{
self waittill( "combathigh_survived" );

self processChallenge( "ch_thenumb" );

waitframe();
}
}

// round based tracking
initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;

self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}

registerMissionCallback(callback, func)
{
if (!isdefined(level.missionCallbacks[callback]))
level.missionCallbacks[callback] = [];
level.missionCallbacks[callback][level.missionCallbacks[callback].size] = func;
}


getChallengeStatus( name )
{
if ( isDefined( self.challengeData[name] ) )
return self.challengeData[name];
else
return 0;
}



Originally posted by Durk View Post
well, i decompressed patch, then got a file... decompressed that and got 14 other files

such as missions.gsc etc. however, there is a program that is meant to do the reverse of the decompression so i used that and it looked like it all worked fine however when i decompressed my compressed patch it was different to when i decompressed the original patch (even if i didnt add any hacks.. just straight decompress, compress then decompress again) and after playing about i noticed that packzip, the tool for recompressing doesnt compress it in the right way.

Do a simple test, make a clean text file and compress it using packzip. Look at the compressed file in a hex editor to see if the header is the same that zlib uses. If it isn't (78DA), it doesn't use the right compression ratio.

I suggest getting a working copy of simplyzip, as that program has a working zlib packer/unpacker.
07-06-2010, 11:15 AM #23
IW_JOSH
►►►►►
Thanks hugely for that Aule, i haven't tested it but i really appreciate you working on it. That was the sole reason i released those patches was because i needed some help with getting it all working. I'll give your method a go using PC fast files, that way it will tell me if they can be decompressed and compressed correctly as i will be able to test them quite easily on PC.


Just Tested decompressing a few GSC's and it works perfectly! Thanks Aule. Will try compressing them now Smile

The following user thanked IW_JOSH for this useful post:

Aule
07-07-2010, 04:15 PM #24
sensi
Banned
o ffs, i tried simplyzip ages ago but just cut out a section in my patch from the 78 DA header to the next FFFF and simplyzip errored.

didnt realise you had to do the whole thing first :P

gave up on this a few weeks ago now as exhausted all possibilities, but will do this in bit just so im there. Have you even tried putting this back on your ps3?

I managed to encrypt my hdd with an inserted modded patch successfully, mw2 loaded but when clicking multiplayer i just got a black screen.

could this just be me not modded the patch correctly originally or the checksum issue?
07-07-2010, 04:21 PM #25
Aule
{([<Milk>])}
Originally posted by sensi View Post
o ffs, i tried simplyzip ages ago but just cut out a section in my patch from the 78 DA header to the next FFFF and simplyzip errored.

didnt realise you had to do the whole thing first :P

gave up on this a few weeks ago now as exhausted all possibilities, but will do this in bit just so im there. Have you even tried putting this back on your ps3?

I managed to encrypt my hdd with an inserted modded patch successfully, mw2 loaded but when clicking multiplayer i just got a black screen.

could this just be me not modded the patch correctly originally or the checksum issue?

You answered your own question yourself; it's either the modded patch, or the checksum.

I've heard that if you backup the ps3, add the patch to the right .dat archive, and restore the backup, it gives you a verified checksum; I haven't tested it though so I can't confirm.


No I haven't tried putting this back on my ps3; I haven't even tried re-compressing the file completely. Since I have the new updated patch_mp.ff, I'll redo my tutorial with editing and compression sometime this week.
07-09-2010, 09:29 PM #26
sensi
Banned
ok fella, add me to msn if u wanna work through so stuff i have a week off work Happy

MSN: [email][email protected][/email]
07-10-2010, 06:06 AM #27
Aule
{([<Milk>])}
Originally posted by sensi View Post
ok fella, add me to msn if u wanna work through so stuff i have a week off work Happy

MSN: [email][email protected][/email]


Bad timing, I'm going out of town tomorrow! I'll be gone until the 18th. :n: Going to see my bro for his bday. Winky Winky
07-10-2010, 07:14 AM #28
DARNY
Big Boy
This is so useless at least tell the ppl how to get the patch_mp.ff file or explain how to decompress the.pkg
That would be useful

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo