# ========================================================================================
# compat.ini for PPSSPP
# ========================================================================================
#
# This file is not meant to be user-editable, although is kept as a separate ini
# file instead of compiled into the code for debugging purposes.
#
# The uses cases are strict:
#   * Enable fixes for things we can't reasonably emulate without completely ruining
#     performance for other games, such as the screen copies in Dangan Ronpa
#   * Disabling accuracy features like 16-bit depth rounding, when we can't seem to
#     implement them at all in a 100% compatible way
#   * Emergency game-specific compatibility fixes before releases, such as the GTA
#     music problem where every attempted fix has reduced compatibility with other games
#   * Enable "unsafe" performance optimizations that some games can tolerate and
#     others cannot. We do not currently have any of those.
#
# This functionality should NOT be used for any of the following:
#   * Cheats
#   * Fun hacks, like enlarged heads or whatever
#   * Fixing general compatibility issues. First try to find a general solution. Try hard.
#
# Game IDs can be looked up at GameFAQs, for example:
# http://www.gamefaqs.com/psp/925776-grand-theft-auto-liberty-city-stories/data
# Sometimes the information may be incomplete though.
#
# ========================================================================================
# Issue numbers refer to issues on https://github.com/hrydgard/ppsspp/issues
# ========================================================================================

[VertexDepthRounding]
# Phantasy Star Portable needs depth rounding to 16-bit precision for text to show up.
# It's enough to do it at the vertex granularity.  #3777
# Phantasy Star Portable
ULJM05309 = true
ULUS10410 = true
ULES01218 = true
ULJM08023 = true
ULES01218 = true
# Phantasy Star Portable 1 Demo
NPUH90023 = true
# Phantasy Star Portable 2
ULES01439 = true
ULUS10529 = true
ULJM05493 = true
NPJH50043 = true
ULJM08030 = true
NPUH90023 = true
ULJM91014 = true
NPJH90002 = true
ULJM05732 = true
NPJH50332 = true
# Phantasy Star Portable 2 JP Demo
ULJM91018 = true
NPJH90062 = true
# Phantasy Star Portable Infinity Demo
NPJH90157 = true  # Infinity demo

# Puyo Puyo Fever 2   #3663 (layering)
ULJM05058 = true
# NBA 2K13  #6603 (menu glitches)
ULAS42332 = true 
ULJS00551 = true
NPJH50713 = true
ULJS00596 = true
ULES01578 = true
ULUS10598 = true
# Power Stone Collection  #6257 (map arrow)
ULES00496 = true
ULUS10171 = true
ULJM05178 = true
# Taiko no Tatsujin Portable DX    #7920  (missing text)
ULJS00383 = true 
NPJH50426 = true 
ULAS42282 = true
# PhotoKano  #7920  (missing text)
ULJS00378 = true
NPJH50579 = true
ULJS19069 = true
NPJH50579 = true

[PixelDepthRounding]
# Heroes Phantasia requires pixel depth rounding.  #6485 (flickering overlaid sprites)
NPJH50558 = true
ULJS00456 = true
ULJS00454 = true
# Heroes Phantasia Limited Edition Disc requires pixel depth rounding.
ULJS00455 = true
# Phantasy Star games flickering
# Phantasy Star Portable
ULJM05309 = true
ULUS10410 = true
ULES01218 = true
ULJM08023 = true
ULES01218 = true
# Phantasy Star Portable 1 Demo
NPUH90023 = true
# Phantasy Star Portable 2
ULES01439 = true
ULUS10529 = true
ULJM05493 = true
NPJH50043 = true
ULJM08030 = true
NPUH90023 = true
ULJM91014 = true
NPJH90002 = true
ULJM05732 = true
NPJH50332 = true
# Phantasy Star Portable 2 JP Demo
ULJM91018 = true
NPJH90062 = true
# Phantasy Star Portable Infinity Demo
NPJH90157 = true  # Infinity demo

