title_name = "Banjo-Kazooie"
title_id = "58410954" # XA-2388
hash = "700FE3401F23C364" # default.xex
#media_id = "69C685B7"

[[patch]]
    name = "60 FPS"
    desc = "Enable all fixes alongside this."
    author = "illusion, retroben"
    is_enabled = false

    # These patches require break_on_debugbreak to be changed from true to false in the Xenia Canary config.
    # Fixme: Missing parts for unfair snowman, and high jumping clam fixes.
    [[patch.be32]]
        address = 0x82110b64
        value = 0x483301cc
    [[patch.be32]]
        address = 0x82440d30
        value = 0x3d60824a
    [[patch.be32]]
        address = 0x82440d34
        value = 0x896bb08f
    [[patch.be32]]
        address = 0x82440d38
        value = 0x2b0b0000
    [[patch.be32]]
        address = 0x82440d3c
        value = 0x419a000c
    [[patch.be32]]
        address = 0x82440d40
        value = 0x39600002
    [[patch.be32]]
        address = 0x82440d44
        value = 0x4bccfe24
    [[patch.be32]]
        address = 0x82440d48
        value = 0x39600001
    [[patch.be32]]
        address = 0x82440d4c
        value = 0x4bccfe1c
    [[patch.be32]]
        address = 0x821d35a8
        value = 0x4826d7a8
    [[patch.be32]]
        address = 0x82440d50
        value = 0x3d60824a
    [[patch.be32]]
        address = 0x82440d54
        value = 0x896bb08f
    [[patch.be32]]
        address = 0x82440d58
        value = 0x2b0b0000
    [[patch.be32]]
        address = 0x82440d5c
        value = 0x419a000c
    [[patch.be32]]
        address = 0x82440d60
        value = 0x39600002
    [[patch.be32]]
        address = 0x82440d64
        value = 0x4bd92848
    [[patch.be32]]
        address = 0x82440d68
        value = 0x39600001
    [[patch.be32]]
        address = 0x82440d6c
        value = 0x4bd92840
    [[patch.be32]]
        address = 0x8216cf00
        value = 0x482d3e00
    [[patch.be32]]
        address = 0x82440d00
        value = 0x8961ffec
    [[patch.be32]]
        address = 0x82440d04
        value = 0x2f0b0040
    [[patch.be32]]
        address = 0x82440d08
        value = 0x419a000c
    [[patch.be32]]
        address = 0x82440d0c
        value = 0x2f0b0041
    [[patch.be32]]
        address = 0x82440d10
        value = 0x409a001c
    [[patch.be32]]
        address = 0x82440d14
        value = 0x897e0000
    [[patch.be32]]
        address = 0x82440d18
        value = 0x2f0b0040
    [[patch.be32]]
        address = 0x82440d1c
        value = 0x419a000c
    [[patch.be32]]
        address = 0x82440d20
        value = 0x2f0b0041
    [[patch.be32]]
        address = 0x82440d24
        value = 0x409a0008
    [[patch.be32]]
        address = 0x82440d28
        value = 0x4bd2c1e0
    [[patch.be32]]
        address = 0x82440d2c
        value = 0x4bd2c1ec

[[patch]]
    name = "Always HD Banjo"
    desc = "Devs neglected to change the outdoors model ID."
    author = "retroben"
    is_enabled = false

    [[patch.be16]]
        address = 0x8209d24e
        value = 0x034e

[[patch]]
    name = "Swimfix"
    desc = "Fixes sluggish swimming at 60 FPS."
    author = "retroben"
    is_enabled = false

    [[patch.be16]]
        address = 0x82001b58
        value = 0x40b3
    [[patch.be16]]
        address = 0x82001b5c
        value = 0x3fc6
    [[patch.be16]]
        address = 0x82001b60
        value = 0x4049
    [[patch.be16]]
        address = 0x820aaa46
        value = 0x0f38
    [[patch.be16]]
        address = 0x820aaa8a
        value = 0x575c

