PS4 [Research]PS2 emulator configuration on PS4

Hi All,

Can anyone help me understand what I am doing wrong here? trying to convert this code for Persona 3 FES, but not sure If it's just not working or me failing to understand how this works -_-.. been trying to learn by example, and kinda lost at the moment.

Any guidance/assistance is appreciated.

Thanks!

PNACH
Code:
//Detect  'Open the in-game menu'
patch=1,EE,e0020000,extended,107cdf48
patch=1,EE,204aa460,extended,46000802 //Set original value
patch=1,EE,20112b94,extended,08030034 //84420000 jump to 'In-Game Menu  Portraits fix'

patch=1,EE,e0020000,extended,007cdf48
patch=1,EE,204aa460,extended,08030024 //46000802 jump to 'Clock, Popup Portraits and etc fix'
patch=1,EE,20112b94,extended,84420000 //Set original value

//Detect 'Scene changing'
//0040023c c0f2a0e4 20108046
//00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00
patch=1,EE,e0010000,extended,107CDED4
patch=1,EE,204aa444,extended,3c02402a //Zoom

patch=1,EE,e0010000,extended,007CDED4
patch=1,EE,204aa444,extended,3c024000 //Set original value

LUA
Code:
--Detect  'Open the in-game menu'
local code_check1 = eeObj.ReadMem16(0x107cdf48)
if code_check1 == 0x0000 then
eeObj.WriteMem32(0x204aa460,0x46000802)
eeObj.WriteMem32(0x20112b94,0x08030034)
else
eeObj.WriteMem32(0x204aa460,0x08030024)
eeObj.WriteMem32(0x20112b94,0x84420000)
end

--Detect 'Scene changing'
local code_check2 = eeObj.ReadMem16(0xe107CDED4)
if code_check2 == 0x0000 then
eeObj.WriteMem32(0x204aa444,0x3c02402a)
else
eeObj.WriteMem32(0x204aa444,0x3c024000)
end
 
The King of Fighters 2003 SLES53382

Before the fix

After the fix


LUA

Code:
-- The King of Fighters 2003  SLES53382
-- emu kof98

apiRequest(1.0)

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

local patcher = function()

-- Fix for Depth precision
-- author=kozarovv (adapted by Immersion95)
-- Fix for Depth precision.
--Game fills upper 16bits of depth with 0xFFFF.
--This results in a really high 32 bit value which is then converted to float
--because both hw and sw renderers lack double precision the lower 16 bits of the initial 32 bit value lose precision.
eeObj.WriteMem32(0x000ffc00,0xf88a0000)
eeObj.WriteMem32(0x000ffc04,0xa080000b)
eeObj.WriteMem32(0x000ffc08,0x08053967)
eeObj.WriteMem32(0x0014E594,0x0803ff00)
eeObj.WriteMem32(0x0014E598,0x4bea497d)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)


Select 60Hz



 
Last edited:
Fix for The King of Fighters '94 Re-bout™ SLPS-25449

CLI
Code:
--gs-uprender=2x2
--gs-upscale=point
--force-frame-blend=1
--gs-use-deferred-l2h=0

--cdvd-sector-read-cycles=5000
--host-display-mode=16:9

#emu used=aofa
LUA
Code:
-- The King of Fighters '94 Re-bout™ SLPS-25449
-- Fix by Kozarovv
-- ported to PS4
-- emu used=aofa

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

apiRequest(0.1)

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

local patcher = function()
--ps3 config ??
eeObj.WriteMem32(0x00273bd8,0x240701b0) -- 0x240701c0 addiu a3, zero, $01c0
--gfx fix
eeObj.WriteMem32(0x000ffc00,0xf88a0000)
eeObj.WriteMem32(0x000ffc04,0xa080000b)
eeObj.WriteMem32(0x000ffc08,0x080836b3)
eeObj.WriteMem32(0x0020dac4,0x0803ff00)
eeObj.WriteMem32(0x0020dac8,0x4bea497d)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

Total fix! Similar issues like 2003. Thanks @kozarovv
 
fix for The King of Fighters™ 2002 Unlimited Match™ Tougeki Version

