PS4 [Research]PS2 emulator configuration on PS4

I'm curious that can be moved outside of vsync patch:

emuObj.PadSetLightBar(0,56,230,201)
emuObj.SetDisplayAspectWide()

My point is that on vsync hook we should do minimal things that can't be done other way.
Because that will force more code to run on every single frame.

Can you test in free time that will work same way?

Code:
-- Hunter: The Reckoning Wayward [NTSC-U] (SLUS_205.11)
-- Widescreen Hack by El_Patas

apiRequest(1.0)

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

--Widescreen hack 16:9

eeObj.WriteMem32(0x0023B1F4,0x3C023F23) --X-Fov A
eeObj.WriteMem32(0x0023B1F4,0x3C023F00) --X-Fov B
eeObj.WriteMem32(0x0023B66C,0x3C03BFAB) -- Y-Fov A
eeObj.WriteMem32(0x0023B66C,0x3C03BF80) -- Y-Fov B
end

emuObj.AddVsyncHook(widescreen)
emuObj.PadSetLightBar(0,56,230,201)
emuObj.SetDisplayAspectWide()

That config in theory should do the same, and SetDisplayAspectWide, and SetLightBar will run only one time on emu load, and stay like that.
 
I'm curious that can be moved outside of vsync patch:

emuObj.PadSetLightBar(0,56,230,201)
emuObj.SetDisplayAspectWide()

My point is that on vsync hook we should do minimal things that can't be done other way.
Because that will force more code to run on every single frame.

Can you test in free time that will work same way?

Code:
-- Hunter: The Reckoning Wayward [NTSC-U] (SLUS_205.11)
-- Widescreen Hack by El_Patas

apiRequest(1.0)

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

--Widescreen hack 16:9

eeObj.WriteMem32(0x0023B1F4,0x3C023F23) --X-Fov A
eeObj.WriteMem32(0x0023B1F4,0x3C023F00) --X-Fov B
eeObj.WriteMem32(0x0023B66C,0x3C03BFAB) -- Y-Fov A
eeObj.WriteMem32(0x0023B66C,0x3C03BF80) -- Y-Fov B
end

emuObj.AddVsyncHook(widescreen)
emuObj.PadSetLightBar(0,56,230,201)
emuObj.SetDisplayAspectWide()

That config in theory should do the same, and SetDisplayAspectWide, and SetLightBar will run only one time on emu load, and stay like that.

everything appears to still be the same
 
pcsx2 is showing this in console when MTV Music generator 2 crashes at the Main mixer

Code:
Protected page @ 0x00265
Protected page @ 0x00219
Protected page @ 0x00218
Protected page @ 0x0021a
Protected page @ 0x00243
Protected page @ 0x0024e
Pagesplit @ 0024EFCC : size=13 insts
Protected page @ 0x00245
Protected page @ 0x00244
Protected page @ 0x00210
Pagesplit @ 00253FF8 : size=2 insts
Protected page @ 0x0020e
o:0 l:1 fd:1 td:1 fd:6540 td:6540 ff:1 tf:1 rt5
o:0 l:1 fd:1 td:1 fd:6540 td:6540 ff:1 tf:1 rt5
Protected page @ 0x0020a
Protected page @ 0x00209
Pagesplit @ 00209FFC : size=1 insts
Protected page @ 0x00207
Protected page @ 0x0024a
Protected page @ 0x0021c
Pagesplit @ 00205FFC : size=1 insts
Protected page @ 0x002b1
Protected page @ 0x002b0
Protected page @ 0x002b2
Protected page @ 0x002af
Pagesplit @ 002AEFE0 : size=8 insts
Protected page @ 0x002ae
Protected page @ 0x00204
Protected page @ 0x00217
Protected page @ 0x0021b
Pagesplit @ 002F4FE0 : size=8 insts
Pagesplit @ 0021BFFC : size=1 insts
Pagesplit @ 00204FC4 : size=15 insts
Protected page @ 0x0024b
Protected page @ 0x0024c
Protected page @ 0x00248
Protected page @ 0x00249

any ideas? All music based games crash at the main dashboard. Magix music maker, digital hitz factory and MTV music generator 2.
 
pcsx2 is showing this in console when MTV Music generator 2 crashes at the Main mixer

