PSP-FPKG

PS4 PSP-FPKG v1.0.1 - Play PSP games with the PS-Plus Emulator v1.0.1

I've played with texture replacement a bit more and here are some noteworthy findings:
  • Texture dumping does work as expected on Patapon Remastered (CUSA06171). Just set --host="/data/" and --texsave="host0:texdump". Make sure to create the folder /data/texdump on the PS4 before running the game.
  • After textures are dumped, simply scale them up 4x or 8x and keep the filename unchanged. Create a folder texreplace inside the root of your fpkg and move the replacement textures there. Disable --host and --texsave again and set --texreplace="host0:texreplace". Rebuild the fpkg and install on your PS4.
  • I have successfully done this process with Bust a Move Delux (ULUS-10057). It's one of the few games that run on the old Patapon emulator.
Now for the bad news:
  • Migrating the replacement textures to the much better Echochrome emulator (which this tool uses) does NOT work. Without any texture replacement, the Echochrome emu can run Bust a Move Delux without any issues. Adding the replacement textures generated with Patapon emu crashes the game.
  • The crash occurs because of an Out of Memory error. It seems that the emulator tries to allocate a wrong amount of memory due to an invalid file name of the replacement texture. The same crash also happens when using arbitrary file names.
  • This leads me to believe that something about the identification of textures must have changed between Patapon and Echochrome.
  • Before crashing, the Echochrome emu also fails to locate the file host0:texreplace.pak. This seems to be an archive format for replacement textures which newer versions of PSPHD support. From what I can tell Patapon Remastered (2017) does not support this format yet but Patapon 2 Remastered (2020) does. However, I believe it's unlikely that this missing file is causing the crash because the PNG textures are still being located afterwards.
  • Crash log when using a Patapon emu replacement texture on Echochrome emu:
    Code:
    <118>**** Base Mode ****
    <118>PSPHD Emulator
    <118>[skipped] '/app0/conf/package-ps4.conf': not present.
    <118>[skipped] '/app0/conf/package-ps4.conf': not present.
    <118>[loading] '/app0/revision.conf'
    <118>(PSP)    --git-rev-gamedata=5fbb82a78533ba4a1d7efb59676f762b6862ca05
    <118>
    <118>====== PSPHD   ============================================================
    <118>  Emulator Rev : 1711941cad (master)
    <118>  Gamedata Rev : 5fbb82a785
    <118>  Built on     : 2022-May-05 pkg-shell (20220505--1542)
    <118>  Built by     : BP-TLINDQUI-07/tlindquist
    <118>  Build with   : clang v13.0
    <118>  Build opts   : Master LTO
    <118>  Platform     : PS4
    <118>===========================================================================
    <118>
    <118>[loading] '/app0/config-title.txt'
    <118>(PSP)    --ps4-trophies=0
    <118>(PSP)    --ps5-uds=0
    <118>(PSP)    --trophies=0
    <118>(PSP)    --image=data/USER_L0.IMG
    <118>(PSP)    --antialias=SSAA4x
    <118>(PSP)    --multisaves=true
    <118>(PSP)    --notrophies=true
    <118>(PSP)    --texreplace=host0:texreplace
    <118>(PSP)    --replacementalpha=true
    <118>(PSP)    --replacementfilter=true
    <118>(PSP)    --texswitch=true
    <118>(PSP)    --autoresampler=true
    <118>(PSP)    --texclutmode=filter
    <118>[skipped] '/app0/config-region.txt': not present.
    <118>[skipped] '/app0/.config-local.txt': not present.
    <118>[skipped] '/app0/.config-local-PSPHD.txt': not present.
    
    [...]
    
    <118>(Lua)  Script scripts/ULUS10057_patches.lua not found
    <118>(Lua)  Script scripts/ULUS10057_features.lua not found
    <118>(Lua)  Script tooling/ULUS10057_tooling.lua not found
    <118>(Lua)  Script scripts/ULUS10057_trophies.lua not found
    <118>(GPU)  Using auto-resampler (scale: 4x)
    <118>(PakFile) WARN :  File 'host0:texreplace-4x.pak' does not exist
    <118>(NativeFileSystem)  Loading directory contents of path: /app0/texreplace/
    <118>(TextureCache)  Looking at 1 files found in 'texreplace'...
    <118>sceKernelAllocateDirectMemory('', size=545259520, align=2097152) failed: 0x80020023 (SCE_KERNEL_ERROR_EWOULDBLOCK)
    <118>FAILED REQUIRE(0) Out of Memory (OOM) in DynamicAllocator '', requestSize=545259520
    <118>E:\Em\PeoplesPackageParty\masticore\libpsemu\stable\src\Allocator.cpp(129): DEBUG STOP.
    <118>[Syscore App] App Crash : PID=0x4b, reason=0x4
    <118>[Syscore App] Syscore Event Queue Push : SCE_SYSCORE_EVENT_APP_CRASH
    <118>[Syscore App] Syscore Event Queue Pop : SCE_SYSCORE_EVENT_APP_CRASH
    <118>[SceLncService] AppCrash: pid={0x0000004b} appId={0x60000e0c} appLocalPid={0x10e0c1b0}