[DepthRangeHack]
# Phantasy Star Portable 2 and Infinity both use viewport depth outside [0, 1].
# This gets clamped in our current implementation, but attempts to fix it run into
# Other bugs, so we've restored this hack for now.
# Phantasy Star Portable
ULJM05309 = true
ULUS10410 = true
ULES01218 = true
ULJM08023 = true
ULES01218 = true
# Phantasy Star Portable 1 Demo
NPUH90023 = true
# Phantasy Star Portable 2
ULES01439 = true
ULUS10529 = true
ULJM05493 = true
NPJH50043 = true
ULJM08030 = true
NPUH90023 = true
ULJM91014 = true
NPJH90002 = true
ULJM05732 = true
NPJH50332 = true
# Phantasy Star Portable 2 JP Demo
ULJM91018 = true
NPJH90062 = true
# Phantasy Star Portable Infinity Demo
NPJH90157 = true  # Infinity demo
# Test Drive Unlimited
# just to disable range culling without adding another hack
# since it causes a lot of missing geometry when driving
ULES00637 = true
ULKS46126 = true
ULUS10249 = true

[ClearToRAM]
# SOCOM Navy Seals games require this. See issue #8973.
# Navy Seals : Tactical Strike
UCES00855 = true
UCUS98649 = true
NPJG00035 = true
NPJG90068 = true
UCJS10102 = true
# Tactical Strike demo
NPUG70003 = true
# Fireteam Bravo
UCKS45021 = true
UCUS98615 = true
UCES00038 = true
ULES00038 = true
# Fireteam Bravo 2
UCES00543 = true
UCUS98645 = true
# Fireteam Bravo 2 Demo
UCUS98677 = true
UCUS98691 = true
# Fireteam Bravo 3
NPHG00032 = true
UCUS98716 = true
UCES01242 = true

[Force04154000Download]
# This applies a hack to Dangan Ronpa, its demo, and its sequel.
# The game draws solid colors to a small framebuffer, and then reads this directly in VRAM.
# We force this framebuffer to 1x and force download it automatically.
NPJH50631 = true
NPJH50372 = true
NPJH90164 = true
NPJH50515 = true
# Let's also apply to Me & My Katamari.
ULUS10094 = true
ULES00339 = true
ULJS00033 = true
UCKS45022 = true
ULJS19009 = true
NPJH50141 = true

[DisableReadbacks]
# MotoGP copies the framebuffer to RAM every frame. We have a hack to display it directly,
# which means we don't also need a readback.
ULJS00078 = true
ULUS10153 = true
UCES00373 = true

[DrawSyncEatCycles]
# This replaced Crash Tag Team Racing hack to also fix Gundam games
# It makes sceGeDrawSync eat a lot of cycles which can affect timing in lots of games,
# might be negative for others, but happens to fix games below.
# Crash Tag Team Racing needs it to pass checking memory stick screen.
ULES00168 = true
ULES00169 = true
ULES00170 = true
ULES00171 = true
ULES00172 = true
ULJM05036 = true
ULUS10044 = true
# Gundam Battle Royale might need it to avoid crashes when certain Ace enemies shows up
ULJS00083 = true
ULKS46104 = true
ULJS19015 = true
# Gundam Battle Chronicle needs it to avoid crashes after most battles
ULJS00122 = true
ULKS46158 = true
ULJS19021 = true
# Gundam Battle Universe same problem as above
ULJS00145 = true
ULKS46183 = true
ULJS00260 = true
ULJS19041 = true
NPJH50843 = true
# Helps with Jeanne d'Arc weird 40/40 fps problem #5154
UCAS40129 = true
UCJS10048 = true
UCKS45033 = true
UCJS18014 = true
UCUS98700 = true
NPJG00032 = true
UCJX90019 = true
# Fixes some double framerate issues in Patapon 2, contributed by pamford45
UCJS10089 = true
NPJG00010 = true
PSPJ30000 = true
UCAS40232 = true
UCAS40239 = true
UCES01177 = true
UCUS98732 = true
UCJS18036 = true
UCAS40292 = true
UCJS18053 = true

[FakeMipmapChange]
# This hacks separates each mipmap to independent textures to display wrong-size mipmaps.
# For example this requires games like Tactics Ogre(Japanese) to display multi bytes fonts stored in mipmaps.
# See issue #5350.
# Tactics Ogre(Japanese)
ULJM05753 = true
NPJH50348 = true
ULJM06009 = true

