From 383bfe96182937f8a897a76901eb034784693567 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Oct 2017 22:33:38 -0700 Subject: [PATCH] [BotW] Add FPS++ (made by Xalphenos) This marks v2-100 on the AppVeyor! --- .../BreathOfTheWild_FPS++/patches.txt | 149 ++++++++++++++++++ Modifications/BreathOfTheWild_FPS++/rules.txt | 2 +- 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 Modifications/BreathOfTheWild_FPS++/patches.txt diff --git a/Modifications/BreathOfTheWild_FPS++/patches.txt b/Modifications/BreathOfTheWild_FPS++/patches.txt new file mode 100644 index 00000000..6d8ae802 --- /dev/null +++ b/Modifications/BreathOfTheWild_FPS++/patches.txt @@ -0,0 +1,149 @@ +[Botw60fpsv112] +moduleMatches = 0x6FD41A61 + +#rodata constants + +_float1 = 0x1026E518 +_float3 = 0x100005D4 + +#TestCave +codeCaveSize = 0x9C + +_fpsCalc = 0x00000008 +0x00000000 = .float 3 ;edit me +_lowlimit = 0x00000000 +0x00000004 = .float 6294724 +_busSpeed = 0x00000004 +0x00000008 = stw r0, 0x78(r30) +0x0000000C = xoris r12, r12, 0x8000 +0x00000010 = stw r12, 0x12C(r30) +0x00000014 = lis r12, 0x4330 +0x00000018 = stw r12, 0x128(r30) +0x0000001C = lfd f10, 0x128(r30) +0x00000020 = stw r12, 0x138(r30) +0x00000024 = lis r12, 0x8000 +0x00000028 = stw r12, 0x13C(r30) +0x0000002C = lfd f12, 0x138(r30) +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 +0x00000048 = lis r12, _busSpeed@ha +0x0000004C = lfs f12, _busSpeed@l(r12) +0x00000050 = fmuls f10, f12, f10 +0x00000054 = lis r12, _float3@ha +0x00000058 = lfs f12, _float3@l(r12) +0x0000005C = fdivs f7, f12, f10 +0x00000060 = lis r12, _lowlimit@ha +0x00000064 = lfs f12, _lowlimit@l(r12) +0x00000068 = fcmpu cr0, f7, f12 +0x0000006C = bge .+0x0C +0x00000070 = stfs f7, 0x130(r30) +0x00000074 = blr +0x00000078 = stfs f12, 0x130(r30) +0x0000007C = blr + +_fullspeed = 0x00000080 +0x00000080 = lis r3, 0x1126 +0x00000084 = lis r12, 0xB42C +0x00000088 = srawi r12, r12, 0x10 +0x0000008c = xoris r12, r12, 0xFFFF +0x00000090 = or r3, r3, r12 +0x00000094 = lfs f0, 0x0(r3) +0x00000098 = blr + +#Branch +0x030D5080 = bla _fpsCalc +0x03653634 = nop +0x03653640 = nop +0x03653684 = bla _fullspeed +0x032E4130 = bla _fullspeed + +#break all forms of frame limiting +0x030D5200 = nop +0x030D53D4 = nop +0x030D53f8 = nop +0x030D5808 = li r0, 1 +0x030D57C4 = li r0, 1 + +#experimental +;0x02F7ECB8 = li r3, 0 +;0x02F7ED60 = li r3, 0 +;0x02F87224 = li r7, 1 +;0x02F87474 = li r7, 1 + +[Botw60fpsv97] +moduleMatches = 0xD71D859D + +#rodata constants + +_float1 = 0x10000660 +_float3 = 0x100031fC + +#TestCave +codeCaveSize = 0x9C + +_fpsCalc = 0x00000008 +0x00000000 = .float 3 ;edit me +_lowlimit = 0x00000000 +0x00000004 = .float 6294724 +_busSpeed = 0x00000004 +0x00000008 = stw r0, 0x78(r30) +0x0000000C = xoris r12, r12, 0x8000 +0x00000010 = stw r12, 0x12C(r30) +0x00000014 = lis r12, 0x4330 +0x00000018 = stw r12, 0x128(r30) +0x0000001C = lfd f10, 0x128(r30) +0x00000020 = stw r12, 0x138(r30) +0x00000024 = lis r12, 0x8000 +0x00000028 = stw r12, 0x13C(r30) +0x0000002C = lfd f12, 0x138(r30) +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 +0x00000048 = lis r12, _busSpeed@ha +0x0000004C = lfs f12, _busSpeed@l(r12) +0x00000050 = fmuls f10, f12, f10 +0x00000054 = lis r12, _float3@ha +0x00000058 = lfs f12, _float3@l(r12) +0x0000005C = fdivs f7, f12, f10 +0x00000060 = lis r12, _lowlimit@ha +0x00000064 = lfs f12, _lowlimit@l(r12) +0x00000068 = fcmpu cr0, f7, f12 +0x0000006C = bge .+0x0C +0x00000070 = stfs f7, 0x130(r30) +0x00000074 = blr +0x00000078 = stfs f12, 0x130(r30) +0x0000007C = blr + +_fullspeed = 0x00000080 +0x00000080 = lis r3, 0x1126 +0x00000084 = lis r12, 0xA824 +0x00000088 = srawi r12, r12, 0x10 +0x0000008c = xoris r12, r12, 0xFFFF +0x00000090 = or r3, r3, r12 +0x00000094 = lfs f0, 0x0(r3) +0x00000098 = blr + +#Branch +0x030D4120 = bla _fpsCalc +0x03652620 = nop +0x0365262C = nop +0x03652670 = bla _fullspeed +0x032E31D0 = bla _fullspeed + +#break all forms of frame limiting +0x030D42A0 = nop +0x030D4474 = nop +0x030D4498 = nop +0x030D48A8 = li r0, 1 +0x030D4864 = li r0, 1 + +#experimental +;0x02F7DD58 = li r3, 0 +;0x02F7DE00 = li r3, 0 +;0x02F862C4 = li r7, 1 +;0x02F86514 = li r7, 1 \ No newline at end of file diff --git a/Modifications/BreathOfTheWild_FPS++/rules.txt b/Modifications/BreathOfTheWild_FPS++/rules.txt index 2f0aebb2..405c5997 100644 --- a/Modifications/BreathOfTheWild_FPS++/rules.txt +++ b/Modifications/BreathOfTheWild_FPS++/rules.txt @@ -1,4 +1,4 @@ [Definition] titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "The Legend of Zelda: Breath of the Wild - FPS++ (dummy pack, nothing here yet)" +name = "The Legend of Zelda: Breath of the Wild - FPS++" version = 2 \ No newline at end of file