
        PPF         : Playstation Patch File Version 1.0
	
 Recoded for PSX by : Icarus/Paradox

 Based on APS by    : Silo (silo@blackbag.org)
		      Fractal (fractal@blackbag.org)	


What is PPF?
============

This little tool is dedicated to all Playstation coders out there, who
do trainers, ntsc/pal-fixes and cracks. With the PPF tools you can make
patchfiles similar to IPS on SuperNES. There is NO need to do own .EXE
files, which apply patches to the ISO-Images, anymore - let PPF do this for
you!

Why PPF?
========

Many groups who do ntsc/pal-fixes or even trainers just include a PC .EXE
file in the release which apply the patch.. BUT there is one big problem:
Many dudes who maybe uses Linux, AmigaOS MacOS etc.. are not able to apply
this patches even if they want to. But now all dudes can use the PPF-Tools,
the patchfiles are NO executable files.. Everyone with an PPF-Applier is able
to apply the patches - I have included the C-Sourcecode in this archive to
go sure that everyone can compile the PPF-Applier and PPF-Creator for his
platform.. - JUST THINK OF ALL THE USERS WHO DONT RUN WINDOWS/DOS!

How to use?
===========

MAKEPPF.EXE:
~~~~~~~~~~~~

MakePPF <options> <Original File> <Modified File> <Output PPF File>
 -d "<Image Title>" : Description
 -q                 : Quiet Mode

If you do a Patch for any Playstation ISO just store the ORIGINAL ISO somewhere
before you begin! Then do you changes on the ISO etcetc..

After that you have now: The Original ISO and the Patched ISO file on your HDD.
To create a PPF file now do the following:

MAKEPPF OrigISO.BIN PatchISO.BIN PATCH.PPF

Now MakePPF will search for differences between the two ISO files and will store
the results in PATCH.PPF... now you can delete the ISO files :-) .. there you go!

If you want to include a description in your PPF file use the option "-d" this
would look like this:

MAKEPPF -d "+10 Trainer for Mortal Kombat 3" OrigISO.BIN PatchISO.BIN PATCH.PPF

The PPF-Patch will have this (+10 Trainer....) as description now (see below
file structure where you can find this one..)

ApplPPF:
~~~~~~~~

ApplyPPF <options> <Original File> <PPF File>
 -q                 : Quiet Mode

If you want to APPLY a PPF patch to a ISO its VERY EASY.. do the following

APPLYPPF OrigISO.BIN PATCH.PPF

thats it.. the Applierprogramm will do the rest for you..

Easy, eh ?

	
 PPF has been designed with several features as standard.

	o No file limitations.
		PPF facilitate patching of iso-files up to 2Gb.

	o Internal Descriptors.
		A small text field allowing PPF authors to describe precisely 
		what the patch does.

	o Future expansion through different patch types and encoding methods.
	



Detailed File Structure
~~~~~~~~~~~~~~~~~~~~~~~

Standard Header
~~~~~~~~~~~~~~~
	BYTE 0-4        : Magic ("PPF10")

	BYTE 5          : Encoding Method
                          0 for Simple Encoding (Similar to IPS & Defined Below)
                          (Allowing for future expansion)
	
	BYTE 6-55       : Description
                          Space padded free text for patch information.

        BYTE 56         : The PATCH - see below..

The Patch Itself
~~~~~~~~~~~~~~~~
Encoding Method #0. (offset 0x5 within the standard header)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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).

If paramter 'y' is set to zero (0) then paramter 'z' will be a two (2)
byte field. Byte zero (0) will be the data and byte one (1) will be the 
number of repetitions.


Examples
~~~~~~~~

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

Starting from File Offset 0x0015F9D0 replace 0x10 bytes with 0xFF
D0 F9 15 00 00 FF 10


 
