PS4 [Research]PS2 emulator configuration on PS4

The problem is that the fpu range opcodes are different, copying the phantasy star's range doesn't work. I was still stuck.

Edit: One time it did work but now I tried it again and 1 enemy doesn't spawn. So it's not fully accurate but close. Any other range upcode I can try?
Yes. You can use --cop2-accurate-range with it.
 
Starsky & Hutch (E)(SLES-51617)

txt
Code:
--gs-uprender=2x2
--gs-upscale=edgesmooth
--host-display-mode=16:9
--gs-ignore-rect-correction=1
--ee-cycle-scalar=1.5

lua
Code:
--Starsky & Hutch (E)(SLES-51617)
--Widescreen hack by Arapapa
--Cheats by Code Master and Codejunkies
--kof98

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

apiRequest(1.0)

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

local fix = function()

--Widescreen hack 16:9
eeObj.WriteMem32(0x00123e4c,0x3c033f2a)
eeObj.WriteMem32(0x204CCEDC,0x3F19999A)

--Cheats by Code Master
eeObj.WriteMem32(0x20514CB0,0xFFFFFFFF) --Have All Items
eeObj.WriteMem32(0x20514CB4,0xFFFFFFFF)
eeObj.WriteMem32(0x20514CB8,0xFFFFFFFF)
eeObj.WriteMem32(0x20514CBC,0xFFFFFFFF)
eeObj.WriteMem32(0x20514CC0,0xFFFFFFFF)

eeObj.WriteMem32(0x201C1FDC,0x24420000) --Infinite Ammo by Codejunkies

eeObj.WriteMem32(0x20514C64,0x00060606) --Unlock All Levels And Bonus Cars
eeObj.WriteMem32(0x20514C68,0x4D1C0003)
eeObj.WriteMem32(0x20514C6C,0x4D1C0003)
eeObj.WriteMem32(0x20514C70,0x4D1C0003)
eeObj.WriteMem32(0x20514C74,0x4D1C0003)
eeObj.WriteMem32(0x20514C78,0x4D1C0003)
eeObj.WriteMem32(0x20514C7C,0x4D1C0003)
eeObj.WriteMem32(0x20514C80,0x4D1C0003)
eeObj.WriteMem32(0x20514C84,0x4D1C0003)
eeObj.WriteMem32(0x20514C88,0x4D1C0003)
eeObj.WriteMem32(0x20514C8C,0x4D1C0003)
eeObj.WriteMem32(0x20514C90,0x4D1C0003)
eeObj.WriteMem32(0x20514C94,0x4D1C0003)
eeObj.WriteMem32(0x20514C98,0x4D1C0003)
eeObj.WriteMem32(0x20514C9C,0x4D1C0003)
eeObj.WriteMem32(0x20514CA0,0x4D1C0003)
eeObj.WriteMem32(0x20514CA4,0x4D1C0003)
eeObj.WriteMem32(0x20514CA8,0x4D1C0003)
eeObj.WriteMem32(0x20514CAC,0x4D1C0003)

emuObj.ThrottleMax()
end
emuObj.AddVsyncHook(fix)
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2 } )

Notes
-- Thank you @Stayhye for sharing the correction of the NTSC version
--gs-ignore-rect-correction=1 corrects horizontal line
--ee-cycle-scalar=1.5 (good performance).
--emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2 } ) #fix car shadow
--configuration tested on base PS4 (fat)
 

Sadly it still doesn't work, vu0-mpg-cycles=500 doesn't seem to help at all. I tried 3 times and there is always 1 or 2 monsters that disappear in the left corner next to the gate and yes, I used red faction emu like it was recommended. With the FPU command, I could sometimes get past it on either Kof98 or Redfaction.
 
Last edited:
@sargentfart
I found the problem.
Change it
--vu0-mpg-cycles=500
for
--vu1-mpg-cycles=500

But unfortunately some parts were slower.
By changing the ee and iop values to improve the slowdown caused by --vu1-mpg-cycles=500...The problem returns.

Capture on pc...chiaki screen (running on ps4)



 
Last edited:
@sargentfart
I found the problem.
Change it
--vu0-mpg-cycles=500
for
--vu1-mpg-cycles=500

But unfortunately some parts were slower.
By changing the ee and iop values to improve the slowdown caused by --vu1-mpg-cycles=500...The problem returns.

Can it be fixed by using --vu1-di-bits=0 and --vu0-di-bits=0 without bringing back the issue? These usually give a nice performance boost.

Edit: Nvm, it's still broken. Vu1 also doesn't fix this. In your video, you go as fast as possible to the enemies that disappear, if you're quick you can get them and progress. But they shouldn't despawn if you target other enemies in the map first.
 
Last edited:
@sargentfart Seems like a VU0 sync issue. Trying using eecyclescalar with the value of 0.5 or less with the combination of vu0 mpgcycles set to 3000

