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 379: Line 379:
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 868:


<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,024:


# 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 3,458: Line 3,433:
<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,211:


#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,830: Line 4,790:
</pre>
</pre>


====Ratchet 4 - Deadlocked====
====Ratchet and Clank: Up Your Arsenal====
<br>'''CLI'''
<br>SCUS97353
<br>Emu = '''War of the Monsters'''
<pre>
<pre>
#Fix graphics
-- 23.07.2023 Added debug stuff that should print in klog.
--gs-use-mipmap=1
-- This should help us figure out why patch fail.
--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'''
apiRequest(1.0)
<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 em  = getEmuObject()
local ee  = getEEObject()
local ee  = getEEObject()
Line 5,062: Line 4,938:
</pre>
</pre>


<br>'''CLI'''
I'm following this approach but it isn't working and I do not know why. --[[User:Scalerize|Scalerize]] ([[User talk:Scalerize|talk]]) 21:55, 28 August 2023 (CEST)
<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>
<pre>
apiRequest(0.1)
apiRequest(0.1)


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


local patcher = function()
--jmp
eeObj.WriteMem32(0x0011F38C, 0x0803FE80)


--Check if patcher's needed
eeObj.AddHook(0x0013B3C8, 0x0200F809, function()  
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
local pointer =  eeObj.GetGpr(gpr.s0)
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
end)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
 
eeObj.WriteMem32(0x000FFA10, 0xAC44FFF4)
 
eeObj.WriteMem32(0x000FFA0C, 0x3442FA00)
--vcallms before
eeObj.WriteMem32(0x000FFA14, 0xAC45FFF0)
eeObj.AddHook(pointer+0x5496C, 0x7120CDA8, function()
eeObj.WriteMem32(0x000FFA18, 0x8C44FFFC)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFA1C, 0x8C840000)
end)
eeObj.WriteMem32(0x000FFA20, 0x149B0003)
 
eeObj.WriteMem32(0x000FFA28, 0x08047CE4)
--vcallms after
eeObj.WriteMem32(0x000FFA2C, 0x241B0000)
eeObj.AddHook(pointer+0x54974, 0x00000000, function()
eeObj.WriteMem32(0x000FFA34, 0xAC43FFF8)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFA38, 0x3C040010)
end)
eeObj.WriteMem32(0x000FFA3C, 0x24840004)
 
eeObj.WriteMem32(0x000FFA40, 0x8C830000)
--vi01 before 1
eeObj.WriteMem32(0x000FFA44, 0x107B0003)
eeObj.AddHook(pointer+0x54A24, 0x00000000, function()
eeObj.WriteMem32(0x000FFA4C, 0x1000FFFB)
          eeObj.AdvanceClock(500)
--Patcher
end)
eeObj.WriteMem32(0x000FFA54, 0xAC44FFFC)
 
eeObj.WriteMem32(0x000FFA64, 0x3C030C03)
--vi01 before 2
eeObj.WriteMem32(0x000FFA68, 0x3463FE48)
eeObj.AddHook(pointer+0x54B64, 0x7019CC3F, function()
eeObj.WriteMem32(0x000FFA6C, 0xAC8300BC) --First 6 vi01
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFA78, 0xAC8301FC)
end)
eeObj.WriteMem32(0x000FFA84, 0xAC830354)
 
eeObj.WriteMem32(0x000FFA90, 0xAC830494)
--vi01 before 3
eeObj.WriteMem32(0x000FFA9C, 0xAC8305EC)
eeObj.AddHook(pointer+0x54CBC, 0x00000000, function()
eeObj.WriteMem32(0x000FFAA8, 0xAC83072C)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFAAC, 0x3C030C03)
end)
eeObj.WriteMem32(0x000FFAB0, 0x3463FE4B)
 
eeObj.WriteMem32(0x000FFAB4, 0xAC83015C) --First 4 vi02
--vi01 before 4
eeObj.WriteMem32(0x000FFAC0, 0xAC8302AC)
eeObj.AddHook(pointer+0x54DFC, 0x7019CC3F, function()
eeObj.WriteMem32(0x000FFACC, 0xAC8303F4)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFAD8, 0xAC830544)
end)
--Physics (COP2 timing issues that I'm fixing through patches instead) (Camera, glove weapon, and gravity)
 
eeObj.WriteMem32(0x000FFADC, 0x3C032401)
--vi01 before 5
eeObj.WriteMem32(0x000FFAE0, 0x346300E0)
eeObj.AddHook(pointer+0x54F54, 0x0019C900, function()
eeObj.WriteMem32(0x000FFAE4, 0xAC8311E4) --gravity
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFAF0, 0xAC833F64) --camera, glove weapon
end)
--Ret
 
eeObj.WriteMem32(0x000FFC0C, 0x8C44FFF4)
--vi01 before 6
eeObj.WriteMem32(0x000FFC10, 0x8C45FFF0)
eeObj.AddHook(pointer+0x55094, 0x7017BEC8, function()
eeObj.WriteMem32(0x000FFC14, 0x8C43FFF8)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFC18, 0x08047CE4)
end)
--VI01 AND VI02 to burn cycles in (000FF904) using advanceclock
 
eeObj.WriteMem32(0x000FF914, 0x03E00008)
--vi01 after 1
eeObj.WriteMem32(0x000FF918, 0x241F0000)
eeObj.AddHook(pointer+0x54A2C, 0x00000000, function()
eeObj.WriteMem32(0x000FF920, 0x48C00800)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FF924, 0x1000FFF7)
end)
eeObj.WriteMem32(0x000FF92C, 0x48C01000)
eeObj.WriteMem32(0x000FF930, 0x1000FFF4)
end
emuObj.AddVsyncHook(patcher)


--vi01 after 2
eeObj.AddHook(pointer+0x54B6C, 0x00000000, function()
          eeObj.AdvanceClock(500)
end)


</pre>
--vi01 after 3
eeObj.AddHook(pointer+0x54CC4, 0x00000000, function()
          eeObj.AdvanceClock(500)
end)


====Ratchet & Clank 2 - Going Commando====
--vi01 after 4
<br>'''CLI'''
eeObj.AddHook(pointer+0x54E04, 0x00000000, function()
<br>Emu = '''War of the Monsters'''
          eeObj.AdvanceClock(500)
<br>SCUS-97268
end)
<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'''
--vi01 after 5
<br>SCUS-97268
eeObj.AddHook(pointer+0x54F5C, 0x000F7880, function()
<pre>
          eeObj.AdvanceClock(500)
apiRequest(0.1)
end)


