PS4 [Research]PS2 emulator configuration on PS4

I'm going to test this with making patches for ps2 games. This may be a game changer for me! Speed up the process


*Edit - This works great! No more building 100+ patch pkg files to test. Edit configs over NFS share, No need to build pkg until game fix is complete!

*Edit2 - Works in tandem with PS4debugger.
 
Last edited:
I'm going to test this with making patches for ps2 games. This may be a game changer for me! Speed up the process


*Edit - This works great! No more building 100+ patch pkg files to test. Edit configs over NFS share, No need to build pkg until game fix is complete!

*Edit2 - Works in tandem with PS4debugger.
IIRC Emulators with encrypted eboots such as JAK X and JAK 3 and PARAPPA will not work with it.

but yes, finally we get this feature to speed up testing the proper configuration :D
 
IIRC Emulators with encrypted eboots such as JAK X and JAK 3 and PARAPPA will not work with it.

but yes, finally we get this feature to speed up testing the proper configuration :D

You can decrypt any eboot by running and dumping from sandbox in FTP. What do you mean?
 
Ultimate Spider-Man™ Limited Edition® NTSC

Code:
--FMV freeze fix(PS4)
eeObj.WriteMem32(0x0057dc7c,0x0) -- 0x5440fffa >> bnel v0, zero, $0057dc68
--causes crash
--eeObj.WriteMem32(0x0057dc7c,0x5000fffa) -- 0x5440fffa >> bnel v0, zero, $0057dc68

Fixes freezes on FMVs.

pros - no longer need to skip FMVs
cons - FMVs eventually get out of sync with audio by about 1.5 seconds..

Big thanks to @Deso for teaching me how to use the PS4debugger to find these addresses
 
Last edited:
X-Men™ Legends® NTSC

CLI
Code:
--gs-uprender=2x2
--gs-upscale=motionvector
--gs-optimize-30fps=1
--cdvd-sector-read-cycles=2000
--vu-custom-min-max=0
--vu1-di-bits=0
--vu0-di-bits=0
--vu1-opt-vf00=2
--vu0-opt-vf00=2
--vu1-injection=1
--vu1=jit-sync
--vu1-jr-cache-policy=newprog
--vu1-jalr-cache-policy=newprog
--vu0-jr-cache-policy=newprog
--vu0-jalr-cache-policy=newprog


--ee-cycle-scalar=1.5
LUA
Code:
-- X-Men™ Legends®
-- ported to PS4 Lua by Stayhye
-- emu used=jakx v2

apiRequest(2.2)

local gpr       = require("ee-gpr-alias")
local emuObj      = getEmuObject()
local eeObj       = getEEObject()
local gsObj       = getGsObject()
local eeOverlay    = eeObj.getOverlayObject()
local iopObj  = getIOPObject()
 

emuObj.PadSetLightBar(0, 10,50,145)
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(0)

local WS = function()
--eeObj.WriteMem32(0x005cc888,0x3c023f34)
eeObj.WriteMem32(0x20720920,0x3FE147AE)  --In-game width widescreen 16:9
eeObj.WriteMem32(0x2072094c,0x3F000000)  --Fonts Width
eeObj.WriteMem32(0x20720950,0x3F000000)  --Fonts Height
eeObj.WriteMem32(0x20720958,0x3F8CCCCD)  --HUD & Menu Height
--eeObj.WriteMem32(0x20720954,0x3FA00000)  --HUD & Menu Width
eeObj.WriteMem32(0x20D85448,0x3F666666)  --HUD Height
eeObj.WriteMem32(0x20D85430,0x3F59999A)  --HUD Width

eeObj.Vu1MpgCycles(3450)
emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(WS)

emuObj.SetGsTitleFix( "globalSet",  "reserved", { workLoadThreshold = 100000} )
emuObj.SetGsTitleFix( "globalSet",  "reserved", { waveThreshold = 90000} )
emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } )

X-Men™ Legends II - Rise of the Apocalypse® NTSC

CLI
Code:
--gs-uprender=2x2
--gs-upscale=motionvector
--gs-optimize-30fps=1
--vu0-di-bits=0
--vu1-di-bits=0