[[patch]]
    name = "Global Fix"
    desc = "Fixes various things that move too fast."
    author = "retroben"
    is_enabled = false

    [[patch.be16]]
        address = 0x82166c52
        value = 0xf6a0
    [[patch.be16]]
        address = 0x82166c9a
        value = 0x1108
    [[patch.be16]]
        address = 0x82001048
        value = 0x3f43
    [[patch.be16]]
        address = 0x821a9062
        value = 0x0f34
    [[patch.be16]]
        address = 0x821a9a66
        value = 0x6374
    [[patch.be16]]
        address = 0x821a9b76
        value = 0x1684
    [[patch.be16]]
        address = 0x821a9c36
        value = 0x1dd0
    [[patch.be16]]
        address = 0x8218a3f6
        value = 0x0e90
    [[patch.be16]]
        address = 0x8218a4aa
        value = 0x36e0
    [[patch.be16]]
        address = 0x82198aee
        value = 0x1040
    [[patch.be16]]
        address = 0x82198bba
        value = 0x0ea0
    [[patch.be16]]
        address = 0x821ade5a
        value = 0x1718
    [[patch.be16]]
        address = 0x821ade5e
        value = 0x1040
    [[patch.be16]]
        address = 0x821ae7e6
        value = 0x4718
    [[patch.be16]]
        address = 0x8200d9cc
        value = 0x40db
    [[patch.be16]]
        address = 0x8215c2da
        value = 0xdd4c
    [[patch.be16]]
        address = 0x8217fef6
        value = 0x3590
    [[patch.be16]]
        address = 0x8200c140
        value = 0x3fb1
    [[patch.be16]]
        address = 0x8217adce
        value = 0xdd4c
    [[patch.be16]]
        address = 0x8217b22e
        value = 0xdd4c
    [[patch.be16]]
        address = 0x8217b44a
        value = 0x8200
    [[patch.be16]]
        address = 0x8217b456
        value = 0x3170
    [[patch.be16]]
        address = 0x82156762
        value = 0x1040
    [[patch.be16]]
        address = 0x82156b9e
        value = 0x1040
    [[patch.be16]]
        address = 0x82156f22
        value = 0x1040
    [[patch.be16]]
        address = 0x82009a78
        value = 0x3f9c
    [[patch.be16]]
        address = 0x82179076
        value = 0x8200
    [[patch.be16]]
        address = 0x8217907a
        value = 0x2f50

[[patch]]
    name = "Special Fix"
    desc = "Fixes special cases that required custom checks on the original game version."
    author = "retroben"
    is_enabled = false

    [[patch.be32]]
        address = 0x8200d700
        value = 0x3f800000
    [[patch.be16]]
        address = 0x8216d1c2
        value = 0x0ed4
    [[patch.be16]]
        address = 0x821a0c7a
        value = 0x1108
    [[patch.be16]]
        address = 0x821a106e
        value = 0x10f8
    [[patch.be16]]
        address = 0x821a1076
        value = 0xbfe0
    [[patch.be16]]
        address = 0x8218c6de
        value = 0x1718
    [[patch.be16]]
        address = 0x8218ca4e
        value = 0x1718
    [[patch.be16]]
        address = 0x8218dade
        value = 0x0600
    [[patch.be16]]
        address = 0x8210ee50
        value = 0x4800

[[patch]]
    name = "Timer Fix"
    desc = "Fixes the hardcoded xbla 30 FPS timers to work with 60 FPS."
    author = "retroben"
    is_enabled = false

    [[patch.be32]]
        address = 0x8210badc
        value = 0x48335294
    [[patch.be32]]
        address = 0x8210bae0
        value = 0x38a00000
    [[patch.be32]]
        address = 0x82440d70
        value = 0x3c80824a
    [[patch.be32]]
        address = 0x82440d74
        value = 0x8884b08f
    [[patch.be32]]
        address = 0x82440d78
        value = 0x2b040000
    [[patch.be32]]
        address = 0x82440d7c
        value = 0x419a000c
    [[patch.be32]]
        address = 0x82440d80
        value = 0x3880fffe
    [[patch.be32]]
        address = 0x82440d84
        value = 0x4bccad5c
    [[patch.be32]]
        address = 0x82440d88
        value = 0x3880ffff
    [[patch.be32]]
        address = 0x82440d8c
        value = 0x4bccad54

[[patch]]
    name = "Gravity Fix"
    desc = "Fixes gravity for baddies that walk in midair at 60 FPS."
    author = "theboy181, retroben"
    is_enabled = false

    [[patch.be32]]
        address = 0x8212e9c0
        value = 0x483123d0
    [[patch.be32]]
        address = 0x82440d90
        value = 0x3cc08200
    [[patch.be32]]
        address = 0x82440d94
        value = 0xc0061c34
    [[patch.be32]]
        address = 0x82440d98
        value = 0xd01f0174
    [[patch.be32]]
        address = 0x82440d9c
        value = 0x4bcedc28

