Version: 1.2
Anchors:
  MGS4_All_Games: &MGS4_All_Games
    "Metal Gear Solid 4: Guns of the Patriots":
      BLES00246: [ All ]
      BLUS30109: [ All ]
      BLJM67001: [ All ]
      NPUB31633: [ All ]
      NPEB02182: [ All ]
      NPJB00698: [ All ]

  MGS4_CrashWorkaround_Notes: &MGS4_CrashWorkaround_Notes
    "Workaround for 0x68 crash."

  MGS4_FlickerWorkaround_Notes: &MGS4_FlickerWorkaround_Notes
    "Workaround for flickering ground textures."

  MGS4_SpursHack_Notes_1: &MGS4_SpursHack_Notes_1
    "Workaround for freezes in Metal Gear Solid 4.\nThis patch applies to a firmware file for all games!\nUsage outside of Metal Gear Solid 4 is for debug purposes only.\nYou must have firmware version "
  MGS4_SpursHack_Notes_2: &MGS4_SpursHack_Notes_2
    " in order to use it.\n\nKnown to affect:\n Metal Gear Solid 4"
    
  MGS4_Widescreen_Notes: &MGS4_Widescreen_Notes
    "Requires \"Stretch To Display Area\" checked in the GPU settings. The interface will be stretched and cutscenes will use the standard field of view."
  MGS4_Widescreen_NotesEx: &MGS4_Widescreen_NotesEx
    "Requires \"Stretch To Display Area\" checked in the GPU settings. The interface will be stretched and cutscenes will use an increased field of view which may cause visual bugs."

  MGS4_Disableshadows_Notes: &MGS4_Disableshadows_Notes
    "Can give a significant performance boost."

  MGS4_Removefog_Notes: &MGS4_Removefog_Notes
    "Does not provide any performance benefit."

  MGS4_Reducestagequality_Notes: &MGS4_Reducestagequality_Notes
    "Removes some transparency related effects from stages. Provides a small performance boost, but causes monitor visuals to break in-game."

  MGS4_RemoveHUD_Notes: &MGS4_RemoveHUD_Notes
    "Removes the ingame HUD. Useful for videos and screenshots."

  MGS4_RemoveEffects_Notes: &MGS4_RemoveEffects_Notes
    "Removes some effects such as explosions and smoke. Provides a moderate performance boost."

  MGS4_FPS_Notes: &MGS4_FPS_Notes
    "Allows you to play the game at 60 FPS or higher without modifying the vblank frequency."

PRX-rbYkgZMgx8Prd7WUAA39oYAdWcNo-0:
  "cellSpurs urgent commands hack - 4.87":
    Games: *MGS4_All_Games
    Author: "elad335"
    Notes: [ *MGS4_SpursHack_Notes_1, "4.87", *MGS4_SpursHack_Notes_2 ]
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000182b8, 0x38000002 ]

PRX-oM7itnHHZPcaVx6KRGhZcv0o4gJj-0:
  "cellSpurs urgent commands hack - 4.88":
    Games: *MGS4_All_Games
    Author: "elad335"
    Notes: [ *MGS4_SpursHack_Notes_1, "4.88", *MGS4_SpursHack_Notes_2 ]
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000182b8, 0x38000002 ]

PRX-WHnKAK6U9UApL2YMgjU3c5ozpTUM-0:
  "cellSpurs urgent commands hack - 4.89":
    Games: *MGS4_All_Games
    Author: "elad335"
    Notes: [ *MGS4_SpursHack_Notes_1, "4.89", *MGS4_SpursHack_Notes_2 ]
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000182b8, 0x38000002 ]

PRX-8bLHVe7P8raRkpC7kUiH9os9vU4s-0:
  "cellSpurs urgent commands hack - 4.90":
    Games: *MGS4_All_Games
    Author: "elad335"
    Notes: [ *MGS4_SpursHack_Notes_1, "4.90", *MGS4_SpursHack_Notes_2 ]
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000181ac, 0x38000002 ]

