Editing Custom Configuration Files

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 14: Line 14:




=Custom Configuration Files=
====18 Wheeler - American Pro Trucker====
====18 Wheeler - American Pro Trucker====
<br>NTSC
<br>NTSC
Line 44: Line 43:
--math.random() + math.random(1, 99)
--math.random() + math.random(1, 99)
</pre>
</pre>
====24 The Game====
====24 The Game====
'''''CLI'''''
'''''CLI'''''
Line 379: Line 377:
eeInsnReplace(0x262608, 0xE4400000, 0xAC410000)
eeInsnReplace(0x262608, 0xE4400000, 0xAC410000)
eeInsnReplace(0x2564A8, 0x8F829764, 0x24020000)</pre>
eeInsnReplace(0x2564A8, 0x8F829764, 0x24020000)</pre>
====Cabela's Dangerous Hunts====
<br>CLI
<br>All
<pre>
#Sps fix
--vu1-no-clamping=0
</pre>


====Castlevania: Curse of Darkness====
====Castlevania: Curse of Darkness====
Line 876: Line 866:


<pre>
<pre>
#Fix for game being stuck with flickering, immovable main menu items.
#Fix for game being stuck at main menu with selections moving very fast
--fpu-no-clamping=1
--fpu-no-clamping=1
#Speedhack
#Speedhack
Line 1,032: Line 1,022:


# Emu used = Primal
# Emu used = Primal
</pre>
====Driv3r====
'''CLI'''
<br>SLUS-20587
<pre>
#Fix for AI cop car (00422D18 to 00423018 on PCSX2?)
--cop2-accurate-addsub-range=0x4b8108,0x4b8408
#Speedhacks
--vu1-di-bits=0
--vu1-mpg-cycles=2700
--ee-cycle-scalar=1.1
#Graphical fixes
--gs-flush-ad-xyz=always
--gs-use-mipmap=1
--gs-use-clut-merge=1
--gs-kernel-cl-up="up2x2simple"
</pre>
</pre>


Line 1,757: Line 1,730:


====Jaws Unleashed====
====Jaws Unleashed====
Config #1
<br>#Forbidden siren V2 emu used.
<br>'''CLI'''
<pre>
#Crash fix
--vu-xgkick-delay=2
#Speedhacks
--vu1-di-bits=0
--ee-cycle-scalar=1.2
--vu1-mpg-cycles=200
</pre>
<br>Config #2
<br>'''''LUA file'''''
<br>'''''LUA file'''''


Line 3,458: Line 3,418:
<br>'''''CLI'''''
<br>'''''CLI'''''
<pre>
<pre>
#Speedhacks
#Speedhacks + Clamping
--vu1-di-bits=0
--vu1-di-bits=0
--vu1-mpg-cycles=850
--vu1-const-prop=1
#Fix for flickering Spyro shadow
--vu1-mpg-cycles=800
--gs-use-clut-merge=1
--ee-cycle-scalar=1.2
#Jakv2 Emu Used
#Jakv2 Emu Used
</pre>
</pre>
Line 4,236: Line 4,196:


#Fix for texture glitches</pre>
#Fix for texture glitches</pre>
====World Series of Poker - Tournament of Champions====
<br>LUA
<br>SLUS-21491
<br>Emu: War of the monsters
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
eeObj.WriteMem32(0x0036A180, 0x0)
end
emuObj.AddVsyncHook(patcher)
</pre>


====X-Files - Resist or Serve====
====X-Files - Resist or Serve====
Line 4,702: Line 4,647:
</pre>
</pre>


=Global Configurations=
<pre>Configurations made for more than one game for a specific purpose</pre>
==SkipMpegHack (FMV skip)==
'''''LUA file'''''
<br>
All games using standard sceMpeg decoder will have their fmvs disabled by this patch.
<pre>
apiRequest(1.0)
eeObj  = getEEObject()
emuObj = getEmuObject()
local addr  = 0x100008
local skipMpeg = function()
    while(addr < 0x1000000)
    do
        if eeObj.ReadMem32(addr) == 0x8c830040 then
            if eeObj.ReadMem32(addr + 4) == 0x03e00008 then
                if eeObj.ReadMem32(addr + 8) == 0x8c620000 then
                    eeObj.WriteMem32(addr + 8, 0x24020001)
                    break
                else
                    addr = addr + 4
                end
            else
                addr = addr + 4
            end
        else
            addr = addr + 4
        end
    end
