PS4 [Research]PS2 emulator configuration on PS4

@Stayhye
Do you happen to have an official config file for Red Dead Revolver? And is "aofa emu" actually means Art of Fighting Anthology which in term is same KOF98 emu?
 
FiX for Jackie Chan Adventures

Code:
--fpu-accurate-range=0x22F2B0,0x22F468

@mrjaredbeta make config for ps3! Now it adapt for ps4!

Config FiX bug, when Jackie falling through the floor in the temple! Sound crackle when Jackie reach that place! Need more tests, but its good progress!

You can see Before-After FiX Comparison VIDEO

UPDATE!

Found it!!!

Code:
--fpu-accurate-addsub-range=0x22F2B0,0x22F468

in txt.

Complite FiX bug, when Jackie falling through the floor in the temple! And NO crackle sound around!

VIDEO

@Kugozx found right value and thanks @mrjaredbeta again for original fix!
 
Last edited:
Code:
apiRequest(1.0)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()

------Fix loading freeze
eeObj.WriteMem32(0x176824,0x24020001)
end

emuObj.AddVsyncHook(patcher)

its for lua, not for txt file
Working great now! lots of texture glitches but nothing game-breaking. So glad i can play this on here!
 
Improvement Fix for Berserk - Millennium Falcon Hen - Seima Senki no Shou (Japan) [english patch]
CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--cdvd-sector-read-cycles=2000

--ee-cycle-scalar=1.67

#emu used=jakx v2
LUA
Code:
-- Berserk - Millennium Falcon Hen - Seima Senki no Shou (Japan) [english patch]
-- Enhancement test v2 By felixthecat1970
-- emu used=jakx v2

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

apiRequest(2.3)

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

emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(0) 

local patcher = function()
--bp. interleacing
eeObj.WriteMem32(0x20193AE4,0x08064ED6)
eeObj.WriteMem32(0x20193AE8,0x00000000)
--new widescreeen preliminar workaround (org c. demilich)
local code_check1 = eeObj.ReadMem16(0x3D2C12) 
if code_check1 == 0x3F4C then
eeObj.WriteMem32(0x3D2C12,0x3F0C3F0C)
end
--Widescreen hack 16:9
eeObj.WriteMem32(0x00239aac,0x3c033f19) --3c033f4c
eeObj.WriteMem32(0x00239ab4,0x3463999a) --3463cccd
--60 fps
eeObj.WriteMem32(0x203B408C,0x00000001)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

--math.random() + math.random(1, 99)

Tested a little. Feedback welcome. Works great so far. If any stuttering occurs later in gameplay, disable 60 fps in LUA
 
@Stayhye
Do you happen to have an official config file for Red Dead Revolver?

Here you go.

CLI
Code:
--gs-kernel-cl-up="up2x2skipInterp"
--fpu-rsqrt-fast-estimate=0
--mtap1=Always
--vif1-ignore-cmd-ints=1
--iop-cycle-scalar=0.80
--iop-hook=0x0086ac,FastForwardClock
--ee-sif0-cycle-scalar=2.0
--ee-sif1-cycle-scalar=2.0
--iop-sif1-cycle-scalar=5.0
--iop-sif0-cycle-scalar=5.0
--iop-tight-slice-count=12
--cdvd-sector-read-cycles=5000
--ee-hook=0x352dd0,AdvanceClock,0x0c0ef9a2,4500
--ee-hook=0x3b5068,FastForwardClock,0x00481024
--ee-hook=0x46fb68,FastForwardClock,0x8ca30000
--ee-hook=0x46fb38,FastForwardClock,0x8c620000
--ee-hook=0x46fb68,MfifoDrain,0x8ca30000
--ee-hook=0x46fb38,MfifoDrain,0x8c620000
--mfifo-manual-drain=0.30
--mfifo-chunk-drain-cycles=210000
LUA
Code:
-- red_dead_revolver
local gpr = require("ee-gpr-alias")

apiRequest(0.1)   -- request version 0.1 API. Calling apiRequest() is mandatory.

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

-- bug#9490 - Disable post-processing effect - <imgImageryDeriver<fxDistort>::Draw(void)>
eeInsnReplace(0x4c4b78, 0x27bdfff0,   0x03e00008)     -- JR $ra
eeInsnReplace(0x4c4b7c, 0xffbf0000,   0x00000000)     -- NOP

