title_name = "Red Dead Redemption" # Original, NTSC, TU9
title_id = "5454082B" # TT-2091
hash = "1A284CDE0A9F0CF8" # default.xex
#media_id = "2AAB34E2" # Disc (World): http://redump.org/disc/13298

[[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 = 0x823c5784
        value = 0x48000048
    [[patch.be8]]
        address = 0x82c1f5bf
        value = 0x01

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

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

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

    [[patch.be32]]
        address = 0x822b55f8
        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 = 0x8274267c
        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 = 0x827425c8
        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 = "cornishlardon, boma"
    is_enabled = false

    [[patch.be32]]
        address = 0x82742600
        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 = 0x82754c14
        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 = 0x8273e758
        value = 0x39600001

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

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

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

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

[[patch]]
    name = "Higher Quality Post Processing"
    author = "boma"
    is_enabled = false

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

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

    [[patch.be32]]
        address = 0x82760c20
        value = 0x480001a0 # b 0x82760dc0
    [[patch.be32]]
        address = 0x82760dc0
        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 = 0x82300438
        value = 0x39600001
    [[patch.be32]]
        address = 0x8241f0e0
        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 = 0x823de36c
        value = 0x39600001

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

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

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

    [[patch.be32]]
        address = 0x82c48710
        value = 0x3c003f80
    [[patch.be32]]
        address = 0x82c48714
        value = 0x9007000c

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

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

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

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