PS4 [Research]PS2 emulator configuration on PS4

The blue "textures" of death :hopelessness: I love Scarface, but this just ruins it for me. First I thought it's a mipmapping problem, but I guess I checked every possible config concerning mipmap. Still nothing. We need this game on PS4...
also pity becouse it work really good on ps3! i watch my own video now and see that graphics
flicker not in all city! in some parts of city graphics is fine. If you ride on bridge for example it have no graphics problems
 
it runs so smooth despite the graphical glitches.
About that codes it worked pretty nice, but im still have some lags. Its because your ps4 is pro version?
can u tell what config u use before my fix? stayhue ones or some urs?
I not play that game long time, but im not use boost mode when i test
 
also pity becouse it work really good on ps3! i watch my own video now and see that graphics
flicker not in all city! in some parts of city graphics is fine. If you ride on bridge for example it have no graphics problems
In the beginning you can see through walls and there are other strange glitches. It's a shame but it's really unplayable like that.
 
can u tell what config u use before my fix? stayhue ones or some urs?
I not play that game long time, but im not use boost mode when i test
Im using a default one. The only thing that i changed in the config is the gp upscale and gp uprender to the value "none". All the work goes for the lua file and the ps3 config i think.
For now im tryng codes to the config file to improve the speed. Are there codes for overclock?
 
Yes, is more easy to me. I add the cli codes to the config txt and is the same, right?
--gs-uprender=2x2
--gs-upscale=edgesmooth
--gs-use-clut-merge=1
--gs-kernel-cl="clutmerge"
--gs-kernel-cl-up="clutmerge2x2"

--vu0=trans
--vu1-mpg-cycles=500
--vu1-di-bits=0

--vu1-jr-cache-policy=newprog

--iop-cycle-scalar=2.0
--ee-cycle-scalar=1.5

#--vu0-no-clamping=0
#--vu0-clamp-range=0x130,0x140
#--vu0-accurate-addsub-range=0x130,0x16a

#--vu0-mul0fix-range=0x010,0x03f

-- Scarface NTSC SLUS-21111
-- emu used=jakx v2

apiRequest(2.3)

local gpr = require("ee-gpr-alias")
local cpr = require("ee-cpr0-alias")
local hwaddr = require("ee-hwaddr")

local emuObj = getEmuObject()
local eeObj = getEEObject()
local gsObj = getGsObject()
local eeOverlay = eeObj.getOverlayObject()
local iopObj = getIOPObject()

emuObj.ForceRefreshRate(0)
emuObj.SetFormattedCard("scarface.card")
emuObj.SetDisplayAspectWide(1)
gsObj.SetDeinterlaceShift(1)
local FIX = function()