[RequireBufferedRendering]
# Warn the user that the game will not work and have issue, if buffered rendering is not enabled.
# Midnight Club: LA Remix
ULUS10383 = true
ULES01144 = true
ULJS00180 = true
ULJS00267 = true
ULJM05904 = true
NPJH50440 = true
# Midnight Club 3 : DUB edition
ULUS10021 = true
ULES00108 = true
# GTA : VCS
ULUS10160 = true
ULES00502 = true
ULES00503 = true
ULJM05297 = true
ULJM05395 = true
ULJM05884 = true
NPJH50827 = true
# GTA : LCS
ULUS10041 = true
ULES00151 = true
ULES00182 = true
ULJM05255 = true
ULJM05359 = true
ULJM05885 = true
NPJH50825 = true
ULKS46157 = true
# GOW : JP/Korean
UCJS10114 = true
UCKS45084 = true
# GOW : Ghost of Sparta
UCUS98737 = true
UCAS40323 = true
NPHG00092 = true
NPEG00044 = true
NPEG00045 = true
NPJG00120 = true
NPUG80508 = true
UCJS10114 = true
UCES01401 = true
UCES01473 = true
# GOW : Ghost of Sparta Demo
NPJG90095 = true
NPEG90035 = true
NPUG70125 = true
# GOW : Chains Of Olympus
UCAS40198 = true
UCUS98653 = true
UCES00842 = true
ULJM05438 = true
ULJM05348 = true
UCKS45084 = true
NPUG80325 = true
NPEG00023 = true
NPHG00027 = true
NPHG00028 = true
NPJH50170 = true
UCET00844 = true
# GOW: Chains of Olympus Demo
UCUS98705 = true
UCED00971 = true
UCUS98713 = true
# Daxter
UCUS98618 = true
UCES00044 = true
NPUG80329 = true
NPEG00025 = true
# Ys Seven
ULUS10551 = true
ULJM05475 = true
NPEH00065 = true
NPJH50350 = true
ULJM08041 = true
NPEH00065 = true
# The Legend of Heroes: Trails in the Sky
ULUS10540 = true
ULUS10578 = true
ULES01556 = true
ULJM05170 = true
ULJM08033 = true
NPJH50373 = true
# Grand Knights History
ULJS00394 = true
ULJS19068 = true	
NPJH50518 = true
# Tactics Ogre
ULUS10565 = true
ULES01500 = true
ULJM05753 = true
NPJH50348 = true
ULJM06009 = true
UCKS45164 = true
# Metal Gear Solid : Peace Walker
ULUS10509 = true
ULES01372 = true
ULJM08038 = true
NPJH50045 = true
ULJM05630 = true
# Star Ocean : Second Evolution
ULUS10375 = true
ULES01187 = true
ULJM05591 = true
ULJM05325 = true
UCAS40203 = true
# Driver 76
ULUS10235 = true
ULES00740 = true
# Chili Con Carnage
ULUS10216 = true
ULES00629 = true
# TODO: There are many more.

[RequireBlockTransfer]
# Warn the user that the game will have issue graphic, if simulate block transfer is not enabled.
# Ys Seven need it to fix minimap. See issues #2928
ULUS10551 = true
ULJM05475 = true
NPEH00065 = true
NPJH50350 = true
ULJM08041 = true
NPEH00065 = true
# The Legend of Heroes: Trails in the Sky need it to fix graphical glitch in menu screen. See issues #8053
ULUS10540 = true
ULUS10578 = true
ULES01556 = true
ULJM05170 = true
ULJM08033 = true
NPJH50373 = true
NPUH10191 = true
NPUH10197 = true
# Grand Knights History need it to fix blackboxes on characters and flickering texture . See issues #2135 , #6099
ULJS00394 = true
ULJS19068 = true	
NPJH50518 = true
# TODO: Will add some games in the future
NPJH50686 = true  # Digimon Adventures (JP, and English patches...)
ULJS00078 = true  # MotoGP
ULUS10153 = true  # MotoGP
UCES00373 = true  # MotoGP
ULUS10551 = true  # Ys Seven
ULJM05475 = true  # Ys Seven JP
ULUS10549 = true  # Ys Seven
NPEH00065 = true  # Ys Seven
NPJH50350 = true  # Ys Seven
ULJM08041 = true  # Ys Seven