CLI
Code:
--gs-uprender=2x2
--gs-upscale=point
--force-frame-blend=1
--gs-use-deferred-l2h=0

--vu0-di-bits=0
--vu1-di-bits=0

--host-display-mode=16:9
--cdvd-sector-read-cycles=3000

# emu used=aofa
LUA
Code:
-- The King of Fighters™ 2002 Unlimited Match™ Tougeki Version®
-- gfx fix by Kozarovv
-- ported to PS4
-- emu used=aofa

apiRequest(0.1)

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

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

local patcher = function()
--English (NEOGEO MODE) by lee4
eeObj.WriteMem32(0x005B4630,0x00000001)
--ALL CHARACTERS by lee4
eeObj.WriteMem32(0x005CA808,0x03FF03FF)
eeObj.WriteMem32(0x00000000,0x00000000)
-- Fix bug 10414 - large stretched polygons block view of player characters
eeObj.WriteMem32(0x000ffc00,0xf88a0000)
eeObj.WriteMem32(0x000ffc04,0xa080000b)
eeObj.WriteMem32(0x000ffc08,0x081079b3)
eeObj.WriteMem32(0x0041e6c4,0x0803ff00)
eeObj.WriteMem32(0x0041e6c8,0x4bea497d)

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

Total Fix
 
Some off top a little, but at last i make big (very big) video about Lazy Retro Emulators Project!

Lazy Retro Emulators - Compilation of old emus for boot ROMs of old Games!
PicoDrive v1.51b v1.13 (Sega), Fceu emulator (Nes), SnesStation (SNES), ReGBA (GBA) also PicoDrive and QuickNES from PS2 ver. of RetroArch
All emus work via ULaunchELF ps2 manager on PS4!

Based on rise of the kasai v1 emu! Maybe someone interesting about it!

 
Fix for The Ant Bully PAL

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

#--host-display-mode=16:9
--cdvd-sector-read-cycles=4000

#emu used=red dead
LUA
Code:
-- The Ant Bully PAL
-- emu used=red dead

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

apiRequest(0.1)

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

emuObj.SetDisplayAspectWide()

local patcher = function()
--16:9

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

--blurry graphics fix
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=1  } )
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2  } )

Total fix!
 
interesting about ps2 to ps4, learning some weeks about how to code this, here i port other codes i did for ps2 past months

****removed the codes, because some reason testing again codes not work anymore (funny yesterday codes working fine ?¿) when use custom.lua and .txt in PS2-FPKG v.06, withow using custom-lua or txt game runs normal , so too early for say i understand this .lua config, i going to debug where is the error but testing is very tiresome....*****
FIXED. some days and hours study again i manage to fix code script.

Hokuto no Ken Shinpan no Sousousei Kengou Retsuden (Japan)

Code:
#USE Orochi-emu
#still have some click noise in options > sound > bgm play or cutscenes need more debugg
--gs-progressive=1
--hid-pad=1
--gs-aspect-ratio=0.75
--host-audio-latency=3
--cdvd-sector-read-cycles=5000
--gs-uprender=none
--gs-upscale=point
--host-display-mode=4:3
Code:
--gametitle=Hokuto no Ken Shinpan no Sousousei Kengou Retsuden (Japan) CRC-0x9E8F0454 SLPM_666.60
--comment= PS4 port Native 480p sdtv mode + extend 640x480 v5 by felixthecat1970

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

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

local lightDef0 = {153, 0, 0}
local lightDef1 = {0, 0, 153}

emuObj.PadSetLightBar(0, lightDef0, 1, lightDef1)

--emuObj.ForceRefreshRate(60)

--enable 480p - 640x480 - Qol options

eeInsnReplace(0x292720, 0x00000000, 0xA38286E8)
eeInsnReplace(0x2ACA50, 0x83A2001C, 0x0000102D)
eeInsnReplace(0x2B3EB8, 0x2442FFFF, 0x0000102D)
eeInsnReplace(0x2B4068, 0x24420001, 0x0000102D)
eeInsnReplace(0x2B3D38, 0x24060001, 0x24060000)
eeInsnReplace(0x29270C, 0x0C040304, 0x00000000)