eeObj.WriteMem32(0x00643790,0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeObj.WriteMem32(0x00643794,0x00000000)
eeObj.WriteMem32(0x0064292c,0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeObj.WriteMem32(0x0050ffa0,0x3c034220)
eeObj.WriteMem32(0x0050ff50,0x3c033f00)

--eeObj.WriteMem32(0x004f8048,0x00000000) -- everything but trees
--eeObj.WriteMem32(0x001b99e0,0x00000000) -- nighht
--eeObj.WriteMem32(0x20DAFABC,0x00000000) --60fps

eeObj.SchedulerDelayEvent("vif1.dma", 0x6500)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(FIX)

emuObj.SetGsTitleFix( "trianglesAsParticles", "reserved", { hasClut=1,zmsk=1 } )

this settings you was add?
 
--gs-uprender=2x2
--gs-upscale=edgesmooth
--gs-use-clut-merge=1
--gs-kernel-cl="clutmerge"
--gs-kernel-cl-up="clutmerge2x2"

--vu0=trans
--vu1-mpg-cycles=500
--vu1-di-bits=0

--vu1-jr-cache-policy=newprog

--iop-cycle-scalar=2.0
--ee-cycle-scalar=1.5

#--vu0-no-clamping=0
#--vu0-clamp-range=0x130,0x140
#--vu0-accurate-addsub-range=0x130,0x16a

#--vu0-mul0fix-range=0x010,0x03f

-- Scarface NTSC SLUS-21111
-- emu used=jakx v2

apiRequest(2.3)

local gpr = require("ee-gpr-alias")
local cpr = require("ee-cpr0-alias")
local hwaddr = require("ee-hwaddr")

local emuObj = getEmuObject()
local eeObj = getEEObject()
local gsObj = getGsObject()
local eeOverlay = eeObj.getOverlayObject()
local iopObj = getIOPObject()

emuObj.ForceRefreshRate(0)
emuObj.SetFormattedCard("scarface.card")
emuObj.SetDisplayAspectWide(1)
gsObj.SetDeinterlaceShift(1)
local FIX = function()

eeObj.WriteMem32(0x00643790,0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeObj.WriteMem32(0x00643794,0x00000000)
eeObj.WriteMem32(0x0064292c,0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeObj.WriteMem32(0x0050ffa0,0x3c034220)
eeObj.WriteMem32(0x0050ff50,0x3c033f00)

--eeObj.WriteMem32(0x004f8048,0x00000000) -- everything but trees
--eeObj.WriteMem32(0x001b99e0,0x00000000) -- nighht
--eeObj.WriteMem32(0x20DAFABC,0x00000000) --60fps

eeObj.SchedulerDelayEvent("vif1.dma", 0x6500)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(FIX)

emuObj.SetGsTitleFix( "trianglesAsParticles", "reserved", { hasClut=1,zmsk=1 } )

this settings you was add?
if you don't have a custom memory card, remove "emuObj.SetFormattedCard("scarface.card")" from LUA. This config only works with Jakx v2 for sure, maybe others. The game seems to hold a better framerate using Star Ocean instead, but LUA config will have to be downgraded.

The "scarface.card" attached has a save at the end, with all you have to do is turn around for the game to glitch.
 

Attachments

Last edited:
if you don't have a custom memory card, remove "emuObj.SetFormattedCard("scarface.card")" from LUA. This config only works with Jakx v2 for sure, maybe others. The game seems to hold a better framerate using Star Ocean instead.
i just want understand what settings use @ImBatman! Becouse he have crash issue too! But i was use lopnor method for make game full speed, and stayhye not use config from ps3 as i see
 
stayhye not use config from ps3 as i see

Code:
eeObj.WriteMem32(0x00643790,0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeObj.WriteMem32(0x00643794,0x00000000)
eeObj.WriteMem32(0x0064292c,0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeObj.WriteMem32(0x0050ffa0,0x3c034220)
eeObj.WriteMem32(0x0050ff50,0x3c033f00)
That is what this is, just translated to PS4 LUA
 
On Scarface...

I 've tried the speed up code in 3 ways:
lopnor
eeInsnReplace
eeObj.WriteMem32
Code:
3D 00 00 00 11 11 00 00 0A 00 00 00 05 00 00 00
90 37 64 00 20 00 81 C4 08 00 E0 03 94 37 64 00
80 3F 03 3C 00 00 00 00 2C 29 64 00 12 00 01 45
12 00 00 10 A0 FF 50 00 20 43 03 3C 20 42 03 3C
50 FF 50 00 80 3F 03 3C 00 3F 03 3C 00 00 00 00
Code:
eeInsnReplace(0x00643790, 0xc4810020, 0x03e00008) -- But it is more aggressive and the pop ins might be more distracting.
eeInsnReplace(0x00643794, 0x3c033f80, 0x00000000)
eeInsnReplace(0x0064292c, 0x45010012, 0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeInsnReplace(0x0050ffa0, 0x3c034320, 0x3c034220)
eeInsnReplace(0x0050ff50, 0x3c033f80, 0x3c033f00)
or
Code:
eeObj.WriteMem32(0x00643790,0x03e00008) -- But it is more aggressive and the pop ins might be more distracting.
eeObj.WriteMem32(0x00643794,0x00000000)
eeObj.WriteMem32(0x0064292c,0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeObj.WriteMem32(0x0050ffa0,0x3c034220)
eeObj.WriteMem32(0x0050ff50,0x3c033f00)

Fact- After correction by @Kugozx , all 3 work exactly the same(at least on the Star Ocean v2 emu)

CLI commands that make no change to glitching
{
Code:
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"

--gs-use-clut-merge=1
--gs-kernel-cl="clutmerge"
--gs-kernel-cl-up="clutmerge2x2"

--gs-vert-precision=8
--gs-kernel-cl="h2lpool"
--gs-kernel-cl-up="h2lpool2x2"
--gs-render-tile-threshold=300000
--vu-custom-min-max=0
--vu1-di-bits=0
--vu0-di-bits=0
--vu1-opt-vf00=2
--vu0-opt-vf00=2
--vu1-injection=1
--assert-path1-ad=0
--ee-ignore-segfault=Read
--vu1-mpg-cycles=400
--vu1-mpg-cycles=850,$000
--vu1-mpg-cycles=475,0xffffffff
--vu0-mpg-cycles=225,0xfc
--cdvd-sector-read-cycles=4000

--fpu-clamp-operands=1
--fpu-rsqrt-fast-estimate=1
--fpu-accurate-mul-fast=1

--cop2-di-bits=1
--threaded-gs=0
--gs-opt-frbuff-switch=1
--gs-ignore-rect-correction=1
--gs-dirty-page-policy=1
--gs-kernel-cl="h2lpool, clutmerge, mipmap, DarkCloud2, fantavision"
--gs-kernel-cl-up="h2lpool2x2, OptRightTri, clutmerge2x2, mipmap2x2, up2x2simple, up2x2skipinterp,  up2x2tc"


--vu-branch-hazard=0
--vu-evil-branches=1
--ee-block-validation=none        #[PageProt,Hash,None]
--ee-regalloc-scalar=RW       #[0,none,ReadOnly,WriteOnly,RW]
--ee-regalloc-simd=ReadOnly           #[0,none,ReadOnly,WriteOnly,RW]
--ee-regalloc-preserve-scalar=LS      #[0,none,LoadOnly,StoreOnly,LS]
--ee-regalloc-preserve-simd=LoadOnly   #[0,none,ReadOnly,WriteOnly,RW]
--ee-const-folding=all
 
Last edited:
On Scarface...

I 've tried the speed up code in 3 ways:
lopnor
eeInsnReplace
eeObj.WriteMem32
Code:
eeInsnReplace(0x00643790, 0xc4810020, 0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeInsnReplace(0x00643794, 0x3c033f80, 0x00000000)
eeInsnReplace(0x0064292c, 0x45010012, 0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeInsnReplace(0x0050ffa0, 0x3c034320, 0x3c034220)
eeInsnReplace(0x0050ff50, 0x3c033f80, 0x3c033f00)
or
Code:
eeObj.WriteMem32(0x00643790,0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeObj.WriteMem32(0x00643794,0x00000000)
eeObj.WriteMem32(0x0064292c,0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeObj.WriteMem32(0x0050ffa0,0x3c034220)
eeObj.WriteMem32(0x0050ff50,0x3c033f00)

Fact- lopnor works the best for some odd reason. The other two formats have very slight micro stutter(at least on the Star Ocean v2 emu)
i was really surprised when i use new config from @mrjaredbeta for ps3 and it have full speed! If he also can help with bugs...
 
@anyone

how would I convert this to eeInsReplace?
Code:
--eeObj.WriteMem32(0x20DAFABC,0x00000000) -- 60fps

I know I have to find the original address, but how would I do that?
 
On Scarface...

I 've tried the speed up code in 3 ways:
lopnor
eeInsnReplace
eeObj.WriteMem32
Code:
3D 00 00 00 11 11 00 00 0A 00 00 00 05 00 00 00
90 37 64 00 20 00 81 C4 08 00 E0 03 94 37 64 00
80 3F 03 3C 00 00 00 00 2C 29 64 00 12 00 01 45
12 00 00 10 A0 FF 50 00 20 43 03 3C 20 42 03 3C
50 FF 50 00 80 3F 03 3C 00 3F 03 3C 00 00 00 00
Code:
eeInsnReplace(0x00643790, 0xc4810020, 0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeInsnReplace(0x00643794, 0x3c033f80, 0x00000000)
eeInsnReplace(0x0064292c, 0x45010012, 0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeInsnReplace(0x0050ffa0, 0x3c034320, 0x3c034220)
eeInsnReplace(0x0050ff50, 0x3c033f80, 0x3c033f00)
or
Code:
eeObj.WriteMem32(0x00643790,0x03e00080) -- But it is more aggressive and the pop ins might be more distracting.
eeObj.WriteMem32(0x00643794,0x00000000)
eeObj.WriteMem32(0x0064292c,0x10000012) -- This patch would affect the smaller objects also (e.g. stillages).
eeObj.WriteMem32(0x0050ffa0,0x3c034220)
eeObj.WriteMem32(0x0050ff50,0x3c033f00)

Fact- lopnor works the best for some odd reason. The other two formats have very slight micro stutter(at least on the Star Ocean v2 emu)

CLI commands that make no change to glitching
{
Code:
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"

--gs-use-clut-merge=1
--gs-kernel-cl="clutmerge"
--gs-kernel-cl-up="clutmerge2x2"

--gs-vert-precision=8
--gs-kernel-cl="h2lpool"
--gs-kernel-cl-up="h2lpool2x2"
--gs-render-tile-threshold=300000
--vu-custom-min-max=0
--vu1-di-bits=0
--vu0-di-bits=0
--vu1-opt-vf00=2
--vu0-opt-vf00=2
--vu1-injection=1
--assert-path1-ad=0
--ee-ignore-segfault=Read
--vu1-mpg-cycles=400
--vu1-mpg-cycles=850,$000
--vu1-mpg-cycles=475,0xffffffff
--vu0-mpg-cycles=225,0xfc
--cdvd-sector-read-cycles=4000

--fpu-clamp-operands=1
--fpu-rsqrt-fast-estimate=1
--fpu-accurate-mul-fast=1

--cop2-di-bits=1
--threaded-gs=0
--gs-opt-frbuff-switch=1
--gs-ignore-rect-correction=1
--gs-dirty-page-policy=1
--gs-kernel-cl="h2lpool, clutmerge, mipmap, DarkCloud2, fantavision"
--gs-kernel-cl-up="h2lpool2x2, OptRightTri, clutmerge2x2, mipmap2x2, up2x2simple, up2x2skipinterp,  up2x2tc"


--vu-branch-hazard=0
--vu-evil-branches=1
--ee-block-validation=none        #[PageProt,Hash,None]
--ee-regalloc-scalar=RW       #[0,none,ReadOnly,WriteOnly,RW]
--ee-regalloc-simd=ReadOnly           #[0,none,ReadOnly,WriteOnly,RW]
--ee-regalloc-preserve-scalar=LS      #[0,none,LoadOnly,StoreOnly,LS]
--ee-regalloc-preserve-simd=LoadOnly   #[0,none,ReadOnly,WriteOnly,RW]
--ee-const-folding=all

I don't know if it helps, but it seems to me that this replacement is wrong:

08 00 E0 03

eeInsnReplace(0x00643790, 0xc4810020, 0x03e00080)

by

eeInsnReplace(0x00643790, 0xc4810020, 0x03e00008)
 

Similar threads

Back
Top