-- gfxState class writes bytes and then reads them back as words later on.
-- This replaces most of the word readbacks with lbu equivalents to avoid STLF.
-- 003c0950 <gfxState::Update_TEST(void)>:
eeInsnReplace(0x3c0970, 0x8ce6efd8, 0x90e6efd8)    -- lw   a2,-4136(a3)
eeInsnReplace(0x3c09a0, 0x8ce3f37c, 0x90e3f37c)    -- lw   v1,-3204(a3)

-- 0032aa70 <fxFloatPropGrid::Get(Vector2 const &) const>:
--  The original  compiler couldn't assume that Vector2 was an aligned object, so it generated
--  ldr/sdr instructions to access it.  The lack of assumption seems to have also caused it to
--  spill FPU registers to memory needlessly.

if true then
   eeInsnReplace(0x32aa74, 0x68a20007, 0x00000000)
   eeInsnReplace(0x32aa78, 0x6ca20000, 0x00000000)
   eeInsnReplace(0x32aa7c, 0xb3a20017, 0xc4a00000)     -- lwc1     $f0,0(a1)
   eeInsnReplace(0x32aa80, 0xb7a20010, 0xc4a10004)     -- lwc1     $f1,4(a1)

   eeInsnReplace(0x32aa8c,   0xc7a00010,   0x00000000)     -- nop
   eeInsnReplace(0x32aa9c,   0xc7a10014,   0x00000000)     -- nop

   eeInsnReplace(0x32aaa8,   0xe7a00010, 0x00000000)     -- nop
   eeInsnReplace(0x32aaac,   0x46020082, 0x46020002)    -- mul.s   $f0,$f0,$f2   
   eeInsnReplace(0x32aab0,   0x3c014480, 0x3c014480)    -- lui     at,0x4480
   eeInsnReplace(0x32aab4,   0x34211000, 0x34211000)    -- ori     at,at,0x1000
   eeInsnReplace(0x32aab8,   0x44812000, 0x44812000)    -- mtc1   at,$f4
   eeInsnReplace(0x32aabc,   0xe7a10014, 0x00000000)    -- nop
   eeInsnReplace(0x32aac0,   0x460308c2, 0x46030842)    -- mul.s   $f1,$f1,$f3
   eeInsnReplace(0x32aac4,   0xe7a20010, 0xe7a00000)    -- swc1   $f0,0(sp)
   eeInsnReplace(0x32aac8,   0x90a4001c, 0x90a4001c)    -- lbu   $a0,28($a1)
   eeInsnReplace(0x32aacc,   0xe7a30014, 0xe7a10004)    -- swc1   $f1,4(sp)

   eeInsnReplace(0x32aad0,   0x6baa0017, 0x00000000)    -- nop
   eeInsnReplace(0x32aad4,   0x6faa0010, 0x00000000)    -- nop
   eeInsnReplace(0x32aad8,   0xb3aa0007, 0x00000000)    -- nop
   eeInsnReplace(0x32aadc,   0xb7aa0000, 0x00000000)    -- nop
   eeInsnReplace(0x32aae0,   0xc7a00000, 0x00000000)    -- nop
   eeInsnReplace(0x32aae4,   0xc7a10004, 0x00000000)    -- nop
end
Features LUA
Code:
-- Lua 5.3
-- Title: Red Dead Revolver - SLUS-20500 (USA) v1.03
-- Author:  Nicola Salmoria
-- Date: March 23, 2016


require( "ee-gpr-alias" ) -- you can access EE GPR by alias (gpr.a0 / gpr["a0"])

apiRequest(0.7)   -- need widescreen support

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


local GFXPIPELINE_16BY9_ADDRESS    = 0x79eeec
local GLOBALS_UNIVERSALDATA_ADDRESS   = 0x742120


local TH1A =   -- start loading screen
   function()
     emuObj.ThrottleMax()
   end

local TH1B =   -- switch to threaded loading (over cutscene etc.)
   function()
     emuObj.ThrottleNorm()
   end


local TH2A =   -- start flashing loading message
   function()
     emuObj.ThrottleMax()
   end

local TH2B =   -- pause loading message
   function()
     emuObj.ThrottleNorm()
   end

local TH2C =   -- unpause loading message
   function()
     emuObj.ThrottleMax()
   end

local TH2D =   -- end loading message
   function()
     emuObj.ThrottleNorm()
   end



local showdownLoading = false

local TH3A =   -- draw "Loading" on Showdown info screen
   function()
     if showdownLoading == false then
       emuObj.ThrottleMax()
       showdownLoading = true
     end
   end

local TH3B =   -- draw "Press START" on Showdown info screen
   function()
     if showdownLoading == true then
       emuObj.ThrottleNorm()
       showdownLoading = false
     end
   end