PPU-33e09a0bd8fa2a3b28780a3feeb7b0e018bae381:
  "Crash fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_CrashWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x001409f8, 0x60000000 ]
      - [ be32, 0x00140a10, 0x60000000 ]
      - [ be32, 0x00140a44, 0x60000000 ]
  "Flickering textures fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FlickerWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000eaac8, 0x60003000 ]

PPU-c937999ea44fb6260455b85c9f25eea55b1208b9:
  "Crash fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_CrashWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x001409f8, 0x60000000 ]
      - [ be32, 0x00140a10, 0x60000000 ]
      - [ be32, 0x00140a44, 0x60000000 ]
  "Flickering textures fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FlickerWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000eaac8, 0x60003000 ]

PPU-bbf4c85f1c01e182e7f96d34f734772c4430a426:
  "Crash fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_CrashWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0013f298, 0x60000000 ]
      - [ be32, 0x0013f2b0, 0x60000000 ]
      - [ be32, 0x0013f2e4, 0x60000000 ]
  "Flickering textures fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FlickerWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000e9388, 0x60003000 ]

PPU-6886ae8f4270fe3fa4c7cf4299307044ad4ce989:
  "Crash fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPEB02182: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_CrashWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0013f298, 0x60000000 ]
      - [ be32, 0x0013f2b0, 0x60000000 ]
      - [ be32, 0x0013f2e4, 0x60000000 ]
  "Flickering textures fix":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPEB02182: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FlickerWorkaround_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000e9388, 0x60003000 ]
      
PPU-9712144d93487f0b62e39f55e175af783b58af72:
  "Disable shadows":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 01.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Disableshadows_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x001358b8, 0x4e800020 ]

PPU-33e09a0bd8fa2a3b28780a3feeb7b0e018bae381:
  "21:9 Aspect Ratio":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x3ff0a3d7 ]
      - [ be32, 0x003d4274, 0xbff0a3d7 ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3fa3126f ]
  "21:9 Aspect Ratio (Cutscenes)":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_NotesEx
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x3ff0a3d7 ]
      - [ be32, 0x003d4274, 0xbff0a3d7 ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x000f1b6c, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3fa3126f ]
  "32:9 Aspect Ratio":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x4039999a ]
      - [ be32, 0x003d4274, 0xc039999a ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3f52b021 ]
  "32:9 Aspect Ratio (Cutscenes)":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_NotesEx
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x4039999a ]
      - [ be32, 0x003d4274, 0xc039999a ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x000f1b6c, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3f52b021 ]
  "Disable shadows":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Disableshadows_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x00132354, 0x4e800020 ]
  "Remove fog":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Removefog_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000eaa08, 0x4e800020 ]
  "Reduce stage quality":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Reducestagequality_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000fa7ec, 0x4e800020 ]
      - [ be32, 0x0010faec, 0x4e800020 ]
  "Disable HUD":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_RemoveHUD_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000f0410, 0x60000000 ]
  "Disable spawned effects":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_RemoveEffects_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0012bcfc, 0x2b8a0004 ]
  "Unlock FPS":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FPS_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000db720, 0x4e800020 ]
  "Infinite Ammo":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "games24.blog.fc2.com"
    Notes:
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0008c578, 0x60000000 ]
  "No Reload":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "games24.blog.fc2.com"
    Notes:
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0008c4dc, 0x7d004378 ]
  "Max Camo":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "dron_3"
    Notes:
    Patch Version: 1.0
    Patch:
      - [ be32, 0x00076564, 0x38000064 ]
      - [ be32, 0x00076568, 0x38600064 ]
      - [ be32, 0x000765b4, 0x3ba00064 ]