--soft filter L3=OFF R3=ON

local CheckInputs = function()

local pad_bits = emuObj.GetPad()
local UP        = pad_bits &  0x0010
local DOWN        = pad_bits &  0x0040
local LEFT        = pad_bits &  0x0080
local RIGHT        = pad_bits &  0x0020
local Triangle    = pad_bits &  0x1000
local Cross        = pad_bits &  0x4000
local Square    = pad_bits &  0x8000
local Circle    = pad_bits &  0x2000
local L1        = pad_bits &  0x0400
local L2        = pad_bits &  0x0100
local L3        = pad_bits &  0x0002
local R1        = pad_bits &  0x0800
local R2        = pad_bits &  0x0200
local R3        = pad_bits &  0x0004
local Select    = pad_bits &  0x0001
local Start        = pad_bits &  0x0008   

if (L3 ~= 0) then
     gsObj.SetUpscaleMode("point")
    end
if (R3 ~= 0) then
     gsObj.SetUpscaleMode("gpu")
    end
end
emuObj.AddVsyncHook(CheckInputs)

Sengoku Basara X (Japan)
Code:
#USE kof98 emu files
--gs-progressive=1
--gs-use-deferred-l2h=0
--hid-pad=1
--gs-aspect-ratio=0.75
--gs-uprender=none
--gs-upscale=point
--host-display-mode=4:3
Code:
--gametitle=Sengoku Basara X (Japan) SLPM_550.08;1) Game CRC = 0x721DEBE4
--comment=PS4 port native sdtv 480p mode unlock + extend resolution 640x480 v4 by felixthecat1970

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

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

local lightDef0 = {153, 0, 0}
local lightDef1 = {0, 0, 153}

emuObj.PadSetLightBar(0, lightDef0, 1, lightDef1)

--enable 480p - 640x480 - Qol options

local options = function()

eeInsnReplace(0x001004E4, 0x00000000, 0xA2620016)
eeInsnReplace(0x0010CF00, 0x24040001, 0x24040000)
eeInsnReplace(0x001EA6B4, 0x24060001, 0x24060000)
eeInsnReplace(0x00386720, 0x002A0630, 0x002A0640)
eeInsnReplace(0x00386740, 0x002A0740, 0x002A0640)
eeInsnReplace(0x002A0550, 0x24020001, 0x24020000)
eeInsnReplace(0x001EA7D0, 0xAE00FCB4, 0xAE0AFCB4)
eeInsnReplace(0x001004CC, 0x0C0C5B3C, 0x00000000)

end
emuObj.AddVsyncHook(options)

--soft filter L3=OFF R3=ON

local CheckInputs = function()

local pad_bits = emuObj.GetPad()
local UP        = pad_bits &  0x0010
local DOWN        = pad_bits &  0x0040
local LEFT        = pad_bits &  0x0080
local RIGHT        = pad_bits &  0x0020
local Triangle    = pad_bits &  0x1000
local Cross        = pad_bits &  0x4000
local Square    = pad_bits &  0x8000
local Circle    = pad_bits &  0x2000
local L1        = pad_bits &  0x0400
local L2        = pad_bits &  0x0100
local L3        = pad_bits &  0x0002
local R1        = pad_bits &  0x0800
local R2        = pad_bits &  0x0200
local R3        = pad_bits &  0x0004
local Select    = pad_bits &  0x0001
local Start        = pad_bits &  0x0008   

if (L3 ~= 0) then
     gsObj.SetUpscaleMode("point")
    end
if (R3 ~= 0) then
     gsObj.SetUpscaleMode("gpu")
    end
end
emuObj.AddVsyncHook(CheckInputs)
 
Last edited:
Hi All,

Can anyone help me ? I am trying to convert Yu-Gi-Oh! Capsule Monster Coliseum (USA).iso to ps4 pkg using PS2-FPKG_v0.6 but when i run the game it stuck on black screen. I know that I should convert it using RECVX emu but I dont know how. There are only two emu options inside PS2-FPKG_v0.6 the jak v2 and rogue v1 but both are not working with the game.

Any assistance is appreciated.

Thanks!
 
