hippie68 / ftpdump

Bash script that dumps PS4 games via FTP connection over the network. For best dumping performance, please use this FTP payload: https://github.com/hippie68/ps4-ftp.
52 stars 9 forks source link

Patched Kingdom Come Deliverance (1.20) shows no patch #20

Closed megatron-uk closed 1 year ago

megatron-uk commented 2 years ago

I have installed my Kingdom Come Deliverance (Special Edition, not Royal Edition) CUSA07180 from disc, patched it to the latest version compatible with my firmware 9.00 (it is listed as game update 1.20) and run ftpdump.

It pulls the keystone file and the base game, but does not detect any patch content.

If I process the dumped game and create an fpkg to play disc-less (gengp4_app + orbis_pub_gen), it shows up as the base game version from the disc (i.e. not the patched version) and runs as expected.

Output of the ftpdump command is:

$ ftpdump -p --debug
DEBUG: Bash version "5.0.17(1)-release" detected.
DEBUG: Found sfo in "/home/m/bin/sfo".
DEBUG: GNU dd detected - using GNU-specific dd options.
DEBUG: Using current directory as output directory.
DEBUG: Options: option_app=, option_patch=1, option_dlc=, dump_keystone=, dump_sflash=, dump_appdb=, dump_path=, dump_title_id=, option_no_decrypt=, debug=1, debug_pfs=, curl_options=, curl_verbose=, wget_options=, wget_verbose=, pfs_extraction_enabled=, sfo_path=/home/m/bin/sfo
DEBUG: Using FTP server "ftp://192.168.1.103:2121".
DEBUG: Checking FTP connection ...
DEBUG: GoldHEN 2.x FTP server detected.
DEBUG: Enabling server-side SELF decryption ...
DEBUG: This FTP server always decrypts.
DEBUG: Checking if patch data exists.
No patch data found for CUSA07180.
Done.

What is interesting, is if I use the --list option, then the KCD update patch does seem to be detected:

$ ftpdump --list --patch
Title ID    Type    Location   DB   PKG  Title
...
CUSA07180   Patch   internal   OK   OK   Kingdom Come: Deliverance
...
hippie68 commented 2 years ago

It could help to use an FTP client and list the contents of the directory /mnt/sandbox/pfsmnt while the patched game is running.

megatron-uk commented 2 years ago

Whilst running, KCD shows the following from the ftp server:

ftp> ls -l
200 PORT command successful!
150 Opening ASCII mode data transfer for LIST.
drwsrwsrws 1 ps4 ps4 120 Apr 18 09:01 .
drwsrws--S 1 ps4 ps4 560 Apr 18 09:01 ..
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 CUSA07180-app0-nest
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 CUSA07180-app0
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 CUSA07180-app0-patch0-union
226 Transfer complete.
ftp> 

The contents of the patch-union folder is:

ftp> cd CUSA07180-app0-patch0-union
250 Requested file action okay, completed.
ftp> ls -l
200 PORT command successful!
150 Opening ASCII mode data transfer for LIST.
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 .
drwsrwsrws 1 ps4 ps4 120 Apr 18 09:01 ..
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 bin
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 data
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 engine
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 localization
dr-sr-sr-s 1 ps4 ps4 65536 Apr 23 2018 sce_module
dr-sr-s--S 1 ps4 ps4 65536 Apr 23 2018 sce_sys
-r-xr-xr-x 1 ps4 ps4 60 Apr 23 2018 databuildversions.txt
-r-xr-xr-x 1 ps4 ps4 80996504 Apr 23 2018 eboot.bin
-r-xr-xr-x 1 ps4 ps4 104 Apr 23 2018 orbis_language.cfg
-r-xr-xr-x 1 ps4 ps4 3288792 Apr 23 2018 sce_discmap.plt
-r-xr-xr-x 1 ps4 ps4 4250 Apr 23 2018 system.cfg
-r-xr-xr-x 1 ps4 ps4 23 Apr 23 2018 version.txt
-r-xr-xr-x 1 ps4 ps4 458 Apr 23 2018 whdlversions.txt
226 Transfer complete.

The version.txt file contents is:

ver_01_09_320011_2654

... and that corresponds to the 1.20 update which is installed:

kcd

I think the version.txt file uses the internal engine build number which keeps parity with the version numbers released on the PC... whereas the update version uses the Playstation update numbering scheme, so hence they don't match.

hippie68 commented 2 years ago

Perhaps the patch remasters the app, and this is related to issue #11. I have no such games, so I can't test if they are dumped correctly. The correct result should be an app dump that is merged with the patch, with its version number set to 1.00, while the true version is supposed to be found in the SFO parameter "VERSION". There would be no way to dump the patch separately.

hippie68 commented 1 year ago

Confirmed that update 1.20 is a remaster patch. It seems the game was dumped successfully with the patch merged into the base game.