[[patch]]
    name = "Walker Fix"
    desc = "Fixes various baddies that move too fast at 60 FPS."
    author = "retroben"
    is_enabled = false

    [[patch.be32]]
        address = 0x8212e454
        value = 0x4831294c
    [[patch.be32]]
        address = 0x82440da0
        value = 0xa3db0002
    [[patch.be32]]
        address = 0x82440da4
        value = 0x2c1e0367
    [[patch.be32]]
        address = 0x82440da8
        value = 0x4182003c
    [[patch.be32]]
        address = 0x82440dac
        value = 0x2c1e03bf
    [[patch.be32]]
        address = 0x82440db0
        value = 0x41820040
    [[patch.be32]]
        address = 0x82440db4
        value = 0x2c1e03c0
    [[patch.be32]]
        address = 0x82440db8
        value = 0x41820044
    [[patch.be32]]
        address = 0x82440dbc
        value = 0x2c1e034f
    [[patch.be32]]
        address = 0x82440dc0
        value = 0x41820048
    [[patch.be32]]
        address = 0x82440dc4
        value = 0x2c1e0006
    [[patch.be32]]
        address = 0x82440dc8
        value = 0x4182004c
    [[patch.be32]]
        address = 0x82440dcc
        value = 0x2c1e0350
    [[patch.be32]]
        address = 0x82440dd0
        value = 0x41820050
    [[patch.be32]]
        address = 0x82440dd4
        value = 0x2c1e0375
    [[patch.be32]]
        address = 0x82440dd8
        value = 0x41820054
    [[patch.be32]]
        address = 0x82440ddc
        value = 0x2c1e034e
    [[patch.be32]]
        address = 0x82440de0
        value = 0x40820058
    [[patch.be32]]
        address = 0x82440de4
        value = 0x3fc00105
    [[patch.be32]]
        address = 0x82440de8
        value = 0x3bde0704
    [[patch.be32]]
        address = 0x82440dec
        value = 0x48000048
    [[patch.be32]]
        address = 0x82440df0
        value = 0x3fc00106
    [[patch.be32]]
        address = 0x82440df4
        value = 0x3bde0903
    [[patch.be32]]
        address = 0x82440df8
        value = 0x4800003c
    [[patch.be32]]
        address = 0x82440dfc
        value = 0x3fc00208
    [[patch.be32]]
        address = 0x82440e00
        value = 0x3bde0c04
    [[patch.be32]]
        address = 0x82440e04
        value = 0x48000030
    [[patch.be32]]
        address = 0x82440e08
        value = 0x3fc00104
    [[patch.be32]]
        address = 0x82440e0c
        value = 0x3bde0602
    [[patch.be32]]
        address = 0x82440e10
        value = 0x48000024
    [[patch.be32]]
        address = 0x82440e14
        value = 0x3fc00103
    [[patch.be32]]
        address = 0x82440e18
        value = 0x3bde0505
    [[patch.be32]]
        address = 0x82440e1c
        value = 0x48000018
    [[patch.be32]]
        address = 0x82440e20
        value = 0x3fc00105
    [[patch.be32]]
        address = 0x82440e24
        value = 0x3bde0604
    [[patch.be32]]
        address = 0x82440e28
        value = 0x4800000c
    [[patch.be32]]
        address = 0x82440e2c
        value = 0x3fc00107
    [[patch.be32]]
        address = 0x82440e30
        value = 0x3bde0903
    [[patch.be32]]
        address = 0x82440e34
        value = 0x93cb0090
    [[patch.be32]]
        address = 0x82440e38
        value = 0x83cb0008
    [[patch.be32]]
        address = 0x82440e3c
        value = 0x4bced61c

[[patch]]
    name = "Egg Gravity Fix"
    desc = "Fixes egg bounce gravity at 60 FPS."
    author = "retroben"
    is_enabled = false

    [[patch.be16]]
        address = 0x82127b06
        value = 0x8253
    [[patch.be16]]
        address = 0x82127b12
        value = 0xaa0c

[[patch]]
    name = "Concert Timer Fix"
    desc = "Fixes it from ending early at 60 FPS."
    author = "retroben"
    is_enabled = false

    [[patch.be32]]
        address = 0x820e0670
        value = 0x483607d0
    [[patch.be32]]
        address = 0x82440e40
        value = 0x3d20824a
    [[patch.be32]]
        address = 0x82440e44
        value = 0x8929ebb7
    [[patch.be32]]
        address = 0x82440e48
        value = 0x2b09001e
    [[patch.be32]]
        address = 0x82440e4c
        value = 0x409a0024
    [[patch.be32]]
        address = 0x82440e50
        value = 0x3d208249
    [[patch.be32]]
        address = 0x82440e54
        value = 0xa1291968
    [[patch.be32]]
        address = 0x82440e58
        value = 0x2b09426a
    [[patch.be32]]
        address = 0x82440e5c
        value = 0x41980014
    [[patch.be32]]
        address = 0x82440e60
        value = 0x2b09428a
    [[patch.be32]]
        address = 0x82440e64
        value = 0x4199000c
    [[patch.be32]]
        address = 0x82440e68
        value = 0x7d235850
    [[patch.be32]]
        address = 0x82440e6c
        value = 0x4bc9f868
    [[patch.be32]]
        address = 0x82440e70
        value = 0x7d235850
    [[patch.be32]]
        address = 0x82440e74
        value = 0x4bc9f800