Hi All,

Can anyone help me ? I am trying to convert Yu-Gi-Oh! Capsule Monster Coliseum (USA).iso to ps4 pkg using PS2-FPKG_v0.6 but when i run the game it stuck on black screen. I know that I should convert it using RECVX emu but I dont know how. There are only two emu options inside PS2-FPKG_v0.6 the jak v2 and rogue v1 but both are not working with the game.

Any assistance is appreciated.

Thanks!
Just put RECVX in emus root folder of PS2-FPKG v0.6 but not fact that emu wil fix game!
 
The Spiderwick Chronicles[SLUS 21716] (U)


CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth
--host-display-mode=16:9
--cdvd-sector-read-cycles=2000
--vu0-no-clamping=0
--vu1-di-bits=0

LUA

Code:
-- The Spiderwick Chronicles[SLUS 21716] (U)
-- patch by Prafull
-- jakv2

apiRequest(0.1)

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

local patcher = function()

-- Fix the initial hang and make the game playable
eeObj.WriteMem32(0x0011f6a4,0x00000000)

end

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

emuObj.AddVsyncHook(patcher)

I didn't add the command...emuObj.ThrottleMax()
Causes micro freeze of videos.
 
Last edited:
Fix for Beyond Good & Evil (SLUS-20763)

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth
--gs-progressive=1

--ee-cycle-scalar=2.0
--vu1-mpg-cycles=2000

--host-display-mode=16:9

#emu used=rotk v1
LUA
Code:
-- Beyond Good & Evil (U)(SLUS-20763)
-- Widescreen hack by Arapapa
-- emu used=rotk v1

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

apiRequest(0.1)

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

--16:9
eeInsnReplace(0x00131cb0,0x3c023f80,0x3c023f40) --0x3c023f80

local WS2 = function()
--Y-Fov
eeObj.WriteMem32(0x001324cc,0x08030010)
eeObj.WriteMem32(0x000c0040,0x46000802)
eeObj.WriteMem32(0x000c0044,0x3c1b3f40)
eeObj.WriteMem32(0x000c0048,0x449bf000)
eeObj.WriteMem32(0x000c004c,0x461e0003)
eeObj.WriteMem32(0x000c0050,0x0804c935)
--Render fix
eeObj.WriteMem32(0x0013ef70,0x3c023f40) --3c023f00
--stutter fix A
eeObj.WriteMem32(0x00205e1c,0x10000024) --10600024
eeObj.WriteMem32(0x00133638,0x1000003d) --1060003d

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(WS2)

--graphics fix for blur
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=1  } )
emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=2  } )

Minor stutter in scenes with far draw distance. @Bortoloti

*edit - Stutter removed
 
Last edited:
Fix for Batman - Rise of Sin Tzu {recommended version=(Prototype) Aug 15 2003}

CLI
Code:
--gs-uprender=2x2
--gs-upscale=EdgeSmooth

--host-display-mode=16:9
--cdvd-sector-read-cycles=4000

--vu1-no-clamping=0  #gfx fix A
--vu0-no-clamping=0  #gfx fix B
--vu-branch-hazard=0 #fixes loading freeze

emu used=recvx v1
LUA
Code:
-- Batman - Rise of Sin Tzu (Prototype) Aug 15 2003
-- Retail has slowdown during FMVs that I can't fix
-- Widescreen & 60fps by Stayhye
-- emu used=recvx v1

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

apiRequest(0.1)

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

local patcher = function()
--16:9
--X-Fov
eeObj.WriteMem32(0x004ad5d8,0x3f5a7408) --0x3f23d70a >> @15833 lui v1, $d70a
--Render Fix
eeObj.WriteMem32(0x00306928,0x3c023f40) --0x3c023f00 >> lui v0, $3f00

emuObj.ThrottleMax()
end

emuObj.AddVsyncHook(patcher)

--60 fps
eeInsnReplace(0x20532748,0x00000002,0x00000001) --0x00000002 >> rwDMAVsyncCnt

Works perfectly(prototype). Retail has stuttering FMVs(Gameplay fine on all versions)
 
Last edited:

Similar threads

Back
Top