Skip to content

Commit

Permalink
v1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-free committed May 7, 2024
1 parent e6f611f commit 401f51d
Show file tree
Hide file tree
Showing 42 changed files with 2,169 additions and 37 deletions.
25 changes: 25 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## Version 1.0.6 (4/23/2024)

Changes:

* Implemented [smaller less intrusive patches](https://github.com/alex-free/libcrypt-patcher/issues/5) for Les Cochons de Guerre (France) Rev 0 and Rev 1, (thanks to [@Littlemouse1968](https://github.com/Littlemouse1968)).

* Added support for [Formula One 99 (Europe) (En,Fr,De,It) (Beta 9/9/1999)](http://redump.org/disc/64499/), [Space Debris (Germany) (Beta 11/11/1999)](http://redump.org/disc/85814/), and [LMA Manager 2001 (Europe) (Beta 02/26/2001)](http://redump.org/disc/92303/),
(thanks to [@Littlemouse1968](https://github.com/Littlemouse1968)).

----------------------------------------------------

* [libcrypt-patcher-v1.0.6-windows-i686-static.zip](https://github.com/alex-free/libcrypt-patcher/releases/download/v1.0.6/libcrypt-patcher-v1.0.6-windows-i686-static.zip) _Portable Release For Windows 95 OSR 2.5 and above, Pentium CPU minimum (32 bit)_

* [libcrypt-patcher-v1.0.6-windows-x86\_64-static.zip](https://github.com/alex-free/libcrypt-patcher/releases/download/v1.0.6/libcrypt-patcher-v1.0.6-windows-x86_64-static.zip) _Portable Release For x86_64 Windows (64 bit)_

* [libcrypt-patcher-v1.0.6-linux-i386-static.zip](https://github.com/alex-free/libcrypt-patcher/releases/download/v1.0.6/libcrypt-patcher-v1.0.6-linux-i386-static.zip) _Portable Release For Linux 3.2.0 and above, 386 CPU minimum (32 bit)_

* [libcrypt-patcher-v1.0.6-linux-i386-static.deb](https://github.com/alex-free/libcrypt-patcher/releases/download/v1.0.6/libcrypt-patcher-v1.0.6-linux-i386-static.deb) _Deb package file For Linux 3.2.0 and above, 386 CPU minimum (32 bit)_

* [libcrypt-patcher-v1.0.6-linux-x86\_64-static.zip](https://github.com/alex-free/libcrypt-patcher/releases/download/v1.0.6/libcrypt-patcher-v1.0.6-linux-x86_64-static.zip) _Portable Release For x86\_64 Linux 3.2.0 and above (64 bit)_

* [libcrypt-patcher-v1.0.6-linux-x86\_64-static.deb](https://github.com/alex-free/libcrypt-patcher/releases/download/v1.0.6/libcrypt-patcher-v1.0.6-linux-x86_64-static.deb) _Deb package file for x86_64 Linux 3.2.0 and above (64 bit)_

---------------------------------------

## Version 1.0.5 (4/22/2024)

Changes:
Expand Down
2 changes: 1 addition & 1 deletion control-i386
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: libcrypt-patcher
Version: 1.0.6
Version: 1.0.7
Maintainer: Alex Free
Architecture: i386
Homepage: https://alex-free.github.io/libcrypt-patcher
Expand Down
2 changes: 1 addition & 1 deletion control-x86_64
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: libcrypt-patcher
Version: 1.0.6
Version: 1.0.7
Maintainer: Alex Free
Architecture: amd64
Homepage: https://alex-free.github.io/libcrypt-patcher
Expand Down
4 changes: 4 additions & 0 deletions genh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ for f in *.PPF; do
# change XXXX_XXX.XX to XXXX_XXX_XX
header=$(echo "$base" | sed 's/\(.\{8\}\)./\1_/')
echo -e "\telse if((strcmp(bootfile, \""$base"\") == 0))\n\t{\n\t\tapply_ppf("$header"_PPF, "$header"_PPF_len, bin);\n\t}\n" >> ../template-code.txt

count=$((count+1))
done

echo "Generated $count headers"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/duckstation-execution-mode-interpreter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions lcp.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "applyppf3_linux.c"
#include "libppf.c"
#include <stdio.h>
#include <stdbool.h>
#include "patches.h"
Expand All @@ -16,7 +16,7 @@ const unsigned char SCES[] = {
};

const unsigned char SLES[] = {
0x53, 0x4C, 0x45, 0x53, 0x5F // SLES_
0x53, 0x4C, 0x45, 0x53 // SLES (We do not check for underscore because the August 19th 1999 Protoype Formula 1 '99 bootfile name line in SYSTEM.CNF is BOOT = cdrom:\SLES1979.02;1)
};

#if defined WIN32 // system("pause"); sucks we can do better
Expand Down Expand Up @@ -120,7 +120,7 @@ int main (int argc, const char * argv[])
}

match_SLES = true;
for(int i=0; i < 5; i++)
for(int i=0; i < 4; i++)
{
if((SLES[i] != sectors[s + i]))
{
Expand Down Expand Up @@ -376,7 +376,7 @@ int main (int argc, const char * argv[])
apply_ppf(SCES_021_85_PPF, SCES_021_85_PPF_len, bin);
}

// Formula One 99 (Europe) (En, Es, Fi)
// Formula One 99 (Europe) (En,Es,Fi)
else if((strcmp(bootfile, "SCES_022.22") == 0))
{
apply_ppf(SCES_022_22_PPF, SCES_022_22_PPF_len, bin);
Expand Down Expand Up @@ -540,6 +540,12 @@ int main (int argc, const char * argv[])
}
}

// Formula One 99 (Europe) (En,Fr,De,It) (Protoype 8/12/1999)
else if((strcmp(bootfile, "SLES1979.02") == 0))
{
apply_ppf(SLES1979_02_PROTOTYPE_PPF, SLES1979_02_PROTOTYPE_PPF_len, bin);
}

// Prince Naseem Boxing (Europe) (En,Fr,De,Es,It)
else if((strcmp(bootfile, "SLES_000.17") == 0))
{
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions patches.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
#include "ppf-c/SLES_129.67.PPF.h"
#include "ppf-c/SLES_129.68.PPF.h"
#include "ppf-c/SLES_129.69.PPF.h"
#include "ppf-c/SLES1979.02_PROTOTYPE.PPF.h"
#include "ppf-c/SLES_220.80.PPF.h"
#include "ppf-c/SLES_220.81.PPF.h"
#include "ppf-c/SLES_220.84.PPF.h"
Expand Down
10 changes: 10 additions & 0 deletions pdx-ppf3/contents.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Contents the PPF3.0 FULL Distribution:

- ApplyPPF3 sourcecodes.
- MakePPF3 sourcecodes.

- ApplyPPF3 console tools (Linux, Win32, MAC OS-X)
- MakePPF3 console tools (Linux, Win32, MAC OS-X)

- GUI Version of ApplyPPF3 (PPF-O-MATIC v3.0)
For Windows 9x, NT, 2K, XP and for MAC OS-X.
7 changes: 7 additions & 0 deletions pdx-ppf3/file_id.diz
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
________/\________ /\_____ ________ ____
\_____ \ \_____ \/ \___ \/ \ | /
/ ___/| \| / / | \ | \ | \ /
Mb/ | _ \ \ \ _ \ \ / \
/ |___| \_|\__\_| \___/___/___| \
/_____|---|____\------|____\-PRESENTS-|____\
PPF3.0 FULL DISTRIBUTION [SRC/WIN/LINUX/MAC]
60 changes: 60 additions & 0 deletions pdx-ppf3/ppfbin/applyppf/applyppf3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ApplyPPF v3.0 documentation by Icarus/Paradox
---------------------------------------------

What is ApplyPPF ?
------------------

ApplyPPF is part of the commandline distribution of the PPF3.0 tools and
is used to apply PPF files to binfiles. ApplyPPF3 can handle PPF1.0,
PPF2.0 and PPF3.0 patches. It will recognize them automatically so you
don't have to worry about this. It can also be used to undo a PPF3.0
patch. (Only if undo-data is available of course).

How to use ApplyPPF ?
---------------------

It is (still) very simple to apply a PPF2.0 patch to a binfile. Here is a
commandline example to patch a binfile called "game.bin"

ApplyPPF3.exe a game.bin patch.ppf

Command "a" is used for applying a patch.
If you want to undo a PPF3.0 patch in case undo data is included type the
following:

ApplyPPF3.exe u game.bin patch.ppf

Command "u" is used for undo patch.


Warnings
--------

If a bin can't be verified the following warning may occour:

1. "The size of the bin file isn't correct, continue ? (y/n): "
- This warning should not be taken too seriously as the filesize check
isn't really reliable. One more reason for me not to include this one
in PPF3.0 anymore. This caused alot more trouble than helped to verify.

2. "Binblock/Patchvalidation failed. continue ? (y/n): "
- This warning *IS* actually very accurate and i suggest if you see this
cancel for once and check everything (PPF & BIN) once again.

3. "Error: no undo data available"
- If you see this errormessage you probably wanted to undo a PPF3.0 patch.
This message is self explaining. There is NO chance to undo the patch if
the patch creator did not include undo data.


Final words
-----------

You can find precompiled ApplyPPF versions for you favorite OS as they are:
Win32, Linux (Redhat) and MAX OS-X.

Reference:

- Win32 version was compiled on a PC using Visual C++ by Microsoft Corp.
- Linux version was compiled on Redhat linux 7.0 using gcc.
- Mac version was compiled on and for MAC OS-X.
Binary file added pdx-ppf3/ppfbin/applyppf/linux-redhat/applyppf3
Binary file not shown.
Binary file added pdx-ppf3/ppfbin/applyppf/mac_os-x/ApplyPPF
Binary file not shown.
Binary file added pdx-ppf3/ppfbin/applyppf/w32/ApplyPPF3.exe
Binary file not shown.
Binary file added pdx-ppf3/ppfbin/makeppf/linux-redhat/makeppf3
Binary file not shown.
Binary file added pdx-ppf3/ppfbin/makeppf/mac_os-x/MakePPF3
Binary file not shown.
124 changes: 124 additions & 0 deletions pdx-ppf3/ppfbin/makeppf/makeppf3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
MakePPF v3.0 documentation by Icarus/Paradox
--------------------------------------------

What is MakePPF ?
-----------------

MakePPF is used to create PPF3.0 patches (ONLY). You can also add a file_id
to you patch or see information about a specific PPF patch.

How to use MakePPF ?
---------------------

Usage of this tool is very simple. To be able to explain a little bit more
detailed i'll post the commandline output:

Usage: PPF <command> [-<sw> [-<sw>...]] <original bin> <modified bin> <ppf>
<Commands>
c : create PPF3.0 patch a : add file_id.diz
s : show patchinfomation
<Switches>
-u : include undo data (default=off)
-x : disable patchvalidation (default=off)
-i [0/1] : imagetype, 0 = BIN, 1 = GI (default=bin)
-d "text" : use "text" as description
-f "file" : add "file" as file_id.diz

IF you want to create a PPF3.0 patch which looks nearly like a PPF2.0 patch you
just have to enter:

MakePPF3.exe c original.bin patched.bin patch.ppf

But also you can mix the command "c" with switches which are described as
following:

-u -> includes undo data within your patch. Of course the PPF will grow nearly
twice as big in size. On the other hand users can undo your patch (for
any reason) later using applyppf.
Example:
MakePPF3.exe c -u original.bin patched.bin patch.ppf

-x -> if you specify this switch the blockcheck/patchvalidation will be DISABLED.
This is interesting if you might want to distribute e.g. a Dreamcast or
XBox or whatever patch and want to go sure that PPF wont validate a maybe
wrong area of the binfile because it is different to a CDRWin/GI image. If
you really ever use this switch i think you're know what I am talking about.
Example:
MakePPF3.exe c -x original.bin patched.bin patch.ppf

-i -> This switch expects a value which should be specified right after the
switch separated by a space. This value can be either 0 or 1. If you
specify:

"-i 0" MakePPF supposes that the image is a CDRWin BIN PSX/PS2 image. (Like
PPF2.0, thats why it is set on DEFAULT).
"-i 1" If you choose imagetype 1 MakePPF supposes that the binfile is a GI
(PrimoDVD) image.

Imagetype is used for the blockcheck so if you specify "-x" , switch -i
will be obsolete because no matter what you choose as imagetype, the
validationblock won't be included.
Examples:
MakePPF3.exe c -i 0 original.bin patched.bin patch.ppf
MakePPF3.exe c -i 1 original.bin patched.bin patch.ppf

-d -> Using this switch you can specify a patch description which will be shown
when a user is applying your patch later. Please put your description in
quotes as well as you should seperate it by a space after the switch.
Example:
MakePPF3.exe c -d "My Elite Patch" original.bin patched.bin patch.ppf

-f -> This switch offers to add a file_id.diz to your patch in one go. You have
to specify the file after the switch which should be added. Also seperated
by a space. Please note, that a file_id.diz cannot exceed 3072 byte
(file_ids which do, will be truncated).
Example:
MakePPF3.exe c -f "myfile_id.diz" original.bin patched.bin patch.ppf

Of course you can mix all these switches together. Example:

MakePPF3.exe c -f "file_id" -d "Cool Patch" -x -u orig.bin patched.bin patch.ppf

Also MakePPF offers two other commands: "a" and "s". Command "a" is used to add a
file_id to an existing PPF3.0 patch. Simple commandline example:

MakePPF3.exe a patch.ppf file_id.diz

Command "s" shows diverse patchinformation. Just enter:
MakePPF3.exe s patch.ppf

Here an example output generated by this command:
MakePPF3.exe s pdx-tst.ppf
F:\PPF3\ppfbin\makeppf\w32>makeppf3 s pdx-tst.ppf
MakePPF v3.0 by =Icarus/Paradox= 15 November 2001
Showing patchinfo...
Version : PPF3.0
Enc.Method : 2
Imagetype : BIN
Validation : Enabled
Undo Data : Available
Description : Paradox Test Patch [PS2/PPF3]
File.id_diz : Available
________/\________ /\_____ ________ ____
\_____ \ \_____ \/ \___ \/ \ | /
/ ___/| \| / / | \ | \ | \ /
Mb/ | _ \ \ \ _ \ \ / \
/ |___| \_|\__\_| \___/___/___| \
/_____|---|____\------|____\-PRESENTS-|____\
PPF3.0 TESTPATCH!
Done.

Very easy i guess.


Final words
-----------

You can find precompiled MakePPF versions for you favorite OS as they are:
Win32, Linux and MAC OS-X.

Reference:

- Win32 version was compiled on a PC using Visual C++ by Microsoft Corp.
- Linux version was compiled on Redhat linux 7.0 using gcc.
- Mac version was compiled on and for MAC OS-X.
Binary file added pdx-ppf3/ppfbin/makeppf/w32/MakePPF3.exe
Binary file not shown.

0 comments on commit 401f51d

Please sign in to comment.