title_name = "Red Dead Redemption" # Original, NTSC
title_id = "5454082B" # TT-2091
hash = "94A999EAFF6AB07B" # 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 = 0x823c53f4
        value = 0x48000048
    [[patch.be8]]
        address = 0x82c23347
        value = 0x01

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

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

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

    [[patch.be32]]
        address = 0x822b4b30
        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 = 0x82754bc4
        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 = 0x82754b10
        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 = 0x82754b48
        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 = 0x82766bac
        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 = 0x82750d18
        value = 0x39600001

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

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

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

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

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

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

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

    [[patch.be32]]
        address = 0x82770958
        value = 0x480001a0 # b 0x82770af8
    [[patch.be32]]
        address = 0x82770af8
        value = 0x3b600001 # li r27,0x1
    [[patch.be32]]
        address = 0x82770afc
        value = 0x9b7f000d # stb r27,0xd(r31)

[[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 = 0x822fef88
        value = 0x39600001
    [[patch.be32]]
        address = 0x8241a53c
        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 = 0x823df854
        value = 0x39600001

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

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

[[patch]]
    name = "Use Cheats Without Losing Autosave"
    desc = "Autosave will be disabled for the rest of your play session after activating a cheat but will function normally upon reopening the game."
    author = "boma"
    is_enabled = false

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

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

    [[patch.be32]]
        address = 0x82c4c430
        value = 0x3c003f80
    [[patch.be32]]
        address = 0x82c4c434
        value = 0x9007000c

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

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

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

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