[DisableAccurateDepth]
# Midnight Club: LA Remix
ULUS10383 = true
ULES01144 = true
ULJS00180 = true
ULJS00267 = true
ULJM05904 = true
NPJH50440 = true
# Midnight Club 3 : DUB edition
ULUS10021 = true
ULES00108 = true

# Shadow of Destiny (#9545)
ULUS10459 = true
NPJH50036 = true

# Burnout games have problems with this on Mali, and have no use for it
# Legends
#ULES00125 = true
#ULUS10025 = true
#ULJM05228 = true
#NPJH50305 = true
#ULJM05049 = true
#ULKS46027 = true
#ULAS42019 = true

# Dominator
ULUS10236 = true
ULES00750 = true
ULJM05242 = true
ULJM05371 = true
NPJH50304 = true
ULES00703 = true
ULAS42095 = true

[RequireDefaultCPUClock]
# GOW : Ghost of Sparta
UCUS98737 = true
UCAS40323 = true
NPHG00092 = true
NPEG00044 = true
NPEG00045 = true
NPJG00120 = true
NPUG80508 = true
UCJS10114 = true
UCES01401 = true
UCES01473 = true
# GOW : Ghost of Sparta Demo
NPJG90095 = true
NPEG90035 = true
NPUG70125 = true
# Tekken 6
ULES01376 = true
ULUS10466 = true

[MGS2AcidHack]
ULUS10006 = true # Metal Gear Acid
ULES00008 = true
ULJM05001 = true
ULAS42007 = true
ULJM08001 = true
ULUS10077 = true # Metal Gear Acid 2
ULAS42035 = true
ULES00284 = true
ULJM05047 = true
ULKS46065 = true
ULJM08011 = true

[SonicRivalsHack]
ULES00622 = true  # SR1
ULUS10195 = true  # SR1
ULUS10323 = true  # SR2
ULES00940 = true  # SR2
ULET00958 = true

[BlockTransferAllowCreateFB]
NPJH50686 = true  # Digimon Adventures (JP, and English patches...)
ULJS00078 = true  # MotoGP
ULUS10153 = true  # MotoGP
UCES00373 = true  # MotoGP
ULUS10551 = true  # Ys Seven
ULJM05475 = true  # Ys Seven JP
ULUS10549 = true  # Ys Seven
NPEH00065 = true  # Ys Seven
NPJH50350 = true  # Ys Seven
ULJM08041 = true  # Ys Seven

[YugiohSaveFix]
# The cause of Yu-gi-oh series 's bad save (cannot save) are load "save status" and use cwcheat,
# but the real cause still unknown. #7914

# Yu-Gi-Oh! Duel Monsters GX: Tag Force
ULJM05151 = true
ULES00600 = true
ULUS10136 = true

# Yu-Gi-Oh! Duel Monsters GX: Tag Force 2
ULUS10302 = true
ULJM05260 = true
ULES00925 = true
ULES00926 = true

# Yu-Gi-Oh! Duel Monsters GX: Tag Force 3 
ULES01183 = true
ULJM05373 = true

# Yu-Gi-Oh! 5D's Tag Force 4
ULUS10481 = true
ULJM05479 = true
ULES01362 = true

# Yu-Gi-Oh! 5D's Tag Force 5
ULUS10555 = true
ULJM05734 = true
ULES01474 = true
 
# Yu-Gi-Oh! 5D's Tag Force 6
ULJM05940 = true
NPJH50794 = true
  
# Yu-Gi-Oh! 5D's Tag Force 
ULJM05940 = true
 
# Yu-Gi-Oh! ARC-V Tag Force Special
NPJH00142 = true

[ForceUMDDelay]
# F1 2006 won't boot at all with our standard unrealistically fast timing.
UCES00238 = true
UCJS10045 = true
# F1 2005, japan only?
UCJS10019 = true