--vu1=jit-sync

--vu1-mpg-cycles=5430
--gs-kernel-cl="h2lpool"
--gs-kernel-cl-up="h2lpool2x2"
--gs-flush-ad-xyz=safeZwrite

--ee-cycle-scalar=1.11

--vu0-no-clamping=0
--vu1-no-clamping=0
--cop2-no-clamping=0

--vu1-jr-cache-policy=newprog
--vu0-jr-cache-policy=newprog
LUA
Code:
-- X-Men™ Legends II - Rise of the Apocalypse®
-- ported to PS4 Lua by Stayhye

apiRequest(2.2)

local gpr       = require("ee-gpr-alias")
local emuObj      = getEmuObject()
local eeObj       = getEEObject()
local gsObj       = getGsObject()
local eeOverlay    = eeObj.getOverlayObject()
local iopObj  = getIOPObject()
 

emuObj.PadSetLightBar(0, 15,100,255)
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(0)

local WS = function()
--Widescreen hack 16:9
eeObj.WriteMem32(0x00270984,0x3c033f40) --3c033f80
eeObj.WriteMem32(0x0027099c,0x460318c3) --00000000
eeObj.WriteMem32(0x008985d0,0x3F199999) --fonts

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(WS)

emuObj.SetGsTitleFix( "globalSet",  "reserved", { workLoadThreshold = 100000} )
emuObj.SetGsTitleFix( "globalSet",  "reserved", { waveThreshold = 90000} )
emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } )

Vast improvement over previous fixes(framerate, loading, etc)
 
Last edited:
Crusty Demons PAL

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth
--gs-use-clut-merge=1
--gs-kernel-cl="clutmerge"
--gs-kernel-cl-up="clutmerge2x2"
--host-display-mode=16:9


--vu1-no-clamping=0
--vu0-no-clamping=0
LUA
Code:
-- Crusty Demons PAL
-- freeze fix by Stayhye
--

apiRequest(0.1)

local gpr       = require("ee-gpr-alias")

local emuObj      = getEmuObject()
local eeObj       = getEEObject()

local patches = function()
--2nd freeze fix
eeObj.WriteMem32(0x006afd9c,0x1400fffa) -- 0x1440fffa >> bne v0, zero, $006afd88
--1st freeze fix
eeObj.WriteMem32(0x0076656c,0x1400ffec) -- 0x1440ffec >> bne v0, zero, $00766520

--emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patches)

No issues so far. Tested a little
 
Last edited:
Timesplitters™ Future Perfect® NTSC
CLI
Code:
--gs-uprender=2x2
--gs-upscale=edgesmooth
--gs-progressive=1
--host-display-mode=16:9
--cdvd-sector-read-cycles=2000
--vu1-mpg-cycles=3000    #<--Important
--vu1=jit-sync           #<--Important
--vif1-instant-xfer=0    #<--Important
--mtap1=always

#emu used=jakx v2
LUA
Code:
-- Timesplitters™ Future Perfect®
-- gfx shimmer fix
-- needs better fix for graphics
-- ported to PS4
-- emu used=jakx v2

apiRequest(2.3)

local gpr       = require("ee-gpr-alias")

local emuObj      = getEmuObject()
local eeObj       = getEEObject()
local gsObj       = getGsObject()

emuObj.PadSetLightBar(0, 45, 70, 200)
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(1)
emuObj.SetDeinterlace(true)

local TS3 = function()
--Unlock All Levels, Characters, Cheats by MadCatz
eeObj.WriteMem32(0x20306A38,0x200EFFFF)
eeObj.WriteMem32(0x20306A3C,0xADEE0BF4)
eeObj.WriteMem32(0x203067A8,0x200EFFFF)
eeObj.WriteMem32(0x203067AC,0xADEE0BFC)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(TS3)

emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=1 } )
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2 } )

Almost perfect. Slight issue with uprender.
 
Last edited:
Wallace & Gromit in Project Zoo (SLUS-20647)

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth
--gs-progressive=1
--gs-force-bilinear=1
--cdvd-sector-read-cycles=2000
--force-frame-blend=1
--vif1-instant-xfer=0
--vu0-di-bits=0
--vu1-di-bits=0
--vu1-mpg-cycles=800