local eeObj = getEEObject()
--vi01 after 6
local emuObj = getEmuObject()
eeObj.AddHook(pointer+0x5509C, 0x71D18D88, function()
          eeObj.AdvanceClock(500)
end)


local patcher = function()
--vi02 before 1
--jmp
eeObj.AddHook(pointer+0x54AC4, 0x701188FC, function()
eeObj.WriteMem32(0x0011B18C, 0x0803FE80)
          eeObj.AdvanceClock(500)
end)


--Check if patcher's needed
--vi02 before 2
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
eeObj.AddHook(pointer+0x54C14, 0x7120CDA8, function()
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
end)
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>
--vi02 before 3
eeObj.AddHook(pointer+0x54D5C, 0x701188FC, function()
          eeObj.AdvanceClock(500)
end)


<br>'''CLI'''
--vi02 before 4
<br>Emu = '''War of the Monsters'''
eeObj.AddHook(pointer+0x54EAC, 0x7120CDA8, function()
<br>SCES-51607
          eeObj.AdvanceClock(500)
<pre>
end)
--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'''
--vi02 before 5
<br>SCES-51607
eeObj.AddHook(pointer+0x54FF4, 0x0019C900, function()
<pre>
          eeObj.AdvanceClock(500)
apiRequest(0.1)
end)


local eeObj = getEEObject()
--vi02 before 6
local emuObj = getEmuObject()
eeObj.AddHook(pointer+0x5514C, 0x00000000, function()
          eeObj.AdvanceClock(500)
end)


local patcher = function()
--vi02 after 1
--Initial jmp
eeObj.AddHook(pointer+0x54ACC, 0x70E0CDA8, function()
eeObj.WriteMem32(0x0011B1AC, 0x0C03FE80)
          eeObj.AdvanceClock(500)
--Check if patcher's needed
end)
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====
--vi02 after 2
<br>'''CLI'''
eeObj.AddHook(pointer+0x54C1C, 0x7009E688, function()
<br>Emu = '''War of the Monsters'''
          eeObj.AdvanceClock(500)
<br>SCUS-97199
end)
<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'''
--vi02 after 3
<br>SCUS-97199
eeObj.AddHook(pointer+0x54D64, 0x70E0CDA8, function()
<br>Author:Scalerize
          eeObj.AdvanceClock(500)
<pre>
end)
apiRequest(0.1)


local eeObj = getEEObject()
--vi02 after 4
local emuObj = getEmuObject()
eeObj.AddHook(pointer+0x54EB4, 0x7009E688, function()
          eeObj.AdvanceClock(500)
end)


local patcher = function()
--vi02 after 5
--jmp
eeObj.AddHook(pointer+0x54FFC, 0x22310006, function()
eeObj.WriteMem32(0x00118CAC, 0x0803FE80)
          eeObj.AdvanceClock(500)
end)


--Check if patcher's needed
--vi02 after 6
eeObj.WriteMem32(0x000FFA00, 0x3C1B7120)
eeObj.AddHook(pointer+0x55154, 0x00000000, function()
eeObj.WriteMem32(0x000FFA04, 0x377BCDA8)
          eeObj.AdvanceClock(500)
eeObj.WriteMem32(0x000FFA08, 0x3C02000F)
end)
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>
</pre>
You need to define pointer as a global variable or define it inside more advanced function, otherwise it is deleted/undefined when you exit first hook. Additionally your code use aliases without importing required file. This can be fixed by importing it or by using 16 instead of gpr.s0. Next thing is that all those hooks imo should be mounted from single function to ensure that all new hooks are added when game step on first hook. Keep in mind that the way you are obtaining ctc addresses can fail for next stages. Finally, when leaving stage you need to remove those hooks. Because they stay there forever, and that address can already hold different code after stage change. This is because hook check for original opcode is done only when mounting it there, not when running code itself. On top of that game overlay loader which you should use to grab pointer IS NOT used to load main menu screen, so you need to patch it manually or at least with another hook. I don't have ratchet elf now here, but make sure that your initial hook is added in place where new level code is already there, because now it seems that your initial hook is before level loader is even launched. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 12:06, 29 August 2023 (CEST)


====Robot Alchemic Drive====
====Robot Alchemic Drive====
Line 5,431: Line 5,126:
<pre>
<pre>
#Fatal Fury emu
#Fatal Fury emu
#Gamefixes
--vu-hack-triace=1
--vu-hack-triace=1
--iop-hook=0xAD808,AdvanceClock,,3000
--cdvd-sector-read-cycles=1
--cdvd-sector-seek-cycles=1
--iop-cycle-scalar=5
</pre>
</pre>


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)