I think having a look at the emulator shipped with Patapon 2 Remastered might help. Maybe it already uses the same texture identification as Echochrome and could have texture dumping enabled if we're lucky.

However, I don't have access to this game so I don't think I can do it...
 
I've played with texture replacement a bit more and here are some noteworthy findings:
  • Texture dumping does work as expected on Patapon Remastered (CUSA06171). Just set --host="/data/" and --texsave="host0:texdump". Make sure to create the folder /data/texdump on the PS4 before running the game.
  • After textures are dumped, simply scale them up 4x or 8x and keep the filename unchanged. Create a folder texreplace inside the root of your fpkg and move the replacement textures there. Disable --host and --texsave again and set --texreplace="host0:texreplace". Rebuild the fpkg and install on your PS4.
  • I have successfully done this process with Bust a Move Delux (ULUS-10057). It's one of the few games that run on the old Patapon emulator.
Now for the bad news:
  • Migrating the replacement textures to the much better Echochrome emulator (which this tool uses) does NOT work. Without any texture replacement, the Echochrome emu can run Bust a Move Delux without any issues. Adding the replacement textures generated with Patapon emu crashes the game.
  • The crash occurs because of an Out of Memory error. It seems that the emulator tries to allocate a wrong amount of memory due to an invalid file name of the replacement texture. The same crash also happens when using arbitrary file names.
  • This leads me to believe that something about the identification of textures must have changed between Patapon and Echochrome.
  • Before crashing, the Echochrome emu also fails to locate the file host0:texreplace.pak. This seems to be an archive format for replacement textures which newer versions of PSPHD support. From what I can tell Patapon Remastered (2017) does not support this format yet but Patapon 2 Remastered (2020) does. However, I believe it's unlikely that this missing file is causing the crash because the PNG textures are still being located afterwards.
  • Crash log when using a Patapon emu replacement texture on Echochrome emu:
    Code:
    <118>**** Base Mode ****
    <118>PSPHD Emulator
    <118>[skipped] '/app0/conf/package-ps4.conf': not present.
    <118>[skipped] '/app0/conf/package-ps4.conf': not present.
    <118>[loading] '/app0/revision.conf'
    <118>(PSP)    --git-rev-gamedata=5fbb82a78533ba4a1d7efb59676f762b6862ca05
    <118>
    <118>====== PSPHD   ============================================================
    <118>  Emulator Rev : 1711941cad (master)
    <118>  Gamedata Rev : 5fbb82a785
    <118>  Built on     : 2022-May-05 pkg-shell (20220505--1542)
    <118>  Built by     : BP-TLINDQUI-07/tlindquist
    <118>  Build with   : clang v13.0
    <118>  Build opts   : Master LTO
    <118>  Platform     : PS4
    <118>===========================================================================
    <118>
    <118>[loading] '/app0/config-title.txt'
    <118>(PSP)    --ps4-trophies=0
    <118>(PSP)    --ps5-uds=0
    <118>(PSP)    --trophies=0
    <118>(PSP)    --image=data/USER_L0.IMG
    <118>(PSP)    --antialias=SSAA4x
    <118>(PSP)    --multisaves=true
    <118>(PSP)    --notrophies=true
    <118>(PSP)    --texreplace=host0:texreplace
    <118>(PSP)    --replacementalpha=true
    <118>(PSP)    --replacementfilter=true
    <118>(PSP)    --texswitch=true
    <118>(PSP)    --autoresampler=true
    <118>(PSP)    --texclutmode=filter
    <118>[skipped] '/app0/config-region.txt': not present.
    <118>[skipped] '/app0/.config-local.txt': not present.
    <118>[skipped] '/app0/.config-local-PSPHD.txt': not present.
    
    [...]
    
    <118>(Lua)  Script scripts/ULUS10057_patches.lua not found
    <118>(Lua)  Script scripts/ULUS10057_features.lua not found
    <118>(Lua)  Script tooling/ULUS10057_tooling.lua not found
    <118>(Lua)  Script scripts/ULUS10057_trophies.lua not found
    <118>(GPU)  Using auto-resampler (scale: 4x)
    <118>(PakFile) WARN :  File 'host0:texreplace-4x.pak' does not exist
    <118>(NativeFileSystem)  Loading directory contents of path: /app0/texreplace/
    <118>(TextureCache)  Looking at 1 files found in 'texreplace'...
    <118>sceKernelAllocateDirectMemory('', size=545259520, align=2097152) failed: 0x80020023 (SCE_KERNEL_ERROR_EWOULDBLOCK)
    <118>FAILED REQUIRE(0) Out of Memory (OOM) in DynamicAllocator '', requestSize=545259520
    <118>E:\Em\PeoplesPackageParty\masticore\libpsemu\stable\src\Allocator.cpp(129): DEBUG STOP.
    <118>[Syscore App] App Crash : PID=0x4b, reason=0x4
    <118>[Syscore App] Syscore Event Queue Push : SCE_SYSCORE_EVENT_APP_CRASH
    <118>[Syscore App] Syscore Event Queue Pop : SCE_SYSCORE_EVENT_APP_CRASH
    <118>[SceLncService] AppCrash: pid={0x0000004b} appId={0x60000e0c} appLocalPid={0x10e0c1b0}