--ee-cycle-scalar=1.5
LUA
Code:
-- Wallace & Gromit in Project Zoo (U)(SLUS-20647)
-- Widescreen hack by Arapapa
-- 60fps by Asasega
-- emu used=kof98um

local gpr = require("ee-gpr-alias")

apiRequest(0.1)

local eeObj = getEEObject()
local emuObj = getEmuObject()

-- psm= SCE_GS_PSMCT32 (0)
emuObj.SetGsTitleFix( "forceSimpleFetch",  "reserved", {psm=0} )
emuObj.SetGsTitleFix( "fetchFromCurrBuff", "reserved", {psm=0} )

emuObj.SetDeinterlace(true)
emuObj.SetDisplayAspectWide()

local patcher = function()
--Widescreen hack 16:9
eeObj.WriteMem32(0x00235f20,0x3c014080) --0x3c014040

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

--PS3 freeze skip(Not used on PS4)
--eeInsnReplace(0x003e9db8, 0x0c0fb8aa, 0x00000000)
--60 fps (crashes emu as WriteMem)
eeInsnReplace(0x00861E80,0x00000000,0x3C888889)

Wallace & Gromit - The Curse of the Were-Rabbit (SLUS-021312)

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth
--gs-progressive=1

--cdvd-sector-read-cycles=2000
--force-frame-blend=1

--vu0-di-bits=0
--vu1-di-bits=0
--vu1-mpg-cycles=1500

--ee-cycle-scalar=0.9
LUA
Code:
-- Wallace & Gromit - The Curse of the Were-Rabbit (U)(SLUS-021312)
-- Widescreen hack by Arapapa
-- ported to ps4 lua by Stayhye
-- emu used=kof98um

local gpr = require("ee-gpr-alias")

apiRequest(1.0)

local eeObj = getEEObject()
local emuObj = getEmuObject()

emuObj.SetDeinterlace(true)
emuObj.SetDisplayAspectWide()


--Zoom
eeInsnReplace(0x0011a4f4,0x3c013f00,0x3c013f1d) 
--Y-Fov
eeInsnReplace(0x0011a598,0x3c014040,0x3c014080) 


local patcher = function()
--60 fps
--eeObj.WriteMem32(0x204349BC,0x00000000)

--emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)
 
TimeSplitters. Short GamePlay!
VIDEO

FiX

TXT.

Code:
--vu1=jit-sync
--mtap1=always
--ps2-lang=system

LUA.
Code:
-- TimeSplitters (PAL)
-- emu used=

apiRequest(1.0)   

local gpr = require("ee-gpr-alias")

local eeObj = getEEObject()
local emuObj = getEmuObject()

local patcher = function()

--Widescreen hack 16:9
eeObj.WriteMem32(0x0027e754,0x3c014340)
eeObj.WriteMem32(0x0027e758,0x44810000)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)
 
WIP fix for Fire Pro Wrestling Z™® (English v0.5b)

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--host-display-mode=16:9
--cdvd-sector-read-cycles=2000
LUA
Code:
-- Fire Pro Wrestling Z™® (English v0.5b)
-- boot fix
-- needs graphics fix
-- emu used=aofa

local gpr = require("ee-gpr-alias")

apiRequest(0.1)

local eeObj  = getEEObject()
local emuObj  = getEmuObject()

local patcher = function()
-- black screen after spike logo fix
eeObj.WriteMem32(0x001eaa14,0x0) --0x1440fffa >> bne v0, zero, $001eaa00
-- black screen after spike logo fix(same as 0x0)
--eeObj.WriteMem32(0x001eaa14,0x1400fffa) --0x1440fffa >> bne v0, zero, $001eaa00

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)


All the way in game, but graphics are missing on most stages. It's like fighting on a black background on some stages
 
Last edited:
WIP fix for Fire Pro Wrestling Z™® (English v0.5b)

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--host-display-mode=16:9
--cdvd-sector-read-cycles=2000
LUA
Code:
-- Fire Pro Wrestling Z™® (English v0.5b)
-- boot fix
-- needs graphics fix
-- emu used=aofa

