title_name = "Red Dead Redemption: Undead Nightmare"
title_id = "5454082B" # TT-2091
hash = "17A27E1218741DDD" # default.xex
#media_id = "5B48AF70" # Disc (USA, Europe): http://redump.org/disc/21650

[[patch]]
    name = "Unlock FPS"
    desc = "Increases vsync target to 60 FPS. Framerates higher than 64 FPS are unlocked. See note about framerate patches in the README. Due to aggressive double buffering, keeping vsync enabled will result in common drops to 30 FPS whenever there are performance dips."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x823c6604
        value = 0x48000048
    [[patch.be8]]
        address = 0x82c4b75f
        value = 0x01

[[patch]]
    name = "Disable Depth of Field & Motion Blur"
    author = "illusion, boma"
    is_enabled = false

    [[patch.be16]]
        address = 0x827e6f2c
        value = 0x4800

[[patch]]
    name = "16x Anisotropic Filtering"
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x822b5eb0
        value = 0x38a00010
    [[patch.be32]]
        address = 0x822b5ec0
        value = 0x38a00010

[[patch]]
    name = "360p Mode"
    desc = "Internally renders the game at 360p and upscales to 720p. Certain objects and terrain will exhibit irregular pop-in."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x8276f1dc
        value = 0x39600001

[[patch]]
    name = "480p Mode"
    desc = "Internally renders the game at 480p and upscales to 720p."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x8276f128
        value = 0x39400001

[[patch]]
    name = "540p Mode, 4x MSAA"
    desc = "Internally renders the game at 540p, upscales to 720p and increases multisample anti-aliasing from 2x to 4x."
    author = "carnishlardon, boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x8276f160
        value = 0x38e00001

[[patch]]
    name = "Disable Sun Flare"
    desc = "This prevents the sun flare effect, which clips through buildings and props, from rendering. May also partially remedy flashing and image exposure issues that arise when upscaling."
    author = "emoose, boma"
    is_enabled = false

    [[patch.be16]]
        address = 0x82781814
        value = 0x4800

[[patch]]
    name = "No Trees - Performance Mode"
    desc = "Prevents trees and all other foliage from rendering. Provides a substantial performance boost."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x8276b1f0
        value = 0x39600001

[[patch]]
    name = "Skip Grass Occlusion"
    desc = "Gets rid of grass."
    author = "illusion, boma"
    is_enabled = false

    [[patch.be16]]
        address = 0x822ee7c4
        value = 0x4800

[[patch]]
    name = "Disable Shadows"
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x82925c08
        value = 0x60000000

[[patch]]
    name = "High Resolution Post-Processing Effects"
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x827d612c
        value = 0x39600001

[[patch]]
    name = "Skip Intro"
    desc = "Skips legal and intro videos."
    author = "illusion, boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x8278dc50
        value = 0x480001a0 # b 0x8278ddf0
    [[patch.be32]]
        address = 0x8278ddf0
        value = 0x3b600001 # li r27,0x1

[[patch]]
    name = "Alternative Script Timing & Asset Garbage Collection"
    desc = "May provide a small performance boost for CPU-limited systems."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x82300da0
        value = 0x39600001
    [[patch.be32]]
        address = 0x824200b0
        value = 0x39600001

[[patch]]
    name = "Use Separate Audio Heap"
    desc = "Changes audio component heap memory. Will lower the quality of realtime audio post-processing but may provide a small performance boost for CPU-limited systems."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x823df1f4
        value = 0x39600001

[[patch]]
    name = "Aspect Ratio"
    desc = "See note about aspect ratio patches in the README."
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x82000d74
        value = 0x4018e38e

[[patch]]
    name = "Infinite Horse Stamina"
    author = "illusion, boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x82c74900
        value = 0x3c003f80
    [[patch.be32]]
        address = 0x82c74904
        value = 0x9007000c

[[patch]]
    name = "Bottomless Clip / Infinite Gun Magazine Size"
    author = "illusion, boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x825b780c
        value = 0x48000008 # Skip fsub
    [[patch.be32]]
        address = 0x825b4304
        value = 0x48000018 # Skip ammo manipulation check

[[patch]]
    name = "Infinite Ammo"
    desc = "100 in reserved magazine."
    author = "illusion, boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x825b909c
        value = 0x3c0042c8 # Ammo amount in 2 bytes float. Default is 100. It will reset to 100 after some idle time.
    [[patch.be32]]
        address = 0x825b90a0
        value = 0x900a0000

[[patch]]
    name = "Infinite Deadeye Meter"
    author = "boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x82220c20
        value = 0x3d608200
    [[patch.be32]]
        address = 0x82220c24
        value = 0xc00d0c10
