PS4 [Research]PS2 emulator configuration on PS4

Fix for The Simpsons Hit and Run NTSC

cli
Code:
--gs-optimize-30fps=1
--gs-motion-factor=25
--ee-cycle-scalar=3.6
--iop-cycle-scalar=3.6
--ee-regalloc-scalar=RW
--gs-progressive=1

lua
Code:
-- The Simpsons - Hit & Run (NTSC-U)<use kinetica v2 emu>
-- Widescreen hack by ElHecht

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

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

-- 16:9 ver
eeObj.WriteMem32(0x00138a88,0x00000000) -- 10400005
eeObj.WriteMem32(0x0014b360,0x00000000) -- 10400004
eeObj.WriteMem32(0x0014b364,0x00000000) -- 10400004
eeObj.WriteMem32(0x002a0b38,0x00000000) -- 10400004
eeObj.WriteMem32(0x0031c888,0x00000000) -- 10400004
eeObj.WriteMem32(0x0031d674,0x00000000) -- 10400004
end

emuObj.AddVsyncHook(patcher)

emulator used=Kinetica v2



SLES_518.97.lua // PAL-M4 (English, French, German, Spanish)

Code:
-- The Simpsons - Hit & Run (PAL-M4)<use kinetica v2 emu>
-- Widescreen hack by ElHecht

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

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

-- 16:9 ver
eeObj.WriteMem32(0x00138ab8,0x00000000) -- 10400005
eeObj.WriteMem32(0x0014b3a8,0x00000000) -- 10400004
eeObj.WriteMem32(0x0014c3ac,0x00000000) -- 10400004
eeObj.WriteMem32(0x001b0dcc,0x24020006) -- 0040182d (Load language selection menu)
eeObj.WriteMem32(0x002a1f88,0x00000000) -- 10400004
eeObj.WriteMem32(0x0031e0b8,0x00000000) -- 10400004
eeObj.WriteMem32(0x0031eea4,0x00000000) -- 10400004
end

emuObj.AddVsyncHook(patcher)

This is for the PAL version of the game.

Can someone explain why
Code:
eeObj.WriteMem32(0x001b0dcc,0x24020006) -- 0040182d (Load language selection menu)
won't work outside the patcher function?

So thanks again @Stayhye.
 
Updated fix for Soul Calibur 3

cli
Code:
--vif1-instant-xfer=0
--ee-cycle-scalar=1.4
--iop-cycle-scalar=2.1
--vu1-mpg-cycles=190
--framelimiter=1
--framelimit-fps=60.0
--framelimit-scalar=2
--host-vsync=60

Near flawless gameplay and video. All characters render correctly. No more slowdown.

JakX v2 used.


This config (+ previous lua) crashes for me, when entering the arena.
So the emu really is JakX v2 (13.924.042 Bytes)?
Do you use the "default" clamping settings in your configs?

Code:
--fpu-no-clamping=0
--fpu-clamp-results=1
--vu0-no-clamping=0
--vu0-clamp-results=1
--vu1-no-clamping=0
--vu1-clamp-results=1
--cop2-no-clamping=0
--cop2-clamp-results=1
 
won't work outside the patcher function?
There is no point of trigger. "patcher" make it active every vsync. You can also hook some address to patch it there.
Maybe

if 1 then
eeObj.WriteMem32(0x001b0dcc,0x24020006) -- 0040182d (Load language selection menu)
end

will work, but i don't think.
 
It is completely different from PCSX2, a lot of flickering polygonal images interfere, I tried many commands to fix it, but to no avail!
pcsx2_nofix.jpg

PCSX2 use 6 auto gamefixes to make it look ok. Image is with turned them off. If that polygonal issues you mention are mostly white, and red like on image, then you can test this patch. But only if that's the same issue, otherwise there is no even need to test it.

Code:
apiRequest(1.0)
-- Musashi Samurai Legend (SLUS-20983)
eeInsnReplace(0x001473b0, 0x8e240060, 0x3c04000f)
 
View attachment 31236
PCSX2 use 6 auto gamefixes to make it look ok. Image is with turned them off. If that polygonal issues you mention are mostly white, and red like on image, then you can test this patch. But only if that's the same issue, otherwise there is no even need to test it.

Code:
apiRequest(1.0)
-- Musashi Samurai Legend (SLUS-20983)
eeInsnReplace(0x001473b0, 0x8e240060, 0x3c04000f)
I tested it some time ago, and I also saw that you posted it on PS3, no changes! It only has polygon failure and it is white, and there is no red image failure. In the initial battle of the game, the frame rate will drop and the audio will be slightly stuck!
 
Last edited:
I tested it some time ago, and I also saw that you posted it on PS3
I created that patch yesterday ;) Previous patch most likely resulted in crash since ps4 emu don't handle tlb misses.

It only has polygon failure and it is white, and there is no red image failure.
That patch should also fix white SPS. But only if it work :P

In the initial battle of the game, the frame rate will drop and the audio will be slightly stuck!
Well that one is for sure different issue.
 
There is no point of trigger. "patcher" make it active every vsync. You can also hook some address to patch it there.
Maybe

if 1 then
eeObj.WriteMem32(0x001b0dcc,0x24020006) -- 0040182d (Load language selection menu)
end

will work, but i don't think.

So it seems that everything after the vsync function call will be ignored. This was my first attempt:
Code:
...
local patcher = function()
-- 16:9 ver
...
...
eeObj.WriteMem32(0x0031eea4,0x00000000) -- 10400004
end

emuObj.AddVsyncHook(patcher)
eeObj.WriteMem32(0x001b0dcc,0x24020006) -- 0040182d (Load language selection menu) //not working here
 
