# ========================================================================================
# 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
ULJM05309 = true
ULUS10410 = true
ULES01218 = true
ULJM08023 = true
ULES01218 = true
# Phantasy Star Portable 2 JP (missing text)
ULJM05493 = true
NPJH50043 = true
ULJM08030 = true
# 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 1
ULJM05309 = true
ULUS10410 = true
ULES01218 = true
ULJM08023 = true
ULES01218 = true
# Phantasy Star Portable 2 JP
ULJM05493 = true
NPJH50043 = true
ULJM08030 = true
# Phantasy Star Portable 1 Demo
NPUH90023 = true
ULJM91014 = true
NPJH90002 = true
# Phantasy Star Portable 2 JP Demo
ULJM91018 = true
NPJH90062 = true

[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.
ULJM05493 = true
NPJH50043 = true
ULJM08030 = true
ULES01439 = true
ULUS10529 = true
ULJM91018 = true  # Infinity demo disc?
NPJH90157 = true  # Infinity demo
ULJM05732 = true
NPJH50332 = true

[ClearToRAM]
# SOCOM Navy Seals games require this. See issue #8973.
# Navy Seals
UCUS98615 = true
ULES00038 = true
UCKS45021 = true
# Fireteam Bravo 3
UCJS10102 = true
NPJG00035 = 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.
ULUS10044 = true
ULES00168 = true
ULES00172 = true
ULJM05036 = 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

[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
ULJM05297 = true
ULJM05395 = true
ULJM05884 = true
NPJH50827 = true
# GTA : LCS
ULUS10041 = true
ULES00151 = true
ULJM05255 = true
ULJM05359 = true
ULJM05885 = true
NPJH50825 = true
# GOW : Chains Of Olympus
UCUS98653 = true
UCUS98705 = true
UCES00842 = true
ULJM05438 = true
ULJM05348 = true
UCKS45084 = true
NPUG80325 = true
NPEG00023 = true
NPHG00028 = true
NPJG00120 = 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

[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
# 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

[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
# Dominator
ULUS10236 = true
ULES00750 = true
ULJM05242 = true
ULJM05371 = true
NPJH50304 = true
ULES00703 = true

[RequireDefaultCPUClock]
# GOW : Ghost of Sparta
UCUS98737 = true
UCAS40323 = true
NPHG00092 = true
NPEG00044 = true
NPJG00120 = true
UCJS10114 = true
UCES01401 = true

[MGS2AcidHack]
ULES00008 = true
ULJM08001 = true
ULJM05001 = true
ULAS42007 = true
ULUS10006 = true
ULUS10077 = true

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