I think having a look at the emulator shipped with Patapon 2 Remastered might help. Maybe it already uses the same texture identification as Echochrome and could have texture dumping enabled if we're lucky.

However, I don't have access to this game so I don't think I can do it...

I have patapon 2 remastered dumped(from PS5). Does not work as fpkg
 
I have patapon 2 remastered dumped(from PS5). Does not work as fpkg
Oh well, that's unfortunate. I guess then we're out of luck for now.
I also tested LocoRoco Midnight Carnival's emulator. Same issue there, and asset dumping is also disabled.


One thing I noticed in the log message <118>(PSP) Package: disabling --texsave, --texmissingsave, --dumpvideos, --dumpaudio is the leading word "Package". It seems kinda odd and could refer to the execution environment of the emulator. Furthermore, if you skim through the eboot.bin you can find this string: "Add --texswitch to config for realtime switching (Neighborhood and Windows only)".

Both of these messages lead me to believe that the emulator might detect if it is being executed from a pkg, and in that case disable asset dumping and texswitch dynamically. By that I mean the functionality may still be included in the build and could just be disabled by a condition at runtime.
I assume if somebody were to run the emulator through Neighborhood on their PS4 TestKit those features would be functional.
 
I've finally figured it out!

Anybody who might be interested in texture dumping and replacement on the new PS Plus PSPHD emulator, keep an eye on this forum. I will make a thread after I find time to write a proper tutorial (in the coming days).
 
I've played with texture replacement a bit more and here are some noteworthy findings:
  • Texture dumping does work as expected on Patapon Remastered (CUSA06171). Just set --host="/data/" and --texsave="host0:texdump". Make sure to create the folder /data/texdump on the PS4 before running the game.
  • After textures are dumped, simply scale them up 4x or 8x and keep the filename unchanged. Create a folder texreplace inside the root of your fpkg and move the replacement textures there. Disable --host and --texsave again and set --texreplace="host0:texreplace". Rebuild the fpkg and install on your PS4.
  • I have successfully done this process with Bust a Move Delux (ULUS-10057). It's one of the few games that run on the old Patapon emulator.
