News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: .  (Read 3904 times)

creeperton

  • Hero Member
  • *****
  • Posts: 604
    • View Profile
.
« on: March 07, 2012, 04:28:14 pm »
.
« Last Edit: November 16, 2015, 01:05:30 am by creeperton »

Romsstar

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: PPF file specifications
« Reply #1 on: March 07, 2012, 06:21:40 pm »
Um, why don't you make two ISOS,
create a PPF file from it with makePPF and open the created PPF with a Hexeditor and see for yourself?

Learning by doing is still the best way.

Also:
There is the full distribution of the PPF Tools at the Utilities Site,
source included:

http://www.romhacking.net/utilities/353/

Check out the source of makeppf and you will understand the process of creating PPF Files, if that is what you want.

FAST6191

  • Hero Member
  • *****
  • Posts: 3013
    • View Profile
Re: PPF file specifications
« Reply #2 on: March 07, 2012, 06:48:51 pm »
I am not 100% on this but I believe there are a couple of minor variations of PPF (it is why I was a bit reluctant to head down this path when IPS became unviable and instead looked at xdelta or bsdiff but that is a different discussion).

Also if it is your intention to create one I should note most better patching methods allow data to be relocated and not have it appear as a change where you simple have a few byte changes but unless I misread it that is not where you are heading with this.

creeperton

  • Hero Member
  • *****
  • Posts: 604
    • View Profile
.
« Reply #3 on: March 07, 2012, 06:58:50 pm »
.
« Last Edit: November 16, 2015, 01:04:57 am by creeperton »

Romsstar

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: PPF file specifications
« Reply #4 on: March 07, 2012, 07:10:54 pm »
But that's my point, the developer included a text file in the utitilies folder called:

 PLAYSTATION PATCH FILE VERSION 3.0 FILE-STRUCTURE FOR DEVELOPERS|

1. The PPF 3.0 Header:

@START_PPF30HEADER
.----------+--------+----------------------------------------------.
| POSITION |  SIZE  |              E X P L A N A T I O N           |
+----------|--------|----------------------------------------------+
| 00-04    |   05   | PPF-Magic: "PPF30"                           |
+----------|--------|----------------------------------------------+
| 05       |   01   | Encoding Method:                             |
|          |        | - 0x00 = is a PPF 1.0 Patch                  |
|          |        | - 0x01 = is a PPF 2.0 Patch                  |
|          |        | - 0x02 = is a PPF 3.0 Patch                  |
+----------|--------|----------------------------------------------+
| 06-55    |   50   | Patch Description                            |
+----------|--------|----------------------------------------------+
| 56       |   01   | Imagetype:                                   |
|          |        | - 0x00 = BIN (any)                           |
|          |        | - 0x01 = GI (PrimoDVD)                       |
+----------|--------|----------------------------------------------+
| 57       |   01   | Blockcheck/Patchvalidation:                  |
|          |        | - 0x00 = Disabled                            |
|          |        | - 0x01 = Enabled                             |
|          |        | If disabled applyppf won't validate the patch|
|          |        | also the 1024 byte block won't be available. |
+----------|--------|----------------------------------------------+
| 58       |   01   | Undo data:                                   |
|          |        | - 0x00 = Not available                       |
|          |        | - 0x01 = Available                           |
|          |        | If available applyppf will be able to        |
|          |        | restore a previous patched bin to back to its|
|          |        | original state. Patchsize increases of course|
+----------|--------|----------------------------------------------+
| 59       |   01   | Dummy:                                       |
|          |        | Not used.                                    |
+----------|--------|----------------------------------------------+
| 60-1083  | 1024   | Binary block:                                |
|          |        | It is used for patchvalidation.              |
|          |        | If Imagetype = 0x00 then its data starting   |
|          |        | from 0x9320.                                 |
|          |        | If Imagetype = 0x01 then its data starting   |
|          |        | from 0x80A0.                                 |
|          |        | If Blockcheck = 0x00 then this block won't be|
|          |        | available.                                   |
+----------|--------|----------------------------------------------+
| 1084-X   |   XX   | The Patch itself.. see below for structure!  |
'----------+--------+----------------------------------------------'
@END_PPF30HEADER - TOTAL HEADER-SIZE = 1084 BYTE with validation and
                                         60 BYTE without validation.

And it goes on, don't want to spam the whole file but I'm pretty sure everything you need is included in that file.


EDIT: Read the PPF3.txt in the ppfdev folder, it contains the whole structure provided with examples

creeperton

  • Hero Member
  • *****
  • Posts: 604
    • View Profile
.
« Reply #5 on: March 07, 2012, 07:15:30 pm »
.
« Last Edit: November 16, 2015, 01:04:00 am by creeperton »