local gpr = require("ee-gpr-alias")

apiRequest(0.1)

local eeObj  = getEEObject()
local emuObj  = getEmuObject()

local patcher = function()
-- black screen after spike logo fix
eeObj.WriteMem32(0x001eaa14,0x0) --0x1440fffa >> bne v0, zero, $001eaa00
-- black screen after spike logo fix(same as 0x0)
--eeObj.WriteMem32(0x001eaa14,0x1400fffa) --0x1440fffa >> bne v0, zero, $001eaa00

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

All the way in game, but graphics are missing on most stages. It's like fighting on a black background on some stages
Try vif1-instant-xfer on that game.
 
Gunslinger Girl Trilogy NTSC(J)

Code:
-- Gunslinger Girl Volume.I
-- NTSC-J Widescreen Hack by synce
-- ported to PS4
-- emu used=swrr v1

apiRequest(0.4)

local eeObj = getEEObject()
local emuObj = getEmuObject()

local patcher = function()
--Widescreen Hack by synce (widescreen archive)
eeObj.WriteMem32(0x202DB230,0x3F400000)
--skip awful long loading screen
eeObj.WriteMem32(0x0010142c,0x0) -- 0x1440fffa >> bne v0, zero, $00101418


emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)
Code:
-- Gunslinger Girl Volume.II
-- NTSC-J Widescreen Hack by synce
-- ported to PS4
-- emu used=

apiRequest(0.4)

local eeObj = getEEObject()
local emuObj = getEmuObject()

local patcher = function()
--Widescreen Hack by synce (widescreen archive)
eeObj.WriteMem32(0x202F7B80,0x3F400000)
--skip awful long loading screen
eeObj.WriteMem32(0x0010148c,0x0) -- 0x1440fffa >> bne v0, zero, $00101478

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)
Code:
-- Gunslinger Girl Volume.III
-- NTSC-J Widescreen Hack by synce
-- ported to PS4
-- emu used=swrr v1

apiRequest(0.4)

local eeObj = getEEObject()
local emuObj = getEmuObject()

local patcher = function()
--Widescreen Hack by synce (widescreen archive)
eeObj.WriteMem32(0x20318100,0x3F400000)
--skip awful long loading screen
eeObj.WriteMem32(0x0010148c,0x0)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

Codes skip the extremely long loading screen on all 3 games.

Marvel™ Ultimate Alliance 1 & 2 NTSC

CLI
Code:
--gs-uprender=2x2
--gs-upscale=motionvector
--cdvd-sector-read-cycles=2000
--gs-kernel-cl="h2lpool"
--gs-kernel-cl-up="h2lpool2x2"
--gs-optimize-30fps=1
--fpu-rsqrt-fast-estimate=0
--vu-custom-min-max=0
--vu1-di-bits=0
--vu0-di-bits=0
--vu1-opt-vf00=2
--vu0-opt-vf00=2
--vu1-injection=1
--vu1=jit-sync

--vu1-mpg-cycles=4800

--ee-cycle-scalar=0.8
 
--vu1-jr-cache-policy=newprog
LUA
Code:
-- Marvel™ Ultimate Alliance
-- ported to PS4 Lua by Stayhye

apiRequest(2.2)

local gpr       = require("ee-gpr-alias")
local emuObj      = getEmuObject()
local eeObj       = getEEObject()
local gsObj       = getGsObject()
local eeOverlay    = eeObj.getOverlayObject()
local iopObj  = getIOPObject()

emuObj.PadSetLightBar(0, 12,76,180)
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(0)

local WS = function()

eeObj.WriteMem32(0x00979ac8,0x3fe6db6e)
eeObj.WriteMem32(0x00979acc,0x3FE38E32)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(WS)


emuObj.SetGsTitleFix( "globalSet",  "reserved", { workLoadThreshold = 100000} )
emuObj.SetGsTitleFix( "globalSet",  "reserved", { waveThreshold = 90000} )
emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } )
CLI
Code:
--gs-uprender=2x2
--gs-upscale=motionvector
--cdvd-sector-read-cycles=2000
--gs-kernel-cl="h2lpool"
--gs-kernel-cl-up="h2lpool2x2"
--gs-adaptive-frameskip=1
--gs-optimize-30fps=1
--fpu-rsqrt-fast-estimate=0
--vu-custom-min-max=0
--vu1-di-bits=0
--vu0-di-bits=0
--vu1-opt-vf00=2
--vu0-opt-vf00=2
--vu1-injection=1
--vu1=jit-sync