local WH1 =   -- update 16:9 flag
   function()
     local isWidescreen = eeObj.GetGpr(gpr.a0)
     
     if isWidescreen == 0 then
       emuObj.SetDisplayAspectNormal()
     else
       emuObj.SetDisplayAspectWide()
     end
   end

local WH2 =   -- init universal data
   function()
     local v1 = eeObj.GetGpr(gpr.v1)
     eeObj.SetGpr(gpr.v1, v1 | 1)   -- enable widescreen
   end

local WH3 =   -- end of boot up sequence
   function()
     local universalData = eeObj.ReadMem32(GLOBALS_UNIVERSALDATA_ADDRESS)
     local isWidescreen = eeObj.ReadMem32(universalData + 92) & 1

     eeObj.WriteMem8(GFXPIPELINE_16BY9_ADDRESS, isWidescreen)

     if isWidescreen == 0 then
       emuObj.SetDisplayAspectNormal()
     else
       emuObj.SetDisplayAspectWide()
     end
   end



-- unthrottle loading screens
local thr1a = eeObj.AddHook(0x21e02c, 0x0080982d, TH1A)   -- <staNewLoadShow::Enter(void)>:
local thr1b = eeObj.AddHook(0x220100, 0x27bdfff0, TH1B)   -- <staNewLoadShow::DoThreadedLoadShow(void)>:
local thr2a = eeObj.AddHook(0x233970, 0x27bdfff0, TH2A)   -- <ThreadedLoadingMessage::Start(void)>:
local thr2b = eeObj.AddHook(0x233a30, 0x27bdfff0, TH2B)   -- <ThreadedLoadingMessage::Pause(void)>:
local thr2c = eeObj.AddHook(0x233a80, 0x3c02004f, TH2C)   -- <ThreadedLoadingMessage::Unpause(void)>:
local thr2d = eeObj.AddHook(0x2339d8, 0x27bdfff0, TH2D)   -- <ThreadedLoadingMessage::Stop(void)>:
local thr3a = eeObj.AddHook(0x226110, 0x8e850008, TH3A)   -- <staNewLoadShow::DrawMultiplayerInfo(void)>:
local thr3b = eeObj.AddHook(0x226058, 0x8e650008, TH3B)   -- <staNewLoadShow::DrawMultiplayerInfo(void)>:

-- widescreen support
local wide1 = eeObj.AddHook(0x3b9050, 0x46010003, WH1)   -- <gfxPipeline::Set16By9(bool)>:
local wide2 = eeObj.AddHook(0x180f90, 0x00641824, WH2)   -- <swcSaveUniversalData::swcSaveUniversalData(void)>:
local wide3 = eeObj.AddHook(0x102b70, 0x24040003, WH3)   -- <gmGame::DoBootUpSequence(void)>:
 

Attachments

Hello, Forum. Is there a way to get 007 Nightfire (corrupted graphics on Jak emus for first person levels) or 007 James bond Agent Under Fire to playable state (Running on several emus like Psyco v2, KOF2000, Kinetika v2, Dark Cloud v2 and Jaks
--vu1=jit-sync # to fix black PS2 logo screen
--vif1-instant-xfer=0 # fixes graphics on Jaks but crashes at FPS level start.
On non-Jaks is quite slow and stuttery especially FIRE and WATER level)?
Any help is much appreciated
@Stayhye
Thanks for your help with red dead.
Do you think there's a chance for you to take a look at Bond games - 007 Agent Under Fire, Nightfire and Everything or Nothing? Those are quite classic. I gave it my best shot but all three have major performance issues with first person levels.
 
@Stayhye
Thanks for your help with red dead.
Do you think there's a chance for you to take a look at Bond games - 007 Agent Under Fire, Nightfire and Everything or Nothing? Those are quite classic. I gave it my best shot but all three have major performance issues with first person levels.

007: Agent Under Fire (WIP)
CLI
Code:
--gs-uprender=2x2
--gs-upscale=edgesmooth

--host-display-mode=16:9

--ee-cycle-scalar=1.85
--idec-cycles-per-qwc=2000
--vu1=jit-sync

--vu1-no-clamping=0
--vu1-mpg-cycles=900

--cdvd-sector-read-cycles=4000
LUA
Code:
local gpr = require("ee-gpr-alias")

apiRequest(0.4)

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

local patcher = function()
--Widescreen hack 16:9
eeObj.WriteMem32(0x003202dc,0x3c013fab) --3c013f80
--Start With 9 Lives by Code Master
local code_check1 = eeObj.ReadMem16(0x1200B4)
if code_check1 == 0x1DC0 then
eeObj.WriteMem32(0x2037F610,0x00000009)
end

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

