diff --git a/NTSC-J 1.0/QFTFreezeEX.txt b/NTSC-J 1.0/QFTFreezeEX.txt new file mode 100644 index 0000000..6c8e4eb --- /dev/null +++ b/NTSC-J 1.0/QFTFreezeEX.txt @@ -0,0 +1,11 @@ +$ QFT Freeze Extra (2022/11/02) [sup39] +04122964 496CDA41 +0411EAE4 496D18B9 +041335B8 496BCDF5 +077F039C 0000002C +801F0384 4BFFFFA8 +38000000 4BFFFFA0 +38000000 57A3043E +2803034B 4182FF90 +28030387 4182FF88 +4E800020 00000000 diff --git a/README.md b/README.md index e2b8adb..65ea7b8 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,7 @@ C Stick|State ↙|post-BH7 (pre-Yoshi-unlock) ←|post-SB7 ↖|post-NB7 (pre-CM-unlock) + +## QFT Freeze Extra +- Legde grab +- Pick up/Throw/Put object diff --git a/src/QFTFreezeEX.ld b/src/QFTFreezeEX.ld new file mode 100644 index 0000000..fb8ee31 --- /dev/null +++ b/src/QFTFreezeEX.ld @@ -0,0 +1,6 @@ +$$ = 0x817f039c; + +freezeQFT = 0x817f0348; +$bl$.onTake = 0x8011eae4; +$bl$.onDrop = 0x80122964; +$bl$.onChangeStatus = 0x801335b8; diff --git a/src/QFTFreezeEX.s b/src/QFTFreezeEX.s new file mode 100644 index 0000000..0672faf --- /dev/null +++ b/src/QFTFreezeEX.s @@ -0,0 +1,36 @@ +.set state.LedgeGrab, 0x3800034B +.set state.PickUp, 0x383 +.set state.Put, 0x80000387 +.set state.Throw, 0x80000588 + +.macro liDX reg val + .if -0x8000 <= \val && \val < 0x8000 || 0xffff8000 <= \val + li \reg, \val@l + .else + lis \reg, \val@h + .if \val&0xffff != 0 + ori \reg, \reg, \val@l + .endif + .endif +.endm + +.onTake: + lwz r0, 0x384(r31) + b freezeQFT +.onDrop: + li r0, 0 + b freezeQFT + +.onChangeStatus: +## orig + li r0, 0 +## checkstatus + ## TODO is checking lower 16 bit enough? + #liDX r12, state.LedgeGrab + #cmplw r29, r12 + rlwinm r3, r29, 0, 16, 31 + cmplwi r3, state.LedgeGrab@l + beq- freezeQFT + cmplwi r3, state.Put@l + beq- freezeQFT + blr