--vu1-mpg-cycles=4800

--ee-cycle-scalar=0.8
 
--vu1-jr-cache-policy=newprog
LUA
Code:
-- Marvel™ Ultimate Alliance 2®
-- Widescreen
-- ported to PS4 Lua by Stayhye

apiRequest(2.2)

local gpr       = require("ee-gpr-alias")
local emuObj      = getEmuObject()
local eeObj       = getEEObject()
local gsObj       = getGsObject()
local eeOverlay    = eeObj.getOverlayObject()
local iopObj  = getIOPObject()
 
emuObj.PadSetLightBar(0, 5,75,200)
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(0)

local WS = function()
--16:9
eeObj.WriteMem32(0x008314e4,0x3fe6db6e)
eeObj.WriteMem32(0x008314e8,0x3FE38E32)
eeObj.WriteMem32(0x00831518,0x3F299999) --fonts

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(WS)

emuObj.SetGsTitleFix( "globalSet",  "reserved", { workLoadThreshold = 100000} )
emuObj.SetGsTitleFix( "globalSet",  "reserved", { waveThreshold = 90000} )
emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } )

Works great! Framerate, loading improvement.

Multiloader 1.33 (Homebrew app/menu)

CLI
Code:
--ee-ignore-segfault=read
#emu used=kof98um
h.jpg

Allows app to boot. Eliminates crash. App is used as menu in a lot of Homebrew compilations. This may work for other homebrews that crash after ps2 logo. Still testing...
 
Last edited:
Thnanks for your supports. Thanks for patches games :))
Anyone for Kya dark lineage? It´s a great platform adventure game was suffer slowdown fps .S
Thank anyway !! :D
 
GUN PS2toPS4 Test

Looks like crash from ship mission is gone!
Just need remove MTVU from lua!

and add
Code:
--vu1=jit-sync         
--vif1-instant-xfer=0
--ee-cycle-scalar=2.4         
--iop-cycle-scalar=2.4

in txt!

Also i use easter egg in game and load various random missions from list! Work also good!
For easter egg need 100% complite game save! I attach it! In video u can see how easter egg will work!

Gun Crash FiX + Easter Egg!
VIDEO

Thanks to @Kugozx and @Bergolino Gamer for tips!!!
 

Attachments

Magix Music Maker Deluxe NTSC

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--ee-cycle-scalar=2.0
--ee-ignore-segfault=read
--vu1-mpg-cycles=5000
--vif1-instant-xfer=0
--vu1=jit-sync
--force-frame-blend=1
LUA
Code:
-- Magix Music Maker Deluxe NTSC
-- Boot fix by Stayhye
-- Tools: PS4 Debugger/NFS Share used
-- emu used=kof98um

local gpr = require("ee-gpr-alias")

apiRequest(1.0)

local eeObj = getEEObject()
local emuObj = getEmuObject()

emuObj.SetDeinterlace(true)
emuObj.SetDisplayAspectWide()
--freeze fix A(splash screen)
eeInsnReplace(0x002009a4,0x1440fffa,0x1400fffa) -- bne v0, zero, $00200990
-- freeze fix C interface freeze when triangle is pressed to go back
eeInsnReplace(0x00226c1c,0x1440fffa,0x1400fffa) -- bne v0, zero, $00226c08

local patcher = function()
--freeze fix B(after FMV)
eeObj.WriteMem32(0x0044ce40,0x0) -- 0x00000000

--emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

Magix Music Maker NTSC

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--ee-cycle-scalar=2.0
--ee-ignore-segfault=read
--vu1-mpg-cycles=5000
--vif1-instant-xfer=0
--vu1=jit-sync
--force-frame-blend=1

No issues noticed. Tested a little.
 
Last edited:

Similar threads

Back
Top