[ForceMax60FPS]
# The GOW games are very heavy and render as fast as they can. They benefit greatly from
# capping the framerate at 60fps.

UCJS10114 = true
UCKS45084 = true
# GOW : Ghost of Sparta
UCUS98737 = true
UCAS40323 = true
NPHG00092 = true
NPEG00044 = true
NPEG00045 = true
NPJG00120 = true
NPUG80508 = true
UCJS10114 = true
UCES01401 = true
UCES01473 = true
# GOW : Ghost of Sparta Demo
NPEG90035 = true
NPUG70125 = true
NPJG90095 = true
# GOW : Chains Of Olympus
UCAS40198 = true
UCUS98653 = true
UCES00842 = true
ULJM05438 = true
ULJM05348 = true
UCKS45084 = true
NPUG80325 = true
NPEG00023 = true
NPHG00027 = true
NPHG00028 = true
NPJH50170 = true
UCET00844 = true
# GOW: Chains of Olympus Demo
UCUS98705 = true
UCED00971 = true
UCUS98713 = true

# F1 2006 has extremely long loading times if we don't limit the framerate.
UCES00238 = true
UCJS10045 = true
# F1 2005, japan only?
UCJS10019 = true

# The Transformers games are also afflicted with long loading times and render too fast like GoW.

# Transformers - The Game
ULES00823 = true
ULES00824 = true
ULES00825 = true
ULUS10274 = true

# Transformers - Revenge of the Fallen
ULES01286 = true
ULES01287 = true
ULUS10433 = true

# Tekken 6
ULES01376 = true
ULUS10466 = true

[JitInvalidationHack]
# This is an absolutely awful hack that somehow prevents issues when clearing the JIT,
# if the game has copied code with EmuHack opcodes or something. Hopefully will be able
# to remove this in the future.
# See #3854.
# Tony Hawk's Underground
ULUS10014 = true
ULES00033 = true
ULES00034 = true
ULES00035 = true
# MTX MotoTrax
ULUS10138 = true

[HideISOFiles]
# DJ Max Portable has some crude copy-protection functionality where it looks for ISO/CSO files
# in a few directories. Prevent this by hiding the files from the game.
# To be sure, catch all versions and remixes of the game that's been seen in reports.
# It checks the following directories:
# /
# /PSP/
# /PSP/COMMON
# /PSP/GAME

ULKS46116 = true
ULKS46189 = true
ULKS46190 = true
ULKS46236 = true
ULKS46240 = true
ULKS46059 = true
ULUS10403 = true
ULUS10538 = true
ULKS46050 = true
ULJM05836 = true
ULJM46236 = true
ULJM06034 = true
NPHH00260 = true
CF0020046 = true
CF0020074 = true
NPJH50471 = true
ULJM06033 = true
NPJH50559 = true
NPEH00030 = true

[MoreAccurateVMMUL]
# Fixes leg shaking in Tekken 6. The potential for slowdown in other games is large enough
# that we will not generally apply this accurate mode where not needed.
ULUS10466 = true
ULES01376 = true
ULJS00224 = true
NPUH10047 = true
ULAS42214 = true
ULJS19054 = true
NPJH50184 = true

[RenderPassMerge]
UCJS10114 = true
UCKS45084 = true
# GOW : Ghost of Sparta
UCUS98737 = true
UCAS40323 = true
NPHG00092 = true
NPEG00044 = true
NPEG00045 = true
NPJG00120 = true
NPUG80508 = true
UCJS10114 = true
UCES01401 = true
UCES01473 = true
# GOW : Ghost of Sparta Demo
NPEG90035 = true
NPUG70125 = true
NPJG90095 = true
# GOW : Chains Of Olympus
UCAS40198 = true
UCUS98653 = true
UCES00842 = true
ULJM05438 = true
ULJM05348 = true
UCKS45084 = true
NPUG80325 = true
NPEG00023 = true
NPHG00027 = true
NPHG00028 = true
NPJH50170 = true
UCET00844 = true
# GOW: Chains of Olympus Demo
UCUS98705 = true
UCED00971 = true
UCUS98713 = true