Code:
Protected page @ 0x00265
Protected page @ 0x00219
Protected page @ 0x00218
Protected page @ 0x0021a
Protected page @ 0x00243
Protected page @ 0x0024e
Pagesplit @ 0024EFCC : size=13 insts
Protected page @ 0x00245
Protected page @ 0x00244
Protected page @ 0x00210
Pagesplit @ 00253FF8 : size=2 insts
Protected page @ 0x0020e
o:0 l:1 fd:1 td:1 fd:6540 td:6540 ff:1 tf:1 rt5
o:0 l:1 fd:1 td:1 fd:6540 td:6540 ff:1 tf:1 rt5
Protected page @ 0x0020a
Protected page @ 0x00209
Pagesplit @ 00209FFC : size=1 insts
Protected page @ 0x00207
Protected page @ 0x0024a
Protected page @ 0x0021c
Pagesplit @ 00205FFC : size=1 insts
Protected page @ 0x002b1
Protected page @ 0x002b0
Protected page @ 0x002b2
Protected page @ 0x002af
Pagesplit @ 002AEFE0 : size=8 insts
Protected page @ 0x002ae
Protected page @ 0x00204
Protected page @ 0x00217
Protected page @ 0x0021b
Pagesplit @ 002F4FE0 : size=8 insts
Pagesplit @ 0021BFFC : size=1 insts
Pagesplit @ 00204FC4 : size=15 insts
Protected page @ 0x0024b
Protected page @ 0x0024c
Protected page @ 0x00248
Protected page @ 0x00249

any ideas? All music based games crash at the main dashboard. Magix music maker, digital hitz factory and MTV music generator 2.
I will look into it in few hours when i get back to home. To be honest i wasn't aware that pcsx2 have any issues with it. Interesting.
 
I will look into it in few hours when i get back to home. To be honest i wasn't aware that pcsx2 have any issues with it. Interesting.

sorry, it freezes on PS4, I was just monitoring PCSX2 to see what happens around that time of crash since I can see the console window
 
sorry, it freezes on PS4, I was just monitoring PCSX2 to see what happens around that time of crash since I can see the console window
Ah ok, log you show just point which part of ee memory get recompiled at that time. But there gonna be hard to make something useful from it for ps4. Since we don't know why exactly it is crashing.
 
Widescreen patches in lua for Crazy taxi and Death by Degrees(both NTSC) causes emu to crash. Patching ISO works.
 
Widescreen patches in lua for Crazy taxi and Death by Degrees(both NTSC) causes emu to crash. Patching ISO works.
While Crazy Taxi patch is little bit extensive, DbD patch look 100% ok. No idea why it fail.
Are you using JAK emu or some other one?
 
Usually issue is that pcsx2 is more friendly to user errors. Some patches are really terrible, and only pcsx2 error ignoring make them work fine. But since you said that patches are fine when you use pnach engine. Maybe PS4 emu apply them too fast with that method.

If you want you can remove:

--FMV's fix by nemesis2000
eeObj.WriteMem32(0x005D9054,0x3faaaaaa)
--black border's fix by nemesis2000
eeObj.WriteMem32(0x0032b0a8,0x3c023f80)

from DbD, and test again. While i'm REALLY not interested into fixing ws patches by myself, i really appreciate feedback so i can create issue on my repository to make sure that i list bad patches. :)
 
Alternate fix for DOA 2 Hardcore NTSC US

Code:
--DOA 2 Hardcore NTSC US

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()

local patcher = function()

eeObj.WriteMem32(0x0021b63c,0x3c014534) -- Widescreen
eeObj.WriteMem32(0x002b06ec,0x24060000) -- Fixes game hanging on boot.
 
iopObj.WriteMem32(0x001D77E4,0x27C40010)
iopObj.WriteMem32(0x001D77E8,0x0C0032B7)   
iopObj.WriteMem32(0x001D77EC,0x00000000)   
end

emuObj.AddVsyncHook(patcher)

emuObj.PadSetLightBar(0,255,200,250)
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(0) 

emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2  } )
 
Last edited:
Final Fix(2022) for Mortal Kombat - Shaolin Monks NTSC

CLI
Code:
--gs-uprender=2x2
--gs-upscale=edgesmooth
--gs-adaptive-frameskip=1

--vif1-instant-xfer=0

--ee-cycle-scalar=1.62

--iop-cycle-scalar=0.78
--vu1-di-bits=0