emu used=psychonauts v2

Still needs work but very playable!
 

Attachments

Last edited:
WIP FIx for Transformers - Revenge of the Fallen (SLUS-21881)
CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth
--ee-context-switch-cycles=10000
--host-window-scale=1.5     #[scale/float]
--host-window-pos=0,-1000  #[x,y] trying to get rid of rainbow line at bottom of some screens
--vif1-instant-xfer=0
--vu1-const-prop=0
#--vu1-mpg-cycles=2200

#emu used=psychonauts v1
LUA
Code:
-- Transformers - Revenge of the Fallen (U)(SLUS-21881)
-- Force turn on Native Widescreen (Full boot passing) by Arapapa
-- emu used=psychonauts v1
 
local gpr = require("ee-gpr-alias")

apiRequest(0.1)

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

emuObj.SetDisplayAspectWide()

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

local patcher = function()
-- Fix Pause menu, some hud parts, etc. by @kozarovv
eeObj.WriteMem32(0x0016ee38,0x3464fff0)
eeObj.WriteMem32(0x0016ee58,0x3464fffc)
--16:9
eeObj.WriteMem32(0x00197088,0x24020002) --30420003
--60 fps
--eeObj.WriteMem32(0x2011E888,0x28420001)

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

emuObj.AddVsyncHook(patcher)

--[[
38 EE 16 00 FF FF 64 34 F0 FF 64 34
58 EE 16 00 FE FF 64 34 FC FF 64 34
--]]


Works great! Has a weird rainbow colored line at bottom of some screens. Still stutters in areas. More testing needed. Can anyone help with the stuttering areas?
 

Attachments

Last edited:
Fix for Terninator 3 - Rise of the Machines NTSC
CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--ee-cycle-scalar=1.8
--cdvd-sector-read-cycles=2000

--vu0-no-clamping=0 #fix missing gfx
--vu1-no-clamping=0 #fix missing gfx

#emu used=aofa
LUA
Code:
-- Terminator 3 - Rise of the Machines (U)(SLUS-20799)
-- Widescreen hack by Arapapa
-- emu used=aofa
 
local gpr = require("ee-gpr-alias")

apiRequest(0.1)

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

emuObj.SetDisplayAspectWide()

local patcher = function()
--Widescreen hack 16:9
--X-Fov
--46a30046 c6c30046 06bc0046
eeObj.WriteMem32(0x0026d3d0,0x080bd578)
eeObj.WriteMem32(0x002f55e0,0x4600a346)
eeObj.WriteMem32(0x002f55e4,0x3c013f40)
eeObj.WriteMem32(0x002f55e8,0x4481f000)
eeObj.WriteMem32(0x002f55ec,0x461e6b42)
eeObj.WriteMem32(0x002f55f0,0x0809b4f5)
--Target Focus (X-Fov)
--000015e6 2d280000
eeObj.WriteMem32(0x00287d64,0x080bed14) --3c014400
eeObj.WriteMem32(0x002fb450,0x461ead42)
eeObj.WriteMem32(0x002fb454,0xe6150000)
eeObj.WriteMem32(0x002fb458,0x080a1f5a)
--60 fps by asasega
eeObj.WriteMem32(0x203F17D8,0x00000000) --fps
eeObj.WriteMem32(0x2013FC7C,0x3C013F00) --speed

emuObj.ThrottleMax() -- again, no negative side effect.
end

emuObj.AddVsyncHook(patcher)

Works perfectly! 60fps with no penalty. Feedback welcome
 
Fix for Terninator 3 - Rise of the Machines NTSC
CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--ee-cycle-scalar=1.8
--cdvd-sector-read-cycles=2000

--vu0-no-clamping=0 #fix missing gfx
--vu1-no-clamping=0 #fix missing gfx

#emu used=aofa
LUA
Code:
-- Terminator 3 - Rise of the Machines (U)(SLUS-20799)
-- Widescreen hack by Arapapa
-- emu used=aofa
 
local gpr = require("ee-gpr-alias")

apiRequest(0.1)

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

emuObj.SetDisplayAspectWide()