end
emuObj.AddEntryPointHook(skipMpeg)
--We should remove that hook, but we never really hit entry point again.
--emuObj.RemoveEntryPointHook(skipMpeg)
</pre>
=Incomplete configurations=
<pre>This is a list of unsuccessful, or incomplete configurations, along with information that might help others in the future.
A place for research and sharing useful info.</pre>
====Dragon ball z budokai tenkaichi====
'''LUA'''
<br>NTSC
Things go wrong somewhere around 0x001137A8
<pre>
apiRequest(0.1)
--untested
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
eeObj.WriteMem32(0x0011A54C, 0x24020000)
eeObj.WriteMem32(0x0018D944, 0x24020000)
eeObj.WriteMem32(0x0018D4CC, 0x24020000)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Dynasty Warriors 5 - Empires====
<br>PAL
<pre>
001428CC
-00142910
</pre>
====Batman begins====
NTSC
<pre>
00409BF8 0000001E
</pre>
====Genji dawn of the samurai====
<br>NTSC
<pre>
002F876C
</pre>
====Bee movie====
NTSC
<br>CLI
<br>NTSC
<br>Redfaction
<pre>
--ee-context-switch-cycles=16000
--assert-path1-ad=1
--gs-kernel-cl-up="up2x2simple"
</pre>
====Hitman - Blood Money====
NTSC
<br>LUA
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
--Exhibits a strange DMA issue
local patcher = function()
eeObj.WriteMem32(0x0028B554, 0x240F0000)
eeObj.WriteMem32(0x0028B4B0, 0x240F0000)
end
emuObj.AddVsyncHook(patcher)
</pre>
====The Simpsons====
<pre>
--vu1-no-clamping=0
</pre>
====Tenchu - Fatal Shadows====
<br>NTSC
<br>Destroy all humans v1
<pre>
#Removes most elements of graphical corruption
--vif1-instant-xfer=0
</pre>
<pre>
apiRequest(0.1)
-- Not the best solution, but it works.
eeInsnReplace(0x001023E0, 0xAE020000, 0x0)
-- The graphical issues start somewhere in this function 0x00134B10
</pre>
====Ratchet 4 - Deadlocked====
<br>'''CLI'''
<br>Emu = '''War of the Monsters'''
<pre>
#Fix graphics
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"
#Fix VU0 sync (raise or lower it as convenient)
--ee-hook=0x000FF904,AdvanceClock,,395
</pre>
<br>'''LUA'''
<br>SCUS-97465
<br>Author:Scalerize
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--jmp
eeObj.WriteMem32(0x0012710C, 0x0803FE80)
--Check if patcher's needed
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
eeObj.WriteMem32(0x000FFA10, 0xAC44FFF4)
eeObj.WriteMem32(0x000FFA0C, 0x3442FA00)
eeObj.WriteMem32(0x000FFA14, 0xAC45FFF0)
eeObj.WriteMem32(0x000FFA18, 0x8C44FFFC)
eeObj.WriteMem32(0x000FFA1C, 0x8C840000)
eeObj.WriteMem32(0x000FFA20, 0x149B0003)
eeObj.WriteMem32(0x000FFA28, 0x08049C44)
eeObj.WriteMem32(0x000FFA2C, 0x241B0000)
eeObj.WriteMem32(0x000FFA34, 0xAC43FFF8)
eeObj.WriteMem32(0x000FFA38, 0x3C040010)
eeObj.WriteMem32(0x000FFA3C, 0x24840004)
eeObj.WriteMem32(0x000FFA40, 0x8C830000)
eeObj.WriteMem32(0x000FFA44, 0x107B0003)
eeObj.WriteMem32(0x000FFA4C, 0x1000FFFB)
--Patcher
eeObj.WriteMem32(0x000FFA54, 0xAC44FFFC)
eeObj.WriteMem32(0x000FFA64, 0x3C030C03)
eeObj.WriteMem32(0x000FFA68, 0x3463FE48)
eeObj.WriteMem32(0x000FFA6C, 0xAC8300BC) --First 6 vi01
eeObj.WriteMem32(0x000FFA78, 0xAC8301FC)
eeObj.WriteMem32(0x000FFA84, 0xAC830354)
eeObj.WriteMem32(0x000FFA90, 0xAC830494)
eeObj.WriteMem32(0x000FFA9C, 0xAC8305EC)
eeObj.WriteMem32(0x000FFAA8, 0xAC83072C)
eeObj.WriteMem32(0x000FFAAC, 0x3C030C03)
eeObj.WriteMem32(0x000FFAB0, 0x3463FE4B)
eeObj.WriteMem32(0x000FFAB4, 0xAC83015C) --First 4 vi02
eeObj.WriteMem32(0x000FFAC0, 0xAC8302AC)
eeObj.WriteMem32(0x000FFACC, 0xAC8303F4)
eeObj.WriteMem32(0x000FFAD8, 0xAC830544)
--Physics (COP2 timing issues that I'm fixing through patches instead) (Camera, glove weapon, and gravity, but not ledge-hanging)
eeObj.WriteMem32(0x000FFADC, 0x3C032401)
eeObj.WriteMem32(0x000FFAE0, 0x346300E0)
eeObj.WriteMem32(0x000FFAE4, 0xAC831214) --(gravity) 48418800
--Ret
eeObj.WriteMem32(0x000FFC0C, 0x8C44FFF4)
eeObj.WriteMem32(0x000FFC10, 0x8C45FFF0)
eeObj.WriteMem32(0x000FFC14, 0x8C43FFF8)
eeObj.WriteMem32(0x000FFC18, 0x08049C44)
--VI01 AND VI02 to burn cycles in (000FF904) using advanceclock
eeObj.WriteMem32(0x000FF914, 0x03E00008)
eeObj.WriteMem32(0x000FF918, 0x241F0000)
eeObj.WriteMem32(0x000FF920, 0x48C00800)
eeObj.WriteMem32(0x000FF924, 0x1000FFF7)
eeObj.WriteMem32(0x000FF92C, 0x48C01000)
eeObj.WriteMem32(0x000FF930, 0x1000FFF4)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Ratchet and Clank 3: Up Your Arsenal====
<br>SCUS97353
<br>Author: Kozarovv
<br>LUA
<pre>
-- 23.07.2023 Added debug stuff that should print in klog.
-- This should help us figure out why patch fail.
apiRequest(1.0)
local em  = getEmuObject()
local ee  = getEEObject()
local patcher = function()
   
    print("CONFIG: Entering patcher!")
    local base = -1
    local addr = -1
    --local spmp = -1
   
    -- Check for SP/MP, not working yet. Only SP supported.
    --spmp = ee.ReadMem32(0x13B3D8)
    --if spmp == 0x0000202d then
    --    addr = 0x13B3D8
    --else
    --    addr = 0x13B3D8
    --end
    -- Search for base.
    addr = 0x13B3D8
    while addr < 0x1000000
    do
        if ee.ReadMem32(addr) == 0x8c810014 then
            if ee.ReadMem32(addr + 4) == 0x3c067000 then
                if ee.ReadMem32(addr + 8) == 0x7cdf1ff0 then
                    base = addr
                    break
                else
                    addr = addr + 4
                end
            else
                addr = addr + 4
            end
        else
            addr = addr + 4
        end
    end
   
    -- Shouldn't be the case.
    if base == -1 then
        print("CONFIG: Base not found!")
        return
    end
    print(string.format("CONFIG: Base = %08x", base))
    -- Patch ctc2 instances.
    ee.WriteMem32(base + 0x490, 0x0C03FF0C) -- ctc2        $zero, vi2
    ee.WriteMem32(base + 0x5e0, 0x0C03FF0C) -- ctc2        $zero, vi2
    ee.WriteMem32(base + 0x728, 0x0C03FF0C) -- ctc2        $zero, vi2
    ee.WriteMem32(base + 0x878, 0x0C03FF0C) -- ctc2        $zero, vi2
    ee.WriteMem32(base + 0x9c0, 0x0C03FF0C) -- ctc2        $zero, vi2
    ee.WriteMem32(base + 0xb18, 0x0C03FF0C) -- ctc2        $zero, vi2
    ee.WriteMem32(base + 0x3f0, 0x0C03FF00) -- ctc2        $zero, vi1
    ee.WriteMem32(base + 0x530, 0x0C03FF00) -- ctc2        $zero, vi1
    ee.WriteMem32(base + 0x688, 0x0C03FF00) -- ctc2        $zero, vi1
    ee.WriteMem32(base + 0x7c8, 0x0C03FF00) -- ctc2        $zero, vi1
    ee.WriteMem32(base + 0x920, 0x0C03FF00) -- ctc2        $zero, vi1
    ee.WriteMem32(base + 0xa60, 0x0C03FF00) -- ctc2        $zero, vi1
    -- preserve ra
    ee.WriteMem32(base + 0x22c, 0xACDF1FF4)
    -- restore ra
    ee.WriteMem32(base + 0xcac, 0x8CDF1FF4)
    -- lq --> lw
    ee.WriteMem32(base + 0xd6c, 0x8c3f1ff0)
    -- delay vcall by few cycles
    ee.WriteMem32(base + 0x33c, 0x241C0020) -- modify to burn ee cycles after vcallms
    ee.WriteMem32(base + 0x340, 0x141CFFFF)
    ee.WriteMem32(base + 0x344, 0x279CFFFF)
    print("CONFIG: Dynamic patches applied!")
end
local delayer = function()
   
    local check = ee.ReadMem32(0x000ffc00)
    if check ~= 0xfcd91ff8 then
        print("CONFIG: Applying static patches!")
    end
   
    -- loop vi1
    ee.WriteMem32(0x000ffc00, 0xfcd91ff8)
    ee.WriteMem32(0x000ffc04, 0x24190080) -- modify to burn ee cycles before ctc2
    ee.WriteMem32(0x000ffc08, 0x1419ffff)
    ee.WriteMem32(0x000ffc0c, 0x2739ffff)
    ee.WriteMem32(0x000ffc10, 0x48c00800)
    ee.WriteMem32(0x000ffc14, 0x24190020) -- modify to burn ee cycles after ctc2
    ee.WriteMem32(0x000ffc18, 0x1419ffff)
    ee.WriteMem32(0x000ffc1c, 0x2739ffff)
    ee.WriteMem32(0x000ffc20, 0x03e00008)
    ee.WriteMem32(0x000ffc24, 0xdcd91ff8)
   
    -- loop vi2
    ee.WriteMem32(0x000ffc30, 0xfcd91ff8)
    ee.WriteMem32(0x000ffc34, 0x24190080) -- modify to burn ee cycles before ctc2
    ee.WriteMem32(0x000ffc38, 0x1419ffff)
    ee.WriteMem32(0x000ffc3c, 0x2739ffff)
    ee.WriteMem32(0x000ffc40, 0x48c01000)
    ee.WriteMem32(0x000ffc44, 0x24190020) -- modify to burn ee cycles after ctc2
    ee.WriteMem32(0x000ffc48, 0x1419ffff)
    ee.WriteMem32(0x000ffc4c, 0x2739ffff)
    ee.WriteMem32(0x000ffc50, 0x03e00008)
    ee.WriteMem32(0x000ffc54, 0xdcd91ff8)
   
    -- This static patch is required because game don't use level loader to load main menu.
    local new_game = ee.ReadMem32(0x3D58B8)
    local check2  = ee.ReadMem32(0x3D5D48)
    if new_game == 0x8c810014 and check2 ~= 0x0C03FF0C then
        print("CONFIG: Applying static patch for new game!")
        ee.WriteMem32(0x3D5D48, 0x0C03FF0C) -- ctc2        $zero, vi2
        ee.WriteMem32(0x3D5E98, 0x0C03FF0C) -- ctc2        $zero, vi2
        ee.WriteMem32(0x3D5FE0, 0x0C03FF0C) -- ctc2        $zero, vi2
        ee.WriteMem32(0x3D6130, 0x0C03FF0C) -- ctc2        $zero, vi2
        ee.WriteMem32(0x3D6278, 0x0C03FF0C) -- ctc2        $zero, vi2
        ee.WriteMem32(0x3D63D0, 0x0C03FF0C) -- ctc2        $zero, vi2
        ee.WriteMem32(0x3D5CA8, 0x0C03FF00) -- ctc2        $zero, vi1
        ee.WriteMem32(0x3D5DE8, 0x0C03FF00) -- ctc2        $zero, vi1
        ee.WriteMem32(0x3D5F40, 0x0C03FF00) -- ctc2        $zero, vi1
        ee.WriteMem32(0x3D6080, 0x0C03FF00) -- ctc2        $zero, vi1
        ee.WriteMem32(0x3D61D8, 0x0C03FF00) -- ctc2        $zero, vi1
        ee.WriteMem32(0x3D6318, 0x0C03FF00) -- ctc2        $zero, vi1
       
        -- preserve ra
        ee.WriteMem32(0x3D5AE4, 0xACDF1FF4)
        -- restore ra
        ee.WriteMem32(0x3D6564, 0x8CDF1FF4)
        -- lq --> lw
        ee.WriteMem32(0x3D6624, 0x8c3f1ff0)
        -- vcall
        ee.WriteMem32(0x3D5BF4, 0x241C0020) -- modify to burn ee cycles after vcallms
        ee.WriteMem32(0x3D5BF8, 0x141CFFFF)
        ee.WriteMem32(0x3D5BFC, 0x279CFFFF)
    end
end
-- hook right after level loader, ideally this should be hook inside loader...
ee.AddHook(0x13B3D8, 0x0000202D, patcher)
em.AddVsyncHook(delayer)
</pre>
<br>'''CLI'''
<br>Emu = '''War of the Monsters'''
<br>Author: '''Scalerize'''
<br>SCUS-97353
<pre>
#Fix graphics
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"
#Fix VU0 sync (raise or lower it as convenient)
--ee-hook=0x000FF904,AdvanceClock,,395
</pre>
<br>Author: Scalerize
<br>LUA
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--jmp
eeObj.WriteMem32(0x0011F38C, 0x0803FE80)
--Check if patcher's needed
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
eeObj.WriteMem32(0x000FFA10, 0xAC44FFF4)
eeObj.WriteMem32(0x000FFA0C, 0x3442FA00)
eeObj.WriteMem32(0x000FFA14, 0xAC45FFF0)
eeObj.WriteMem32(0x000FFA18, 0x8C44FFFC)
eeObj.WriteMem32(0x000FFA1C, 0x8C840000)
eeObj.WriteMem32(0x000FFA20, 0x149B0003)
eeObj.WriteMem32(0x000FFA28, 0x08047CE4)
eeObj.WriteMem32(0x000FFA2C, 0x241B0000)
eeObj.WriteMem32(0x000FFA34, 0xAC43FFF8)
eeObj.WriteMem32(0x000FFA38, 0x3C040010)
eeObj.WriteMem32(0x000FFA3C, 0x24840004)
eeObj.WriteMem32(0x000FFA40, 0x8C830000)
eeObj.WriteMem32(0x000FFA44, 0x107B0003)
eeObj.WriteMem32(0x000FFA4C, 0x1000FFFB)
--Patcher
eeObj.WriteMem32(0x000FFA54, 0xAC44FFFC)
eeObj.WriteMem32(0x000FFA64, 0x3C030C03)
eeObj.WriteMem32(0x000FFA68, 0x3463FE48)
eeObj.WriteMem32(0x000FFA6C, 0xAC8300BC) --First 6 vi01
eeObj.WriteMem32(0x000FFA78, 0xAC8301FC)
eeObj.WriteMem32(0x000FFA84, 0xAC830354)
eeObj.WriteMem32(0x000FFA90, 0xAC830494)
eeObj.WriteMem32(0x000FFA9C, 0xAC8305EC)
eeObj.WriteMem32(0x000FFAA8, 0xAC83072C)
eeObj.WriteMem32(0x000FFAAC, 0x3C030C03)
eeObj.WriteMem32(0x000FFAB0, 0x3463FE4B)
eeObj.WriteMem32(0x000FFAB4, 0xAC83015C) --First 4 vi02
eeObj.WriteMem32(0x000FFAC0, 0xAC8302AC)
eeObj.WriteMem32(0x000FFACC, 0xAC8303F4)
eeObj.WriteMem32(0x000FFAD8, 0xAC830544)
--Physics (COP2 timing issues that I'm fixing through patches instead) (Camera, glove weapon, and gravity)
eeObj.WriteMem32(0x000FFADC, 0x3C032401)
eeObj.WriteMem32(0x000FFAE0, 0x346300E0)
eeObj.WriteMem32(0x000FFAE4, 0xAC8311E4) --gravity
eeObj.WriteMem32(0x000FFAF0, 0xAC833F64) --camera, glove weapon
--Ret
eeObj.WriteMem32(0x000FFC0C, 0x8C44FFF4)
eeObj.WriteMem32(0x000FFC10, 0x8C45FFF0)
eeObj.WriteMem32(0x000FFC14, 0x8C43FFF8)
eeObj.WriteMem32(0x000FFC18, 0x08047CE4)
--VI01 AND VI02 to burn cycles in (000FF904) using advanceclock
eeObj.WriteMem32(0x000FF914, 0x03E00008)
eeObj.WriteMem32(0x000FF918, 0x241F0000)
eeObj.WriteMem32(0x000FF920, 0x48C00800)
eeObj.WriteMem32(0x000FF924, 0x1000FFF7)
eeObj.WriteMem32(0x000FF92C, 0x48C01000)
eeObj.WriteMem32(0x000FF930, 0x1000FFF4)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Ratchet & Clank 2 - Going Commando====
<br>'''CLI'''
<br>Emu = '''War of the Monsters'''
<br>SCUS-97268
<pre>
#Fix graphics
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"
#Fix VU0 sync (raise or lower it as convenient)
--ee-hook=0x000FF904,AdvanceClock,,395
</pre>
'''LUA'''
<br>SCUS-97268
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--jmp
eeObj.WriteMem32(0x0011B18C, 0x0803FE80)
--Check if patcher's needed
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
eeObj.WriteMem32(0x000FFA10, 0xAC44FFF4)
eeObj.WriteMem32(0x000FFA0C, 0x3442FA00)
eeObj.WriteMem32(0x000FFA14, 0xAC45FFF0)
eeObj.WriteMem32(0x000FFA18, 0x8C44FFFC)
eeObj.WriteMem32(0x000FFA1C, 0x8C840000)
eeObj.WriteMem32(0x000FFA20, 0x149B0003)
eeObj.WriteMem32(0x000FFA28, 0x08046C64)
eeObj.WriteMem32(0x000FFA2C, 0x241B0000)
eeObj.WriteMem32(0x000FFA34, 0xAC43FFF8)
eeObj.WriteMem32(0x000FFA38, 0x3C040010)
eeObj.WriteMem32(0x000FFA3C, 0x24840004)
eeObj.WriteMem32(0x000FFA40, 0x8C830000)
eeObj.WriteMem32(0x000FFA44, 0x107B0003)
eeObj.WriteMem32(0x000FFA4C, 0x1000FFFB)
--Patcher
eeObj.WriteMem32(0x000FFA54, 0xAC44FFFC)
eeObj.WriteMem32(0x000FFA64, 0x3C030C03)
eeObj.WriteMem32(0x000FFA68, 0x3463FE48)
eeObj.WriteMem32(0x000FFA6C, 0xAC8300BC) --First 6 vi01
eeObj.WriteMem32(0x000FFA78, 0xAC8301FC)
eeObj.WriteMem32(0x000FFA84, 0xAC830354)
eeObj.WriteMem32(0x000FFA90, 0xAC830494)
eeObj.WriteMem32(0x000FFA9C, 0xAC8305EC)
eeObj.WriteMem32(0x000FFAA8, 0xAC83072C)
eeObj.WriteMem32(0x000FFAAC, 0x3C030C03)
eeObj.WriteMem32(0x000FFAB0, 0x3463FE4B)
eeObj.WriteMem32(0x000FFAB4, 0xAC83015C) --First 4 vi02
eeObj.WriteMem32(0x000FFAC0, 0xAC8302AC)
eeObj.WriteMem32(0x000FFACC, 0xAC8303F4)
eeObj.WriteMem32(0x000FFAD8, 0xAC830544)
--Physics (COP2 timing issues that I'm fixing through patches instead) (Camera, glove weapon, and gravity. Boxes still not fixed)
eeObj.WriteMem32(0x000FFADC, 0x3C032401)
eeObj.WriteMem32(0x000FFAE0, 0x346300E0)
eeObj.WriteMem32(0x000FFAE4, 0xAC8311F4) -- (gravity) 48418800
eeObj.WriteMem32(0x000FFAEC, 0xAC832264) -- (camera)
eeObj.WriteMem32(0x000FFAF4, 0xAC833E24) -- (glove weapon)
--Ret
eeObj.WriteMem32(0x000FFC0C, 0x8C44FFF4)
eeObj.WriteMem32(0x000FFC10, 0x8C45FFF0)
eeObj.WriteMem32(0x000FFC14, 0x8C43FFF8)
eeObj.WriteMem32(0x000FFC18, 0x08046C64)
--VI01 AND VI02 to burn cycles in (000FF904) using advanceclock
eeObj.WriteMem32(0x000FF914, 0x03E00008)
eeObj.WriteMem32(0x000FF918, 0x241F0000)
eeObj.WriteMem32(0x000FF920, 0x48C00800)
eeObj.WriteMem32(0x000FF924, 0x1000FFF7)
eeObj.WriteMem32(0x000FF92C, 0x48C01000)
eeObj.WriteMem32(0x000FF930, 0x1000FFF4)
end
emuObj.AddVsyncHook(patcher)
</pre>
<br>'''CLI'''
<br>Emu = '''War of the Monsters'''
<br>SCES-51607
<pre>
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"
#Fix VU0 sync (raise or lower it as convenient)
--ee-hook=0x000FF918,AdvanceClock,,386
</pre>
<br>'''LUA'''
<br>SCES-51607
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--Initial jmp
eeObj.WriteMem32(0x0011B1AC, 0x0C03FE80)
--Check if patcher's needed
eeObj.WriteMem32(0x000FFA00, 0x3C1B000F)
eeObj.WriteMem32(0x000FFA04, 0x377BFA00)
eeObj.WriteMem32(0x000FFA08, 0xAF62FFFC)
eeObj.WriteMem32(0x000FFA0C, 0xAF63FFF8)
eeObj.WriteMem32(0x000FFA10, 0xAF64FFF4)
eeObj.WriteMem32(0x000FFA14, 0x3C020C03)
eeObj.WriteMem32(0x000FFA18, 0x3442FE53)
eeObj.WriteMem32(0x000FFA1C, 0x8F63FFE8)
eeObj.WriteMem32(0x000FFA20, 0x246305E0)
eeObj.WriteMem32(0x000FFA24, 0x8C630000)
eeObj.WriteMem32(0x000FFA28, 0x1062FFDF)
--Create variable and start the patcher
eeObj.WriteMem32(0x000FFA2C, 0x3C027829)
eeObj.WriteMem32(0x000FFA30, 0x34420010)
eeObj.WriteMem32(0x000FFA34, 0x3C030010)
eeObj.WriteMem32(0x000FFA38, 0x8C640000)
eeObj.WriteMem32(0x000FFA3C, 0x10820003)
eeObj.WriteMem32(0x000FFA44, 0x24630004)
eeObj.WriteMem32(0x000FFA48, 0x1000FFFB)
eeObj.WriteMem32(0x000FFA50, 0xAF63FFE8)
--VI01 patcher
eeObj.WriteMem32(0x000FFA54, 0x3C020C03)
eeObj.WriteMem32(0x000FFA58, 0x3442FE50)
eeObj.WriteMem32(0x000FFA5C, 0xAC620158)
eeObj.WriteMem32(0x000FFA60, 0xAC620298)
eeObj.WriteMem32(0x000FFA64, 0xAC6203F0)
eeObj.WriteMem32(0x000FFA68, 0xAC620530)
eeObj.WriteMem32(0x000FFA6C, 0xAC620688)
eeObj.WriteMem32(0x000FFA70, 0xAC6207C8)
--VI02 patcher
eeObj.WriteMem32(0x000FFA74, 0x3C020C03)
eeObj.WriteMem32(0x000FFA78, 0x3442FE53)
eeObj.WriteMem32(0x000FFA7C, 0xAC6201F8)
eeObj.WriteMem32(0x000FFA80, 0xAC620348)
eeObj.WriteMem32(0x000FFA84, 0xAC620490)
eeObj.WriteMem32(0x000FFA88, 0xAC6205E0)
--Physics
eeObj.WriteMem32(0x000FFA8C, 0x3C022401)
eeObj.WriteMem32(0x000FFA90, 0x344200E0)
eeObj.WriteMem32(0x000FFA94, 0xAC621290) -- (gravity) 48418800
--Ret
eeObj.WriteMem32(0x000FF9A8, 0x8F62FFFC)
eeObj.WriteMem32(0x000FF9AC, 0x8F63FFF8)
eeObj.WriteMem32(0x000FF9B0, 0x8F64FFF4)
eeObj.WriteMem32(0x000FF9BC, 0x241B0000)
eeObj.WriteMem32(0x000FF9C0, 0x08047D78)
--B to ret
eeObj.WriteMem32(0x000FFABC, 0x1000FFBA)
-- CTC2 cmnds
eeObj.WriteMem32(0x000FF928, 0x03E00008)
eeObj.WriteMem32(0x000FF92C, 0x241F0000)
eeObj.WriteMem32(0x000FF940, 0x48C00800)
eeObj.WriteMem32(0x000FF944, 0x1000FFF4)
eeObj.WriteMem32(0x000FF94C, 0x48C01000)
eeObj.WriteMem32(0x000FF950, 0x1000FFF1)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Ratchet & Clank 1====
<br>'''CLI'''
<br>Emu = '''War of the Monsters'''
<br>SCUS-97199
<pre>
#Fix graphics
--gs-use-mipmap=1
--gs-kernel-cl="mipmap"
--gs-kernel-cl-up="mipmap2x2"
#Fix VU0 sync (raise or lower it as convenient)
--ee-hook=0x000FF904,AdvanceClock,,385
</pre>
'''LUA'''
<br>SCUS-97199
<br>Author:Scalerize
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--jmp
eeObj.WriteMem32(0x00118CAC, 0x0803FE80)
--Check if patcher's needed
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
eeObj.WriteMem32(0x000FFA10, 0xAC44FFF4)
eeObj.WriteMem32(0x000FFA0C, 0x3442FA00)
eeObj.WriteMem32(0x000FFA14, 0xAC45FFF0)
eeObj.WriteMem32(0x000FFA18, 0x8C44FFFC)
eeObj.WriteMem32(0x000FFA1C, 0x8C840000)
eeObj.WriteMem32(0x000FFA20, 0x149B0003)
eeObj.WriteMem32(0x000FFA28, 0x0804632C)
eeObj.WriteMem32(0x000FFA2C, 0x241B0000)
eeObj.WriteMem32(0x000FFA34, 0xAC43FFF8)
eeObj.WriteMem32(0x000FFA38, 0x3C040010)
eeObj.WriteMem32(0x000FFA3C, 0x24840004)
eeObj.WriteMem32(0x000FFA40, 0x8C830000)
eeObj.WriteMem32(0x000FFA44, 0x107B0003)
eeObj.WriteMem32(0x000FFA4C, 0x1000FFFB)
--Patcher
eeObj.WriteMem32(0x000FFA54, 0xAC44FFFC)
eeObj.WriteMem32(0x000FFA64, 0x3C030C03)
eeObj.WriteMem32(0x000FFA68, 0x3463FE48)
eeObj.WriteMem32(0x000FFA6C, 0xAC8300BC) --First 6 vi01
eeObj.WriteMem32(0x000FFA78, 0xAC8301FC)
eeObj.WriteMem32(0x000FFA84, 0xAC830354)
eeObj.WriteMem32(0x000FFA90, 0xAC830494)
eeObj.WriteMem32(0x000FFA9C, 0xAC8305EC)
eeObj.WriteMem32(0x000FFAA8, 0xAC83072C)
eeObj.WriteMem32(0x000FFAAC, 0x3C030C03)
eeObj.WriteMem32(0x000FFAB0, 0x3463FE4B)
eeObj.WriteMem32(0x000FFAB4, 0xAC83015C) --First 4 vi02
eeObj.WriteMem32(0x000FFAC0, 0xAC8302AC)
eeObj.WriteMem32(0x000FFACC, 0xAC8303F4)
eeObj.WriteMem32(0x000FFAD8, 0xAC830544)
--Physics (COP2 timing issues that I'm fixing through patches instead) (Camera, and gravity. Boxes and glove weapon still not fixed)
eeObj.WriteMem32(0x000FFADC, 0x3C032401)
eeObj.WriteMem32(0x000FFAE0, 0x346300E0)
eeObj.WriteMem32(0x000FFAE4, 0xAC8311B0) -- 48418800 (gravity)
--Ret
eeObj.WriteMem32(0x000FFC0C, 0x8C44FFF4)
eeObj.WriteMem32(0x000FFC10, 0x8C45FFF0)
eeObj.WriteMem32(0x000FFC14, 0x8C43FFF8)
eeObj.WriteMem32(0x000FFC18, 0x0804632C)
--VI01 AND VI02 to burn cycles in (000FF904) using advanceclock
eeObj.WriteMem32(0x000FF914, 0x03E00008)
eeObj.WriteMem32(0x000FF918, 0x241F0000)
eeObj.WriteMem32(0x000FF920, 0x48C00800)
eeObj.WriteMem32(0x000FF924, 0x1000FFF7)
eeObj.WriteMem32(0x000FF92C, 0x48C01000)
eeObj.WriteMem32(0x000FF930, 0x1000FFF4)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Robot Alchemic Drive====
'''LUA'''
<pre>
apiRequest(0.1)
local emuObj = getEmuObject()
local iopObj        = getIOPObject()
local patcher = function()
--Audio fix(?)
--iopObj.WriteMem32(0x000F5CBC, 0x24C6FFFF)
iopObj.WriteMem32(0x000F5764, 0x24064000)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Shadow Man - 2econd Coming====
<br>SLUS204.13
<pre>
apiRequest(0.1)
local eeObj = getEEObject()
local emuObj = getEmuObject()
local patcher = function()
--Once it reaches to the TEQ, the game crashes.
eeObj.WriteMem32(0x00231AF0, 0x0808C6AF)
end
emuObj.AddVsyncHook(patcher)
</pre>
====Forbidden Siren 2====
'''CLI'''
<br>NTSC
<pre>
--vu-xgkick-delay=9
</pre>
====Wild Arms 4====
'''CLI'''
<pre>
#Fatal Fury emu
#Gamefixes
--vu-hack-triace=1
--iop-hook=0xAD808,AdvanceClock,,3000
</pre>
===sceTtyPrint===
This should print some debug info in emulog/klog, pcsx2 a like. Pattern based on Smugglers Run 2 and Spiderman 3. So first test should be done with those games. Spiderman should print something like "Legal screen is 512 x 256." first. Smugglers Run 2 "Timezone=60". Assuming it work, this can give some valuable info about VIF1/GIF hangs, which are 50% of issues in those crappy emus.
--sceTtyWrite take:
--a0 = string ptr
--a1 = size (we need to overwrite str_ptr + size with 0 to make it 0 terminated)
-- best tty pattern for now = "0A 00 07 24 0D 00 05 24 0C 00 C4 24"
apiRequest(1.0)
eeObj  = getEEObject()
emuObj = getEmuObject()
local printerino = function()
    local str_ptr  = eeObj.GetGpr(4) -- a0
    local str_size = eeObj.GetGpr(5) -- a1
   
    -- Add zero terminator, not sure if we need it...
    -- But i don't see any way to pass how long string should be.
    -- So just 0 terminate it just in case.
    -- Note: PS2 pass newline as last character, maybe we don't need it.
    -- if it break anything, or looks weird, then remove +1 from below write.
    eeObj.WriteMem8(str_ptr + str_size + 1, 0)
   
    local str = eeObj.ReadMemStr(str_ptr)
    print(string.format("PS2 DEBUG: %s", str))
end
local addr  = 0x100008
local ttySearch = function()
print("PS2 DEBUG: Entering ttySearch.")
    while(addr < 0x1000000 )
    do
        if eeObj.ReadMem32(addr) == 0x2407000A then
            if eeObj.ReadMem32(addr + 4) == 0x2405000D then
                if eeObj.ReadMem32(addr + 8) == 0x24C4000C then
-- I'm sorry...
local check = 0
local full_op = 0
while(check ~= 0x27BD and addr ~= 0x100008)
do
    addr = addr - 4
full_op = eeObj.ReadMem32(addr)
check = full_op >> 16
end
                    break -- first loop
                else
                    addr = addr + 4
                end
            else
                addr = addr + 4
            end
        else
            addr = addr + 4
        end
    end
if addr < 0x1000000 and not addr < 0x100008 then
    print(string.format("Found sceTtyWrite function at: 0x%X", addr))
eeObj.AddHook(addr, full_op, printerino)
else
    print("sceTtyWrite function not found!")
    end
end
emuObj.AddEntryPointHook(ttySearch)


{{Reverse Engineering}}<noinclude>
{{Reverse Engineering}}<noinclude>
[[Category:Main]]
[[Category:Main]]
</noinclude>
</noinclude>
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)