Now for the bad news:
  • Migrating the replacement textures to the much better Echochrome emulator (which this tool uses) does NOT work. Without any texture replacement, the Echochrome emu can run Bust a Move Delux without any issues. Adding the replacement textures generated with Patapon emu crashes the game.
  • The crash occurs because of an Out of Memory error. It seems that the emulator tries to allocate a wrong amount of memory due to an invalid file name of the replacement texture. The same crash also happens when using arbitrary file names.
  • This leads me to believe that something about the identification of textures must have changed between Patapon and Echochrome.
  • Before crashing, the Echochrome emu also fails to locate the file host0:texreplace.pak. This seems to be an archive format for replacement textures which newer versions of PSPHD support. From what I can tell Patapon Remastered (2017) does not support this format yet but Patapon 2 Remastered (2020) does. However, I believe it's unlikely that this missing file is causing the crash because the PNG textures are still being located afterwards.
  • Crash log when using a Patapon emu replacement texture on Echochrome emu:
    Code:
    <118>**** Base Mode ****
    <118>PSPHD Emulator
    <118>[skipped] '/app0/conf/package-ps4.conf': not present.
    <118>[skipped] '/app0/conf/package-ps4.conf': not present.
    <118>[loading] '/app0/revision.conf'
    <118>(PSP)    --git-rev-gamedata=5fbb82a78533ba4a1d7efb59676f762b6862ca05
    <118>
    <118>====== PSPHD   ============================================================
    <118>  Emulator Rev : 1711941cad (master)
    <118>  Gamedata Rev : 5fbb82a785
    <118>  Built on     : 2022-May-05 pkg-shell (20220505--1542)
    <118>  Built by     : BP-TLINDQUI-07/tlindquist
    <118>  Build with   : clang v13.0
    <118>  Build opts   : Master LTO
    <118>  Platform     : PS4
    <118>===========================================================================
    <118>
    <118>[loading] '/app0/config-title.txt'
    <118>(PSP)    --ps4-trophies=0
    <118>(PSP)    --ps5-uds=0
    <118>(PSP)    --trophies=0
    <118>(PSP)    --image=data/USER_L0.IMG
    <118>(PSP)    --antialias=SSAA4x
    <118>(PSP)    --multisaves=true
    <118>(PSP)    --notrophies=true
    <118>(PSP)    --texreplace=host0:texreplace
    <118>(PSP)    --replacementalpha=true
    <118>(PSP)    --replacementfilter=true
    <118>(PSP)    --texswitch=true
    <118>(PSP)    --autoresampler=true
    <118>(PSP)    --texclutmode=filter
    <118>[skipped] '/app0/config-region.txt': not present.
    <118>[skipped] '/app0/.config-local.txt': not present.
    <118>[skipped] '/app0/.config-local-PSPHD.txt': not present.
    
    [...]
    
    <118>(Lua)  Script scripts/ULUS10057_patches.lua not found
    <118>(Lua)  Script scripts/ULUS10057_features.lua not found
    <118>(Lua)  Script tooling/ULUS10057_tooling.lua not found
    <118>(Lua)  Script scripts/ULUS10057_trophies.lua not found
    <118>(GPU)  Using auto-resampler (scale: 4x)
    <118>(PakFile) WARN :  File 'host0:texreplace-4x.pak' does not exist
    <118>(NativeFileSystem)  Loading directory contents of path: /app0/texreplace/
    <118>(TextureCache)  Looking at 1 files found in 'texreplace'...
    <118>sceKernelAllocateDirectMemory('', size=545259520, align=2097152) failed: 0x80020023 (SCE_KERNEL_ERROR_EWOULDBLOCK)
    <118>FAILED REQUIRE(0) Out of Memory (OOM) in DynamicAllocator '', requestSize=545259520
    <118>E:\Em\PeoplesPackageParty\masticore\libpsemu\stable\src\Allocator.cpp(129): DEBUG STOP.
    <118>[Syscore App] App Crash : PID=0x4b, reason=0x4
    <118>[Syscore App] Syscore Event Queue Push : SCE_SYSCORE_EVENT_APP_CRASH
    <118>[Syscore App] Syscore Event Queue Pop : SCE_SYSCORE_EVENT_APP_CRASH
    <118>[SceLncService] AppCrash: pid={0x0000004b} appId={0x60000e0c} appLocalPid={0x10e0c1b0}

I think having a look at the emulator shipped with Patapon 2 Remastered might help. Maybe it already uses the same texture identification as Echochrome and could have texture dumping enabled if we're lucky.

However, I don't have access to this game so I don't think I can do it...

hi @mexxpower help please!

I have LocoRoco Midnight Carnival's emulator. from PS4

fille "image0/texreplace"
I used Texture Pack a GTA: Chinatown War.

Screenshot_2.png


add --texreplace="host0:texreplace" Does not work fpkg. Just crashes for me
Code:
Usage:
--texreplace="host0:texreplace"

Screenshot_1.png
 
hi @mexxpower help please!

I have LocoRoco Midnight Carnival's emulator. from PS4

fille "image0/texreplace"
I used Texture Pack a GTA: Chinatown War.

View attachment 39101

add --texreplace="host0:texreplace" Does not work fpkg. Just crashes for me
Code:
Usage:
--texreplace="host0:texreplace"

View attachment 39100

I've just posted my tutorial on texture dumping an replacement.

I also used GTA: Chinatown Wars as a test game, so it should definitively work for you!
 
For future reference: If you guys have the issue of the fpkg tool crashing upon fpkg creation (Like i did) Just clear your temporary folder
 
@Deso - Do you know the value for PS4debugger to edit memory/patch memory? We could get a lot more games going here as well .
I was not able to locate them as of yet, but assuming I did, we still don't know how to use lua in Echochrome's emulator.
 

Attachments

Last edited:
Last edited:
hello jabu nice app but i still cant make it work i tried it on crisis core and patapon but when I hit create fPKG it show the message [error] format of the project file is not valid. <volume_ts> so what should I do?

I know this is old post but if someone is still having this issue.

Easy fix.
Windows Settings > Time & language > Language & region > Region - Regional format -> Select English (United Kingdom)

Harder way is to check "Pause before creating pkg(debug)" and then copy the temp folder to your desktop.
Create .gp4 with GP4 Generator (gengp4_app.exe)
Select psphd folder
Click GP4 and edit <volume_ts> 00.00.00 to 00:00:00
Save GP4 file
Open Fake PKG Generator (orbis-pub-gen.exe) and build the pkg file manually
 
God Of War - Ghost Of Sparta

UCUS98737

Black screen fixed, but the game still needs more work until it's playable.

The lua can be added here:

scripts\UCUS98737_patches.lua

LUA:
Code:
local axObj = getAXObject()
local emuObj = getEmuObject()

local patcher = function()

axObj.WriteMem32(0x08A15210,0x24020000)
end

emuObj.AddVsyncHook(patcher)

config-title.txt
Code:
--antialias=off
--forcenobilinear=true
#godofwarhack fixes freeze
--godofwarhack=true
 
Last edited:
God Of War - Ghost Of Sparta

UCUS98737

fixed, but the game still need more work until it's playable.

The lua can be added here:

scripts\UCUS98737_patches.lua

LUA:
Code:
local axObj = getAXObject()
local emuObj = getEmuObject()

local patcher = function()

axObj.WriteMem32(0x08A15210,0x24020000)
end

emuObj.AddVsyncHook(patcher)

config-title.txt
Code:
--antialias=off
--forcenobilinear=true
#godofwarhack fixes freeze
--godofwarhack=true

Nice config!

You fixed Freezer/Black screen?

Requesting:

- Fieldrunners (Black Screen)
- naruto impact (Black Screen)
- Diner Dash (Freezer logo)
 
God Of War - Ghost Of Sparta

UCUS98737

Black screen fixed, but the game still needs more work until it's playable.

The lua can be added here:

scripts\UCUS98737_patches.lua

LUA:
Code:
local axObj = getAXObject()
local emuObj = getEmuObject()

local patcher = function()

axObj.WriteMem32(0x08A15210,0x24020000)
end

emuObj.AddVsyncHook(patcher)

config-title.txt
Code:
--antialias=off
--forcenobilinear=true
#godofwarhack fixes freeze
--godofwarhack=true

Small test!
VIDEO
 
Back
Top