So it seems that everything after the vsync function call will be ignored. This was my first attempt:
Code:
...
local patcher = function()
-- 16:9 ver
...
...
eeObj.WriteMem32(0x0031eea4,0x00000000) -- 10400004
end

emuObj.AddVsyncHook(patcher)
eeObj.WriteMem32(0x001b0dcc,0x24020006) -- 0040182d (Load language selection menu) //not working here
Yeah because from code point of view there is nothing to do as WriteMem32 need to know when to trigger itself.
That why i found emuObj.AddVsyncHook, and that why later Jabu added that to PS2FPKG ;)
You can use
eeInsnReplace(0x001b0dcc, 0x<original code from game>, 0x24020006)

But that require finding original code for every game. Doing vsynch patch is just easier sometime.
 
I created that patch yesterday ;) Previous patch most likely resulted in crash since ps4 emu don't handle tlb misses.
Yes, I see that your patch is to port the configuration on PS3. The configuration of PCSX2 will make the game crash after reading the progress. This is the Japanese version I transplanted. If you don't trust me, you can ask others to test the US version. The situation is the same as I said above.
Code:
apiRequest(0.1)

eeInsnReplace(0x147C38, 0x8E240060, 0x3C04000F)
 
Yeah because from code point of view there is nothing to do as WriteMem32 need to know when to trigger itself.
That why i found emuObj.AddVsyncHook, and that why later Jabu added that to PS2FPKG ;)
You can use
eeInsnReplace(0x001b0dcc, 0x<original code from game>, 0x24020006)

But that require finding original code for every game. Doing vsynch patch is just easier sometime.

Ahh...okay.
Will try eeInsnReplace() next time for these type of patches. For the original code part - I guess ps2dis should help with that. ;-)
Thanks @kozarovv
 
For the original code part - I guess ps2dis should help with that. ;-)
Yup. But keep in mind that some patches change range that is not in elf, or data that is in elf but is changed after some time. Those patches still need our ugly vsync hook method.

;)
 
Fix for Urban Reign NTSC

cli
Code:
--vif-ignore-invalid-cmd=0
--vif1-ignore-cmd-ints=1
--vif1-instant-xfer=0
--vu1=jit-sync
--mtap1=always

lua
Code:
-- Urban Reign NTSC (SLUS-21209)

apiRequest(2.3)

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

local widescreen = function()
--emuObj.PadSetLightBar(0,210,151,62)
emuObj.SetDisplayAspectWide()
--emuObj.EnableImposeMenu(true)
gsObj.SetDeinterlaceShift(0)
--emuObj.SetFormattedCard("custom_formatted.card")

end

emuObj.AddVsyncHook(widescreen)

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

emuObj.SetGsTitleFix( "globalSet",  "reserved", { workLoadThreshold = 100000} )

Thanks!
2 player not working please fix it
 
W.I.P. Fix for Grand Theft Auto: Vice City Stories

*Edit - New better fix added here https://www.psx-place.com/threads/r...nfiguration-on-ps4.16131/page-103#post-313421
cli
Code:
--gs-uprender=none
--gs-upscale=none
--ee-cycle-scalar=3.58
--iop-cycle-scalar=3.58
--host-audio-latency=2.01

lua
Code:
apiRequest(1.0)

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

local patcher      = function()

--widescreen fix
eeObj.WriteMem32(0x002653d8,0x3c013f9d)
eeObj.WriteMem32(0x002653dc,0x44810000)
eeObj.WriteMem32(0x002653e0,0x46006302)
eeObj.WriteMem32(0x002653e4,0x3c020048)
eeObj.WriteMem32(0x002653e8,0x03e00008)
eeObj.WriteMem32(0x002653ec,0xe44c7484)

eeObj.WriteMem32(0x0037add4,0x0c0994f6)
eeObj.WriteMem32(0x003b9d14,0x0c0994f9)
eeObj.WriteMem32(0x003ba1b0,0x0c0994f9)
 
end

emuObj.AddVsyncHook(patcher)

emu=Jakx v2

game still suffers from slowdown in heavy traffic/intense action areas. Please modify and experiment with it to see if you can make better or run the same with upscale.
 
Last edited:
This config (+ previous lua) crashes for me, when entering the arena.
So the emu really is JakX v2 (13.924.042 Bytes)?
Do you use the "default" clamping settings in your configs?

Code:
--fpu-no-clamping=0
--fpu-clamp-results=1
--vu0-no-clamping=0
--vu0-clamp-results=1
--vu1-no-clamping=0
--vu1-clamp-results=1
--cop2-no-clamping=0
--cop2-clamp-results=1

Got it working using Jak2 v2. Soul Calibur III game has some minor graphical issues (fine horizontal lines) around the character models with this emu/txt/lua combo.

Next I will try Virtua Tennis II + Buffy Chaos Bleeds with "--vif1-instant-xfer=0" configured.
 
Preliminary Fix For Driv3r NTSC

cli
Code:
--iop-cycle-scalar=3.13
--ee-cycle-scalar=3.13
--vu1-mpg-cycles=1490
--vu0-mpg-cycles=1650
--gs-uprender=none
--gs-upscale=edgesmooth

--host-audio-latency=2.54

--framelimiter=1
--framelimit-fps=60.0
--framelimit-scalar=1


--detect-idle-chcr=none  # [none,VIF0,VIF1,GIF,fromIPU,toIPU,etc]
--mfifo-manual-drain=1.4  # [frame_multiplier/float]

Game still has minor slowdown/stutter. Much improved from default settings.


Jakx V2 used
 
Last edited:

Similar threads

Back
Top