Log in

View Full Version : Converting ppf to text to patch 1st_read manually


Soldiaz
27-02-2004, 15:27
is there a way to see whats inside a ppf and wich string is replaced.

I am sure this would be very useful cause most patches are made for an iso. But if you do not have the "original" iso then the patch does not work properly.

Megalexxx
28-02-2004, 01:29
It very easy to get something like :
_ position of bytes to change
_ number of bytes to change
_ new value

But if you don't know where were the byte in the original iso, it won't help you that much...

Soldiaz
28-02-2004, 02:43
mmh thats true. I thought bout it as i read a post from you how to remove the rgb protection from gauntlet legends. Because any time i download a patch and i am trying to apply it, the program says "wrong filesize" and so on. Maybe you post some more hex codes :-) ...

Megalexxx
29-02-2004, 01:18
Just for information :

1. The PPF 2.0 Header:

@START_PPF20HEADER
.----------+--------+---------------------------------------------.
| POSITION | SIZE | E X P L A N A T I O N |
+----------|--------|---------------------------------------------+
| 00-04 | 05 | PPF-Magic: "PPF20" |
+----------|--------|---------------------------------------------+
| 05 | 01 | Encoding Method: |
| | | - If $00 then it is a PPF 1.0 Patch |
| | | - If $01 then it is a PPF 2.0 Patch |
+----------|--------|---------------------------------------------+
| 06-55 | 50 | Patch Description |
+----------|--------|---------------------------------------------+
| 56-59 | 04 | Size of the file (e.g. CDRWin binfile) this |
| | | patch was made of. Used for Identification |
+----------|--------|---------------------------------------------+
| 60-1083 | 1024 | this is a binary block of 1024 byte taken |
| | | from position $9320 of the file (e.g. CDRWin|
| | | binfile) this patch was made of. Used for |
| | | identification. |
+----------|--------|---------------------------------------------+
| 1084-X | XX | The Patch itself.. see below for structure! |
'----------+--------+---------------------------------------------'
@END_PPF20HEADER - TOTAL HEADER-SIZE = 1084 BYTE.


2. The PPF 2.0 Patch Itself (Encoding Method #1)

@START_PPF20PATCH
FORMAT : xxxx,y,zzzz

xxxx = 4 byte file offset.

y = Number of bytes that will be changed.

zzzz = New data to be written ('y' number of bytes).

Example
~~~~~~~

Starting from File Offset 0x0015F9D0 replace 3 bytes with 01,02,03
D0 F9 15 00 03 01 02 03

Be careful! watch the endian format!!! If you own an Amiga and want
to do a PPF2-Patcher for Amiga don't forget to swap the endian-format
of the OFFSET to avoid seek errors!

@END_PPF20PATCH


3. The PPF 2.0 Fileid area

@START_FILEID

The fileid area is used to store additional patch information of
the PPF 2.0 file. I implemented this following the AMIGA standard
of adding a fileid to e.g. .txt files. You can add a FILE_ID to a
PPF 2.0 patch by using the tool 'PPFdiz.exe' or "PPF-O-MATIC2"
included in this package. You dont have to add a FILE_ID to your
PPF 2.0 patch. It only for your pleasure! :)

For developers: a file_id area begins with @BEGIN_FILE_ID.DIZ and
ends with @END_FILE_ID.DIZ (Amiga BBS standard).
Between @BEGIN_FILE_ID.DIZ and @END_FILE_ID.DIZ you will find
the File_Id and followed after @END_FILE_ID.DIZ you will find an
Integer (4 byte long) with the length of the FILE_ID.DIZ!

A File_ID.diz file cannot be greater than 3072 Bytes.

If you do a PPF 2.0 Applier be sure to check for an existing FILE
ID AREA, because it is located after the PATCH DATA!

@END_FILEID