diff --git a/Modifications/BreathOfTheWild_FPS++/patches.txt b/Modifications/BreathOfTheWild_FPS++/patches.txt index 12e3a967..5c56e076 100644 --- a/Modifications/BreathOfTheWild_FPS++/patches.txt +++ b/Modifications/BreathOfTheWild_FPS++/patches.txt @@ -1,3 +1,90 @@ +[BotwFPSV208] +moduleMatches = 0x6267BFD0 + +#rodata constants +_float1 = 0x10000670 +_float30 = 0x101E7964 +_convSub = 0x10000BB0 + +#TestCave +codeCaveSize = 0x9C + +_fpsCalc = 0x00000010 +0x00000000 = .float 3 ; Don't edit me! +_lowlimit = 0x00000000 +0x00000004 = .float 62156250 +_busSpeed = 0x00000004 +_currentFPS = 0x00000008 +_speedDiv = 0x0000000C + +0x00000010 = stw r0, 0x78(r30) +0x00000014 = xoris r12, r12, 0x8000 +0x00000018 = stw r12, 0x12C(r30) +0x0000001C = lis r12, 0x4330 +0x00000020 = stw r12, 0x128(r30) +0x00000024 = lfd f10, 0x128(r30) +0x00000028 = lis r12, _convSub@ha +0x0000002C = lfd f12, _convSub@l(r12) +0x00000030 = fsub f10, f10, f12 +0x00000034 = frsp f10, f10 +0x00000038 = lis r12, _float1@ha +0x0000003C = lfs f12, _float1@l(r12) +0x00000040 = fdivs f10, f12, f10 +0x00000044 = lis r12, _busSpeed@ha +0x00000048 = lfs f12, _busSpeed@l(r12) +0x0000004C = fmuls f10, f12, f10 +0x00000050 = lis r12, _currentFPS@ha +0x00000054 = stfs f10, _currentFPS@l(r12) + +0x00000058 = lis r12, _float30@ha +0x0000005C = lfs f12, _float30@l(r12) +0x00000060 = fdivs f7, f12, f10 +0x00000064 = lis r12, _lowlimit@ha +0x00000068 = lfs f12, _lowlimit@l(r12) +0x0000006C = lis r12, _speedDiv@ha +0x00000070 = fcmpu cr0, f7, f12 +0x00000074 = bge .+0x0C + +0x00000078 = stfs f7, _speedDiv@l(r12) +0x0000007C = blr +0x00000080 = stfs f12, _speedDiv@l(r12) +0x00000084 = blr + +_fenceNeg1 = 0x00000084 +0x00000088 = add r6, r12, r0 #orig instruction we are replacing +0x0000008C = cmpwi r6, 500 #check if less than 500 (full sync on those first frames to prevent milk water) +0x00000090 = blt .+0x08 #skip subtract if less than +0x00000094 = subi r6, r6, 1 #do the subtract +0x00000098 = blr #return + +#codeChanges +0x031FA97C = bla _fpsCalc +0x03793328 = nop +0x03793334 = nop +0x03793378 = lis r29, _speedDiv@ha +0x03793380 = lfs f0, _speedDiv@L(r29) +0x0379338C = nop +0x03415C1C = lis r12, _speedDiv@ha +0x03415C24 = lfs f0, _speedDiv@l(r12) +0x03415C2C = nop +0x02D90D2C = lis r10, _currentFPS@ha +0x02D90D30 = lfs f11, _currentFPS@l(r10) +0x02D90D88 = lis r10, _currentFPS@ha +0x02D90D8C = lfs f11, _currentFPS@l(r10) + + +#break all forms of frame limiting +0x031FAAFC = bla _fenceNeg1 ;Best fence (make sure GPU is never more than 1 frame ahead) +;0x031FAAE8 = li r0, 1 ;Better fence (make sure GPU is never more than 1 second? ahead) +;0x031FAB00 = nop ; skip fence (no waiting on GPU) +0x031FACD0 = nop ; disable vsync +0x031FACF4 = nop ; disable vsync loop + +#Cheats +;0x02D90CC0 = fmr f29, f1 ;inf stamina +;0x02D452A4 = nop ;inf hearts +;0x02EB6758 = nop ;inf arrows + [BotwFPSv176V192] moduleMatches = 0xFD091F9F,0xD472D8A5