local patcher = function()
--Widescreen hack 16:9
--X-Fov
--46a30046 c6c30046 06bc0046
eeObj.WriteMem32(0x0026d3d0,0x080bd578)
eeObj.WriteMem32(0x002f55e0,0x4600a346)
eeObj.WriteMem32(0x002f55e4,0x3c013f40)
eeObj.WriteMem32(0x002f55e8,0x4481f000)
eeObj.WriteMem32(0x002f55ec,0x461e6b42)
eeObj.WriteMem32(0x002f55f0,0x0809b4f5)
--Target Focus (X-Fov)
--000015e6 2d280000
eeObj.WriteMem32(0x00287d64,0x080bed14) --3c014400
eeObj.WriteMem32(0x002fb450,0x461ead42)
eeObj.WriteMem32(0x002fb454,0xe6150000)
eeObj.WriteMem32(0x002fb458,0x080a1f5a)
--60 fps by asasega
eeObj.WriteMem32(0x203F17D8,0x00000000) --fps
eeObj.WriteMem32(0x2013FC7C,0x3C013F00) --speed

emuObj.ThrottleMax() -- again, no negative side effect.
end

emuObj.AddVsyncHook(patcher)

Works perfectly! 60fps with no penalty. Feedback welcome
Long time ago play it on ps3! Will test it on ps4 too!
 
007: Agent Under Fire (WIP)
CLI
Code:
--gs-uprender=2x2
--gs-upscale=edgesmooth

--host-display-mode=16:9

--ee-cycle-scalar=1.85
--idec-cycles-per-qwc=2000
--vu1=jit-sync

--vu1-no-clamping=0
--vu1-mpg-cycles=900

--cdvd-sector-read-cycles=4000
LUA
Code:
local gpr = require("ee-gpr-alias")

apiRequest(0.4)

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

local patcher = function()
--Widescreen hack 16:9
eeObj.WriteMem32(0x003202dc,0x3c013fab) --3c013f80
--Start With 9 Lives by Code Master
local code_check1 = eeObj.ReadMem16(0x1200B4)
if code_check1 == 0x1DC0 then
eeObj.WriteMem32(0x2037F610,0x00000009)
end

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

emu used=psychonauts v2

Still needs work but very playable!

Tested the config. Unfortunately same slowdowns in same places are still present. Mostly with big rooms with lots of geometry - super slow. First level it starts really stutter when you get to submarine hanger at the end of level. Would a save file be helpful to test other levels specially Fire and Water?
 
Fix for Terninator 3 - Rise of the Machines NTSC
CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--ee-cycle-scalar=1.8
--cdvd-sector-read-cycles=2000

--vu0-no-clamping=0 #fix missing gfx
--vu1-no-clamping=0 #fix missing gfx

#emu used=aofa
LUA
Code:
-- Terminator 3 - Rise of the Machines (U)(SLUS-20799)
-- Widescreen hack by Arapapa
-- emu used=aofa
 
local gpr = require("ee-gpr-alias")

apiRequest(0.1)

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

emuObj.SetDisplayAspectWide()

local patcher = function()
--Widescreen hack 16:9
--X-Fov
--46a30046 c6c30046 06bc0046
eeObj.WriteMem32(0x0026d3d0,0x080bd578)
eeObj.WriteMem32(0x002f55e0,0x4600a346)
eeObj.WriteMem32(0x002f55e4,0x3c013f40)
eeObj.WriteMem32(0x002f55e8,0x4481f000)
eeObj.WriteMem32(0x002f55ec,0x461e6b42)
eeObj.WriteMem32(0x002f55f0,0x0809b4f5)
--Target Focus (X-Fov)
--000015e6 2d280000
eeObj.WriteMem32(0x00287d64,0x080bed14) --3c014400
eeObj.WriteMem32(0x002fb450,0x461ead42)
eeObj.WriteMem32(0x002fb454,0xe6150000)
eeObj.WriteMem32(0x002fb458,0x080a1f5a)
--60 fps by asasega
eeObj.WriteMem32(0x203F17D8,0x00000000) --fps
eeObj.WriteMem32(0x2013FC7C,0x3C013F00) --speed

emuObj.ThrottleMax() -- again, no negative side effect.
end

emuObj.AddVsyncHook(patcher)

Works perfectly! 60fps with no penalty. Feedback welcome
Test it too! Yes it work fast and amazing!
VIDEO

Also maybe you ever before test - Knight Rider The Game (SLES51011) ?
It always was have same kind bugs as in terminator, car not show up and invisible!

with
Code:
--vu0-no-clamping=0
--vu1-no-clamping=0

Car shows more often, but it still alot graphical bugs! Last test was on aofa emu.
You can see on VIDEO
 
Sorry for the noob but i don't know how to apply cli.conf because i use PS2-FPKG by Jabu and it doesn't have an option for cli.conf files, can someone explain that for me?
 

Similar threads

Back
Top