Problem persists.
I don't know if this helps but I will leave it here.
cZOG6By.png
 
Can it be fixed by using --vu1-di-bits=0 and --vu0-di-bits=0 without bringing back the issue? These usually give a nice performance boost.

Edit: Nvm, it's still broken. Vu1 also doesn't fix this. In your video, you go as fast as possible to the enemies that disappear, if you're quick you can get them and progress. But they shouldn't despawn if you target other enemies in the map first.
try this command:
Code:
--fpu-no-clamping=0
 
Any fix for the simpsons game?

-has audio distortion (temporary fix = pass checkpoint save, exit episode, continue episode, fixed itself o_O)
-slowdowns.

-outlines fix
Code:
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=1  } )
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2  } )

or

CLI:
Code:
--host-display-mode=16:9      
--gs-upscale=motionvec
--gs-uprender=none
Hello brother, which emu did you use? Did you make any further progress on this emulation?
 
@sargentfart

Tested by 5x

--gs-uprender=2x2
--gs-upscale=edgesmooth
--gs-kernel-cl-up="up2x2skipinterp"
--host-display-mode=16:9
--fpu-accurate-mul-fast=1
--fpu-accurate-range=0x1acce0,0x1FFFFFF
--fpu-custom-min-max=0
--fpu-no-clamping=1
--cop2-no-clamping=1
#fix mission 2
#kof98

It works, I tried it 3 times, thank you. One of them climbs backwards and another one sometimes dies by falling off the map but at least we can always progress no matter what so it's finally playable.
Maybe I will play with the fpu accurate range a bit to see if I can perfect it. I'll update this post if I find a better opcode.
 
Last edited:
Fix for Scarface - The World is Yours (NTSC)

CLI
Code:
--gs-uprender=2x2
--gs-upscale=edgesmooth
--gs-kernel-cl-up="up2x2skipinterp" #gfx fix A
--gs-motion-factor=30 #fps smoothing
--gs-optimize-30fps=1 #fps smoothing

--cdvd-sector-read-cycles=2000 # loading speedup

--vu1-di-bits=0 # micro freezing fix

--ee-cycle-scalar=0.75
--iop-cycle-scalar=0.75 # input response increase

--vu1-jr-cache-policy=newprog  # stutter fix
--vu1-jalr-cache-policy=newprog  # stutter fix

#emu used=star ocean v2

LUA

Code:
-- Scarface - The World is Yours (NTSC)
-- speed fix by Agrippa & Kozarovv
-- graphical issues fix by kozarovv
-- ported to PS4 lua by Stayhye
-- emu used=star ocean v2

apiRequest(0.1)

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

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

emuObj.SetFormattedCard("scarface.card")
emuObj.SetDisplayAspectWide()

--PS3 config(speed up)
eeInsnReplace(0x00643790, 0xc4810020, 0x03e00008) -- 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)

local gfx_fix = function()
--[[ Kozarovv's Notes:
after some reversing i noticed that Scarface don't use VU1 to draw road terrain. This patch in theory force rendering to be done.
--]]
--graphics fix C
eeObj.WriteMem32(0x004F4D8C,0x10000003)
eeObj.WriteMem32(0x004F4F34,0x00000000)
eeObj.WriteMem32(0x004F4F58,0x10000007)
--60 fps by asasega
--eeObj.WriteMem32(0x20DAFABC,0x00000000) -- breaks uprender and FPS

   if eeObj.ReadMem16(0x1B99E0, 0xE614) then
     eeObj.WriteMem32(0x001B90DC,0x00000000) -- bloom backbuffer
     eeObj.WriteMem32(0x001B8B88,0x00000000) -- MotionBlurEnable
     eeObj.WriteMem32(0x001B9318,0x00000000) -- MipMapLevel
 
   end
 
eeObj.Vu1MpgCycles(375) -- Helps FPS and removes stutter
--emuObj.ThrottleMax() -- not supported by Star Ocean 3 emu
end

emuObj.AddVsyncHook(gfx_fix)

-- Uprender/Upscale fix
emuObj.SetGsTitleFix( "globalSet",  "reserved", { waveThreshold = 90000} ) -- removes even more stutter
emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } )
emuObj.SetGsTitleFix( "forceSimpleFetch",  "reserved", {psm=0} )
emuObj.SetGsTitleFix( "fetchFromCurrBuff", "reserved", {psm=0} )


Total fix! Almost perfect! Probably can still be tweaked to remove remaining stutter. Big Thanks to @kozarovv for final graphics fix.
Where exactly do I add the cli and lua config files? I am using the Star Ocean V2 and changing the game is but no luck. I am using PS2-FPKG v0.7 and everytime I make the PS2 pkg it never gets past the PS2 boot logo. Just feels like I have put so much time into this one game that I can't give up now. Any help would be really appreciated.
 

Similar threads

Back
Top