# This script was made by OblivionReign
import sys
sys.path.insert(1,'C:\Program Files\IDA Professional 9.2\scripts')
from importlib import reload
try:
if 'cheatlib' in sys.modules:
del sys.modules['cheatlib']
except NameError:
pass
import cheatLib
cheatLib = reload(cheatLib)
from cheatLib import *
cls()
################################ START ######################################
Init('Pokemon Legends Z-A')
AddSection('Item/Misc')
AddCheat('Disable Autosave') # strb w8, [x20, #0xf0]
cheatAddr = AOB('88 C2 03 39 E1 03 13 AA')
cheatAddr1 = AOB('68 C2 03 39 88 02 40 F9')
if isFound(cheatAddr):
Hack(cheatAddr,('STRB WZR, [X20, #0xF0]'))
else:
Hack(cheatAddr1,('STRB WZR, [X19, #0xF0]'))
AddCheat('Max/Inf Money') # str w8, [x0, #0x40]
cheatAddr1 = AOB('08 40 00 B9 00 01 80 52')
cheatAddr2 = AOB('08 40 00 B9 C0 03 5F D6 E0 CF 92 52')
Hack(cheatAddr1, 'str w9, [x0, #0x40]')
Hack(cheatAddr2, 'str w9, [x0, #0x40]')
AddCheat('Max Item Quantity (On Access/Gain)')
cheatAddr = AOB('02 01 00 F9 03 09 00 B9')
CodeCave(cheatAddr, (
'MOV W10, #999',
'BFI X2, X10, #32, #32',
'STR X2, [X8]',
'B {back}',
),
use_BL=False)
AddCheat('50,000 Challenger Tickets') # add w8, w8, w22
cheatAddr = AOB('08 01 16 0B 69 2E 41 B9')
Hack(cheatAddr, 'mov w8, #0xc350')
AddCheat('Max Hyperspace Survey Points') # add w25, w0, w25
cheatAddr = AOB('19 00 19 0B E0 03 14 AA')
Hack(cheatAddr, 'movn w25, #0')
EndSection('Item/Misc')
AddSection('Movement')
AddCheat('Movement Speed x8 Hold ZL') # fmov s0, #1.00000000
hack_addr = AOB('00 10 2E 1E 00 18 24 1E')
Hack(
hack_addr,
'fmov s0, #8.00000000',
showRestoreCode=False,
useButton='ZL',
elseCode=Hack(
hack_addr,
'fmov s0, #1.00000000',
showRestoreCode=False,
returnCode=True
)
)
AddCheat('Walk through Walls (Hold:Y)')
AddCheatCode('''580F0000 05F2B9A8
580F1000 000000C0
580F1000 00000000
580F1000 00000138
780F0000 00000143
610F0000 00000000 0000003C
80000008
610F0000 00000000 000000BF
20000000
''')
AddCheat('Moon Jump (Hold:B)')
AddCheatCode('''80000002
580F0000 05F2B9A8
580F1000 000000C0
580F1000 00000000
580F1000 00000138
780F0000 00000094
989EF000
580E1000 00000000
C4000000 00000000 00000002
94AEE100 40000000
20000000
A4EF0000
80000002
580F0000 05F2B9A8
580F1000 000000C0
580F1000 00000000
580F1000 00000138
780F0000 000000C4
640F0000 00000000 41200000
20000000
''')
AddCheat('Game Speed (R3+↑/↓ Speed Up/Down')
cheatAddr=AOB('56 A0 FC 01', searchStart=dataStart, searchEnd=dataEnd)
AddCheatCode('''80002020
18050000 %08X 00000000 03F940AB
040F0000 %08X 05F5E100
20000000
18050000 %08X 00000000 02FAF080
040F0000 %08X 03F940AB
20000000
18050000 %08X 00000000 01FCA056
040F0000 %08X 02FAF080
20000000
20000000
80008020
18050000 %08X 00000000 02FAF080
040F0000 %08X 01FCA056
20000000
18050000 %08X 00000000 03F940AB
040F0000 %08X 02FAF080
20000000
18050000 %08X 00000000 05F5E100
040F0000 %08X 03F940AB
20000000
20000000
'''%(cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr,cheatAddr))
EndSection('Movement')
AddSection('Spawn Modifiers')
AddCheat('Force Shiny') # ldr w1, [sp, #0x20], ldr w1, [sp, #0x28]
cheatAddr = AOB('E1 23 40 B9 ? ? ? ? 60 3A 40 F9')
cheatAddr1 = AOB('E1 2B 40 B9 ? ? ? ? 60 3A 40 F9')
Hack(cheatAddr, 'mov w1, #1')
Hack(cheatAddr1, 'mov w1, #1')
AddCheat('6IV On') # ldrb w1, [sp, #0x50]
cheatAddr1 = AOB('E1 43 41 39')
cheatAddr2 = AOB('E1 4B 41 39')
cheatAddr3 = AOB('E1 53 41 39')
cheatAddr4 = AOB('E1 5B 41 39')
cheatAddr5 = AOB('E1 63 41 39')
cheatAddr6 = AOB('E1 6B 41 39')
Hack(cheatAddr1, 'mov w1, #0x1f')
Hack(cheatAddr2, 'mov w1, #0x1f')
Hack(cheatAddr3, 'mov w1, #0x1f')
Hack(cheatAddr4, 'mov w1, #0x1f')
Hack(cheatAddr5, 'mov w1, #0x1f')
Hack(cheatAddr6, 'mov w1, #0x1f')
AddCheat('Always Encounter Pokedex')
cheatAddr1 = AOB('17 30 41 79')
cheatAddr2 = AOB('60 3A 40 F9 ? ? ? ? 60 3A 40 F9 E1 1B 40 B9')
cheatAddr3 = AOB('16 30 41 79 08 C0 45 39')
cheatAddr4 = AOB('60 3A 40 F9 ? ? ? ? 60 3A 40 F9 E1 1B 40 B9')
# Check if Primary Set exists
if isFound(cheatAddr1) and isFound(cheatAddr2):
CodeCave(cheatAddr1, (
'ldrh w23, [x0, #0x98]',
'adrp x7, #0x2fa4000',
'str w23, [x7, #0x8f0]',
'B {back}',
), use_BL=False)
CodeCave(cheatAddr2, (
'adrp x7, #0x2fa4000',
'ldr w1, [x7, #0x8f0]',
'cbz w1, #0x8',
'strh w1, [sp, #0x32]',
'ldr x0, [x19, #0x70]',
'B {back}',
), use_BL=False)
# If Primary fails, check Secondary Set
elif isFound(cheatAddr3) and isFound(cheatAddr4):
CodeCave(cheatAddr3, (
'ldrh w22, [x0, #0x98]',
'adrp x7, #0x2fa4000',
'str w22, [x7, #0x8f0]',
'B {back}',
), use_BL=False)
CodeCave(cheatAddr4, (
'adrp x7, #0x2fa4000',
'ldr w1, [x7, #0x8f0]',
'cbz w1, #0x8',
'strh w1, [sp, #0x32]',
'ldr x0, [x19, #0x70]',
'B {back}',
), use_BL=False)
base_addr = GetCodeK()
LEVEL_DATA_ADDR = base_addr - 4
ITEM_DATA_ADDR = base_addr - 8
FORM_DATA_ADDR = base_addr - 0xC
SPECIES_DATA_ADDR = base_addr - 0x10
AddCheat('Always Encounter Pokemon')
cheatAddr1 = AOB('60 3A 40 F9 ? ? ? ? 60 3A 40 F9 E1 1B 40 B9')
data_values = (
'00000000', # Species (Init 0)
'00000000', # Form (Init 0)
'00000000', # Item (Init 0)
'0000000A' # Level (Init 10)
)
cave_instructions = (
'ldr w1, {end}-0x10', # Load Species
'cbz w1, #0x8', # If 0, skip
'strh w1, [sp, #0x32]', # Overwrite Species
'ldr w1, {end}-0xC', # Load Form
'strh w1, [sp, #0x34]', # Overwrite Form
'ldr w1, {end}-8', # Load Item
'strh w1, [sp, #0x36]', # Overwrite Item
'ldr w1, {end}-4', # Load Level
'strb w1, [sp, #0x40]', # Overwrite Level
'ldr x0, [x19, #0x70]', # Original Instruction
'B {back}', # Return
)
final_cave_block = cave_instructions + data_values
if isFound(cheatAddr1):
CodeCave(cheatAddr1, final_cave_block, showRestoreCode=False, use_BL=False)
AddCheat('Encounter Zygarde') # Dex #718 Hex #2CE
Hack(
SPECIES_DATA_ADDR,
0x2CE,
False
)
AddCheat('Encounter Zygarde Level 100 10%')
Hack(
SPECIES_DATA_ADDR,
0x2CE,
False
)
Hack(
FORM_DATA_ADDR,
0x2,
False
)
Hack(
LEVEL_DATA_ADDR,
0x64,
False
)
AddCheat('Encounter Item Masterball') # Item 1
Hack(
ITEM_DATA_ADDR,
0x1,
False
)
AddCheat('Encounter Item Rare Candy') # Item 50
Hack(
ITEM_DATA_ADDR,
0x32,
False
)
AddCheat('Always Level 100') # ldrb w2, [sp, #0x40]
cheatAddr = AOB('E2 03 41 39')
Hack(cheatAddr, 'mov w2, #0x64')
AddCheat('Always Level 50') # ldrb w2, [sp, #0x40]
cheatAddr = AOB('E2 03 41 39')
Hack(cheatAddr, 'mov w2, #50', showRestoreCode=False)
AddCheat('Always Level 5') # ldrb w2, [sp, #0x40]
cheatAddr = AOB('E2 03 41 39')
Hack(cheatAddr, 'mov w2, #0x5', showRestoreCode=False)
AddCheat('Always Level 1') # ldrb w2, [sp, #0x40]
cheatAddr = AOB('E2 03 41 39')
Hack(cheatAddr, 'mov w2, #0x1', showRestoreCode=False)
AddCheat('Always Male') # ldrb w1, [sp, #0x42]
cheatAddr = AOB('E1 0B 41 39')
Hack(cheatAddr, 'mov w1, #0')
AddCheat('Always Female') # ldrb w1, [sp, #0x42]
cheatAddr = AOB('E1 0B 41 39')
Hack(cheatAddr, 'mov w1, #1', showRestoreCode=False)
AddCheat('Always Genderless') # ldrb w1, [sp, #0x42]
cheatAddr = AOB('E1 0B 41 39')
Hack(cheatAddr, 'mov w1, #2', showRestoreCode=False)
AddCheat('(None Hardy)') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0')
Hack(cheatAddr2, 'mov w1, #0')
AddCheat('(+Atk, -Def) Lonely') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #1', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #1', showRestoreCode=False)
# [(+Atk, -Spd) Brave] - Value #2
AddCheat('(+Atk, -Spd) Brave') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #2', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #2', showRestoreCode=False)
# [(+Atk, -SAtk) Adamant] - Value #3
AddCheat('(+Atk, -SAtk) Adamant') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #3', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #3', showRestoreCode=False)
# [(+Atk, -SDef) Naughty] - Value #4
AddCheat('(+Atk, -SDef) Naughty') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #4', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #4', showRestoreCode=False)
# [(+Def, -Atk) Bold] - Value #5
AddCheat('(+Def, -Atk) Bold') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #5', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #5', showRestoreCode=False)
# [(None) Docile] - Value #6
AddCheat('(None) Docile') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #6', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #6', showRestoreCode=False)
# [(+Def, -Spd) Relaxed] - Value #7
AddCheat('(+Def, -Spd) Relaxed') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #7', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #7', showRestoreCode=False)
# [(+Def, -SAtk) Impish] - Value #8
AddCheat('(+Def, -SAtk) Impish') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #8', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #8', showRestoreCode=False)
# [(+Def, -SDef) Lax] - Value #9
AddCheat('(+Def, -SDef) Lax') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #9', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #9', showRestoreCode=False)
# [(+Spd, -Atk) Timid] - Value #0xA
AddCheat('(+Spd, -Atk) Timid') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0xa', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0xa', showRestoreCode=False)
# [(+Spd, -Def) Hasty] - Value #0xB
AddCheat('(+Spd, -Def) Hasty') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0xb', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0xb', showRestoreCode=False)
# [(None) Serious] - Value #0xC
AddCheat('(None) Serious') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0xc', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0xc', showRestoreCode=False)
# [(+Spd, -SAtk) Jolly] - Value #0xD
AddCheat('(+Spd, -SAtk) Jolly') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0xd', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0xd', showRestoreCode=False)
# [(+Spd, -SDef) Naive] - Value #0xE
AddCheat('(+Spd, -SDef) Naive') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0xe', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0xe', showRestoreCode=False)
# [(+SAtk, -Atk) Modest] - Value #0xF
AddCheat('(+SAtk, -Atk) Modest') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0xf', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0xf', showRestoreCode=False)
# [(+SAtk, -Def) Mild] - Value #0x10
AddCheat('(+SAtk, -Def) Mild') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x10', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x10', showRestoreCode=False)
# [(+SAtk, -Spd) Quiet] - Value #0x11
AddCheat('(+SAtk, -Spd) Quiet') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x11', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x11', showRestoreCode=False)
# [(None) Bashful] - Value #0x12
AddCheat('(None) Bashful') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x12', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x12', showRestoreCode=False)
# [(+SAtk, -SDef) Rash] - Value #0x13
AddCheat('(+SAtk, -SDef) Rash') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x13', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x13', showRestoreCode=False)
# [(+SDef, -Atk) Calm] - Value #0x14
AddCheat('(+SDef, -Atk) Calm') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x14', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x14', showRestoreCode=False)
# [(+SDef, -Def) Gentle] - Value #0x15
AddCheat('(+SDef, -Def) Gentle') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x15', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x15', showRestoreCode=False)
# [(+SDef, -Spd) Sassy] - Value #0x16
AddCheat('(+SDef, -Spd) Sassy') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x16', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x16', showRestoreCode=False)
# [(+SDef, -SAtk) Careful] - Value #0x17
AddCheat('(+SDef, -SAtk) Careful') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x17', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x17', showRestoreCode=False)
# [(None) Quirky] - Value #0x18
AddCheat('(None) Quirky') # ldrh w1, [sp, #0x44], ldrh w1, [sp, #0x46]
cheatAddr1 = AOB('E1 8B 40 79')
cheatAddr2 = AOB('E1 8F 40 79')
Hack(cheatAddr1, 'mov w1, #0x18', showRestoreCode=False)
Hack(cheatAddr2, 'mov w1, #0x18', showRestoreCode=False)
EndSection('Spawn Modifiers')
AddSection('Battle Codes')
AddCheat('Max/Infinite Mega Energy') # str s1, [x19, #0x1a8]
cheatAddr = AOB('61 AA 01 BD')
CodeCave(cheatAddr,(
'ldr s1, {end}-4',
'str s1, [x19, #0x1a8]',
'B {back}',
Float2DWord(100.0),
),
use_BL=False)
AddCheat('Exp Multiplier x4') # fmov s2, #2.0
cheatAddr = AOB('00 10 20 1E 60 10 00 1F')
Hack(cheatAddr, 'fmov s0, #4.0')
AddCheat('Exp Multiplier x17') # fmov s2, #2.0
cheatAddr = AOB('00 10 20 1E 60 10 00 1F')
Hack(cheatAddr, 'fmov s0, #17.0', showRestoreCode=False)
AddCheat('No Move cooldown') # fmaxnm v0.4s, v0.4s, v1.4s
cheatAddr = AOB('00 C4 21 4E')
Hack(cheatAddr, 'movi v0.2d, #0')
AddCheat('100% Catch Rate') # and w8, w0, #0xff
cheatAddr = AOB('08 1C 00 12 1F 05 00 71 21 01 00 54')
Hack(cheatAddr, 'mov w8, #1')
AddCheat('Player doesnt Blackout') # cbnz x0, #0x14
cheatAddr = AOB('A0 00 00 B5 94 22 00 91 9F 02 15 EB 41 FE FF 54 ? ? ? ? 57 00 00 B4')
Hack(cheatAddr, 'cbz x0, #0x14')
EndSection('Battle Codes')
TIME_DELTA_ADDR = RegCodeK(4)
RegData(Float2DWord(100.0), size=4)
CHEAT_HOOK_ADDR = AOB('80 22 00 91 E8 23 00 91 8A 32 00 BD')
AddSection('Time Control')
AddCheat('Stop Time')
Hack(CHEAT_HOOK_ADDR+8, 'str s8, [x20, #0x30]')
cave_forward = CodeCave(CHEAT_HOOK_ADDR, (
'ldr s11, {end}-0x4', # Load float address
'fadd s10, s10, s11', # Time = Time + Delta
'add x0, x20, #0x8', # Original Instruction 1 (hooked instruction)
'b {back}', # Return to next instruction
Float2DWord(100.0) # Data
), showRestoreCode=False, use_BL=False, returnCode=True)
cave_reverse = CodeCave(CHEAT_HOOK_ADDR, (
'ldr s11, {end}-0x4', # Load float address
'fsub s10, s10, s11', # Time = Time - Delta
'add x0, x20, #0x8', # Original Instruction 1
'b {back}', # Return to next instruction
Float2DWord(100.0) # Data
), showRestoreCode=False, use_BL=False, returnCode=True)
cave_normal = CodeCave(CHEAT_HOOK_ADDR, (
'add x0, x20, #0x8', # Original Instruction 1
'b {back}' # Return to next instruction
), showRestoreCode=False, use_BL=False, returnCode=True)
secondary_check = ButtonCode(['ZL', 'B'],
code=cave_reverse,
elseCode=cave_normal)
final_combined_code = ButtonCode(['ZL', 'A'],
code=cave_forward,
elseCode=secondary_check)
AddCheat('Control Time (ZL+A Fwd / ZL+B Rev)')
AddCheatCode(final_combined_code)
AddCheat('Stop Time Mega Dimension') # fmsub d0, d8, d0, d1
cheatAddr = AOB('00 85 40 1F')
Hack(cheatAddr, 'fmov d0, d1')
EndSection('Time Control')
################################# END #######################################
HackComplete()