Normalize all Game INI files

Add a simple Python script that does a basic normalization on
the game INI files and run it across all the files we have. This
normalizes the sections, their order and comments, and the whitespace
within them.

It also removes the sections Video_Hardware, Gecko, and Wii, which
should not be in the game INI files we ship by default.
This commit is contained in:
Jasper St. Pierre
2013-08-11 11:32:11 -04:00
parent 8bbd1d12e8
commit e5f4586356
1468 changed files with 34307 additions and 16232 deletions
+112
View File
@@ -0,0 +1,112 @@
import chardet
import codecs
import os
import glob
standard_sections = [
"Core",
"EmuState",
"OnLoad",
"OnFrame",
"ActionReplay",
"Video",
"Video_Settings",
"Video_Enhancements",
"Video_Hacks",
"Speedhacks",
]
standard_comments = {
"Core": "Values set here will override the main dolphin settings.",
"EmuState": "The Emulation State. 1 is worst, 5 is best, 0 is not set.",
"OnLoad": "Add memory patches to be loaded once on boot here.",
"OnFrame": "Add memory patches to be applied every frame here.",
"ActionReplay": "Add action replay cheats here.",
"Video": "",
"Video_Settings": "",
"Video_Enhancements": "",
"Video_Hacks": "",
"Speedhacks": "",
}
def normalize_comment(line):
line = line.strip().lstrip('#').lstrip()
if line:
return "# %s" % (line,)
else:
return ""
def normalize_ini_file(in_, out):
sections = {}
current_section = None
toplevel_comment = ""
wants_comment = False
for line in in_:
line = line.strip()
# strip utf8 bom
line = line.lstrip(u'\ufeff')
if line.startswith('#'):
line = normalize_comment(line)
if current_section is None:
toplevel_comment += line
continue
if line.startswith('['):
end = line.find(']')
section_name = line[1:end]
if section_name not in standard_sections:
continue
current_section = []
sections[section_name] = current_section
wants_comment = False
continue
if current_section is None and line:
raise ValueError("invalid junk")
if current_section is None:
continue
if line.startswith('#') and not wants_comment:
continue
current_section.append(line)
if line:
wants_comment = True
out.write(toplevel_comment.strip() + "\n\n")
for section in standard_sections:
lines = '\n'.join(sections.get(section, "")).strip()
comments = standard_comments[section]
if not lines and not comments:
continue
out.write("[%s]\n" % (section,))
if comments:
out.write("# %s\n" % (comments,))
if lines:
out.write(lines)
out.write('\n')
out.write('\n')
def main():
for name in glob.glob("??????.ini"):
in__name = name
out_name = name + '.new'
in_str = open(in__name, 'r').read()
encoding = chardet.detect(in_str)
in_ = codecs.open(in__name, 'r', encoding['encoding'])
out = codecs.open(out_name, 'w', 'utf8')
normalize_ini_file(in_, out)
os.rename(out_name, in__name)
if __name__ == "__main__":
main()
+17 -5
View File
@@ -1,10 +1,22 @@
# D43E01 - ZELDA OCARINA MULTI PACK # D43E01 - ZELDA OCARINA MULTI PACK
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 5 EmulationStateId = 5
EmulationIssues = Minor video glitches when pausing EmulationIssues = Minor video glitches when pausing
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -12,4 +24,4 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
+11 -4
View File
@@ -1,14 +1,21 @@
# D43J01 - ZELDA OCARINA MULTI PACK # D43J01 - ZELDA OCARINA MULTI PACK
[Core] [Core]
#Values set here will override the main dolphin settings. # Values set here will override the main dolphin settings.
[EmuState] [EmuState]
#The Emulation State. 1 is worst, 5 is best, 0 is not set. # The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnLoad] [OnLoad]
#Add memory patches to be loaded once on boot here. # Add memory patches to be loaded once on boot here.
[OnFrame] [OnFrame]
# Add memory patches to be applied every frame here.
+$loophack +$loophack
0x806866E4:word:0x60000000 0x806866E4:word:0x60000000
[ActionReplay] [ActionReplay]
[Video] # Add action replay cheats here.
+15 -2
View File
@@ -1,10 +1,23 @@
# D43P01 - The Legend of Zelda: Ocarina of Time # D43P01 - The Legend of Zelda: Ocarina of Time
[Core]
# Values set here will override the main dolphin settings.
[EmuState] [EmuState]
#The Emulation State. # The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 1 EmulationStateId = 1
Issues="Dolphin doesn't support soft reset" Issues="Dolphin doesn't support soft reset"
EmulationIssues = EmulationIssues =
[OnFrame]#Add memory patches here.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay] [ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
+17 -5
View File
@@ -1,10 +1,22 @@
# D43U01 - ZELDA OCARINA MULTI PACK # D43U01 - ZELDA OCARINA MULTI PACK
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
[Gecko]
+13 -2
View File
@@ -1,9 +1,20 @@
# DTLX01 - ACTION REPLAY # DTLX01 - ACTION REPLAY
[Core] [Core]
# Values set here will override the main dolphin settings.
TLBHack = 1 TLBHack = 1
#Values set here will override the main dolphin settings. # Values set here will override the main dolphin settings.
[EmuState] [EmuState]
#The Emulation State. 1 is worst, 5 is best, 0 is not set. # The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 0 EmulationStateId = 0
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame] [OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay] [ActionReplay]
# Add action replay cheats here.
+16 -4
View File
@@ -1,6 +1,18 @@
# DVDXDV - Unknown # DVDXDV - Unknown
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
+17 -4
View File
@@ -1,9 +1,22 @@
# FABP01 - Zelda: Link to Past # FABP01 - Zelda: Link to Past
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues = EmulationIssues =
EmulationStateId = 4 EmulationStateId = 4
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
+16 -5
View File
@@ -1,8 +1,19 @@
# FBYE01 - Super Mario Bros. 2 # FBYE01 - Super Mario Bros. 2
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 3 EmulationStateId = 3
EmulationIssues = Can't see graphics EmulationIssues = Can't see graphics
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
[Video] # Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
+18 -5
View File
@@ -1,10 +1,22 @@
# G2BE5G - Black & Bruised # G2BE5G - Black & Bruised
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -12,6 +24,7 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
+18 -5
View File
@@ -1,10 +1,22 @@
# G2BP7D - Black & Bruised # G2BP7D - Black & Bruised
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -12,6 +24,7 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
+16 -4
View File
@@ -1,7 +1,19 @@
# G2CE52 - TC2 US # G2CE52 - TC2 US
[Core] Values set here will override the main dolphin settings.
[Core]
# Values set here will override the main dolphin settings.
TLBHack=1 TLBHack=1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 3 EmulationStateId = 3
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
+16 -4
View File
@@ -1,10 +1,21 @@
# G2FE78 - Tak 2: The Staff of Dreams # G2FE78 - Tak 2: The Staff of Dreams
[Core] Values set here will override the main dolphin settings.
[Core]
# Values set here will override the main dolphin settings.
TLBHack = 1 TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
$Infinite Health $Infinite Health
04112828 48232224 04112828 48232224
04344A4C D017021C 04344A4C D017021C
@@ -16,3 +27,4 @@ $Max JuJu Elements
$Have All Cards/All Cards Mixable $Have All Cards/All Cards Mixable
00000000 8439A5E0 00000000 8439A5E0
00000001 001E000A 00000001 001E000A
+16 -4
View File
@@ -1,6 +1,18 @@
# G2GJB2 - MOBILE SUIT GUNDAM GUNDAMvs.ZGUNDAM # G2GJB2 - MOBILE SUIT GUNDAM GUNDAMvs.ZGUNDAM
[Core] Values set here will override the main dolphin settings.
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 5 EmulationStateId = 5
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
+19 -4
View File
@@ -1,12 +1,21 @@
# G2ME01 - Metroid Prime 2 Echoes # G2ME01 - Metroid Prime 2 Echoes
[Core]
# Values set here will override the main dolphin settings.
[EmuState] [EmuState]
#The Emulation State. # The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EFB to RAM is needed for the scanner/visors to work properly. EmulationIssues = EFB to RAM is needed for the scanner/visors to work properly.
[Speedhacks]
0x803758bc=400 [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame] [OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay] [ActionReplay]
# Add action replay cheats here.
$This Code Must Be On! $This Code Must Be On!
043BC410 906D0000 043BC410 906D0000
043BC414 88030004 043BC414 88030004
@@ -137,6 +146,7 @@ $Full Logbook
04002F3C 9BE50004 04002F3C 9BE50004
04002F40 88050004 04002F40 88050004
04002F44 4820E72C 04002F44 4820E72C
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -144,9 +154,14 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
[Video_Hacks] [Video_Hacks]
EFBCopyEnable = True EFBCopyEnable = True
EFBToTextureEnable = False EFBToTextureEnable = False
[Speedhacks]
0x803758bc=400
+19 -5
View File
@@ -1,13 +1,21 @@
# G2MP01 - Metroid Prime 2 Echoes # G2MP01 - Metroid Prime 2 Echoes
[Core]
# Values set here will override the main dolphin settings.
[EmuState] [EmuState]
#The Emulation State. # The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EFB to RAM is needed for the scanner/visors to work properly. EmulationIssues = EFB to RAM is needed for the scanner/visors to work properly.
[Speedhacks]
#Patch OSYieldThread to take more time - MP2's idle loop is really stupid. [OnLoad]
0x80375c68=400 # Add memory patches to be loaded once on boot here.
[OnFrame] [OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay] [ActionReplay]
# Add action replay cheats here.
$Infinite Health $Infinite Health
423DDE0C 000A44BB 423DDE0C 000A44BB
423DDE0C 000B6000 423DDE0C 000B6000
@@ -137,6 +145,7 @@ $Full Logbook
04002F3C 9BE50004 04002F3C 9BE50004
04002F40 88050004 04002F40 88050004
04002F44 4820EA34 04002F44 4820EA34
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -144,9 +153,14 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
[Video_Hacks] [Video_Hacks]
EFBCopyEnable = True EFBCopyEnable = True
EFBToTextureEnable = False EFBToTextureEnable = False
[Speedhacks]
0x80375c68=400
+17 -5
View File
@@ -1,11 +1,23 @@
# G2OE41 - PoP:WW # G2OE41 - PoP:WW
[Core] Values set here will override the main dolphin settings.
[Core]
# Values set here will override the main dolphin settings.
TLBHack = 1 TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -13,7 +25,7 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
+18 -5
View File
@@ -1,11 +1,23 @@
# G2OP41 - PoP:WW # G2OP41 - PoP:WW
[Core] Values set here will override the main dolphin settings.
[Core]
# Values set here will override the main dolphin settings.
TLBHack = 1 TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -13,6 +25,7 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
+17 -5
View File
@@ -1,11 +1,23 @@
# G2RE52 - Shrek SuperSlam # G2RE52 - Shrek SuperSlam
[Core] Values set here will override the main dolphin settings.
[Core]
# Values set here will override the main dolphin settings.
TLBHack = 1 TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -13,4 +25,4 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]
+17 -5
View File
@@ -1,11 +1,23 @@
# G2TE52 - Tony Hawk's Underground 2 # G2TE52 - Tony Hawk's Underground 2
[Core] Values set here will override the main dolphin settings.
[Core]
# Values set here will override the main dolphin settings.
TLBHack = 1 TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4 EmulationStateId = 4
EmulationIssues = EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here. [OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video] [Video]
ProjectionHack = 0 ProjectionHack = 0
PH_SZNear = 0 PH_SZNear = 0
@@ -13,4 +25,4 @@ PH_SZFar = 0
PH_ExtraParam = 0 PH_ExtraParam = 0
PH_ZNear = PH_ZNear =
PH_ZFar = PH_ZFar =
[Gecko]

Some files were not shown because too many files have changed in this diff Show More