--cdvd-sector-read-cycles=3000
--host-vsync=1

#emu used=jak xv2

LUA
Code:
-- Mortal Kombat - Shaolin Monks (SLUS-21087)
-- Widescreen, no interlace + Cheats
-- speed fix alt by mrjaredbeta
-- speed fix combo by Raigho @PCSX2 forums
-- ported to PS4 LUA
-- 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()

local thresholdArea = 600
 
emuObj.SetDisplayAspectWide()
gsObj.SetDeinterlaceShift(1)

eeInsnReplace(0x23e188, 0x14440011, 0x10000011) -- speed fix alt

local WS = function()

eeObj.Vu1MpgCycles(777)

eeObj.WriteMem32(0x004f4b38,0x3f400000) -- 16:9
eeObj.WriteMem32(0x00322f2c,0x3c013f80) -- black border fix
eeObj.WriteMem32(0x00272210,0x24030256) -- FMV's fix
eeObj.WriteMem32(0x00272498,0x240B0256) -- ||
-- no interlace
local code_check1 = eeObj.ReadMem16(0x67B7C8)
if code_check1 == 0x0001 then
eeObj.WriteMem32(0x2038334C,0xDE020010)
end
local code_check2 = eeObj.ReadMem16(0x67B7C8)
if code_check2 == 0x0003 then
eeObj.WriteMem32(0x2038334C,0x34021400)
end
-----------speed fix combo---------------
--Disable Bloom
eeObj.WriteMem32(0x004F4B68,0x0)
--Disable Fog
eeObj.WriteMem32(0x004F4C08,0x0)
--Disable Light on Characters Skills
eeObj.WriteMem32(0x004F4C98,0x0)
--Disable Characters Skinning
eeObj.WriteMem32(0x004F4C44,0x0)
----------CHEATS-----------------------
--Unlock All Characters in vs. Mode
eeObj.WriteMem32(0x205D8288,0xFFFFFFFF)
--Single PLayer Chars
eeObj.WriteMem32(0x205D82B4,0x00000001)
eeObj.WriteMem32(0x205D82B8,0x00000001)
--Boss Fix code
--eeObj.WriteMem32(0x20298DA8,0x00000000)
--Unlock Mortal Kombat II by MadCatz
eeObj.WriteMem32(0x205D82B0,0x00000001)
--Replace Options With Debug Menu In Game by Combusto Dragon
eeObj.WriteMem32(0x204C6FE0,0x0000019F)
eeObj.WriteMem32(0x204C6FE4,0x001AAE80)
--View Movies To Unlock Them by Code Master
eeObj.WriteMem32(0x201C1DD4,0x00431025)
eeObj.WriteMem32(0x201C1DD8,0xAC820000)
eeObj.WriteMem32(0x201C1DE0,0x24020001)
--View Arena Art To Unlock Them by Code Master
eeObj.WriteMem32(0x201C1E2C,0x00431025)
eeObj.WriteMem32(0x201C1E30,0xAC820000)
eeObj.WriteMem32(0x201C1E38,0x24020001)
--View Concept Art To Unlock Them by Code Master
eeObj.WriteMem32(0x201C1E84,0x00431025)
eeObj.WriteMem32(0x201C1E88,0xAC820000)
eeObj.WriteMem32(0x201C1E90,0x24020001)
--View Photos To Unlock Them by Code Master
eeObj.WriteMem32(0x201C1EDC,0x00431025)
eeObj.WriteMem32(0x201C1EE0,0xAC820000)
eeObj.WriteMem32(0x201C1EE8,0x24020001)
----------------------
emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(WS)

emulator used=JakX v2


 
Last edited:
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=1 } ) emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2 } )
Only one of them can be used. The effect of texMode=1 is smooth, and texMode=2 should be another effect, which will lose some image quality.
 
Nice find, we have few games not working due to instant vif also on ps3, sadly no option to fix it there.
Other games that are worth to give a shot with that command are:

Snowblind engine games (Baldur's Gate: Dark Alliance, Champions of Norrath, etc.)
Downhill Domination
Buffy Vampire Slayer

Those are games that i'm aware that hate instant VIF. Not saying it will 100% fix them, just worth to give a shot. I will try to search on pcsx2 what was fixed when they abandoned inst vif1. ;)

Edit: Mafia also like timing
Shadow Man: 2econd Coming
 

Similar threads

Back
Top