PPU-bbf4c85f1c01e182e7f96d34f734772c4430a426:
  "21:9 Aspect Ratio":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003c3edc, 0x3ff0a3d7 ]
      - [ be32, 0x003c3ee4, 0xbff0a3d7 ]
      - [ be32, 0x000efaf0, 0xc1be8040 ]
      - [ be32, 0x003c3c90, 0x3fa3126f ]
  "21:9 Aspect Ratio (Cutscenes)":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_NotesEx
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003c3edc, 0x3ff0a3d7 ]
      - [ be32, 0x003c3ee4, 0xbff0a3d7 ]
      - [ be32, 0x000efaf0, 0xc1be8040 ]
      - [ be32, 0x000f042c, 0xc1be8040 ]
      - [ be32, 0x003c3c90, 0x3fa3126f ]
  "32:9 Aspect Ratio":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003c3edc, 0x4039999a ]
      - [ be32, 0x003c3ee4, 0xc039999a ]
      - [ be32, 0x000efaf0, 0xc1be8040 ]
      - [ be32, 0x003c3c90, 0x3f52b021 ]
  "32:9 Aspect Ratio (Cutscenes)":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_NotesEx
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003c3edc, 0x4039999a ]
      - [ be32, 0x003c3ee4, 0xc039999a ]
      - [ be32, 0x000efaf0, 0xc1be8040 ]
      - [ be32, 0x000f042c, 0xc1be8040 ]
      - [ be32, 0x003c3c90, 0x3f52b021 ]
  "Disable shadows":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Disableshadows_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x00130bf4, 0x4e800020 ]
  "Remove fog":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Removefog_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000e92c8, 0x4e800020 ]
  "Reduce stage quality":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Reducestagequality_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000f90ac, 0x4e800020 ]
      - [ be32, 0x0010e3ac, 0x4e800020 ]
  "Disable HUD":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_RemoveHUD_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000eecd0, 0x60000000 ]
  "Disable spawned effects":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_RemoveEffects_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0012a59c, 0x2b8a0004 ]
  "Unlock FPS":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        NPUB31633: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FPS_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000d9fe0, 0x4e800020 ]

PPU-c937999ea44fb6260455b85c9f25eea55b1208b9:
  "21:9 Aspect Ratio":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x3ff0a3d7 ]
      - [ be32, 0x003d4274, 0xbff0a3d7 ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3fa3126f ]
  "21:9 Aspect Ratio (Cutscenes)":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_NotesEx
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x3ff0a3d7 ]
      - [ be32, 0x003d4274, 0xbff0a3d7 ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x000f1b6c, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3fa3126f ]
  "32:9 Aspect Ratio":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_Notes
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x4039999a ]
      - [ be32, 0x003d4274, 0xc039999a ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3f52b021 ]
  "32:9 Aspect Ratio (Cutscenes)":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Widescreen_NotesEx
    Group: AR
    Patch Version: 1.0
    Patch:
      - [ be32, 0x003d426c, 0x4039999a ]
      - [ be32, 0x003d4274, 0xc039999a ]
      - [ be32, 0x000f1230, 0xc1be8040 ]
      - [ be32, 0x000f1b6c, 0xc1be8040 ]
      - [ be32, 0x003d4020, 0x3f52b021 ]
  "Disable shadows":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Disableshadows_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x00132354, 0x4e800020 ]
  "Remove fog":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Removefog_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000eaa08, 0x4e800020 ]
  "Reduce stage quality":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_Reducestagequality_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000fa7ec, 0x4e800020 ]
      - [ be32, 0x0010faec, 0x4e800020 ]
  "Disable HUD":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_RemoveHUD_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000f0410, 0x60000000 ]
  "Disable spawned effects":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_RemoveEffects_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x0012bcfc, 0x2b8a0004 ]
  "Unlock FPS":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLES00246: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: *MGS4_FPS_Notes
    Patch Version: 1.0
    Patch:
      - [ be32, 0x000db720, 0x4e800020 ]

OVL-a86de0a3c096dc8299a8b8a50b8feb6fa1e1d2ea:
  "Disable snow effect":
    Games:
      "Metal Gear Solid 4: Guns of the Patriots":
        BLUS30109: [ 02.00 ]
    Author: "TriggerHappy"
    Notes: "Removes the heavy snow effect on the Shadow Moses stage."
    Patch Version: 1.0
    Patch:
      - [ be32, 0x302a1400, 0x4e800020 ]