[PS2onPS4] [HELP] How are these 4-player patches done?

Nicoful

회원 | Member
Original poster
회원 | Member
Jun 4, 2018
12
5
Hi. Do anyone have any idea Kozarovv found these offsets for the 4-player patches (see the mtap related code in the spoilers below)?

The PS2 emulator can't handle inputs for games that require multitap to be connected on port 2, these are seen as controller 2A, 2B, 2C, 2D and are therefore not read.
Kozarovv solves this by finding offsets for these inputs and redirects them back to multitap 1 in this order:
2A -> 1B,
2B -> 1C,
2C -> 1D.

I would love to know what tools being used and if there is certain function calls to look for in memory by using cheat engine or similar.
If you have any ideas how this could be done I'm all ears since I have a favourite game on my own that have the same problem (Sega ages 2500: Decathlete Collection [SLPM-62444]).

Example #1:
Def Jam™ Fight for N.Y.® NTSC (4 Player fix)
Comment:
4 player working. All thanks to Kozarovv for his multi-tap patches. Tested quite a bit, works great.

-- Def Jam: Fight for NY (SLUS-21004)
-- Multi-Tap fix by Kozarovv
-- ported to PS4 by Stayhye
-- emu used=aofa

CLI

--mtap1=always
--mtap2=always

LUA
apiRequest(0.1)
local eeObj = getEEObject()
local mtap_fix = function()
-- Force controllers detection
eeObj.WriteMem32(0x32F3EC,0x00000000)
-- Manually count to 8...
eeObj.WriteMem32(0x1EADFC,0x24100000)
eeObj.WriteMem32(0x1EAE04,0x26100001)
-- Rearrange controllers from port 2 to 1
eeObj.WriteMem32(0x0fff00,0x10040007)
eeObj.WriteMem32(0x0fff04,0x28b90003)
eeObj.WriteMem32(0x0fff08,0x54190001)
eeObj.WriteMem32(0x0fff0c,0x24a50001)
eeObj.WriteMem32(0x0fff10,0x54190001)
eeObj.WriteMem32(0x0fff14,0x24040000)
eeObj.WriteMem32(0x0fff18,0x080CBBD0)
eeObj.WriteMem32(0x0fff1c,0x00000000)
eeObj.WriteMem32(0x0fff20,0x54050001)
eeObj.WriteMem32(0x0fff24,0x24040001)
eeObj.WriteMem32(0x0fff28,0x54050001)
eeObj.WriteMem32(0x0fff2c,0x24a5ffff)
eeObj.WriteMem32(0x0fff30,0x080CBBD0)
eeObj.WriteMem32(0x0fff34,0x00000000)
eeObj.WriteMem32(0x32F36C,0x0c03ffc0)
end
emuObj.AddVsyncHook(mtap_fix)

Example #2:
Urban Reign™ NTSC NTSC (4 Player Fix) +Cheats)

Comment:
Big thanks to Kozarovv for this one! Finally 4 player multi-tap works! Apparently the emulator is flawed in how it handles multi-tap when it involves "--mtap2". All functions for 2A, 2B, 2C, 2D must be redirected to ports on multi-tap 1.

-- Urban Reign NTSC (SLUS-21209)
-- Multitap fix by Kozarovv
-- ported to PS4 by Stayhye
-- emu used=kof98um

CLI

--mtap1=Always

LUA
apiRequest(0.1)
local gpr = require("ee-gpr-alias")
local emuObj = getEmuObject()
local eeObj = getEEObject()
local gsObj = getGsObject()
emuObj.PadSetLightBar(0, 45,65,55)
emuObj.SetDeinterlace(true)
emuObj.SetDisplayAspectWide()
local WS = function()
-- Init first mtap
eeObj.WriteMem32(0x12BA88,0x24040000)
-- Read data from 1B port when 2A is requested
eeObj.WriteMem32(0x0ffc00,0x10040005)
eeObj.WriteMem32(0x0ffc04,0x00000000)
eeObj.WriteMem32(0x0ffc08,0x14050003)
eeObj.WriteMem32(0x0ffc10,0x24040000)
eeObj.WriteMem32(0x0ffc14,0x24050001)
eeObj.WriteMem32(0x0ffc18,0x080c5cbd)
eeObj.WriteMem32(0x0ffc1c,0x24030070)
eeObj.WriteMem32(0x3172ec,0x0803ff00)
emuObj.ThrottleMax()
end
emuObj.AddVsyncHook(WS)
emuObj.SetGsTitleFix( "globalSet", "reserved", { workLoadThreshold = 100000} )
emuObj.SetGsTitleFix( "globalSet", "reserved", { waveThreshold = 90000} )
emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } )
 
Last edited: