diff --git a/Data/Sys/Wii/setting-kor.txt b/Data/Sys/Wii/setting-kor.txt
new file mode 100644
index 0000000000..8c04855554
Binary files /dev/null and b/Data/Sys/Wii/setting-kor.txt differ
diff --git a/Data/User/GameConfig/G3QEA4.ini b/Data/User/GameConfig/G3QEA4.ini
index 19f71c3f7a..34471c842e 100644
--- a/Data/User/GameConfig/G3QEA4.ini
+++ b/Data/User/GameConfig/G3QEA4.ini
@@ -1,7 +1,18 @@
-# G3QEA4 - TMNT3
-[Core] Values set here will override the main dolphin settings.
-TLBHack=1
-[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationStateId = 5
-[OnFrame] Add memory patches to be applied every frame here.
-[ActionReplay] Add action replay cheats here.
+# G3QEA4 - TMNT3
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 5
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/G3RD52.ini b/Data/User/GameConfig/G3RD52.ini
new file mode 100644
index 0000000000..e939d6e28a
--- /dev/null
+++ b/Data/User/GameConfig/G3RD52.ini
@@ -0,0 +1,16 @@
+# G3RD52 - Shrek 2
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Sound issues need lle audio to be fixed.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 1
+PH_SZNear = 1
+PH_SZFar = 1
+PH_ExtraParam = 0
+PH_ZNear = 20
+PH_ZFar = 1.99998
+[Gecko]
diff --git a/Data/User/GameConfig/G3RE52.ini b/Data/User/GameConfig/G3RE52.ini
new file mode 100644
index 0000000000..15a742f636
--- /dev/null
+++ b/Data/User/GameConfig/G3RE52.ini
@@ -0,0 +1,16 @@
+# G3RE52 - Shrek 2
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Sound issues need lle audio to be fixed.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 1
+PH_SZNear = 1
+PH_SZFar = 1
+PH_ExtraParam = 0
+PH_ZNear = 20
+PH_ZFar = 1.99998
+[Gecko]
diff --git a/Data/User/GameConfig/G3RF52.ini b/Data/User/GameConfig/G3RF52.ini
new file mode 100644
index 0000000000..cde2d9a8ca
--- /dev/null
+++ b/Data/User/GameConfig/G3RF52.ini
@@ -0,0 +1,16 @@
+# G3RF52 - Shrek 2
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Sound issues need lle audio to be fixed.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 1
+PH_SZNear = 1
+PH_SZFar = 1
+PH_ExtraParam = 0
+PH_ZNear = 20
+PH_ZFar = 1.99998
+[Gecko]
diff --git a/Data/User/GameConfig/G3RP52.ini b/Data/User/GameConfig/G3RP52.ini
new file mode 100644
index 0000000000..bb42289bd9
--- /dev/null
+++ b/Data/User/GameConfig/G3RP52.ini
@@ -0,0 +1,16 @@
+# G3RP52 - Shrek 2
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Sound issues need lle audio to be fixed.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 1
+PH_SZNear = 1
+PH_SZFar = 1
+PH_ExtraParam = 0
+PH_ZNear = 20
+PH_ZFar = 1.99998
+[Gecko]
diff --git a/Data/User/GameConfig/G6NE69.ini b/Data/User/GameConfig/G6NE69.ini
index 832bea8e5f..9759e5911d 100644
--- a/Data/User/GameConfig/G6NE69.ini
+++ b/Data/User/GameConfig/G6NE69.ini
@@ -2,6 +2,15 @@
[Core] Values set here will override the main dolphin settings.
TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationIssues =
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+EmulationStateId = 4
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/G6NP69.ini b/Data/User/GameConfig/G6NP69.ini
index 8a35467139..314a7ae4f5 100644
--- a/Data/User/GameConfig/G6NP69.ini
+++ b/Data/User/GameConfig/G6NP69.ini
@@ -2,6 +2,15 @@
[Core] Values set here will override the main dolphin settings.
TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationIssues =
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+EmulationStateId = 4
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/G9TD52.ini b/Data/User/GameConfig/G9TD52.ini
new file mode 100644
index 0000000000..95f5d1837b
--- /dev/null
+++ b/Data/User/GameConfig/G9TD52.ini
@@ -0,0 +1,18 @@
+# G9TD52 - Shark Tale
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Needs LLE audio for proper sound.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
diff --git a/Data/User/GameConfig/G9TE52.ini b/Data/User/GameConfig/G9TE52.ini
new file mode 100644
index 0000000000..8ce046e142
--- /dev/null
+++ b/Data/User/GameConfig/G9TE52.ini
@@ -0,0 +1,18 @@
+# G9TE52 - Shark Tale
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Needs LLE audio for proper sound.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
diff --git a/Data/User/GameConfig/G9TF52.ini b/Data/User/GameConfig/G9TF52.ini
new file mode 100644
index 0000000000..625316cf7e
--- /dev/null
+++ b/Data/User/GameConfig/G9TF52.ini
@@ -0,0 +1,18 @@
+# G9TF52 - Shark Tale
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Needs LLE audio for proper sound.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
diff --git a/Data/User/GameConfig/G9TI52.ini b/Data/User/GameConfig/G9TI52.ini
new file mode 100644
index 0000000000..b4e063dc8e
--- /dev/null
+++ b/Data/User/GameConfig/G9TI52.ini
@@ -0,0 +1,18 @@
+# G9TI52 - Shark Tale
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Needs LLE audio for proper sound.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
diff --git a/Data/User/GameConfig/G9TP52.ini b/Data/User/GameConfig/G9TP52.ini
new file mode 100644
index 0000000000..a00d3fb255
--- /dev/null
+++ b/Data/User/GameConfig/G9TP52.ini
@@ -0,0 +1,18 @@
+# G9TP52 - Shark Tale
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Needs LLE audio for proper sound.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 0
diff --git a/Data/User/GameConfig/GBHDC8.ini b/Data/User/GameConfig/GBHDC8.ini
new file mode 100644
index 0000000000..dbc0e46f56
--- /dev/null
+++ b/Data/User/GameConfig/GBHDC8.ini
@@ -0,0 +1,18 @@
+# GBHDC8 - Mystic Heroes
+[EmuState]
+#The Emulation State (as of Dolphin r1027)
+EmulationStateId = 4
+EmulationIssues = Needs Real xfb for the videos to display.
+[OnFrame]
+[ActionReplay]
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GBHEC8.ini b/Data/User/GameConfig/GBHEC8.ini
index e086dcbc61..30fa0f7380 100644
--- a/Data/User/GameConfig/GBHEC8.ini
+++ b/Data/User/GameConfig/GBHEC8.ini
@@ -1,147 +1,119 @@
# GBHEC8 - Mystic Heroes
-
[EmuState]
#The Emulation State (as of Dolphin r1027)
EmulationStateId = 4
-
+EmulationIssues = Needs Real xfb for the videos to display.
[OnFrame]
-#Add memory patches here.
-
-#Add decrypted action replay cheats here.
[ActionReplay]
-
-$(m)
+$(m)
01180C36 88000000
C4201E68 0000FF00
-
-$Max Health
+$Max Health
01180C37 08000000
02264788 0000270F
-
-$Max Magic
+$Max Magic
01180C38 08000000
0226478A 0000270F
-
-$Max Attack
+$Max Attack
01180C39 08000000
0226478C 0000270F
-
-$Max Defense
+$Max Defense
01180C3A 08000000
0226478E 0000270F
-
-$Max Rune Attack
+$Max Rune Attack
01180C3B 08000000
02264790 0000270F
-
-$Max Rune Defense
+$Max Rune Defense
01180C3C 08000000
02264792 0000270F
-
-$Have All Runes
+$Have All Runes
01180C3D 08000000
022647C0 0005FFFF
-
-$Max Level All Magic Slots
+$Max Level All Magic Slots
01180C3E 08000000
042647A8 09090909
-
-$Start On Level 1-2
+$Start On Level 1-2
01180C3F 08000000
0226475A 00000102
-
-$Start On Level 1-3
+$Start On Level 1-3
01180C40 08000000
0226475A 00000103
-
-$Start On Level 2-1
+$Start On Level 2-1
01180C41 08000000
0226475A 00000201
-
-$Start On Level 2-2
+$Start On Level 2-2
01180C42 08000000
0226475A 00000202
-
-$Start On Level 2-3
+$Start On Level 2-3
01180C43 08000000
0226475A 00000203
-
-$Start On Level 3-1
+$Start On Level 3-1
01180C44 08000000
0226475A 00000301
-
-$Start On Level 3-2
+$Start On Level 3-2
01180C45 08000000
0226475A 00000302
-
-$Start On Level 3-3
+$Start On Level 3-3
01180C46 08000000
0226475A 00000303
-
-$Start On Level 4-1
+$Start On Level 4-1
01180C47 08000000
0226475A 00000401
-
-$Start On Level 4-2
+$Start On Level 4-2
01180C48 08000000
0226475A 00000402
-
-$Start On Level 4-3
+$Start On Level 4-3
01180C49 08000000
0226475A 00000403
-
-$Start On Level 5-1
+$Start On Level 5-1
01180C4A 08000000
0226475A 00000501
-
-$Start On Level 5-2
+$Start On Level 5-2
01180C4B 08000000
0226475A 00000502
-
-$Start On Level 5-3
+$Start On Level 5-3
01180C4C 08000000
0226475A 00000503
-
-$Start On Level 6-1
+$Start On Level 6-1
01180C4D 08000000
0226475A 00000601
-
-$Start On Level 6-2
+$Start On Level 6-2
01180C4E 08000000
0226475A 00000602
-
-$Start On Level 6-3
+$Start On Level 6-3
01180C4F 08000000
0226475A 00000603
-
-$Start On Level 7-1
+$Start On Level 7-1
01180C50 08000000
0226475A 00000701
-
-$Start On Level 7-2
+$Start On Level 7-2
01180C51 08000000
0226475A 00000702
-
-$Start On Level 7-3
+$Start On Level 7-3
01180C52 08000000
0226475A 00000703
-
-$Start On Level 7-4
+$Start On Level 7-4
01180C53 08000000
0226475A 00000704
-
-$Start On Level 8-1
+$Start On Level 8-1
01180C54 08000000
0226475A 00000801
-
-$Start On Level 8-2
+$Start On Level 8-2
01180C55 08000000
0226475A 00000802
-
-$Start On Level 8-3
+$Start On Level 8-3
01180C56 08000000
0226475A 00000803
-
-$Start On Level 8-4
+$Start On Level 8-4
01180C57 08000000
-0226475A 00000804
\ No newline at end of file
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GBHFC8.ini b/Data/User/GameConfig/GBHFC8.ini
new file mode 100644
index 0000000000..e0ac6b2976
--- /dev/null
+++ b/Data/User/GameConfig/GBHFC8.ini
@@ -0,0 +1,18 @@
+# GBHFC8 - Mystic Heroes
+[EmuState]
+#The Emulation State (as of Dolphin r1027)
+EmulationStateId = 4
+EmulationIssues = Needs Real xfb for the videos to display.
+[OnFrame]
+[ActionReplay]
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GBHPC8.ini b/Data/User/GameConfig/GBHPC8.ini
new file mode 100644
index 0000000000..59c0c5dd54
--- /dev/null
+++ b/Data/User/GameConfig/GBHPC8.ini
@@ -0,0 +1,18 @@
+# GBHPC8 - Mystic Heroes
+[EmuState]
+#The Emulation State (as of Dolphin r1027)
+EmulationStateId = 4
+EmulationIssues = Needs Real xfb for the videos to display.
+[OnFrame]
+[ActionReplay]
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GBSE8P.ini b/Data/User/GameConfig/GBSE8P.ini
index b774901496..5b91e4fe54 100644
--- a/Data/User/GameConfig/GBSE8P.ini
+++ b/Data/User/GameConfig/GBSE8P.ini
@@ -1,7 +1,16 @@
# GBSE8P - BEACH SPIKERS
[Core] Values set here will override the main dolphin settings.
+EnableFPRF = True
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationStateId = 2
-EmulationIssues = Controlls don't work ingame only walking works
+EmulationStateId = 4
+EmulationIssues = Needs lle audio to solve sound issues.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GBSP8P.ini b/Data/User/GameConfig/GBSP8P.ini
index 5ceadc46f8..c21ff6f50b 100644
--- a/Data/User/GameConfig/GBSP8P.ini
+++ b/Data/User/GameConfig/GBSP8P.ini
@@ -1,6 +1,16 @@
# GBSP8P - BEACH SPIKERS
[Core] Values set here will override the main dolphin settings.
+EnableFPRF = True
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
+EmulationIssues = Needs lle audio to solve sound issues.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GC6E01.ini b/Data/User/GameConfig/GC6E01.ini
index 6b8e2c10c3..b745ef89b2 100644
--- a/Data/User/GameConfig/GC6E01.ini
+++ b/Data/User/GameConfig/GC6E01.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = HLE music drops notes, if EFB scale is not integral, 1x, 2x or 3x serious texture glitches occur
+EmulationIssues = If EFB scale is not integral, serious texture glitches occur.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -16,4 +16,3 @@ PH_ZFar =
[Video_Settings]
EFBScale = 1
SafeTextureCacheColorSamples = 0
-
diff --git a/Data/User/GameConfig/GC6P01.ini b/Data/User/GameConfig/GC6P01.ini
index e5ed8f4587..4ebad29a0f 100644
--- a/Data/User/GameConfig/GC6P01.ini
+++ b/Data/User/GameConfig/GC6P01.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = HLE music drops notes, if EFB scale is not integral, 1x, 2x or 3x serious texture glitches occur
+EmulationIssues = If EFB scale is not integral, serious texture glitches occur.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/GDSE78.ini b/Data/User/GameConfig/GDSE78.ini
index 36adee24cc..d315811b96 100644
--- a/Data/User/GameConfig/GDSE78.ini
+++ b/Data/User/GameConfig/GDSE78.ini
@@ -1,8 +1,19 @@
# GDSE78 - Dark Summit
[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.
-EmulationStateId = 1
-EmulationIssues =
+EmulationStateId = 4
+EmulationIssues = Needs real xfb for the videos to display.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GDSP78.ini b/Data/User/GameConfig/GDSP78.ini
new file mode 100644
index 0000000000..acebf51c09
--- /dev/null
+++ b/Data/User/GameConfig/GDSP78.ini
@@ -0,0 +1,19 @@
+# GDSP78 - Dark Summit
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues = Needs real xfb for the videos to display.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GE4E7D.ini b/Data/User/GameConfig/GE4E7D.ini
index 234c5a4812..66d98e1fe3 100644
--- a/Data/User/GameConfig/GE4E7D.ini
+++ b/Data/User/GameConfig/GE4E7D.ini
@@ -1,8 +1,17 @@
# GE4E7D - 4x4 Evolution 2
[Core] Values set here will override the main dolphin settings.
TLBHack = 1
+SkipIdle = 0
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationStateId = 1
-EmulationIssues = Stuck at
+EmulationStateId = 4
+EmulationIssues = Idleskipping causes speed issues(menus,etc.)
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GEAE8P.ini b/Data/User/GameConfig/GEAE8P.ini
index 95afa9f062..3cf24a25c5 100644
--- a/Data/User/GameConfig/GEAE8P.ini
+++ b/Data/User/GameConfig/GEAE8P.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = LLE audio is needed to fix sound issues. Gfx glitches.
+EmulationIssues = Gfx glitches.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/GEAP8P.ini b/Data/User/GameConfig/GEAP8P.ini
index 92aa6472a9..e9fcefdcea 100644
--- a/Data/User/GameConfig/GEAP8P.ini
+++ b/Data/User/GameConfig/GEAP8P.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = LLE audio is needed to fix sound issues. Gfx glitches.
+EmulationIssues = Gfx glitches.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/GF4E52.ini b/Data/User/GameConfig/GF4E52.ini
index 1d062e1846..9135101401 100644
--- a/Data/User/GameConfig/GF4E52.ini
+++ b/Data/User/GameConfig/GF4E52.ini
@@ -1,7 +1,19 @@
-# GF4E52 - Fantastic Four
-[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
-EmulationIssues = Can be slow
-[OnFrame] Add memory patches to be applied every frame here.
-[ActionReplay] Add action replay cheats here.
+# GF4E52 - Fantastic Four
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/GF4F52.ini b/Data/User/GameConfig/GF4F52.ini
new file mode 100644
index 0000000000..479efe3d49
--- /dev/null
+++ b/Data/User/GameConfig/GF4F52.ini
@@ -0,0 +1,19 @@
+# GF4F52 - Fantastic Four
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/GF4P52.ini b/Data/User/GameConfig/GF4P52.ini
new file mode 100644
index 0000000000..196d565967
--- /dev/null
+++ b/Data/User/GameConfig/GF4P52.ini
@@ -0,0 +1,19 @@
+# GF4P52 - Fantastic Four
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationStateId = 4
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/GH2E69.ini b/Data/User/GameConfig/GH2E69.ini
index 8f8edf2532..b1f64e6ef7 100644
--- a/Data/User/GameConfig/GH2E69.ini
+++ b/Data/User/GameConfig/GH2E69.ini
@@ -1,12 +1,18 @@
-# GH2E69 - NFS: HP2
-[Core] Values set here will override the main dolphin settings.
-MMU = 1
-[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationStateId = 3
-EmulationIssues = Intro videos are messed up, skip them. Game is slow (r6651)
-[OnFrame] Add memory patches to be applied every frame here.
-[ActionReplay] Add action replay cheats here.
-[Video]
-ProjectionHack = 0
-[Gecko]
-
+# GH2E69 - NFS: HP2
+[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
+EmulationIssues = Intro videos are messed up, skip them. Needs LLE audio for proper sound and the game is slow.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/GH2P69.ini b/Data/User/GameConfig/GH2P69.ini
new file mode 100644
index 0000000000..006dad78dc
--- /dev/null
+++ b/Data/User/GameConfig/GH2P69.ini
@@ -0,0 +1,18 @@
+# GH2P69 - NFS: HP2
+[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
+EmulationIssues = Intro videos are messed up, skip them. Needs LLE audio for proper sound and the game is slow.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/GKHEA4.ini b/Data/User/GameConfig/GKHEA4.ini
index 635d743f83..4973a2955f 100644
--- a/Data/User/GameConfig/GKHEA4.ini
+++ b/Data/User/GameConfig/GKHEA4.ini
@@ -1,7 +1,17 @@
# GKHEA4 - King Arthur
[Core] Values set here will override the main dolphin settings.
+SkipIdle = 0
+BlockMerging = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationStateId = 3
-EmulationIssues = Slow and screen on right side is cut off
+EmulationStateId = 4
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GKHPA4.ini b/Data/User/GameConfig/GKHPA4.ini
index f3a70877f4..ab44a39965 100644
--- a/Data/User/GameConfig/GKHPA4.ini
+++ b/Data/User/GameConfig/GKHPA4.ini
@@ -1,6 +1,17 @@
# GKHPA4 - King Arthur
[Core] Values set here will override the main dolphin settings.
+SkipIdle = 0
+BlockMerging = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationStateId = 3
+EmulationStateId = 4
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GLYE69.ini b/Data/User/GameConfig/GLYE69.ini
index 160e0444b8..da2c0b1537 100644
--- a/Data/User/GameConfig/GLYE69.ini
+++ b/Data/User/GameConfig/GLYE69.ini
@@ -1,6 +1,16 @@
# GLYE69 - NBA LIVE 2005
[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
-EmulationIssues =
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+EmulationStateId = 4
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GLYP69.ini b/Data/User/GameConfig/GLYP69.ini
new file mode 100644
index 0000000000..84392be595
--- /dev/null
+++ b/Data/User/GameConfig/GLYP69.ini
@@ -0,0 +1,16 @@
+# GLYP69 - NBA LIVE 2005
+[Core] Values set here will override the main dolphin settings.
+TLBHack = 1
+[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+EmulationStateId = 4
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GMIE70.ini b/Data/User/GameConfig/GMIE70.ini
index f32657ffaa..7e3be02a66 100644
--- a/Data/User/GameConfig/GMIE70.ini
+++ b/Data/User/GameConfig/GMIE70.ini
@@ -3,7 +3,7 @@
TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
-EmulationIssues =
+EmulationIssues = Needs Efb to Ram for Sonic Imager (gadgets).
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -17,3 +17,6 @@ PH_ZFar =
[Video_Settings]
UseXFB = True
UseRealXFB = False
+[Video_Hacks]
+EFBCopyEnable = True
+EFBToTextureEnable = False
diff --git a/Data/User/GameConfig/GMIP70.ini b/Data/User/GameConfig/GMIP70.ini
index 2738d6e0c4..1fb1521e83 100644
--- a/Data/User/GameConfig/GMIP70.ini
+++ b/Data/User/GameConfig/GMIP70.ini
@@ -3,7 +3,7 @@
TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
-EmulationIssues =
+EmulationIssues = Needs Efb to Ram for Sonic Imager (gadgets).
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -17,3 +17,6 @@ PH_ZFar =
[Video_Settings]
UseXFB = True
UseRealXFB = False
+[Video_Hacks]
+EFBCopyEnable = True
+EFBToTextureEnable = False
diff --git a/Data/User/GameConfig/GN8E69.ini b/Data/User/GameConfig/GN8E69.ini
new file mode 100644
index 0000000000..3129860bb7
--- /dev/null
+++ b/Data/User/GameConfig/GN8E69.ini
@@ -0,0 +1,15 @@
+# GN8E69 - NBA LIVE 2004
+[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
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GN8P69.ini b/Data/User/GameConfig/GN8P69.ini
new file mode 100644
index 0000000000..f56f46bfcd
--- /dev/null
+++ b/Data/User/GameConfig/GN8P69.ini
@@ -0,0 +1,15 @@
+# GN8P69 - NBA LIVE 2004
+[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
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GNJEAF.ini b/Data/User/GameConfig/GNJEAF.ini
index 2c46ed2f8b..7b86e03933 100644
--- a/Data/User/GameConfig/GNJEAF.ini
+++ b/Data/User/GameConfig/GNJEAF.ini
@@ -3,6 +3,17 @@
TLBHack = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
-EmulationIssues = Cutscenes are black
+EmulationIssues = Needs Real Xfb for the videos to display.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GNLE69.ini b/Data/User/GameConfig/GNLE69.ini
new file mode 100644
index 0000000000..68dcf3183b
--- /dev/null
+++ b/Data/User/GameConfig/GNLE69.ini
@@ -0,0 +1,15 @@
+# GNLE69 - NBA Live 2003
+[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
+EmulationIssues = Sound issues need LLE audio to be fixed and the videos are messed up.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/GPAE01.ini b/Data/User/GameConfig/GPAE01.ini
new file mode 100644
index 0000000000..2c4a579eca
--- /dev/null
+++ b/Data/User/GameConfig/GPAE01.ini
@@ -0,0 +1,18 @@
+# GPAE01 - PokemonChannelMainDisk
+[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
+EmulationIssues = Needs Efb to Ram for painting.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Hacks]
+EFBToTextureEnable = False
+EFBCopyEnable = True
diff --git a/Data/User/GameConfig/GPAJ01.ini b/Data/User/GameConfig/GPAJ01.ini
new file mode 100644
index 0000000000..2c41ef72f0
--- /dev/null
+++ b/Data/User/GameConfig/GPAJ01.ini
@@ -0,0 +1,18 @@
+# GPAJ01 - PokemonChannelMainDisk
+[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
+EmulationIssues = Needs Efb to Ram for painting.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Hacks]
+EFBToTextureEnable = False
+EFBCopyEnable = True
diff --git a/Data/User/GameConfig/GPAP01.ini b/Data/User/GameConfig/GPAP01.ini
new file mode 100644
index 0000000000..15bc8aa8cf
--- /dev/null
+++ b/Data/User/GameConfig/GPAP01.ini
@@ -0,0 +1,18 @@
+# GPAP01 - PokemonChannelMainDisk
+[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
+EmulationIssues = Needs Efb to Ram for painting.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Hacks]
+EFBToTextureEnable = False
+EFBCopyEnable = True
diff --git a/Data/User/GameConfig/GPAU01.ini b/Data/User/GameConfig/GPAU01.ini
new file mode 100644
index 0000000000..21a7a58e23
--- /dev/null
+++ b/Data/User/GameConfig/GPAU01.ini
@@ -0,0 +1,18 @@
+# GPAU01 - PokemonChannelMainDisk
+[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
+EmulationIssues = Needs Efb to Ram for painting.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Hacks]
+EFBToTextureEnable = False
+EFBCopyEnable = True
diff --git a/Data/User/GameConfig/GQSDAF.ini b/Data/User/GameConfig/GQSDAF.ini
index bf754eb2c5..1b7d9a176c 100644
--- a/Data/User/GameConfig/GQSDAF.ini
+++ b/Data/User/GameConfig/GQSDAF.ini
@@ -5,7 +5,7 @@
#The Emulation State. 1 is worst, 5 is best, 0 is not set.
#Emulation state validated on r1648
EmulationStateId = 4
-EmulationIssues = Sound issues need LLE plugin to be solved.(r7184)
+EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
diff --git a/Data/User/GameConfig/GQSEAF.ini b/Data/User/GameConfig/GQSEAF.ini
index 5ab40734e7..df7fae9cf3 100644
--- a/Data/User/GameConfig/GQSEAF.ini
+++ b/Data/User/GameConfig/GQSEAF.ini
@@ -426,7 +426,7 @@ EmulationStateId = 4
# Max Affection codes
# use only one of these codes at a time for your
# favorite character to have max affection.
-EmulationIssues = Sound issues need LLE plugin to be solved.(r7184)
+EmulationIssues =
[OnFrame]
[ActionReplay]
$(M) (Datel)
@@ -790,4 +790,3 @@ PH_ZFar = 1
SafeTextureCacheColorSamples = 512
[Video_Hacks]
DlistCachingEnable = False
-
diff --git a/Data/User/GameConfig/GQSFAF.ini b/Data/User/GameConfig/GQSFAF.ini
index 56bc287e7e..8eb054e980 100644
--- a/Data/User/GameConfig/GQSFAF.ini
+++ b/Data/User/GameConfig/GQSFAF.ini
@@ -5,7 +5,7 @@
#The Emulation State. 1 is worst, 5 is best, 0 is not set.
#Emulation state validated on r1648
EmulationStateId = 4
-EmulationIssues = Sound issues need LLE plugin to be solved.(r7184)
+EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
diff --git a/Data/User/GameConfig/GQSPAF.ini b/Data/User/GameConfig/GQSPAF.ini
index 64132e6ca7..b7b70f5476 100644
--- a/Data/User/GameConfig/GQSPAF.ini
+++ b/Data/User/GameConfig/GQSPAF.ini
@@ -5,7 +5,7 @@
#The Emulation State. 1 is worst, 5 is best, 0 is not set.
#Emulation state validated on r1648
EmulationStateId = 4
-EmulationIssues = Sound issues need LLE plugin to be solved.(r7184)
+EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
diff --git a/Data/User/GameConfig/GRQE41.ini b/Data/User/GameConfig/GRQE41.ini
index c4fbb2e36f..b03f78efd5 100644
--- a/Data/User/GameConfig/GRQE41.ini
+++ b/Data/User/GameConfig/GRQE41.ini
@@ -1,7 +1,18 @@
# GRQE41 - CITY RACER
[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 = 1
-EmulationIssues = Nothing
+EmulationStateId = 2
+EmulationIssues = Needs lle audio for sound and real XFB for videos to show up.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GS2D78.ini b/Data/User/GameConfig/GS2D78.ini
new file mode 100644
index 0000000000..85bcce0ad9
--- /dev/null
+++ b/Data/User/GameConfig/GS2D78.ini
@@ -0,0 +1,18 @@
+# GS2D78 - Summoner 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.
+EmulationStateId = 4
+EmulationIssues = Needs real xfb for the videos to display.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GS2E78.ini b/Data/User/GameConfig/GS2E78.ini
new file mode 100644
index 0000000000..ed66cb0da2
--- /dev/null
+++ b/Data/User/GameConfig/GS2E78.ini
@@ -0,0 +1,18 @@
+# GS2E78 - Summoner 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.
+EmulationStateId = 4
+EmulationIssues = Needs real xfb for the videos to display.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GS2F78.ini b/Data/User/GameConfig/GS2F78.ini
new file mode 100644
index 0000000000..baa39b549c
--- /dev/null
+++ b/Data/User/GameConfig/GS2F78.ini
@@ -0,0 +1,18 @@
+# GS2F78 - Summoner 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.
+EmulationStateId = 4
+EmulationIssues = Needs real xfb for the videos to display.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GS2P78.ini b/Data/User/GameConfig/GS2P78.ini
new file mode 100644
index 0000000000..79fdc07d89
--- /dev/null
+++ b/Data/User/GameConfig/GS2P78.ini
@@ -0,0 +1,18 @@
+# GS2P78 - Summoner 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.
+EmulationStateId = 4
+EmulationIssues = Needs real xfb for the videos to display.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GTZE41.ini b/Data/User/GameConfig/GTZE41.ini
index bf6dbaac1d..be20078a64 100644
--- a/Data/User/GameConfig/GTZE41.ini
+++ b/Data/User/GameConfig/GTZE41.ini
@@ -1,7 +1,18 @@
# GTZE41 - DISNEY'S TARZAN
[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 = 2
-EmulationIssues =
+EmulationStateId = 4
+EmulationIssues = Needs real Xfb for videos to display and LLE audio for proper sound and stability (hle freezes ingame).
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GTZP41.ini b/Data/User/GameConfig/GTZP41.ini
new file mode 100644
index 0000000000..4a350e41c6
--- /dev/null
+++ b/Data/User/GameConfig/GTZP41.ini
@@ -0,0 +1,18 @@
+# GTZP41 - DISNEY'S TARZAN
+[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
+EmulationIssues = Needs real Xfb for videos to display and LLE audio for proper sound and stability (hle freezes ingame).
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = True
diff --git a/Data/User/GameConfig/GWOE5G.ini b/Data/User/GameConfig/GWOE5G.ini
index 7960d2dc81..44ebf853ef 100644
--- a/Data/User/GameConfig/GWOE5G.ini
+++ b/Data/User/GameConfig/GWOE5G.ini
@@ -1,7 +1,17 @@
# GWOE5G - Blowout
[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 = 1
-Issues="Does Nothing"
+EmulationStateId = 4
+EmulationIssues = Needs LLE audio to get ingame.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
diff --git a/Data/User/GameConfig/GWRE01.ini b/Data/User/GameConfig/GWRE01.ini
index 6bb9265887..17d0f32cdf 100644
--- a/Data/User/GameConfig/GWRE01.ini
+++ b/Data/User/GameConfig/GWRE01.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = needs the frame cheats from ini
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
$(m)
diff --git a/Data/User/GameConfig/GWRP01.ini b/Data/User/GameConfig/GWRP01.ini
index ff622dc857..bdeeeb8654 100644
--- a/Data/User/GameConfig/GWRP01.ini
+++ b/Data/User/GameConfig/GWRP01.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = goes to before race with framepatch
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[Video]
ProjectionHack = 0
diff --git a/Data/User/GameConfig/R8AE01.ini b/Data/User/GameConfig/R8AE01.ini
index af8a1a8a8b..56e5afe685 100644
--- a/Data/User/GameConfig/R8AE01.ini
+++ b/Data/User/GameConfig/R8AE01.ini
@@ -13,6 +13,8 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
+[Video_Settings]
+SafeTextureCacheColorSamples = 512
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True
diff --git a/Data/User/GameConfig/RFFEGD.ini b/Data/User/GameConfig/RFFEGD.ini
index 0db2a572ee..5efa2dd980 100644
--- a/Data/User/GameConfig/RFFEGD.ini
+++ b/Data/User/GameConfig/RFFEGD.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use efb scale x1 for the black lines to disappear
+EmulationIssues = Needs integral scaling for the black lines to disappear.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -13,7 +13,6 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Settings]
-EFBScale = 2
+[Video_Settings]
+EFBScale = 1
SafeTextureCacheColorSamples = 512
-
diff --git a/Data/User/GameConfig/RFFJGD.ini b/Data/User/GameConfig/RFFJGD.ini
index 24d3099bc8..850bb88c9d 100644
--- a/Data/User/GameConfig/RFFJGD.ini
+++ b/Data/User/GameConfig/RFFJGD.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use efb scale x1 for the black lines to disappear
+EmulationIssues = Needs integral scaling for the black lines to disappear.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -13,6 +13,6 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Settings]
-EFBScale = 2
+[Video_Settings]
+EFBScale = 1
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/RFFPGD.ini b/Data/User/GameConfig/RFFPGD.ini
index bb0471ea68..6c9c27abb4 100644
--- a/Data/User/GameConfig/RFFPGD.ini
+++ b/Data/User/GameConfig/RFFPGD.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use efb scale x1 for the black lines to disappear
+EmulationIssues = Needs integral scaling for the black lines to disappear.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -13,6 +13,6 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Settings]
-EFBScale = 2
+[Video_Settings]
+EFBScale = 1
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/RIPEAF.ini b/Data/User/GameConfig/RIPEAF.ini
index da321f88ce..6373ea5568 100644
--- a/Data/User/GameConfig/RIPEAF.ini
+++ b/Data/User/GameConfig/RIPEAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/RIPJAF.ini b/Data/User/GameConfig/RIPJAF.ini
index dbbee55ffb..1cf02a9079 100644
--- a/Data/User/GameConfig/RIPJAF.ini
+++ b/Data/User/GameConfig/RIPJAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/RIPPAF.ini b/Data/User/GameConfig/RIPPAF.ini
index 64d6ac3fd5..b6b9edb6fb 100644
--- a/Data/User/GameConfig/RIPPAF.ini
+++ b/Data/User/GameConfig/RIPPAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/RIUJAF.ini b/Data/User/GameConfig/RIUJAF.ini
index e18411c3ff..49dac820e4 100644
--- a/Data/User/GameConfig/RIUJAF.ini
+++ b/Data/User/GameConfig/RIUJAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/RIUPAF.ini b/Data/User/GameConfig/RIUPAF.ini
index 2192cb63bd..a557f4e1da 100644
--- a/Data/User/GameConfig/RIUPAF.ini
+++ b/Data/User/GameConfig/RIUPAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/ROLE8P.ini b/Data/User/GameConfig/ROLE8P.ini
index 9fb165c654..607d412d7f 100644
--- a/Data/User/GameConfig/ROLE8P.ini
+++ b/Data/User/GameConfig/ROLE8P.ini
@@ -2,16 +2,16 @@
[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
-EmulationIssues = Use Direct 3d 11 backend.
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
-ProjectionHack = 0
+ProjectionHack = 1
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
-PH_ZFar =
+PH_ZFar = 0.01
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/ROLJ01.ini b/Data/User/GameConfig/ROLJ01.ini
index 59e58e525a..43348472b6 100644
--- a/Data/User/GameConfig/ROLJ01.ini
+++ b/Data/User/GameConfig/ROLJ01.ini
@@ -2,16 +2,16 @@
[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
-EmulationIssues = Use Direct 3d 11 backend.
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
-ProjectionHack = 0
+ProjectionHack = 1
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
-PH_ZFar =
+PH_ZFar = 0.01
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/ROLK01.ini b/Data/User/GameConfig/ROLK01.ini
index 51ee178104..0b49240afd 100644
--- a/Data/User/GameConfig/ROLK01.ini
+++ b/Data/User/GameConfig/ROLK01.ini
@@ -2,16 +2,16 @@
[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
-EmulationIssues = Use Direct 3d 11 backend.
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
-ProjectionHack = 0
+ProjectionHack = 1
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
-PH_ZFar =
+PH_ZFar = 0.01
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/ROLP8P.ini b/Data/User/GameConfig/ROLP8P.ini
index b969360e00..e39bc91547 100644
--- a/Data/User/GameConfig/ROLP8P.ini
+++ b/Data/User/GameConfig/ROLP8P.ini
@@ -2,16 +2,16 @@
[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
-EmulationIssues = Use Direct 3d 11 backend.
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
-ProjectionHack = 0
+ProjectionHack = 1
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
-PH_ZFar =
+PH_ZFar = 0.01
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/ROUJAF.ini b/Data/User/GameConfig/ROUJAF.ini
index 5dea114bf6..ddea43bdf2 100644
--- a/Data/User/GameConfig/ROUJAF.ini
+++ b/Data/User/GameConfig/ROUJAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/ROUPAF.ini b/Data/User/GameConfig/ROUPAF.ini
index 5f9b8e0ce7..82f940a178 100644
--- a/Data/User/GameConfig/ROUPAF.ini
+++ b/Data/User/GameConfig/ROUPAF.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues = Use direct3D11 plugin (r6932)
+EmulationIssues =
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
diff --git a/Data/User/GameConfig/RRZEGY.ini b/Data/User/GameConfig/RRZEGY.ini
new file mode 100644
index 0000000000..78a1056318
--- /dev/null
+++ b/Data/User/GameConfig/RRZEGY.ini
@@ -0,0 +1,18 @@
+# RRZEGY - Rubik's Puzzle World
+[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
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/RRZPGY.ini b/Data/User/GameConfig/RRZPGY.ini
new file mode 100644
index 0000000000..b7b812a090
--- /dev/null
+++ b/Data/User/GameConfig/RRZPGY.ini
@@ -0,0 +1,18 @@
+# RRZPGY - Rubik's Puzzle World
+[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
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/S72E01.ini b/Data/User/GameConfig/S72E01.ini
new file mode 100644
index 0000000000..fba45b8b64
--- /dev/null
+++ b/Data/User/GameConfig/S72E01.ini
@@ -0,0 +1,18 @@
+# S72E01 - Kirby's Dream Collection Special Edition
+[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
+EmulationIssues = Classic games are unplayable.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/S72J01.ini b/Data/User/GameConfig/S72J01.ini
new file mode 100644
index 0000000000..74c8225e3a
--- /dev/null
+++ b/Data/User/GameConfig/S72J01.ini
@@ -0,0 +1,18 @@
+# S72J01 - Hoshi No Kirby: 20th Anniversary Edition
+[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
+EmulationIssues = Classic games are unplayable.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+UseXFB = True
+UseRealXFB = False
diff --git a/Data/User/GameConfig/SCYE4Q.ini b/Data/User/GameConfig/SCYE4Q.ini
new file mode 100644
index 0000000000..1000cd8bcc
--- /dev/null
+++ b/Data/User/GameConfig/SCYE4Q.ini
@@ -0,0 +1,15 @@
+# SCYE4Q - Cars 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.
+EmulationStateId = 1
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/SCYP4Q.ini b/Data/User/GameConfig/SCYP4Q.ini
new file mode 100644
index 0000000000..a7f2b779ff
--- /dev/null
+++ b/Data/User/GameConfig/SCYP4Q.ini
@@ -0,0 +1,15 @@
+# SCYP4Q - Cars 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.
+EmulationStateId = 1
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/SCYX4Q.ini b/Data/User/GameConfig/SCYX4Q.ini
new file mode 100644
index 0000000000..6f1a2cf0b3
--- /dev/null
+++ b/Data/User/GameConfig/SCYX4Q.ini
@@ -0,0 +1,15 @@
+# SCYX4Q - Cars 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.
+EmulationStateId = 1
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/SCYY4Q.ini b/Data/User/GameConfig/SCYY4Q.ini
new file mode 100644
index 0000000000..b2637bb69c
--- /dev/null
+++ b/Data/User/GameConfig/SCYY4Q.ini
@@ -0,0 +1,15 @@
+# SCYY4Q - Cars 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.
+EmulationStateId = 1
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/SCYZ4Q.ini b/Data/User/GameConfig/SCYZ4Q.ini
new file mode 100644
index 0000000000..9fad833875
--- /dev/null
+++ b/Data/User/GameConfig/SCYZ4Q.ini
@@ -0,0 +1,15 @@
+# SCYZ4Q - Cars 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.
+EmulationStateId = 1
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
diff --git a/Data/User/GameConfig/SDNE41.ini b/Data/User/GameConfig/SDNE41.ini
index c3ac08ad38..79dfb707c5 100644
--- a/Data/User/GameConfig/SDNE41.ini
+++ b/Data/User/GameConfig/SDNE41.ini
@@ -1,6 +1,6 @@
# SDNE41 - Just Dance
[Video_Settings]
-EFBScale = 0
+EFBScale = 1
[Video_Enhancements]
MaxAnisotropy = 0
[Video]
@@ -11,7 +11,7 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[EmuState]
-EmulationStateId = 0
+EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
diff --git a/Data/User/GameConfig/SDNP41.ini b/Data/User/GameConfig/SDNP41.ini
index 07ac7ff92a..612ecdeddf 100644
--- a/Data/User/GameConfig/SDNP41.ini
+++ b/Data/User/GameConfig/SDNP41.ini
@@ -1,6 +1,6 @@
# SDNP41 - Just Dance
[Video_Settings]
-EFBScale = 0
+EFBScale = 1
[Video_Enhancements]
MaxAnisotropy = 0
[Video]
@@ -11,7 +11,7 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[EmuState]
-EmulationStateId = 0
+EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
diff --git a/Data/User/GameConfig/SEME4Q.ini b/Data/User/GameConfig/SEME4Q.ini
index 9b246a03d9..7e340985b3 100644
--- a/Data/User/GameConfig/SEME4Q.ini
+++ b/Data/User/GameConfig/SEME4Q.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues =
+EmulationIssues = Enable progressive scan if the game has boot issues.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -13,7 +13,8 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Settings]
+[Video_Settings]
+EFBScale = 1
SafeTextureCacheColorSamples = 0
[Video_Enhancements]
ForceFiltering = False
@@ -21,4 +22,3 @@ ForceFiltering = False
DlistCachingEnable = False
[Wii]
DisableWiimoteSpeaker = 1
-
diff --git a/Data/User/GameConfig/SEMJ01.ini b/Data/User/GameConfig/SEMJ01.ini
new file mode 100644
index 0000000000..7dc481ea34
--- /dev/null
+++ b/Data/User/GameConfig/SEMJ01.ini
@@ -0,0 +1,24 @@
+# SEMJ01 - Disney Epic Mickey: Mickey Mouse and the Magic Brush
+[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
+EmulationIssues = Enable progressive scan if the game has boot issues.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
+SafeTextureCacheColorSamples = 0
+[Video_Enhancements]
+ForceFiltering = False
+[Video_Hacks]
+DlistCachingEnable = False
+[Wii]
+DisableWiimoteSpeaker = 1
diff --git a/Data/User/GameConfig/SEMP4Q.ini b/Data/User/GameConfig/SEMP4Q.ini
index 1bb265c49c..fa1afc01c2 100644
--- a/Data/User/GameConfig/SEMP4Q.ini
+++ b/Data/User/GameConfig/SEMP4Q.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues =
+EmulationIssues = Enable progressive scan if the game has boot issues.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -13,7 +13,8 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Settings]
+[Video_Settings]
+EFBScale = 1
SafeTextureCacheColorSamples = 0
[Video_Enhancements]
ForceFiltering = False
diff --git a/Data/User/GameConfig/SEMX4Q.ini b/Data/User/GameConfig/SEMX4Q.ini
index 09597ac5fa..b4c56197ea 100644
--- a/Data/User/GameConfig/SEMX4Q.ini
+++ b/Data/User/GameConfig/SEMX4Q.ini
@@ -2,7 +2,7 @@
[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
-EmulationIssues =
+EmulationIssues = Enable progressive scan if the game has boot issues.
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -13,7 +13,8 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Settings]
+[Video_Settings]
+EFBScale = 1
SafeTextureCacheColorSamples = 0
[Video_Enhancements]
ForceFiltering = False
diff --git a/Data/User/GameConfig/SEMY4Q.ini b/Data/User/GameConfig/SEMY4Q.ini
new file mode 100644
index 0000000000..5d8798227d
--- /dev/null
+++ b/Data/User/GameConfig/SEMY4Q.ini
@@ -0,0 +1,24 @@
+# SEMY4Q - Disney Epic Mickey
+[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
+EmulationIssues = Enable progressive scan if the game has boot issues.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
+SafeTextureCacheColorSamples = 0
+[Video_Enhancements]
+ForceFiltering = False
+[Video_Hacks]
+DlistCachingEnable = False
+[Wii]
+DisableWiimoteSpeaker = 1
diff --git a/Data/User/GameConfig/SEMZ4Q.ini b/Data/User/GameConfig/SEMZ4Q.ini
new file mode 100644
index 0000000000..eecaa23166
--- /dev/null
+++ b/Data/User/GameConfig/SEMZ4Q.ini
@@ -0,0 +1,24 @@
+# SEMZ4Q - Disney Epic Mickey
+[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
+EmulationIssues = Enable progressive scan if the game has boot issues.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
+SafeTextureCacheColorSamples = 0
+[Video_Enhancements]
+ForceFiltering = False
+[Video_Hacks]
+DlistCachingEnable = False
+[Wii]
+DisableWiimoteSpeaker = 1
diff --git a/Data/User/GameConfig/SERE4Q.ini b/Data/User/GameConfig/SERE4Q.ini
new file mode 100644
index 0000000000..ef5f4edfb2
--- /dev/null
+++ b/Data/User/GameConfig/SERE4Q.ini
@@ -0,0 +1,20 @@
+# SERE4Q - Disney Epic Mickey 2: The Power of 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.
+EmulationStateId = 4
+EmulationIssues = Enable progressive scan if the game has boot issues.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
+SafeTextureCacheColorSamples = 0
+[Wii]
+DisableWiimoteSpeaker = 1
diff --git a/Data/User/GameConfig/SERF4Q.ini b/Data/User/GameConfig/SERF4Q.ini
new file mode 100644
index 0000000000..b03abcf0e9
--- /dev/null
+++ b/Data/User/GameConfig/SERF4Q.ini
@@ -0,0 +1,20 @@
+# SERF4Q - Disney Epic Mickey 2: The Power of 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.
+EmulationStateId = 4
+EmulationIssues = Enable progressive scan if the game has boot issues.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
+SafeTextureCacheColorSamples = 0
+[Wii]
+DisableWiimoteSpeaker = 1
diff --git a/Data/User/GameConfig/SERP4Q.ini b/Data/User/GameConfig/SERP4Q.ini
new file mode 100644
index 0000000000..e57bb14704
--- /dev/null
+++ b/Data/User/GameConfig/SERP4Q.ini
@@ -0,0 +1,20 @@
+# SERP4Q - Disney Epic Mickey 2: The Power of 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.
+EmulationStateId = 4
+EmulationIssues = Enable progressive scan if the game has boot issues.
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Settings]
+EFBScale = 1
+SafeTextureCacheColorSamples = 0
+[Wii]
+DisableWiimoteSpeaker = 1
diff --git a/Data/User/GameConfig/SILE78.ini b/Data/User/GameConfig/SILE78.ini
index 7a7de8fcee..ec3df3964d 100644
--- a/Data/User/GameConfig/SILE78.ini
+++ b/Data/User/GameConfig/SILE78.ini
@@ -1,9 +1,10 @@
# SILE78 - Worms Battle Islands
[Core] Values set here will override the main dolphin settings.
TLBHack = 1
+SkipIdle = 0
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
-EmulationIssues =
+EmulationIssues = Idleskipping causes speed issues(menus,etc.)
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -14,7 +15,5 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Hardware]
-VSync = False
[Video_Settings]
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/SILP78.ini b/Data/User/GameConfig/SILP78.ini
index 3be5d8870f..0f5c7dd381 100644
--- a/Data/User/GameConfig/SILP78.ini
+++ b/Data/User/GameConfig/SILP78.ini
@@ -1,9 +1,10 @@
# SILP78 - Worms Battle Islands
[Core] Values set here will override the main dolphin settings.
TLBHack = 1
+SkipIdle = 0
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
-EmulationIssues =
+EmulationIssues = Idleskipping causes speed issues(menus,etc.)
[OnFrame] Add memory patches to be applied every frame here.
[ActionReplay] Add action replay cheats here.
[Video]
@@ -14,7 +15,5 @@ PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
-[Video_Hardware]
-VSync = False
[Video_Settings]
SafeTextureCacheColorSamples = 512
diff --git a/Data/User/GameConfig/SLSEXJ.ini b/Data/User/GameConfig/SLSEXJ.ini
new file mode 100644
index 0000000000..3250f478c0
--- /dev/null
+++ b/Data/User/GameConfig/SLSEXJ.ini
@@ -0,0 +1,19 @@
+# SLSEXJ - THE LAST STORY
+[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
+EmulationIssues =
+[OnFrame] Add memory patches to be applied every frame here.
+[ActionReplay] Add action replay cheats here.
+[Video]
+ProjectionHack = 0
+PH_SZNear = 0
+PH_SZFar = 0
+PH_ExtraParam = 0
+PH_ZNear =
+PH_ZFar =
+[Gecko]
+[Video_Hacks]
+EFBToTextureEnable = False
+EFBCopyEnable = True
+EFBCopyCacheEnable = True
diff --git a/Externals/SOIL/stb_image_aug.c b/Externals/SOIL/stb_image_aug.c
index 2bbb50b1bf..450d6c4b8c 100644
--- a/Externals/SOIL/stb_image_aug.c
+++ b/Externals/SOIL/stb_image_aug.c
@@ -2394,6 +2394,7 @@ static int parse_png_file(png *z, int scan, int req_comp)
// if critical, fail
if ((c.type & (1 << 29)) == 0) {
#ifndef STBI_NO_FAILURE_STRINGS
+ #ifndef STBI_FAILURE_USERMSG
// not threadsafe
static char invalid_chunk[] = "XXXX chunk not known";
invalid_chunk[0] = (uint8) (c.type >> 24);
@@ -2401,6 +2402,7 @@ static int parse_png_file(png *z, int scan, int req_comp)
invalid_chunk[2] = (uint8) (c.type >> 8);
invalid_chunk[3] = (uint8) (c.type >> 0);
#endif
+ #endif
return e(invalid_chunk, "PNG not supported: unknown chunk type");
}
skip(s, c.length);
@@ -2584,7 +2586,7 @@ static int shiftsigned(int v, int shift, int bits)
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
uint8 *out;
- unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
+ unsigned int mr=0,mg=0,mb=0,ma=0;
stbi_uc pal[256][4];
int psize=0,i,j,compress=0,width;
int bpp, flip_vertically, pad, target, offset, hsz;
@@ -2634,7 +2636,6 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
mg = 0xff << 8;
mb = 0xff << 0;
ma = 0xff << 24;
- fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
} else {
mr = 31 << 10;
mg = 31 << 5;
diff --git a/Externals/wxWidgets3/wx/wxcocoa.h b/Externals/wxWidgets3/wx/wxcocoa.h
index 406621565c..841d17e949 100644
--- a/Externals/wxWidgets3/wx/wxcocoa.h
+++ b/Externals/wxWidgets3/wx/wxcocoa.h
@@ -996,25 +996,25 @@
#define HAVE_USLEEP 1
/* Define if you have wcscasecmp() function */
-#define HAVE_WCSCASECMP 1
+/* #undef HAVE_WCSCASECMP 1 */
/* Define if you have wcsncasecmp() function */
-#define HAVE_WCSNCASECMP 1
+/* #undef HAVE_WCSNCASECMP 1 */
/* Define if you have wcslen function */
#define HAVE_WCSLEN 1
/* Define if you have wcsdup function */
-#define HAVE_WCSDUP 1
+/* #undef HAVE_WCSDUP 1 */
/* Define if you have wcsftime() function */
#define HAVE_WCSFTIME 1
/* Define if you have strnlen() function */
-#define HAVE_STRNLEN 1
+/* #undef HAVE_STRNLEN 1 */
/* Define if you have wcsnlen() function */
-#define HAVE_WCSNLEN 1
+/* #undef HAVE_WCSNLEN 1 */
/* Define if you have wcstoull() and wcstoll() */
/* #undef HAVE_WCSTOULL */
diff --git a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp
index d09bce85f9..f6d5d31bed 100644
--- a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp
+++ b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp
@@ -87,6 +87,13 @@ bool CoreAudioSound::Start()
return false;
}
+ err = AudioUnitSetParameter(audioUnit,
+ kHALOutputParam_Volume,
+ kAudioUnitParameterFlag_Output, 0,
+ m_volume / 100., 0);
+ if (err != noErr)
+ ERROR_LOG(AUDIO, "error setting volume");
+
err = AudioUnitInitialize(audioUnit);
if (err != noErr) {
ERROR_LOG(AUDIO, "error initializing audiounit");
@@ -105,6 +112,7 @@ bool CoreAudioSound::Start()
void CoreAudioSound::SetVolume(int volume)
{
OSStatus err;
+ m_volume = volume;
err = AudioUnitSetParameter(audioUnit,
kHALOutputParam_Volume,
diff --git a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h
index b7f7d96f53..581e4aabd8 100644
--- a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h
+++ b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h
@@ -47,6 +47,7 @@ public:
private:
AudioUnit audioUnit;
+ int m_volume;
static OSStatus callback(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
diff --git a/Source/Core/AudioCommon/Src/OpenALStream.cpp b/Source/Core/AudioCommon/Src/OpenALStream.cpp
index 99220f0ed2..2abd357782 100644
--- a/Source/Core/AudioCommon/Src/OpenALStream.cpp
+++ b/Source/Core/AudioCommon/Src/OpenALStream.cpp
@@ -123,7 +123,6 @@ void OpenALStream::SoundLoop()
{
Common::SetCurrentThreadName("Audio thread - openal");
- ALenum err;
u32 ulFrequency = m_mixer->GetSampleRate();
memset(uiBuffers, 0, OAL_NUM_BUFFERS * sizeof(ALuint));
@@ -144,8 +143,8 @@ void OpenALStream::SoundLoop()
// Set the default sound volume as saved in the config file.
alSourcef(uiSource, AL_GAIN, fVolume);
- err = alGetError();
// TODO: Error handling
+ //ALenum err = alGetError();
ALint iBuffersFilled = 0;
ALint iBuffersProcessed = 0;
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp
index 93e9d25087..65cd6dbd0b 100644
--- a/Source/Core/Common/Src/CPUDetect.cpp
+++ b/Source/Core/Common/Src/CPUDetect.cpp
@@ -173,9 +173,7 @@ void CPUInfo::Detect()
if (max_ex_fn >= 0x80000001) {
// Check for more features.
__cpuid(cpu_id, 0x80000001);
- bool cmp_legacy = false;
if (cpu_id[2] & 1) bLAHFSAHF64 = true;
- if (cpu_id[2] & 2) cmp_legacy = true; //wtf is this?
if ((cpu_id[3] >> 29) & 1) bLongMode = true;
}
diff --git a/Source/Core/Common/Src/ColorUtil.cpp b/Source/Core/Common/Src/ColorUtil.cpp
index 5e5143549a..52ffec0803 100644
--- a/Source/Core/Common/Src/ColorUtil.cpp
+++ b/Source/Core/Common/Src/ColorUtil.cpp
@@ -31,7 +31,7 @@ const int lut3to8[] = { 0x00,0x24,0x48,0x6D,0x91,0xB6,0xDA,0xFF };
u32 Decode5A3(u16 val)
{
- const u32 bg_color = 0xFFFFFFFF;
+ const u32 bg_color = 0x00000000;
int r, g, b, a;
diff --git a/Source/Core/Common/Src/CommonPaths.h b/Source/Core/Common/Src/CommonPaths.h
index decf2aef97..430a0c0cd8 100644
--- a/Source/Core/Common/Src/CommonPaths.h
+++ b/Source/Core/Common/Src/CommonPaths.h
@@ -128,6 +128,7 @@
#define WII_EUR_SETTING "setting-eur.txt"
#define WII_USA_SETTING "setting-usa.txt"
#define WII_JAP_SETTING "setting-jpn.txt"
+#define WII_KOR_SETTING "setting-kor.txt"
#define GECKO_CODE_HANDLER "codehandler.bin"
diff --git a/Source/Core/Common/Src/DebugInterface.h b/Source/Core/Common/Src/DebugInterface.h
index 15c58e4f57..317cd0bb43 100644
--- a/Source/Core/Common/Src/DebugInterface.h
+++ b/Source/Core/Common/Src/DebugInterface.h
@@ -30,7 +30,7 @@ public:
virtual void step() {}
virtual void runToBreakpoint() {}
virtual void breakNow() {}
- virtual void insertBLR(unsigned int /*address*/, unsigned int) {}
+ virtual void insertBLR(unsigned int /*address*/, unsigned int /*value*/) {}
virtual void showJitResults(unsigned int /*address*/) {};
virtual int getColor(unsigned int /*address*/){return 0xFFFFFFFF;}
virtual std::string getDescription(unsigned int /*address*/) = 0;
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index 4650c6e1ba..77aac45418 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -299,7 +299,7 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename)
ERROR_LOG(COMMON,
"Copy: failed reading from source, %s --> %s: %s",
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg());
- return false;
+ goto bail;
}
}
@@ -310,13 +310,19 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename)
ERROR_LOG(COMMON,
"Copy: failed writing to output, %s --> %s: %s",
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg());
- return false;
+ goto bail;
}
}
// close flushs
fclose(input);
fclose(output);
return true;
+bail:
+ if (input)
+ fclose(input);
+ if (output)
+ fclose(output);
+ return false;
#endif
}
@@ -649,7 +655,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR))
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
else
- paths[D_USER_IDX] = std::string(getenv("HOME")) + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP;
+ paths[D_USER_IDX] = std::string(getenv("HOME") ? getenv("HOME") : getenv("PWD")) + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP;
#endif
INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", paths[D_USER_IDX].c_str());
diff --git a/Source/Core/Common/Src/Setup.h b/Source/Core/Common/Src/Setup.h
deleted file mode 100644
index c0faec3059..0000000000
--- a/Source/Core/Common/Src/Setup.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, version 2.0.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License 2.0 for more details.
-
-// A copy of the GPL 2.0 should have been included with the program.
-// If not, see http://www.gnu.org/licenses/
-
-// Official SVN repository and contact information can be found at
-// http://code.google.com/p/dolphin-emu/
-
-#ifndef _SETUP_H_
-#define _SETUP_H_
-
-// -----------------------------------------------------------------------------------------------------
-// File description:
-// Compilation settings. I avoid placing this in Common.h or some place where lots of files needs
-// to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible.
-// This file can be kept on the ignore list in your SVN program. It allows local optional settings
-// depending on what works on your computer.
-// -----------------------------------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------------------------------
-// Settings:
-
-// This may remove sound artifacts in Wario Land Shake It and perhaps other games
-//#define SETUP_AVOID_SOUND_ARTIFACTS
-
-// Build with playback rerecording options
-//#define RERECORDING
-
-// -----------------------------------------------------------------------------------------------------
-
-#endif // _SETUP_H_
-
diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp
index ce91aac651..73f83c204f 100644
--- a/Source/Core/Common/Src/Thread.cpp
+++ b/Source/Core/Common/Src/Thread.cpp
@@ -15,7 +15,6 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#include "Setup.h"
#include "Thread.h"
#include "Common.h"
diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp
index 087f8fcead..b1beed2066 100644
--- a/Source/Core/Common/Src/Timer.cpp
+++ b/Source/Core/Common/Src/Timer.cpp
@@ -97,12 +97,6 @@ void Timer::AddTimeDifference()
m_StartTime += GetTimeDifference();
}
-// Wind back the starting time to a custom time
-void Timer::WindBackStartingTime(u64 WindBack)
-{
- m_StartTime += WindBack;
-}
-
// Get the time elapsed since the Start()
u64 Timer::GetTimeElapsed()
{
diff --git a/Source/Core/Common/Src/Timer.h b/Source/Core/Common/Src/Timer.h
index a638920409..152d4c60e6 100644
--- a/Source/Core/Common/Src/Timer.h
+++ b/Source/Core/Common/Src/Timer.h
@@ -35,7 +35,6 @@ public:
// The time difference is always returned in milliseconds, regardless of alternative internal representation
u64 GetTimeDifference();
void AddTimeDifference();
- void WindBackStartingTime(u64 WindBack);
static void IncreaseResolution();
static void RestoreResolution();
diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Common/Src/VideoBackendBase.cpp
index 339cb016c1..40bb0fc4ce 100644
--- a/Source/Core/Common/Src/VideoBackendBase.cpp
+++ b/Source/Core/Common/Src/VideoBackendBase.cpp
@@ -41,7 +41,7 @@ static bool IsGteVista()
VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
- return VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask);
+ return VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask) != FALSE;
}
#endif
diff --git a/Source/Core/Common/Src/x64Analyzer.cpp b/Source/Core/Common/Src/x64Analyzer.cpp
index 2ea3e9a512..66a2fe217f 100644
--- a/Source/Core/Common/Src/x64Analyzer.cpp
+++ b/Source/Core/Common/Src/x64Analyzer.cpp
@@ -31,12 +31,9 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
info.hasImmediate = false;
info.isMemoryWrite = false;
- int addressSize = 8;
u8 modRMbyte = 0;
u8 sibByte = 0;
bool hasModRM = false;
- bool hasSIBbyte = false;
- bool hasDisplacement = false;
int displacementSize = 0;
@@ -47,7 +44,6 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
}
else if (*codePtr == 0x67)
{
- addressSize = 4;
codePtr++;
}
@@ -113,7 +109,6 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
info.otherReg = (sibByte & 7);
if (rex & 2) info.scaledReg += 8;
if (rex & 1) info.otherReg += 8;
- hasSIBbyte = true;
}
else
{
@@ -122,7 +117,6 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
}
if (mrm.mod == 1 || mrm.mod == 2)
{
- hasDisplacement = true;
if (mrm.mod == 1)
displacementSize = 1;
else
diff --git a/Source/Core/Common/Src/x64Emitter.cpp b/Source/Core/Common/Src/x64Emitter.cpp
index d4bd1adabf..19e96478d1 100644
--- a/Source/Core/Common/Src/x64Emitter.cpp
+++ b/Source/Core/Common/Src/x64Emitter.cpp
@@ -870,7 +870,6 @@ void XEmitter::BTC(int bits, OpArg dest, OpArg index) {WriteBitTest(bits, dest,
//shift can be either imm8 or cl
void XEmitter::SHRD(int bits, OpArg dest, OpArg src, OpArg shift)
{
- bool writeImm = false;
if (dest.IsImm())
{
_assert_msg_(DYNA_REC, 0, "SHRD - can't use imms as destination");
@@ -901,7 +900,6 @@ void XEmitter::SHRD(int bits, OpArg dest, OpArg src, OpArg shift)
void XEmitter::SHLD(int bits, OpArg dest, OpArg src, OpArg shift)
{
- bool writeImm = false;
if (dest.IsImm())
{
_assert_msg_(DYNA_REC, 0, "SHLD - can't use imms as destination");
diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt
index dd19d36d36..4f01cfb5d6 100644
--- a/Source/Core/Core/CMakeLists.txt
+++ b/Source/Core/Core/CMakeLists.txt
@@ -5,7 +5,6 @@ set(SRCS Src/ActionReplay.cpp
Src/Console.cpp
Src/Core.cpp
Src/CoreParameter.cpp
- Src/CoreRerecording.cpp
Src/CoreTiming.cpp
Src/DSPEmulator.cpp
Src/GeckoCodeConfig.cpp
diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj
index 25ede66e60..e1f6db3d18 100644
--- a/Source/Core/Core/Core.vcxproj
+++ b/Source/Core/Core/Core.vcxproj
@@ -207,7 +207,6 @@
-
@@ -386,7 +385,11 @@
-
+
+ false
+ false
+ false
+
Create
Create
diff --git a/Source/Core/Core/Src/ActionReplay.cpp b/Source/Core/Core/Src/ActionReplay.cpp
index 1ef6ca81bc..77f5778061 100644
--- a/Source/Core/Core/Src/ActionReplay.cpp
+++ b/Source/Core/Core/Src/ActionReplay.cpp
@@ -285,7 +285,6 @@ bool RunCode(const ARCode &arcode)
// used for conditional codes
int skip_count = 0;
- u32 addr_last = 0;
u32 val_last = 0;
current_code = &arcode;
@@ -394,7 +393,6 @@ bool RunCode(const ARCode &arcode)
{
LogInfo("ZCode: Memory Copy");
doMemoryCopy = true;
- addr_last = addr;
val_last = data;
}
else
diff --git a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp
index 788b8c317c..bd789fa82b 100644
--- a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp
+++ b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp
@@ -187,8 +187,10 @@ bool CBoot::SetupWiiMemory(unsigned int _CountryCode)
switch((DiscIO::IVolume::ECountry)_CountryCode)
{
case DiscIO::IVolume::COUNTRY_KOREA:
+ region_filename = File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_KOR_SETTING;
+ break;
case DiscIO::IVolume::COUNTRY_TAIWAN:
- // TODO: Determine if Korea / Taiwan have their own specific settings.
+ // TODO: Determine if Taiwan has their own specific settings.
case DiscIO::IVolume::COUNTRY_JAPAN:
region_filename = File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_JAP_SETTING;
break;
diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp
index 187baf415c..e0fac1da87 100644
--- a/Source/Core/Core/Src/BootManager.cpp
+++ b/Source/Core/Core/Src/BootManager.cpp
@@ -118,13 +118,12 @@ bool BootCore(const std::string& _rFilename)
if (Movie::IsPlayingInput() && Movie::IsConfigSaved())
{
- Movie::Init();
StartUp.bCPUThread = Movie::IsDualCore();
StartUp.bSkipIdle = Movie::IsSkipIdle();
StartUp.bDSPHLE = Movie::IsDSPHLE();
StartUp.bProgressive = Movie::IsProgressive();
StartUp.bFastDiscSpeed = Movie::IsFastDiscSpeed();
- if (Movie::IsUsingMemcard() && Movie::IsBlankMemcard())
+ if (Movie::IsUsingMemcard() && Movie::IsStartingFromClearSave() && !StartUp.bWii)
{
if (File::Exists("Movie.raw"))
File::Delete("Movie.raw");
diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp
index 0c4fa04566..180e6c981d 100644
--- a/Source/Core/Core/Src/ConfigManager.cpp
+++ b/Source/Core/Core/Src/ConfigManager.cpp
@@ -131,6 +131,7 @@ void SConfig::SaveSettings()
// General
ini.Set("General", "LastFilename", m_LastFilename);
+ ini.Set("General", "ShowLag", m_ShowLag);
// ISO folders
// clear removed folders
@@ -155,10 +156,12 @@ void SConfig::SaveSettings()
ini.Set("General", "RecursiveGCMPaths", m_RecursiveISOFolder);
ini.Set("General", "NANDRoot", m_NANDPath);
+ ini.Set("General", "WirelessMac", m_WirelessMac);
// Interface
ini.Set("Interface", "ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
ini.Set("Interface", "UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
+ ini.Set("Interface", "OnScreenDisplayMessages", m_LocalCoreStartupParameter.bOnScreenDisplayMessages);
ini.Set("Interface", "HideCursor", m_LocalCoreStartupParameter.bHideCursor);
ini.Set("Interface", "AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
@@ -208,6 +211,8 @@ void SConfig::SaveSettings()
ini.Set("GameList", "ListKorea", m_ListKorea);
ini.Set("GameList", "ListTaiwan", m_ListTaiwan);
ini.Set("GameList", "ListUnknown", m_ListUnknown);
+ ini.Set("GameList", "ListSort", m_ListSort);
+ ini.Set("GameList", "ListSortSecondary", m_ListSort2);
// Core
ini.Set("Core", "HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
@@ -246,6 +251,10 @@ void SConfig::SaveSettings()
// GFX Backend
ini.Set("Core", "GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
+ // Movie
+ ini.Set("Movie", "PauseMovie", m_PauseMovie);
+ ini.Set("Movie", "Author", m_strMovieAuthor);
+
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
m_SYSCONF->Save();
}
@@ -260,6 +269,7 @@ void SConfig::LoadSettings()
// General
{
ini.Get("General", "LastFilename", &m_LastFilename);
+ ini.Get("General", "ShowLag", &m_ShowLag, false);
m_ISOFolder.clear();
int numGCMPaths;
@@ -282,12 +292,14 @@ void SConfig::LoadSettings()
m_NANDPath = File::GetUserPath(D_WIIROOT_IDX, m_NANDPath);
DiscIO::cUIDsys::AccessInstance().UpdateLocation();
DiscIO::CSharedContent::AccessInstance().UpdateLocation();
+ ini.Get("General", "WirelessMac", &m_WirelessMac);
}
{
// Interface
ini.Get("Interface", "ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, false);
ini.Get("Interface", "UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
+ ini.Get("Interface", "OnScreenDisplayMessages", &m_LocalCoreStartupParameter.bOnScreenDisplayMessages, true);
ini.Get("Interface", "HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
ini.Get("Interface", "AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
@@ -334,11 +346,13 @@ void SConfig::LoadSettings()
ini.Get("GameList", "ListPal", &m_ListPal, true);
ini.Get("GameList", "ListUsa", &m_ListUsa, true);
- ini.Get("GameList", "ListFrance", &m_ListFrance, true);
- ini.Get("GameList", "ListItaly", &m_ListItaly, true);
- ini.Get("GameList", "ListKorea", &m_ListKorea, true);
- ini.Get("GameList", "ListTaiwan", &m_ListTaiwan, true);
- ini.Get("GameList", "ListUnknown", &m_ListUnknown, true);
+ ini.Get("GameList", "ListFrance", &m_ListFrance, true);
+ ini.Get("GameList", "ListItaly", &m_ListItaly, true);
+ ini.Get("GameList", "ListKorea", &m_ListKorea, true);
+ ini.Get("GameList", "ListTaiwan", &m_ListTaiwan, true);
+ ini.Get("GameList", "ListUnknown", &m_ListUnknown, true);
+ ini.Get("GameList", "ListSort", &m_ListSort, 3);
+ ini.Get("GameList", "ListSortSecondary",&m_ListSort2, 0);
// Core
ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false);
@@ -384,6 +398,10 @@ void SConfig::LoadSettings()
// GFX Backend
ini.Get("Core", "GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
+
+ // Movie
+ ini.Get("General", "PauseMovie", &m_PauseMovie, false);
+ ini.Get("Movie", "Author", &m_strMovieAuthor, "");
}
m_SYSCONF = new SysConf();
diff --git a/Source/Core/Core/Src/ConfigManager.h b/Source/Core/Core/Src/ConfigManager.h
index 0c8f3f1af1..cbe1b4d1cb 100644
--- a/Source/Core/Core/Src/ConfigManager.h
+++ b/Source/Core/Core/Src/ConfigManager.h
@@ -75,6 +75,13 @@ struct SConfig : NonCopyable
bool m_ListKorea;
bool m_ListTaiwan;
bool m_ListUnknown;
+ int m_ListSort;
+ int m_ListSort2;
+
+ std::string m_WirelessMac;
+ bool m_PauseMovie;
+ bool m_ShowLag;
+ std::string m_strMovieAuthor;
SysConf* m_SYSCONF;
diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp
index d3c9fb7033..e92b9088bc 100644
--- a/Source/Core/Core/Src/Core.cpp
+++ b/Source/Core/Core/Src/Core.cpp
@@ -18,9 +18,9 @@
#ifdef _WIN32
#include
+#include "EmuWindow.h"
#endif
-#include "Setup.h" // Common
#include "Atomic.h"
#include "Thread.h"
#include "Timer.h"
@@ -61,9 +61,6 @@
#include "VideoBackendBase.h"
#include "AudioCommon.h"
#include "OnScreenDisplay.h"
-#ifdef _WIN32
-#include "EmuWindow.h"
-#endif
#include "VolumeHandler.h"
#include "FileMonitor.h"
@@ -293,7 +290,7 @@ void Stop() // - Hammertime!
SConfig::GetInstance().m_SYSCONF->Reload();
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
- Movie::g_currentInputCount = 0;
+ Movie::Shutdown();
g_bStopping = false;
}
diff --git a/Source/Core/Core/Src/Core.h b/Source/Core/Core/Src/Core.h
index 448bd55bb6..312c446744 100644
--- a/Source/Core/Core/Src/Core.h
+++ b/Source/Core/Core/Src/Core.h
@@ -95,21 +95,6 @@ void RequestRefreshInfo();
// the return value of the first call should be passed in as the second argument of the second call.
bool PauseAndLock(bool doLock, bool unpauseOnUnlock=true);
-#ifdef RERECORDING
-
-void FrameUpdate();
-void FrameAdvance();
-void FrameStepOnOff();
-void WriteStatus();
-void RerecordingStart();
-void RerecordingStop();
-void WindBack(int Counter);
-
-extern int g_FrameCounter,g_InputCounter;
-extern bool g_FrameStep;
-
-#endif
-
} // namespace
#endif
diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp
index ba72d47ffb..dee2452cb3 100644
--- a/Source/Core/Core/Src/CoreParameter.cpp
+++ b/Source/Core/Core/Src/CoreParameter.cpp
@@ -53,7 +53,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bFastDiscSpeed(false),
SelectedLanguage(0), bWii(false), bDisableWiimoteSpeaker(false),
bConfirmStop(false), bHideCursor(false),
- bAutoHideCursor(false), bUsePanicHandlers(true),
+ bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
iRenderWindowXPos(-1), iRenderWindowYPos(-1),
iRenderWindowWidth(640), iRenderWindowHeight(480),
bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h
index 2eb261b589..e67935906b 100644
--- a/Source/Core/Core/Src/CoreParameter.h
+++ b/Source/Core/Core/Src/CoreParameter.h
@@ -122,7 +122,7 @@ struct SCoreStartupParameter
bool bDisableWiimoteSpeaker;
// Interface settings
- bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers;
+ bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers, bOnScreenDisplayMessages;
// Hotkeys
int iHotkey[NUM_HOTKEYS];
diff --git a/Source/Core/Core/Src/CoreRerecording.cpp b/Source/Core/Core/Src/CoreRerecording.cpp
deleted file mode 100644
index 3064ed37ad..0000000000
--- a/Source/Core/Core/Src/CoreRerecording.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-// Copyright (C) 2003 Dolphin Project.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, version 2.0.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License 2.0 for more details.
-
-// A copy of the GPL 2.0 should have been included with the program.
-// If not, see http://www.gnu.org/licenses/
-
-// Official SVN repository and contact information can be found at
-// http://code.google.com/p/dolphin-emu/
-
-
-#include "Setup.h"
-#ifndef RERECORDING
-bool rerecording = false;
-#else
-
-// Include
-// --------------
-#ifdef _WIN32
- #include
-#endif
-
-#include "Thread.h" // Common
-
-#include "Timer.h"
-#include "Common.h"
-
-#include "Console.h"
-#include "Core.h"
-#include "CPUDetect.h"
-#include "CoreTiming.h"
-#include "Boot/Boot.h"
-#include "PatchEngine.h"
-
-#include "HW/Memmap.h"
-#include "HW/ProcessorInterface.h"
-#include "HW/GPFifo.h"
-#include "HW/CPU.h"
-#include "HW/HW.h"
-#include "HW/DSP.h"
-#include "HW/GPFifo.h"
-#include "HW/AudioInterface.h"
-#include "HW/VideoInterface.h"
-#include "HW/CommandProcessor.h"
-#include "HW/PixelEngine.h"
-#include "HW/SystemTimers.h"
-
-#include "PowerPC/PowerPC.h"
-
-#include "ConfigManager.h"
-
-#include "MemTools.h"
-#include "Host.h"
-#include "LogManager.h"
-
-
-
-
-
-// File description: Rerecording Functions
-/* ---------------
-
-How the timer works: We measure the time between drawn frames, not when the game is paused. So time
-should be a fairly comparable measure of the time it took to play the game. However the time it takes
-to draw a frame will be lower on a fast computer. Therefore we could perhaps measure time as an
-internal game time that is adjusted by the average time it takes to draw a frame. Also if it only takes
-ten or twenty milliseconds to draw a frame I'm not certain about how accurate the mmsystem timers are for
-such short periods.
-
-//////////////////////////////////////*/
-
-
-
-namespace Core
-{
-
-
-
-// Declarations and definitions
-// ---------------
-int g_FrameCounter = 0;
-bool g_FrameStep = false;
-Common::Timer ReRecTimer;
-
-
-
-
-// Control Run, Pause, Stop and the Timer.
-// ---------------
-
-// Subtract the paused time when we run again
-void Run()
-{
- ReRecTimer.AddTimeDifference();
-}
-// Update the time
-void Pause()
-{
- ReRecTimer.Update();
-}
-
-// Start the timer when a game is booted
-void RerecordingStart()
-{
- g_FrameCounter = 0;
- ReRecTimer.Start();
-
- // Logging
- //DEBUG_LOG(CONSOLE, "RerecordingStart: %i\n", g_FrameCounter);
-}
-
-// Reset the frame counter
-void RerecordingStop()
-{
- // Write the final time and Stop the timer
- ReRecTimer.Stop();
-
- // Update status bar
- WriteStatus();
-}
-
-/* Wind back the frame counter when a save state is loaded. Currently we don't know what that means in
- time so we just guess that the time is proportional the the number of frames
-
- Todo: There are many assumptions here: We probably want to replace the time here by the actual time
- that we save together with the save state or the input recording for example. And have it adjusted
- for full speed playback (whether it's 30 fps or 60 fps or some other speed that the game is natively
- capped at). Also the input interrupts do not occur as often as the frame renderings, they occur more
- often. So we may want to move the input recording to fram updates, or perhaps sync the input interrupts
- to frame updates.
- */
-void WindBack(int Counter)
-{
- /* Counter should be smaller than g_FrameCounter, however it currently updates faster than the
- frames so currently it may not be the same. Therefore I use the abs() function. */
- int AbsoluteFrameDifference = abs(g_FrameCounter - Counter);
- float FractionalFrameDifference = (float) AbsoluteFrameDifference / (float) g_FrameCounter;
-
- // Update the frame counter
- g_FrameCounter = Counter;
-
- // Approximate a time to wind back the clock to
- // Get the current time
- u64 CurrentTimeMs = ReRecTimer.GetTimeElapsed();
- // Save the current time in seconds in a new double
- double CurrentTimeSeconds = (double) (CurrentTimeMs / 1000);
- // Reduce it by the same proportion as the counter was wound back
- CurrentTimeSeconds = CurrentTimeSeconds * FractionalFrameDifference;
- // Update the clock
- ReRecTimer.WindBackStartingTime((u64)CurrentTimeSeconds * 1000);
-
- // Logging
- DEBUG_LOG(CONSOLE, "WindBack: %i %u\n", Counter, (u64)CurrentTimeSeconds);
-}
-
-
-
-
-// Frame advance
-// ---------------
-void FrameAdvance()
-{
- // Update status bar
- WriteStatus();
-
- // If a game is not started, return
- if (Core::GetState() == Core::CORE_UNINITIALIZED) return;
-
- // Play to the next frame
- if (g_FrameStep)
- {
- Run();
- Core::SetState(Core::CORE_RUN);
- }
-}
-
-// Turn on frame stepping
-void FrameStepOnOff()
-{
- /* Turn frame step on or off. If a game is running and we turn this on it means that the game
- will pause after the next frame update */
- g_FrameStep = !g_FrameStep;
-
- // Update status bar
- WriteStatus();
-
- // If a game is not started, return
- if(Core::GetState() == Core::CORE_UNINITIALIZED) return;
-
- // Run the emulation if we turned off framestepping
- if (!g_FrameStep)
- {
- Run();
- Core::SetState(Core::CORE_RUN);
- }
-}
-
-
-
-
-// General functions
-// ---------------
-
-// Write to the status bar
-void WriteStatus()
-{
- std::string TmpStr = "Time: " + ReRecTimer.GetTimeElapsedFormatted();
- TmpStr += StringFromFormat(" Frame: %s", ThousandSeparate(g_FrameCounter).c_str());
- // The FPS is the total average since the game was booted
- TmpStr += StringFromFormat(" FPS: %i", (g_FrameCounter * 1000) / ReRecTimer.GetTimeElapsed());
- TmpStr += StringFromFormat(" FrameStep: %s", g_FrameStep ? "On" : "Off");
- Host_UpdateStatusBar(TmpStr.c_str(), 1);
-}
-
-
-// When a new frame is drawn
-void FrameUpdate()
-{
- // Write to the status bar
- WriteStatus();
- /* I don't think the frequent update has any material speed inpact at all, but should it
- have you can controls the update speed by changing the "% 10" in this line */
- //if (g_FrameCounter % 10 == 0) WriteStatus();
-
- // Pause if frame stepping is on
- if(g_FrameStep)
- {
- Pause();
- Core::SetState(Core::CORE_PAUSE);
- }
-
- // Count one frame
- g_FrameCounter++;
-}
-
-
-
-} // Core
-
-
-#endif // RERECORDING
diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp
index bccadf30cc..525f7165f2 100644
--- a/Source/Core/Core/Src/CoreTiming.cpp
+++ b/Source/Core/Core/Src/CoreTiming.cpp
@@ -119,7 +119,7 @@ int RegisterEvent(const char *name, TimedCallback callback)
// check for existing type with same name.
// we want event type names to remain unique so that we can use them for serialization.
- for (int i = 0; i < event_types.size(); ++i)
+ for (unsigned int i = 0; i < event_types.size(); ++i)
{
if (!strcmp(name, event_types[i].name))
{
@@ -188,7 +188,7 @@ void EventDoState(PointerWrap &p, BaseEvent* ev)
if (p.GetMode() == PointerWrap::MODE_READ)
{
bool foundMatch = false;
- for (int i = 0; i < event_types.size(); ++i)
+ for (unsigned int i = 0; i < event_types.size(); ++i)
{
if (!strcmp(name.c_str(), event_types[i].name))
{
diff --git a/Source/Core/Core/Src/DSP/Jit/DSPJitRegCache.cpp b/Source/Core/Core/Src/DSP/Jit/DSPJitRegCache.cpp
index 6bcbeca35e..ee5908889a 100644
--- a/Source/Core/Core/Src/DSP/Jit/DSPJitRegCache.cpp
+++ b/Source/Core/Core/Src/DSP/Jit/DSPJitRegCache.cpp
@@ -220,8 +220,8 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
for(i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++) {
if (cache.regs[i].loc.GetSimpleReg() !=
regs[i].loc.GetSimpleReg() &&
- xregs[cache.regs[i].loc.GetSimpleReg()].guest_reg ==
- DSP_REG_NONE) {
+ xregs[cache.regs[i].loc.GetSimpleReg()].guest_reg == DSP_REG_NONE)
+ {
movToHostReg(i,
cache.regs[i].loc.GetSimpleReg(),
true);
diff --git a/Source/Core/Core/Src/Debugger/PPCDebugInterface.h b/Source/Core/Core/Src/Debugger/PPCDebugInterface.h
index c305235049..5f9e41bb39 100644
--- a/Source/Core/Core/Src/Debugger/PPCDebugInterface.h
+++ b/Source/Core/Core/Src/Debugger/PPCDebugInterface.h
@@ -34,7 +34,7 @@ public:
virtual void step() {}
virtual void breakNow();
virtual void runToBreakpoint();
- virtual void insertBLR(unsigned int address, unsigned int);
+ virtual void insertBLR(unsigned int address, unsigned int value);
virtual int getColor(unsigned int address);
virtual std::string getDescription(unsigned int address);
virtual void showJitResults(u32 address);
diff --git a/Source/Core/Core/Src/GeckoCode.cpp b/Source/Core/Core/Src/GeckoCode.cpp
index 35b2f53392..2d5f694ded 100644
--- a/Source/Core/Core/Src/GeckoCode.cpp
+++ b/Source/Core/Core/Src/GeckoCode.cpp
@@ -171,7 +171,7 @@ bool InstallCodeHandler()
Memory::Write_U8(1, 0x80001807);
// Invalidate the icache
- for (int i = 0; i < data.length(); i += 32)
+ for (unsigned int i = 0; i < data.length(); i += 32)
{
PowerPC::ppcState.iCache.Invalidate(0x80001800 + i);
}
diff --git a/Source/Core/Core/Src/GeckoCodeConfig.cpp b/Source/Core/Core/Src/GeckoCodeConfig.cpp
index a23d531f7e..10c2068e3e 100644
--- a/Source/Core/Core/Src/GeckoCodeConfig.cpp
+++ b/Source/Core/Core/Src/GeckoCodeConfig.cpp
@@ -42,8 +42,6 @@ void LoadCodes(const IniFile& inifile, std::vector& gcodes)
std::istringstream ss(*lines_iter);
- int read_state = 0;
-
switch ((*lines_iter)[0])
{
@@ -61,7 +59,6 @@ void LoadCodes(const IniFile& inifile, std::vector& gcodes)
gcode.name = StripSpaces(gcode.name);
// read the code creator name
std::getline(ss, gcode.creator, ']');
- read_state = 0;
break;
// notes
diff --git a/Source/Core/Core/Src/HW/AudioInterface.cpp b/Source/Core/Core/Src/HW/AudioInterface.cpp
index f4141818ae..0a33e7c773 100644
--- a/Source/Core/Core/Src/HW/AudioInterface.cpp
+++ b/Source/Core/Core/Src/HW/AudioInterface.cpp
@@ -354,9 +354,6 @@ unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples
static s16 l1 = 0;
static s16 l2 = 0;
- static s16 r1 = 0;
- static s16 r2 = 0;
-
if ( frac >= 0x10000 || frac == 0)
{
@@ -364,9 +361,6 @@ unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples
l1 = l2; //current
l2 = pcm[pos * 2]; //next
-
- r1 = r2; //current
- r2 = pcm[pos * 2 + 1]; //next
}
pcm_l = ((l1 << 16) + (l2 - l1) * (u16)frac) >> 16;
diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp
index e86231db43..5945cb7141 100644
--- a/Source/Core/Core/Src/HW/DSP.cpp
+++ b/Source/Core/Core/Src/HW/DSP.cpp
@@ -718,6 +718,8 @@ void Do_ARAM_DMA()
{
while (g_arDMA.Cnt.count)
{
+ // These are logically seperated in code to show that a memory map has been set up
+ // See below in the write section for more information
if ((g_ARAM_Info.Hex & 0xf) == 3)
{
Memory::Write_U64_Swap(*(u64*)&g_ARAM.ptr[g_arDMA.ARAddr & g_ARAM.mask], g_arDMA.MMAddr);
diff --git a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp
index 66ee4bef84..817610ea0f 100644
--- a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp
@@ -20,7 +20,6 @@
#include "ChunkFile.h"
#include "IniFile.h"
#include "HLEMixer.h"
-#include "Setup.h"
#include "StringUtil.h"
#include "LogManager.h"
#include "IniFile.h"
diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
index 74c9d24db4..9524882a45 100644
--- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
@@ -281,7 +281,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
u32 Addr__AXOutSBuffer_1;
u32 Addr__AXOutSBuffer_2;
u32 Addr__A;
- u32 Addr__12;
+ //u32 Addr__12;
u32 Addr__4_1;
u32 Addr__4_2;
//u32 Addr__4_3;
@@ -429,7 +429,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
break;
case 0x0012:
- Addr__12 = HLEMemory_Read_U16(uAddress);
+ //Addr__12 = HLEMemory_Read_U16(uAddress);
uAddress += 2;
break;
diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
index 03b1d3b75b..1bbf8a9838 100644
--- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
@@ -159,8 +159,8 @@ void CUCode_AXWii::Update(int cycles)
bool CUCode_AXWii::AXTask(u32& _uMail)
{
u32 uAddress = _uMail;
- u32 Addr__AXStudio;
- u32 Addr__AXOutSBuffer;
+ //u32 Addr__AXStudio;
+ //u32 Addr__AXOutSBuffer;
bool bExecuteList = true;
/*
@@ -178,7 +178,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
switch (iCommand)
{
case 0x0000:
- Addr__AXStudio = HLEMemory_Read_U32(uAddress);
+ //Addr__AXStudio = HLEMemory_Read_U32(uAddress);
uAddress += 4;
break;
@@ -193,7 +193,8 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
case 0x0004:
// PBs are here now
m_addressPBs = HLEMemory_Read_U32(uAddress);
- soundStream->GetMixer()->SetHLEReady(true);
+ if (soundStream)
+ soundStream->GetMixer()->SetHLEReady(true);
// soundStream->Update();
uAddress += 4;
break;
@@ -208,7 +209,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
break;
case 0x0007: // AXLIST_SBUFFER
- Addr__AXOutSBuffer = HLEMemory_Read_U32(uAddress);
+ //Addr__AXOutSBuffer = HLEMemory_Read_U32(uAddress);
uAddress += 10;
break;
diff --git a/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.cpp
index 2e2816ae77..58534f137a 100644
--- a/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.cpp
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.cpp
@@ -134,7 +134,7 @@ void DSPDebugInterface::toggleMemCheck(unsigned int address)
PanicAlert("MemCheck functionality not supported in DSP module.");
}
-void DSPDebugInterface::insertBLR(unsigned int address)
+void DSPDebugInterface::insertBLR(unsigned int address, unsigned int value)
{
PanicAlert("insertBLR functionality not supported in DSP module.");
}
diff --git a/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.h b/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.h
index 5ace467ae6..dafe91f28b 100644
--- a/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.h
+++ b/Source/Core/Core/Src/HW/DSPLLE/DSPDebugInterface.h
@@ -27,7 +27,7 @@ public:
virtual void setPC(unsigned int address);
virtual void step() {}
virtual void runToBreakpoint();
- virtual void insertBLR(unsigned int address);
+ virtual void insertBLR(unsigned int address, unsigned int value);
virtual int getColor(unsigned int address);
virtual std::string getDescription(unsigned int address);
};
diff --git a/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp
index f65d8c6b8b..c157e55d1b 100644
--- a/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp
+++ b/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp
@@ -52,7 +52,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index)
, m_bDirty(false)
{
m_strFilename = (card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;
- if (Movie::IsUsingMemcard() && Movie::IsPlayingInput() && Movie::IsConfigSaved() && Movie::IsBlankMemcard())
+ if (Movie::IsPlayingInput() && Movie::IsConfigSaved() && Movie::IsUsingMemcard() && Movie::IsStartingFromClearSave())
m_strFilename = "Movie.raw";
// we're potentially leaking events here, since there's no UnregisterEvent until emu shutdown, but I guess it's inconsequential
diff --git a/Source/Core/Core/Src/HW/GCMemcard.cpp b/Source/Core/Core/Src/HW/GCMemcard.cpp
index 9b72a0313c..dd15a32914 100644
--- a/Source/Core/Core/Src/HW/GCMemcard.cpp
+++ b/Source/Core/Core/Src/HW/GCMemcard.cpp
@@ -265,7 +265,7 @@ bool GCMemcard::Save()
mcdFile.WriteBytes(&dir_backup, BLOCK_SIZE);
mcdFile.WriteBytes(&bat, BLOCK_SIZE);
mcdFile.WriteBytes(&bat_backup, BLOCK_SIZE);
- for (int i = 0; i < maxBlock - MC_FST_BLOCKS; ++i)
+ for (unsigned int i = 0; i < maxBlock - MC_FST_BLOCKS; ++i)
{
mcdFile.WriteBytes(mc_data_blocks[i].block, BLOCK_SIZE);
}
@@ -587,7 +587,7 @@ u16 GCMemcard::BlockAlloc::NextFreeBlock(u16 StartingBlock) const
for (u16 i = StartingBlock; i < BAT_SIZE; ++i)
if (Map[i-MC_FST_BLOCKS] == 0)
return i;
- for (u16 i = 0; i < StartingBlock; ++i)
+ for (u16 i = MC_FST_BLOCKS; i < StartingBlock; ++i)
if (Map[i-MC_FST_BLOCKS] == 0)
return i;
}
@@ -609,7 +609,7 @@ bool GCMemcard::BlockAlloc::ClearBlocks(u16 FirstBlock, u16 BlockCount)
{
return false;
}
- for (int i = 0; i < length; ++i)
+ for (unsigned int i = 0; i < length; ++i)
Map[blocks.at(i)-MC_FST_BLOCKS] = 0;
FreeBlocks = BE16(BE16(FreeBlocks) + BlockCount);
@@ -625,7 +625,7 @@ u32 GCMemcard::GetSaveData(u8 index, std::vector & Blocks) const
u16 block = DEntry_FirstBlock(index);
u16 BlockCount = DEntry_BlockCount(index);
- u16 memcardSize = BE16(hdr.SizeMb) * MBIT_TO_BLOCKS;
+ //u16 memcardSize = BE16(hdr.SizeMb) * MBIT_TO_BLOCKS;
if ((block == 0xFFFF) || (BlockCount == 0xFFFF))
{
@@ -669,12 +669,10 @@ u32 GCMemcard::ImportFile(DEntry& direntry, std::vector &saveBlocks)
Directory UpdatedDir = *CurrentDir;
// find first free dir entry
- int index = -1;
for (int i=0; i < DIRLEN; i++)
{
if (BE32(UpdatedDir.Dir[i].Gamecode) == 0xFFFFFFFF)
{
- index = i;
UpdatedDir.Dir[i] = direntry;
*(u16*)&UpdatedDir.Dir[i].FirstBlock = BE16(firstBlock);
UpdatedDir.Dir[i].CopyCounter = UpdatedDir.Dir[i].CopyCounter+1;
@@ -887,7 +885,7 @@ u32 GCMemcard::ImportGciInternal(FILE* gcih, const char *inputFile, const std::s
std::vector saveData;
saveData.reserve(size);
- for (int i = 0; i < size; ++i)
+ for (unsigned int i = 0; i < size; ++i)
{
GCMBlock b;
gci.ReadBytes(b.block, BLOCK_SIZE);
@@ -1000,7 +998,7 @@ u32 GCMemcard::ExportGci(u8 index, const char *fileName, const std::string &dire
return NOMEMCARD;
}
gci.Seek(DENTRY_SIZE + offset, SEEK_SET);
- for (int i = 0; i < size; ++i)
+ for (unsigned int i = 0; i < size; ++i)
{
gci.WriteBytes(saveData[i].block, BLOCK_SIZE);
}
diff --git a/Source/Core/Core/Src/HW/Memmap.cpp b/Source/Core/Core/Src/HW/Memmap.cpp
index 1156d456ad..2da999eeac 100644
--- a/Source/Core/Core/Src/HW/Memmap.cpp
+++ b/Source/Core/Core/Src/HW/Memmap.cpp
@@ -656,8 +656,10 @@ u8 *GetPointer(const u32 _Address)
case 0x9:
case 0xd:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
+ {
if ((_Address & 0xfffffff) < EXRAM_SIZE)
return m_pPhysicalEXRAM + (_Address & EXRAM_MASK);
+ }
else
break;
diff --git a/Source/Core/Core/Src/HW/SI.cpp b/Source/Core/Core/Src/HW/SI.cpp
index 84a3744d6f..0f563806ce 100644
--- a/Source/Core/Core/Src/HW/SI.cpp
+++ b/Source/Core/Core/Src/HW/SI.cpp
@@ -273,7 +273,7 @@ void Init()
g_Channel[i].m_InLo.Hex = 0;
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
- AddDevice(Movie::IsUsingPad(i) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i);
+ AddDevice(Movie::IsUsingPad(i) ? (Movie::IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
else
AddDevice(SConfig::GetInstance().m_SIDevice[i], i);
}
diff --git a/Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.cpp b/Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.cpp
index 897b6d1227..3537ed3747 100644
--- a/Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.cpp
+++ b/Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.cpp
@@ -262,7 +262,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
{
int cmd = *jvs_io++;
- int unknown = 0;
DEBUG_LOG(AMBASEBOARDDEBUG, "JVS IO, node=%d, cmd=%02x", node, cmd);
switch (cmd)
@@ -362,10 +361,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
}
case 0xf0:
if (*jvs_io++ == 0xD9)
- {
ERROR_LOG(AMBASEBOARDDEBUG, "JVS RESET");
- } else
- unknown = 1;
msg.addData(1);
d10_1 |= 1;
diff --git a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp
index a9b708324d..74c020fd39 100644
--- a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp
+++ b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp
@@ -132,15 +132,17 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
if(Movie::IsPlayingInput())
{
Movie::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
- if(!Core::g_CoreStartupParameter.bWii)
+ if(!Movie::IsUsingWiimote(0))
Movie::InputUpdate();
}
else if(Movie::IsRecordingInput())
{
Movie::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
- if(!Core::g_CoreStartupParameter.bWii)
+ if(!Movie::IsUsingWiimote(0))
Movie::InputUpdate();
}
+ else
+ Movie::CheckPadStatus(&PadStatus, ISIDevice::m_iDeviceNumber);
// Thankfully changing mode does not change the high bits ;)
_Hi = (u32)((u8)PadStatus.stickY);
diff --git a/Source/Core/Core/Src/HW/Wiimote.cpp b/Source/Core/Core/Src/HW/Wiimote.cpp
index 30ab7af141..0928deffb1 100644
--- a/Source/Core/Core/Src/HW/Wiimote.cpp
+++ b/Source/Core/Core/Src/HW/Wiimote.cpp
@@ -136,9 +136,9 @@ void DoState(unsigned char **ptr, int mode)
{
// TODO:
- //PointerWrap p(ptr, mode);
- //for (unsigned int i=0; i<4; ++i)
- // ((WiimoteEmu::Wiimote*)g_plugin.controllers[i])->DoState(p);
+ PointerWrap p(ptr, mode);
+ for (unsigned int i=0; i<4; ++i)
+ ((WiimoteEmu::Wiimote*)g_plugin.controllers[i])->DoState(p);
}
// ___________________________________________________________________________
diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp
index e7036c8fcb..5c34fff9ac 100644
--- a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp
@@ -594,13 +594,69 @@ void Wiimote::SendReadDataReply(ReadRequest& _request)
void Wiimote::DoState(PointerWrap& p)
{
- // not working :(
- //if (p.MODE_READ == p.GetMode())
- //{
- // // LOAD
- // Reset(); // should cause a status report to be sent, then wii should re-setup wiimote
- //}
- //p.Do(m_reporting_channel);
+ p.Do(m_extension->active_extension);
+ p.Do(m_extension->switch_extension);
+
+ p.Do(m_accel);
+ p.Do(m_index);
+ p.Do(ir_sin);
+ p.Do(ir_cos);
+ p.Do(m_rumble_on);
+ p.Do(m_speaker_mute);
+ p.Do(m_motion_plus_present);
+ p.Do(m_motion_plus_active);
+ p.Do(m_reporting_auto);
+ p.Do(m_reporting_mode);
+ p.Do(m_reporting_channel);
+ p.Do(m_shake_step);
+ p.Do(m_sensor_bar_on_top);
+ p.Do(m_status);
+ p.Do(m_adpcm_state);
+ p.Do(m_ext_key);
+ p.DoArray(m_eeprom, sizeof(m_eeprom));
+ p.Do(m_reg_motion_plus);
+ p.Do(m_reg_ir);
+ p.Do(m_reg_ext);
+ p.Do(m_reg_speaker);
+
+ //Do 'm_read_requests' queue
+ {
+ u32 size = 0;
+ if (p.mode == PointerWrap::MODE_READ)
+ {
+ //clear
+ while (m_read_requests.size())
+ m_read_requests.pop();
+
+ p.Do(size);
+ while (size--)
+ {
+ ReadRequest tmp;
+ p.Do(tmp.address);
+ p.Do(tmp.position);
+ p.Do(tmp.size);
+ tmp.data = new u8[tmp.size];
+ p.DoArray(tmp.data, tmp.size);
+ m_read_requests.push(tmp);
+ }
+ }
+ else
+ {
+ std::queue tmp_queue(m_read_requests);
+ size = m_read_requests.size();
+ p.Do(size);
+ while (!tmp_queue.empty())
+ {
+ ReadRequest tmp = tmp_queue.front();
+ p.Do(tmp.address);
+ p.Do(tmp.position);
+ p.Do(tmp.size);
+ p.DoArray(tmp.data, tmp.size);
+ tmp_queue.pop();
+ }
+ }
+ }
+ p.DoMarker("Wiimote");
}
}
diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp
index 6f7f80ece7..b7652e973a 100644
--- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp
@@ -762,9 +762,9 @@ void Wiimote::Update()
}
}
}
- if (Movie::IsRecordingInput())
+ if (!Movie::IsPlayingInput())
{
- Movie::RecordWiimote(m_index, data, rptf, m_reg_ir.mode);
+ Movie::CheckWiimoteStatus(m_index, data, rptf, m_reg_ir.mode);
}
// don't send a data report if auto reporting is off
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/IOdarwin.mm b/Source/Core/Core/Src/HW/WiimoteReal/IOdarwin.mm
index 8e3586f7d9..9ee39e5b92 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/IOdarwin.mm
+++ b/Source/Core/Core/Src/HW/WiimoteReal/IOdarwin.mm
@@ -185,6 +185,11 @@ bool Wiimote::Connect()
RealDisconnect();
return false;
}
+
+ // As of 10.8 these need explicit retaining or writing to the wiimote has a very high
+ // chance of crashing and burning.
+ [ichan retain];
+ [cchan retain];
NOTICE_LOG(WIIMOTE, "Connected to wiimote %i at %s",
index + 1, [[btd getAddressString] UTF8String]);
@@ -215,7 +220,8 @@ void Wiimote::RealDisconnect()
m_wiimote_thread.join();
[btd closeConnection];
-
+ [ichan release];
+ [cchan release];
btd = NULL;
cchan = NULL;
ichan = NULL;
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
index 5e03e36e68..28ce6106c7 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
@@ -512,14 +512,14 @@ void StateChange(EMUSTATE_CHANGE newState)
// TODO: disable/enable auto reporting, maybe
}
-#define ARRAYSIZE(_arr) (sizeof(_arr)/(sizeof(_arr[0])))
-
bool IsValidBluetoothName(const char* name) {
static const char* kValidWiiRemoteBluetoothNames[] = {
"Nintendo RVL-CNT-01",
"Nintendo RVL-CNT-01-TR",
"Nintendo RVL-WBC-01",
};
+ if (name == NULL)
+ return false;
for (size_t i = 0; i < ARRAYSIZE(kValidWiiRemoteBluetoothNames); i++)
if (strcmp(name, kValidWiiRemoteBluetoothNames[i]) == 0)
return true;
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
index a9368ff1af..0fb356c2d8 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
@@ -322,7 +322,7 @@ void ExecuteCommand(u32 _Address)
bool CmdSuccess = false;
ECommandType Command = static_cast(Memory::Read_U32(_Address));
- volatile int DeviceID = Memory::Read_U32(_Address + 8);
+ volatile s32 DeviceID = Memory::Read_U32(_Address + 8);
IWII_IPC_HLE_Device* pDevice = (DeviceID >= 0 && DeviceID < IPC_MAX_FDS) ? g_FdMap[DeviceID] : NULL;
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h
index c124bb4448..d2907d7ee9 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h
@@ -21,8 +21,7 @@
#include
#include "../HW/Memmap.h"
-class PointerWrap;
-
+#include "ChunkFile.h"
#define FS_SUCCESS (u32)0 // Success
#define FS_EACCES (u32)-1 // Permission denied
@@ -62,7 +61,11 @@ public:
virtual ~IWII_IPC_HLE_Device() { }
- virtual void DoState(PointerWrap& p) { DoStateShared(p); }
+ virtual void DoState(PointerWrap& p)
+ {
+ DoStateShared(p);
+ p.Do(m_Active);
+ }
void DoStateShared(PointerWrap& p);
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
index dfe63ee1ef..6b490a1922 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
@@ -183,8 +183,8 @@ void CWII_IPC_HLE_Device_FileIO::CloseFile()
bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
{
u32 ReturnValue = FS_RESULT_FATAL;
- const s32 SeekPosition = Memory::Read_U32(_CommandAddress + 0xC);
- const s32 Mode = Memory::Read_U32(_CommandAddress + 0x10);
+ const u32 SeekPosition = Memory::Read_U32(_CommandAddress + 0xC);
+ const u32 Mode = Memory::Read_U32(_CommandAddress + 0x10);
if (OpenFile())
@@ -205,7 +205,7 @@ bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
}
case 1:
{
- s32 wantedPos = SeekPosition+m_SeekPos;
+ u32 wantedPos = SeekPosition+m_SeekPos;
if (wantedPos >=0 && wantedPos <= fileSize)
{
m_SeekPos = wantedPos;
@@ -215,7 +215,7 @@ bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
}
case 2:
{
- s32 wantedPos = fileSize+m_SeekPos;
+ u64 wantedPos = fileSize+m_SeekPos;
if (wantedPos >=0 && wantedPos <= fileSize)
{
m_SeekPos = wantedPos;
@@ -371,6 +371,8 @@ void CWII_IPC_HLE_Device_FileIO::DoState(PointerWrap &p)
p.Do(have_file_handle);
p.Do(m_Mode);
p.Do(seek);
+ p.Do(m_SeekPos);
+ p.Do(m_Filename);
if (p.GetMode() == PointerWrap::MODE_READ)
{
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp
index ae389d7b69..f409c88c83 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp
@@ -57,7 +57,11 @@
#include "NandPaths.h"
#include "CommonPaths.h"
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
+#include "../Movie.h"
+#ifdef _WIN32
+#include
+#endif
std::string CWII_IPC_HLE_Device_es::m_ContentFile;
@@ -783,14 +787,17 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
}
else
{
+ static CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = GetUsbPointer();
+ bool* wiiMoteConnected = new bool[s_Usb->m_WiiMotes.size()];
+ for(unsigned int i = 0; i < s_Usb->m_WiiMotes.size();
+ i++) wiiMoteConnected[i] = s_Usb->m_WiiMotes[i].IsConnected();
+
std::string tContentFile(m_ContentFile.c_str());
WII_IPC_HLE_Interface::Reset(true);
WII_IPC_HLE_Interface::Init();
-
- static CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = GetUsbPointer();
for (unsigned int i = 0; i < s_Usb->m_WiiMotes.size(); i++)
{
- if (s_Usb->m_WiiMotes[i].IsConnected())
+ if (wiiMoteConnected[i])
{
s_Usb->m_WiiMotes[i].Activate(false);
s_Usb->m_WiiMotes[i].Activate(true);
@@ -801,6 +808,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
}
}
+ delete[] wiiMoteConnected;
WII_IPC_HLE_Interface::SetDefaultContentFile(tContentFile);
}
// Pass the "#002 check"
@@ -891,6 +899,52 @@ u32 CWII_IPC_HLE_Device_es::ES_DIVerify(u8* _pTMD, u32 _sz)
File::CreateFullPath(tmdPath);
File::CreateFullPath(Common::GetTitleDataPath(tmdTitleID));
+
+ Movie::g_titleID = tmdTitleID;
+ std::string savePath = Common::GetTitleDataPath(tmdTitleID);
+ if (Movie::IsRecordingInput())
+ {
+ // TODO: Check for the actual save data
+ if (File::Exists((savePath + "banner.bin").c_str()))
+ Movie::g_bClearSave = false;
+ else
+ Movie::g_bClearSave = true;
+ }
+
+ // TODO: Force the game to save to another location, instead of moving the user's save.
+ if (Movie::IsPlayingInput() && Movie::IsConfigSaved() && Movie::IsStartingFromClearSave())
+ {
+ if (File::Exists((savePath + "banner.bin").c_str()))
+ {
+ if (File::Exists((savePath + "../backup/").c_str()))
+ {
+ // The last run of this game must have been to play back a movie, so their save is already backed up.
+ File::DeleteDirRecursively(savePath.c_str());
+ }
+ else
+ {
+ #ifdef _WIN32
+ MoveFile(savePath.c_str(), (savePath + "../backup/").c_str());
+ #else
+ File::CopyDir(savePath.c_str(),(savePath + "../backup/").c_str());
+ File::DeleteDirRecursively(savePath.c_str());
+ #endif
+ }
+ }
+ }
+ else if (File::Exists((savePath + "../backup/").c_str()))
+ {
+ // Delete the save made by a previous movie, and copy back the user's save.
+ if (File::Exists((savePath + "banner.bin").c_str()))
+ File::DeleteDirRecursively(savePath);
+ #ifdef _WIN32
+ MoveFile((savePath + "../backup/").c_str(), savePath.c_str());
+ #else
+ File::CopyDir((savePath + "../backup/").c_str(), savePath.c_str());
+ File::DeleteDirRecursively((savePath + "../backup/").c_str());
+ #endif
+ }
+
if(!File::Exists(tmdPath))
{
File::IOFile _pTMDFile(tmdPath, "wb");
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
index 75db39b994..0ac752e867 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
@@ -46,6 +46,7 @@ it failed)
#endif
#include "WII_IPC_HLE_Device_net.h"
+#include "../ConfigManager.h"
#include "FileUtil.h"
#include
#include
@@ -276,11 +277,36 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress)
// No idea why the fifth and sixth bytes are left untouched.
{
// hardcoded address as a fallback
- // TODO: Make this configurable? Different MAC addresses MIGHT be needed for requesting a user id or encrypting content with NWC24
const u8 default_address[] = { 0x00, 0x19, 0x1e, 0xfd, 0x71, 0x84 };
INFO_LOG(WII_IPC_NET, "NET_NCD_MANAGE: IOCTLV_NCD_GETWIRELESSMACADDRESS");
+ if (!SConfig::GetInstance().m_WirelessMac.empty())
+ {
+ int x = 0;
+ int tmpaddress[6];
+ for (unsigned int i = 0; i < SConfig::GetInstance().m_WirelessMac.length() && x < 6; i++)
+ {
+ if (SConfig::GetInstance().m_WirelessMac[i] == ':' || SConfig::GetInstance().m_WirelessMac[i] == '-')
+ continue;
+
+ std::stringstream ss;
+ ss << std::hex << SConfig::GetInstance().m_WirelessMac[i];
+ if (SConfig::GetInstance().m_WirelessMac[i+1] != ':' && SConfig::GetInstance().m_WirelessMac[i+1] != '-')
+ {
+ ss << std::hex << SConfig::GetInstance().m_WirelessMac[i+1];
+ i++;
+ }
+ ss >> tmpaddress[x];
+ x++;
+ }
+ u8 address[6];
+ for (int i = 0; i < 6;i++)
+ address[i] = tmpaddress[i];
+ Memory::WriteBigEData(address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
+ break;
+ }
+
#if defined(__linux__)
const char *check_devices[3] = { "wlan0", "ath0", "eth0" };
int fd, ret;
@@ -324,7 +350,6 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress)
if (SUCCEEDED(ret)) Memory::WriteBigEData(adapter_info->Address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
else Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
-
delete[] adapter_info;
#else
Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
index d53d1ebd2a..af10e98d60 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
@@ -104,14 +104,8 @@ CWII_IPC_HLE_Device_usb_oh1_57e_305::~CWII_IPC_HLE_Device_usb_oh1_57e_305()
void CWII_IPC_HLE_Device_usb_oh1_57e_305::DoState(PointerWrap &p)
{
-/*
- //things that do not get saved: (why not?)
-
- std::vector m_WiiMotes;
-
- std::deque m_EventQueue;
- */
-
+ p.Do(m_Active);
+ p.Do(m_ControllerBD);
p.Do(m_CtrlSetup);
p.Do(m_ACLSetup);
p.Do(m_HCIEndpoint);
@@ -119,75 +113,30 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::DoState(PointerWrap &p)
p.Do(m_last_ticks);
p.DoArray(m_PacketCount,4);
p.Do(m_ScanEnable);
+ p.Do(m_EventQueue);
m_acl_pool.DoState(p);
- bool storeFullData = (Movie::IsRecordingInput() || Movie::IsPlayingInput());
- p.Do(storeFullData);
- p.DoMarker("storeFullData in CWII_IPC_HLE_Device_usb_oh1_57e_305");
-
- if (!storeFullData)
- {
- if (p.GetMode() == PointerWrap::MODE_READ)
- {
- m_EventQueue.clear();
-
- if (SConfig::GetInstance().m_WiimoteReconnectOnLoad)
- {
- // Reset the connection of all connected wiimotes
- for (unsigned int i = 0; i < 4; i++)
- {
- if (!m_WiiMotes[i].IsInactive())
- {
- m_WiiMotes[i].Activate(false);
- m_WiiMotes[i].Activate(true);
- }
- else
- {
- m_WiiMotes[i].Activate(false);
- }
- }
- }
- }
+ for (unsigned int i = 0; i < 4; i++)
+ m_WiiMotes[i].DoState(p);
+
+ // Reset the connection of real and hybrid wiimotes
+ if (p.GetMode() == PointerWrap::MODE_READ && SConfig::GetInstance().m_WiimoteReconnectOnLoad)
+ {
+ for (unsigned int i = 0; i < 4; i++)
+ {
+ if (WIIMOTE_SRC_EMU == g_wiimote_sources[i] || WIIMOTE_SRC_NONE == g_wiimote_sources[i])
+ continue;
+ // TODO: Selectively clear real wiimote messages if possible. Or create a real wiimote channel and reporting mode pre-setup to vacate the need for m_WiimoteReconnectOnLoad.
+ m_EventQueue.clear();
+ if (!m_WiiMotes[i].IsInactive())
+ {
+ m_WiiMotes[i].Activate(false);
+ m_WiiMotes[i].Activate(true);
+ }
+ else
+ m_WiiMotes[i].Activate(false);
+ }
}
- else
- {
- // I'm not sure why these things aren't normally saved, but I think they can affect the emulation state,
- // so if sync matters (e.g. if a movie is active), we really should save them.
- // also, it's definitely not safe to do the above auto-reconnect hack either.
- // (unless we can do it without changing anything that affects emulation state, which is not currently the case)
-
- p.Do(m_EventQueue);
- p.DoMarker("m_EventQueue");
-
- // m_WiiMotes is kind of annoying to save. maybe this could be done in a more general way.
- u32 vec_size = (u32)m_WiiMotes.size();
- p.Do(vec_size);
- for (u32 i = 0; i < vec_size; ++i)
- {
- if (i < m_WiiMotes.size())
- {
- CWII_IPC_HLE_WiiMote& wiimote = m_WiiMotes[i];
- wiimote.DoState(p);
- }
- else
- {
- bdaddr_t tmpBD = BDADDR_ANY;
- CWII_IPC_HLE_WiiMote wiimote = CWII_IPC_HLE_WiiMote(this, i, tmpBD, false);
- wiimote.DoState(p);
- if (p.GetMode() == PointerWrap::MODE_READ)
- {
- m_WiiMotes.push_back(wiimote);
- _dbg_assert_(WII_IPC_WIIMOTE, m_WiiMotes.size() == i);
- }
- }
- }
- if (p.GetMode() == PointerWrap::MODE_READ)
- while ((u32)m_WiiMotes.size() > vec_size)
- m_WiiMotes.pop_back();
- p.DoMarker("m_WiiMotes");
- }
-
- DoStateShared(p);
}
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::RemoteDisconnect(u16 _connectionHandle)
@@ -1518,9 +1467,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteLinkPolicy(u8* _Input)
DEBUG_LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%04x", pLinkPolicy->con_handle);
DEBUG_LOG(WII_IPC_WIIMOTE, " Policy: 0x%04x", pLinkPolicy->settings);
- hci_write_link_policy_settings_rp Reply;
- Reply.status = 0x00;
- Reply.con_handle = pLinkPolicy->con_handle;
+ //hci_write_link_policy_settings_rp Reply;
+ //Reply.status = 0x00;
+ //Reply.con_handle = pLinkPolicy->con_handle;
SendEventCommandStatus(HCI_CMD_WRITE_LINK_POLICY_SETTINGS);
@@ -1929,4 +1878,4 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey)
, _pLinkKey[0], _pLinkKey[1], _pLinkKey[2], _pLinkKey[3], _pLinkKey[4], _pLinkKey[5], _pLinkKey[6], _pLinkKey[7]
, _pLinkKey[8], _pLinkKey[9], _pLinkKey[10], _pLinkKey[11], _pLinkKey[12], _pLinkKey[13], _pLinkKey[14], _pLinkKey[15]);
-}
\ No newline at end of file
+}
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp
index 8445eeffdc..e59e1b3208 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp
@@ -102,6 +102,7 @@ void CWII_IPC_HLE_WiiMote::DoState(PointerWrap &p)
p.Do(uclass);
p.Do(features);
p.Do(lmp_version);
+ p.Do(lmp_subversion);
p.Do(m_LinkKey);
p.Do(m_Name);
diff --git a/Source/Core/Core/Src/Movie.cpp b/Source/Core/Core/Src/Movie.cpp
index 28c082ce70..5eb1660d8e 100644
--- a/Source/Core/Core/Src/Movie.cpp
+++ b/Source/Core/Core/Src/Movie.cpp
@@ -27,7 +27,6 @@
#include "HW/WiimoteEmu/WiimoteEmu.h"
#include "HW/WiimoteEmu/WiimoteHid.h"
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
-#include "VideoBackendBase.h"
#include "State.h"
#include "Timer.h"
#include "VideoConfig.h"
@@ -35,9 +34,11 @@
#include "HW/EXI_Device.h"
#include "HW/EXI_Channel.h"
#include "HW/DVDInterface.h"
+#include "../../Common/Src/NandPaths.h"
+#include "Crypto/md5.h"
-// large enough for just over 24 hours of single-player recording
-#define MAX_DTM_LENGTH (40 * 1024 * 1024)
+// The chunk to allocate movie data in multiples of.
+#define DTM_BASE_LENGTH (1024)
std::mutex cs_frameSkip;
@@ -55,24 +56,22 @@ u8 g_numPads = 0;
ControllerState g_padState;
DTMHeader tmpHeader;
u8* tmpInput = NULL;
+size_t tmpInputAllocated = 0;
u64 g_currentByte = 0, g_totalBytes = 0;
u64 g_currentFrame = 0, g_totalFrames = 0; // VI
u64 g_currentLagCount = 0, g_totalLagCount = 0; // just stats
u64 g_currentInputCount = 0, g_totalInputCount = 0; // just stats
u64 g_recordingStartTime; // seconds since 1970 that recording started
-bool bSaveConfig = false;
-bool bSkipIdle = false;
-bool bDualCore = false;
-bool bProgressive = false;
-bool bDSPHLE = false;
-bool bFastDiscSpeed = false;
-std::string videoBackend = "opengl";
+bool bSaveConfig, bSkipIdle, bDualCore, bProgressive, bDSPHLE, bFastDiscSpeed = false;
+bool bMemcard, g_bClearSave = false;
+std::string videoBackend = "unknown";
int iCPUCore = 1;
-bool bMemcard;
-bool bBlankMC = false;
bool g_bDiscChange = false;
std::string g_discChange = "";
std::string author = "";
+u64 g_titleID = 0;
+unsigned char MD5[16];
+u8 bongos;
bool g_bRecordingFromSaveState = false;
bool g_bPolled = false;
@@ -84,9 +83,39 @@ std::string g_InputDisplay[8];
ManipFunction mfunc = NULL;
+void EnsureTmpInputSize(size_t bound)
+{
+ if (tmpInputAllocated >= bound)
+ return;
+ // The buffer expands in powers of two of DTM_BASE_LENGTH
+ // (standard exponential buffer growth).
+ size_t newAlloc = DTM_BASE_LENGTH;
+ while (newAlloc < bound)
+ newAlloc *= 2;
+ u8* newTmpInput = new u8[newAlloc];
+ tmpInputAllocated = newAlloc;
+ if (tmpInput != NULL)
+ {
+ if (g_totalBytes > 0)
+ memcpy(newTmpInput, tmpInput, (size_t)g_totalBytes);
+ delete[] tmpInput;
+ }
+ tmpInput = newTmpInput;
+}
std::string GetInputDisplay()
{
+ if (!IsPlayingInput() && !IsRecordingInput())
+ {
+ g_numPads = 0;
+ for (int i = 0; i < 4; i++)
+ {
+ if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER || SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA)
+ g_numPads |= (1 << i);
+ if (g_wiimote_sources[i] != WIIMOTE_SRC_NONE)
+ g_numPads |= (1 << (i + 4));
+ }
+ }
std::string inputDisplay = "";
for (int i = 0; i < 8; ++i)
if ((g_numPads & (1 << i)) != 0)
@@ -105,6 +134,10 @@ void FrameUpdate()
g_totalFrames = g_currentFrame;
g_totalLagCount = g_currentLagCount;
}
+ if (IsPlayingInput() && IsConfigSaved())
+ {
+ SetGraphicsConfig();
+ }
if (g_bFrameStep)
{
@@ -135,11 +168,24 @@ void Init()
if (IsPlayingInput())
{
ReadHeader();
+ std::thread md5thread(CheckMD5);
+ if ((strncmp((char *)tmpHeader.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str(), 6)))
+ {
+ PanicAlert("The recorded game (%s) is not the same as the selected game (%s)", tmpHeader.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str());
+ EndPlayInput(false);
+ }
}
+ if (IsRecordingInput())
+ {
+ GetSettings();
+ std::thread md5thread(GetMD5);
+ }
+
g_frameSkipCounter = g_framesToSkip;
memset(&g_padState, 0, sizeof(g_padState));
if (!tmpHeader.bFromSaveState || !IsPlayingInput())
Core::SetStateFileName("");
+
for (int i = 0; i < 8; ++i)
g_InputDisplay[i].clear();
@@ -147,15 +193,10 @@ void Init()
{
g_bRecordingFromSaveState = false;
g_rerecords = 0;
- g_numPads = 0;
g_currentByte = 0;
g_currentFrame = 0;
g_currentLagCount = 0;
g_currentInputCount = 0;
- // we don't clear these things because otherwise we can't resume playback if we load a movie state later
- //g_totalFrames = g_totalBytes = 0;
- //delete tmpInput;
- //tmpInput = NULL;
}
}
@@ -164,6 +205,9 @@ void InputUpdate()
g_currentInputCount++;
if (IsRecordingInput())
g_totalInputCount = g_currentInputCount;
+
+ if (IsPlayingInput() && g_currentInputCount == (g_totalInputCount -1) && SConfig::GetInstance().m_PauseMovie)
+ Core::SetState(Core::CORE_PAUSE);
}
void SetFrameSkipping(unsigned int framesToSkip)
@@ -268,6 +312,11 @@ bool IsUsingPad(int controller)
return ((g_numPads & (1 << controller)) != 0);
}
+bool IsUsingBongo(int controller)
+{
+ return ((bongos & (1 << controller)) != 0);
+}
+
bool IsUsingWiimote(int wiimote)
{
return ((g_numPads & (1 << (wiimote + 4))) != 0);
@@ -307,9 +356,9 @@ int GetCPUMode()
return iCPUCore;
}
-bool IsBlankMemcard()
+bool IsStartingFromClearSave()
{
- return bBlankMC;
+ return g_bClearSave;
}
bool IsUsingMemcard()
@@ -325,7 +374,7 @@ void ChangePads(bool instantly)
int controllers = 0;
for (int i = 0; i < 4; i++)
- if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER)
+ if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER || SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA)
controllers |= (1 << i);
if (instantly && (g_numPads & 0x0F) == controllers)
@@ -333,9 +382,9 @@ void ChangePads(bool instantly)
for (int i = 0; i < 4; i++)
if (instantly) // Changes from savestates need to be instantaneous
- SerialInterface::AddDevice(IsUsingPad(i) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i);
+ SerialInterface::AddDevice(IsUsingPad(i) ? (IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
else
- SerialInterface::ChangeDevice(IsUsingPad(i) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i);
+ SerialInterface::ChangeDevice(IsUsingPad(i) ? (IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
}
void ChangeWiiPads(bool instantly)
@@ -369,6 +418,10 @@ bool BeginRecordingInput(int controllers)
g_recordingStartTime = Common::Timer::GetLocalTimeSinceJan1970();
g_rerecords = 0;
+ for (int i = 0; i < 4; i++)
+ if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA)
+ bongos |= (1 << i);
+
if (Core::IsRunning())
{
if(File::Exists(tmpStateFilename))
@@ -376,21 +429,23 @@ bool BeginRecordingInput(int controllers)
State::SaveAs(tmpStateFilename.c_str());
g_bRecordingFromSaveState = true;
+
+ // This is only done here if starting from save state because otherwise we won't have the titleid. Otherwise it's set in WII_IPC_HLE_Device_es.cpp.
+ // TODO: find a way to GetTitleDataPath() from Movie::Init()
+ if (Core::g_CoreStartupParameter.bWii)
+ {
+ if (File::Exists((Common::GetTitleDataPath(g_titleID) + "banner.bin").c_str()))
+ Movie::g_bClearSave = false;
+ else
+ Movie::g_bClearSave = true;
+ }
+ std::thread md5thread(GetMD5);
}
g_playMode = MODE_RECORDING;
+ GetSettings();
+ author = SConfig::GetInstance().m_strMovieAuthor;
+ EnsureTmpInputSize(1);
- bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
- bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
- bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
- bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
- bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
- videoBackend = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend;
- iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
- bBlankMC = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
- bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
-
- delete [] tmpInput;
- tmpInput = new u8[MAX_DTM_LENGTH];
g_currentByte = g_totalBytes = 0;
Core::DisplayMessage("Starting movie recording", 2000);
@@ -475,15 +530,6 @@ void SetInputDisplayString(ControllerState padState, int controllerID)
if(g_padState.DPadRight)
g_InputDisplay[controllerID].append(" RIGHT");
- //if(g_padState.L)
- //{
- // g_InputDisplay[controllerID].append(" L");
- //}
- //if(g_padState.R)
- //{
- // g_InputDisplay[controllerID].append(" R");
- //}
-
Analog1DToString(g_padState.TriggerL, " L", inp);
g_InputDisplay[controllerID].append(inp);
@@ -550,66 +596,76 @@ void SetWiiInputDisplayString(int remoteID, u8* const coreData, u8* const accelD
g_InputDisplay[controllerID].append("\n");
}
-
-
-void RecordInput(SPADStatus *PadStatus, int controllerID)
+void CheckPadStatus(SPADStatus *PadStatus, int controllerID)
{
- if(!IsRecordingInput() || !IsUsingPad(controllerID))
- return;
-
g_padState.A = ((PadStatus->button & PAD_BUTTON_A) != 0);
g_padState.B = ((PadStatus->button & PAD_BUTTON_B) != 0);
g_padState.X = ((PadStatus->button & PAD_BUTTON_X) != 0);
g_padState.Y = ((PadStatus->button & PAD_BUTTON_Y) != 0);
g_padState.Z = ((PadStatus->button & PAD_TRIGGER_Z) != 0);
g_padState.Start = ((PadStatus->button & PAD_BUTTON_START) != 0);
-
+
g_padState.DPadUp = ((PadStatus->button & PAD_BUTTON_UP) != 0);
g_padState.DPadDown = ((PadStatus->button & PAD_BUTTON_DOWN) != 0);
g_padState.DPadLeft = ((PadStatus->button & PAD_BUTTON_LEFT) != 0);
g_padState.DPadRight = ((PadStatus->button & PAD_BUTTON_RIGHT) != 0);
-
+
g_padState.L = ((PadStatus->button & PAD_TRIGGER_L) != 0);
g_padState.R = ((PadStatus->button & PAD_TRIGGER_R) != 0);
g_padState.TriggerL = PadStatus->triggerLeft;
g_padState.TriggerR = PadStatus->triggerRight;
- g_padState.disc = g_bDiscChange;
g_padState.AnalogStickX = PadStatus->stickX;
g_padState.AnalogStickY = PadStatus->stickY;
-
+
g_padState.CStickX = PadStatus->substickX;
g_padState.CStickY = PadStatus->substickY;
-
- memcpy(&(tmpInput[g_currentByte]), &g_padState, 8);
- g_currentByte += 8;
- g_totalBytes = g_currentByte;
-
SetInputDisplayString(g_padState, controllerID);
+}
+
+void RecordInput(SPADStatus *PadStatus, int controllerID)
+{
+ if (!IsRecordingInput() || !IsUsingPad(controllerID))
+ return;
+
+ CheckPadStatus(PadStatus, controllerID);
if (g_bDiscChange)
{
+ g_padState.disc = g_bDiscChange;
g_bDiscChange = false;
}
+
+ EnsureTmpInputSize((size_t)(g_currentByte + 8));
+ memcpy(&(tmpInput[g_currentByte]), &g_padState, 8);
+ g_currentByte += 8;
+ g_totalBytes = g_currentByte;
}
-void RecordWiimote(int wiimote, u8 *data, const WiimoteEmu::ReportFeatures& rptf, int irMode)
+void CheckWiimoteStatus(int wiimote, u8 *data, const WiimoteEmu::ReportFeatures& rptf, int irMode)
{
- if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
- return;
-
u8* const coreData = rptf.core?(data+rptf.core):NULL;
u8* const accelData = rptf.accel?(data+rptf.accel):NULL;
u8* const irData = rptf.ir?(data+rptf.ir):NULL;
u8 size = rptf.size;
+ SetWiiInputDisplayString(wiimote, coreData, accelData, irData);
+
+ if (IsRecordingInput())
+ RecordWiimote(wiimote, data, size);
+}
+
+void RecordWiimote(int wiimote, u8 *data, u8 size)
+{
+ if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
+ return;
InputUpdate();
+ EnsureTmpInputSize((size_t)(g_currentByte + size + 1));
tmpInput[g_currentByte++] = size;
memcpy(&(tmpInput[g_currentByte]), data, size);
g_currentByte += size;
g_totalBytes = g_currentByte;
- SetWiiInputDisplayString(wiimote, coreData, accelData, irData);
}
void ReadHeader()
@@ -628,41 +684,33 @@ void ReadHeader()
bDSPHLE = tmpHeader.bDSPHLE;
bFastDiscSpeed = tmpHeader.bFastDiscSpeed;
iCPUCore = tmpHeader.CPUCore;
- bBlankMC = tmpHeader.bBlankMC;
+ g_bClearSave = tmpHeader.bClearSave;
bMemcard = tmpHeader.bMemcard;
-
+ bongos = tmpHeader.bongos;
}
else
{
- bSaveConfig = false;
- bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
- bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
- bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
- bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
- bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
- videoBackend = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend;
- bBlankMC = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
- bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
+ GetSettings();
}
-
videoBackend.resize(ARRAYSIZE(tmpHeader.videoBackend));
- for (int i = 0; i < ARRAYSIZE(tmpHeader.videoBackend);i++)
+ for (unsigned int i = 0; i < ARRAYSIZE(tmpHeader.videoBackend);i++)
{
videoBackend[i] = tmpHeader.videoBackend[i];
}
g_discChange.resize(ARRAYSIZE(tmpHeader.discChange));
- for (int i = 0; i < ARRAYSIZE(tmpHeader.discChange);i++)
+ for (unsigned int i = 0; i < ARRAYSIZE(tmpHeader.discChange);i++)
{
g_discChange[i] = tmpHeader.discChange[i];
}
author.resize(ARRAYSIZE(tmpHeader.author));
- for (int i = 0; i < ARRAYSIZE(tmpHeader.author);i++)
+ for (unsigned int i = 0; i < ARRAYSIZE(tmpHeader.author);i++)
{
author[i] = tmpHeader.author[i];
}
+ memcpy(MD5, tmpHeader.md5, 16);
}
bool PlayInput(const char *filename)
@@ -695,19 +743,6 @@ bool PlayInput(const char *filename)
Movie::LoadInput(filename);
}
- /* TODO: Put this verification somewhere we have the gameID of the played game
- // TODO: Replace with Unique ID
- if(tmpHeader.uniqueID != 0) {
- PanicAlert("Recording Unique ID Verification Failed");
- goto cleanup;
- }
-
- if(strncmp((char *)tmpHeader.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str(), 6)) {
- PanicAlert("The recorded game (%s) is not the same as the selected game (%s)", header.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str());
- goto cleanup;
- }
- */
-
ReadHeader();
g_totalFrames = tmpHeader.frameCount;
g_totalLagCount = tmpHeader.lagCount;
@@ -719,8 +754,7 @@ bool PlayInput(const char *filename)
g_playMode = MODE_PLAYING;
g_totalBytes = g_recordfd.GetSize() - 256;
- delete tmpInput;
- tmpInput = new u8[MAX_DTM_LENGTH];
+ EnsureTmpInputSize((size_t)g_totalBytes);
g_recordfd.ReadArray(tmpInput, (size_t)g_totalBytes);
g_currentByte = 0;
g_recordfd.Close();
@@ -762,11 +796,8 @@ void LoadInput(const char *filename)
ReadHeader();
if (!g_bReadOnly)
{
- if (g_rerecords > tmpHeader.numRerecords)
- {
- tmpHeader.numRerecords = g_rerecords;
- }
- tmpHeader.numRerecords++;
+ g_rerecords++;
+ tmpHeader.numRerecords = g_rerecords;
t_record.Seek(0, SEEK_SET);
t_record.WriteArray(&tmpHeader, 1);
}
@@ -790,9 +821,8 @@ void LoadInput(const char *filename)
g_totalLagCount = tmpHeader.lagCount;
g_totalInputCount = tmpHeader.inputCount;
+ EnsureTmpInputSize((size_t)totalSavedBytes);
g_totalBytes = totalSavedBytes;
- delete [] tmpInput;
- tmpInput = new u8[MAX_DTM_LENGTH];
t_record.ReadArray(tmpInput, (size_t)g_totalBytes);
}
else if (g_currentByte > 0)
@@ -892,10 +922,6 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
if (!IsPlayingInput() || !IsUsingPad(controllerID) || tmpInput == NULL)
return;
- if (IsConfigSaved())
- {
- SetGraphicsConfig();
- }
if (g_currentFrame == 1)
{
if (tmpHeader.bMemcard)
@@ -915,8 +941,7 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
return;
}
- // dtm files don't save the mic button or error bit. not sure if they're actually
- // used, but better safe than sorry
+ // dtm files don't save the mic button or error bit. not sure if they're actually used, but better safe than sorry
signed char e = PadStatus->err;
memset(PadStatus, 0, sizeof(SPADStatus));
PadStatus->err = e;
@@ -992,13 +1017,11 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
}
else
{
- Core::SetState(Core::CORE_PAUSE);
PanicAlert("Change the disc to %s", g_discChange.c_str());
}
}
SetInputDisplayString(g_padState, controllerID);
-
CheckInputEnd();
}
@@ -1057,7 +1080,7 @@ void EndPlayInput(bool cont)
}
else if(g_playMode != MODE_NONE)
{
- g_numPads = g_rerecords = 0;
+ g_rerecords = 0;
g_currentByte = 0;
g_playMode = MODE_NONE;
Core::DisplayMessage("Movie End.", 2000);
@@ -1104,9 +1127,11 @@ void SaveRecording(const char *filename)
header.bUseXFB = g_ActiveConfig.bUseXFB;
header.bUseRealXFB = g_ActiveConfig.bUseRealXFB;
header.bMemcard = bMemcard;
- header.bBlankMC = bBlankMC;
+ header.bClearSave = g_bClearSave;
strncpy((char *)header.discChange, g_discChange.c_str(),ARRAYSIZE(header.discChange));
strncpy((char *)header.author, author.c_str(),ARRAYSIZE(header.author));
+ memcpy(header.md5,MD5,16);
+ header.bongos = bongos;
// TODO
header.uniqueID = 0;
@@ -1150,4 +1175,61 @@ void SetGraphicsConfig()
g_Config.bUseXFB = tmpHeader.bUseXFB;
g_Config.bUseRealXFB = tmpHeader.bUseRealXFB;
}
+
+void GetSettings()
+{
+ bSaveConfig = true;
+ bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
+ bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
+ bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
+ bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
+ bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
+ videoBackend = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend;
+ iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
+ if (!Core::g_CoreStartupParameter.bWii)
+ g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
+ bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
+}
+
+void CheckMD5()
+{
+ for (int i=0, n=0; i<16; i++)
+ {
+ if (tmpHeader.md5[i] != 0)
+ continue;
+ n++;
+ if (n == 16)
+ return;
+ }
+ Core::DisplayMessage("Verifying checksum...", 2000);
+
+ unsigned char gameMD5[16];
+ char game[255];
+ memcpy(game, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename.c_str(), SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename.size());
+ md5_file(game, gameMD5);
+
+ if (memcmp(gameMD5,MD5,16) == 0)
+ Core::DisplayMessage("Checksum of current game matches the recorded game.", 2000);
+ else
+ PanicAlert("Checksum of current game does not match the recorded game!");
+}
+
+void GetMD5()
+{
+ Core::DisplayMessage("Calculating checksum of game file...", 2000);
+ for (int i = 0; i < 16; i++)
+ MD5[i] = 0;
+ char game[255];
+ memcpy(game, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename.c_str(),SConfig::GetInstance().m_LocalCoreStartupParameter.m_strFilename.size());
+ md5_file(game, MD5);
+ Core::DisplayMessage("Finished calculating checksum.", 2000);
+}
+
+void Shutdown()
+{
+ g_currentInputCount = g_totalInputCount = g_totalFrames = g_totalBytes = 0;
+ delete [] tmpInput;
+ tmpInput = NULL;
+ tmpInputAllocated = 0;
+}
};
diff --git a/Source/Core/Core/Src/Movie.h b/Source/Core/Core/Src/Movie.h
index 94e63a9e2b..2cb4c78e23 100644
--- a/Source/Core/Core/Src/Movie.h
+++ b/Source/Core/Core/Src/Movie.h
@@ -19,7 +19,6 @@
#define __MOVIE_H
#include "Common.h"
-#include "FileUtil.h"
#include "../../InputCommon/Src/GCPadStatus.h"
#include
@@ -61,8 +60,9 @@ static_assert(sizeof(ControllerState) == 8, "ControllerState should be 8 bytes")
#pragma pack(pop)
// Global declarations
-extern bool g_bFrameStep, g_bPolled, g_bReadOnly, g_bDiscChange;
+extern bool g_bFrameStep, g_bPolled, g_bReadOnly, g_bDiscChange, g_bClearSave;
extern PlayMode g_playMode;
+extern u64 g_titleID;
extern u32 g_framesToSkip, g_frameSkipCounter;
@@ -98,7 +98,7 @@ struct DTMHeader {
u8 videoBackend[16]; // UTF-8 representation of the video backend
u8 audioEmulator[16]; // UTF-8 representation of the audio emulator
- u8 padBackend[16]; // UTF-8 representation of the input backend
+ unsigned char md5[16]; // MD5 of game iso
u64 recordingStartTime; // seconds since 1970 that recording started (used for RTC)
@@ -117,8 +117,9 @@ struct DTMHeader {
bool bUseXFB;
bool bUseRealXFB;
bool bMemcard;
- bool bBlankMC; // Create a new memory card when playing back a movie if true
- u8 reserved[16]; // Padding for any new config options
+ bool bClearSave; // Create a new memory card when playing back a movie if true
+ u8 bongos;
+ u8 reserved[15]; // Padding for any new config options
u8 discChange[40]; // Name of iso file to switch to, for two disc games.
u8 reserved2[47]; // Make heading 256 bytes, just because we can
};
@@ -132,7 +133,6 @@ void Init();
void SetPolledDevice();
-bool IsAutoFiring();
bool IsRecordingInput();
bool IsRecordingInputFromSaveState();
bool IsJustStartingRecordingInputFromSaveState();
@@ -148,12 +148,14 @@ bool IsSkipIdle();
bool IsDSPHLE();
bool IsFastDiscSpeed();
int GetCPUMode();
-bool IsBlankMemcard();
+bool IsStartingFromClearSave();
bool IsUsingMemcard();
void SetGraphicsConfig();
+void GetSettings();
bool IsUsingPad(int controller);
bool IsUsingWiimote(int wiimote);
+bool IsUsingBongo(int controller);
void ChangePads(bool instantly = false);
void ChangeWiiPads(bool instantly = false);
@@ -166,7 +168,7 @@ void FrameSkipping();
bool BeginRecordingInput(int controllers);
void RecordInput(SPADStatus *PadStatus, int controllerID);
-void RecordWiimote(int wiimote, u8* data, const struct WiimoteEmu::ReportFeatures& rptf, int irMode);
+void RecordWiimote(int wiimote, u8 *data, u8 size);
bool PlayInput(const char *filename);
void LoadInput(const char *filename);
@@ -176,6 +178,11 @@ bool PlayWiimote(int wiimote, u8* data, const struct WiimoteEmu::ReportFeatures&
void EndPlayInput(bool cont);
void SaveRecording(const char *filename);
void DoState(PointerWrap &p);
+void CheckMD5();
+void GetMD5();
+void Shutdown();
+void CheckPadStatus(SPADStatus *PadStatus, int controllerID);
+void CheckWiimoteStatus(int wiimote, u8* data, const struct WiimoteEmu::ReportFeatures& rptf, int irMode);
std::string GetInputDisplay();
@@ -186,4 +193,4 @@ void SetInputManip(ManipFunction);
void CallInputManip(SPADStatus *PadStatus, int controllerID);
};
-#endif // __FRAME_H
+#endif // __MOVIE_H
diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.cpp
index 33540bfb64..8ea35503bf 100644
--- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.cpp
+++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.cpp
@@ -295,6 +295,7 @@ static GekkoOPTemplate table31_2[] =
{266, Interpreter::addx, {"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 0, 0, 0, 0}},
{778, Interpreter::addx, {"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 0, 0, 0, 0}},
{10, Interpreter::addcx, {"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
+ {522, Interpreter::addcx, {"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
{138, Interpreter::addex, {"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
{234, Interpreter::addmex, {"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
{202, Interpreter::addzex, {"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
@@ -310,6 +311,7 @@ static GekkoOPTemplate table31_2[] =
{40, Interpreter::subfx, {"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 0, 0, 0, 0}},
{552, Interpreter::subfx, {"subox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 0, 0, 0, 0}},
{8, Interpreter::subfcx, {"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
+ {520, Interpreter::subfcx, {"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
{136, Interpreter::subfex, {"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
{232, Interpreter::subfmex, {"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
{200, Interpreter::subfzex, {"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT, 0, 0, 0, 0}},
diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit64_Tables.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit64_Tables.cpp
index 8d593a6742..ddb59903d2 100644
--- a/Source/Core/Core/Src/PowerPC/Jit64/Jit64_Tables.cpp
+++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit64_Tables.cpp
@@ -308,6 +308,7 @@ static GekkoOPTemplate table31_2[] =
{266, &Jit64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{778, &Jit64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{10, &Jit64::addcx}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
+ {522, &Jit64::addcx}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{138, &Jit64::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{234, &Jit64::addmex}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{202, &Jit64::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
@@ -323,6 +324,7 @@ static GekkoOPTemplate table31_2[] =
{40, &Jit64::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{552, &Jit64::subfx}, //"subox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{8, &Jit64::subfcx}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
+ {520, &Jit64::subfcx}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{136, &Jit64::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{232, &Jit64::subfmex}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{200, &Jit64::subfzex}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp
index 5aaf4b99f1..3d88d687e0 100644
--- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp
+++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp
@@ -1097,7 +1097,7 @@ void Jit64::mulli(UGeckoInstruction inst)
gpr.BindToRegister(d, (d == a), true);
if (imm == 0)
XOR(32, gpr.R(d), gpr.R(d));
- else if(imm == -1)
+ else if(imm == (u32)-1)
{
if (d != a)
MOV(32, gpr.R(d), gpr.R(a));
@@ -1147,7 +1147,7 @@ void Jit64::mullwx(UGeckoInstruction inst)
int src = gpr.R(a).IsImm() ? b : a;
if (imm == 0)
XOR(32, gpr.R(d), gpr.R(d));
- else if(imm == -1)
+ else if(imm == (u32)-1)
{
if (d != src)
MOV(32, gpr.R(d), gpr.R(src));
@@ -1263,7 +1263,7 @@ void Jit64::divwux(UGeckoInstruction inst)
while(!(divisor & (1 << shift)))
shift--;
- if (divisor == (1 << shift))
+ if (divisor == (u32)(1 << shift))
{
gpr.Lock(a, b, d);
gpr.BindToRegister(d, d == a, true);
@@ -1387,7 +1387,7 @@ void Jit64::divwx(UGeckoInstruction inst)
if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
{
s32 i = (s32)gpr.R(a).offset, j = (s32)gpr.R(b).offset;
- if( j == 0 || i == 0x80000000 && j == -1)
+ if( j == 0 || (i == (s32)0x80000000 && j == -1))
{
gpr.SetImmediate32(d, (i >> 31) ^ j);
if (inst.OE)
diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp
index e91291fa90..ce47e2c3ac 100644
--- a/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp
+++ b/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp
@@ -472,10 +472,10 @@ static OpArg regBuildMemAddress(RegInfo& RI, InstLoc I, InstLoc AI,
#else
// 64-bit
if (Profiled) {
- RI.Jit->LEA(32, EAX, M((void*)addr));
+ RI.Jit->LEA(32, EAX, M((void*)(u64)addr));
return MComplex(RBX, EAX, SCALE_1, 0);
}
- return M((void*)addr);
+ return M((void*)(u64)addr);
#endif
}
}
diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_Tables.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_Tables.cpp
index 9e8e36f9c3..9418030b9c 100644
--- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_Tables.cpp
+++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL_Tables.cpp
@@ -309,6 +309,7 @@ static GekkoOPTemplate table31_2[] =
{266, &JitIL::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{778, &JitIL::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{10, &JitIL::Default}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
+ {522, &JitIL::Default}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{138, &JitIL::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{234, &JitIL::Default}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{202, &JitIL::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
@@ -324,6 +325,7 @@ static GekkoOPTemplate table31_2[] =
{40, &JitIL::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{552, &JitIL::subfx}, //"subox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{8, &JitIL::subfcx}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
+ {520, &JitIL::subfcx}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{136, &JitIL::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{232, &JitIL::Default}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{200, &JitIL::Default}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
diff --git a/Source/Core/Core/Src/PowerPC/PowerPC.cpp b/Source/Core/Core/Src/PowerPC/PowerPC.cpp
index 8a7b817212..170044b2e3 100644
--- a/Source/Core/Core/Src/PowerPC/PowerPC.cpp
+++ b/Source/Core/Core/Src/PowerPC/PowerPC.cpp
@@ -144,7 +144,7 @@ void Init(int cpu_core)
#ifdef _WIN32
_control87(_PC_53, MCW_PC);
#else
- unsigned short _mode;
+ unsigned short _mode = 0;
asm ("fstcw %0" : : "m" (_mode));
_mode = (_mode & ~FPU_PREC_MASK) | FPU_PREC_53;
asm ("fldcw %0" : : "m" (_mode));
diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp
index 3f3e367349..a532ace217 100644
--- a/Source/Core/Core/Src/State.cpp
+++ b/Source/Core/Core/Src/State.cpp
@@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
-static const int STATE_VERSION = 8;
+static const u32 STATE_VERSION = 10;
struct StateHeader
{
@@ -199,8 +199,10 @@ void CompressAndDumpState(CompressAndDumpState_args save_args)
if (File::Exists(File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav.dtm"))
File::Delete((File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav.dtm"));
- if (!File::Rename(filename, File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav") || !File::Rename(filename + ".dtm", File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav.dtm"))
+ if (!File::Rename(filename, File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav"))
Core::DisplayMessage("Failed to move previous state to state undo backup", 1000);
+ else
+ File::Rename(filename + ".dtm", File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav.dtm");
}
if ((Movie::IsRecordingInput() || Movie::IsPlayingInput()) && !Movie::IsJustStartingRecordingInputFromSaveState())
Movie::SaveRecording((filename + ".dtm").c_str());
@@ -385,6 +387,7 @@ void LoadAs(const std::string& filename)
g_loadDepth++;
// Save temp buffer for undo load state
+ if (!Movie::IsJustStartingRecordingInputFromSaveState())
{
std::lock_guard lk(g_cs_undo_load_buffer);
SaveToBuffer(g_undo_load_buffer);
diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt
index 77ac9eb439..d03cf7c6b1 100644
--- a/Source/Core/DolphinWX/CMakeLists.txt
+++ b/Source/Core/DolphinWX/CMakeLists.txt
@@ -153,6 +153,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/postprocess_bundle.cmake "
include(BundleUtilities)
message(\"Fixing up application bundle: ${BUNDLE_PATH}\")
+ set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${BUNDLE_PATH}\" \"\" \"\")
")
add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD
diff --git a/Source/Core/DolphinWX/Dolphin.vcxproj b/Source/Core/DolphinWX/Dolphin.vcxproj
index 72c40a3db4..1556eb5687 100644
--- a/Source/Core/DolphinWX/Dolphin.vcxproj
+++ b/Source/Core/DolphinWX/Dolphin.vcxproj
@@ -201,6 +201,8 @@ xcopy "$(SolutionDir)..\Externals\SDL\$(PlatformName)\*.dll" "$(TargetDir)" /e /
Copying Data\* to $(TargetDir)
+
+
@@ -387,4 +389,4 @@ xcopy "$(SolutionDir)..\Externals\SDL\$(PlatformName)\*.dll" "$(TargetDir)" /e /
-
\ No newline at end of file
+
diff --git a/Source/Core/DolphinWX/DolphinWX.rc b/Source/Core/DolphinWX/DolphinWX.rc
index e9c06a8fa9..550e08c35a 100644
--- a/Source/Core/DolphinWX/DolphinWX.rc
+++ b/Source/Core/DolphinWX/DolphinWX.rc
@@ -2,3 +2,7 @@
//
#include "resource.h"
IDI_ICON1 ICON "..\\..\\..\\Installer\\Dolphin.ico"
+"dolphin" ICON "..\\..\\..\\Installer\\Dolphin.ico"
+#define wxUSE_NO_MANIFEST 1
+#include
+
diff --git a/Source/Core/DolphinWX/Src/CheatsWindow.cpp b/Source/Core/DolphinWX/Src/CheatsWindow.cpp
index eb25117533..dec6648461 100644
--- a/Source/Core/DolphinWX/Src/CheatsWindow.cpp
+++ b/Source/Core/DolphinWX/Src/CheatsWindow.cpp
@@ -36,7 +36,7 @@ extern CFrame* main_frame;
static wxCheatsWindow *g_cheat_window;
wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
- : wxDialog(parent, wxID_ANY, _("Cheats Manager"), wxDefaultPosition, wxDefaultSize)
+ : wxDialog(parent, wxID_ANY, _("Cheats Manager"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxDIALOG_NO_PARENT)
{
::g_cheat_window = this;
@@ -57,6 +57,7 @@ wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
}
}
+ SetSize(wxSize(-1, 600));
Center();
Show();
}
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp
index ef82810019..76508daf7c 100644
--- a/Source/Core/DolphinWX/Src/ConfigMain.cpp
+++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp
@@ -125,6 +125,7 @@ EVT_SLIDER(ID_VOLUME, CConfigMain::AudioSettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
+EVT_CHECKBOX(ID_INTERFACE_ONSCREENDISPLAYMESSAGES, CConfigMain::DisplaySettingsChanged)
EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::DisplaySettingsChanged)
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::DisplaySettingsChanged)
EVT_BUTTON(ID_HOTKEY_CONFIG, CConfigMain::DisplaySettingsChanged)
@@ -337,6 +338,7 @@ void CConfigMain::InitializeGUIValues()
// Display - Interface
ConfirmStop->SetValue(startup_params.bConfirmStop);
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
+ OnScreenDisplayMessages->SetValue(startup_params.bOnScreenDisplayMessages);
Theme->SetSelection(startup_params.iTheme);
// need redesign
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
@@ -490,6 +492,7 @@ void CConfigMain::InitializeGUITooltips()
// Display - Interface
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occured.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
+ OnScreenDisplayMessages->SetToolTip(_("Show messages on the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
// Display - Themes: Copyright notice
Theme->SetItemToolTip(0, _("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
@@ -579,6 +582,8 @@ void CConfigMain::CreateGUIControls()
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS,
_("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+ OnScreenDisplayMessages = new wxCheckBox(DisplayPage, ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
+ _("On-Screen Display Messages"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxBoxSizer* sInterface = new wxBoxSizer(wxHORIZONTAL);
sInterface->Add(TEXT_BOX(DisplayPage, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
@@ -588,6 +593,7 @@ void CConfigMain::CreateGUIControls()
sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings"));
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
+ sbInterface->Add(OnScreenDisplayMessages, 0, wxALL, 5);
sbInterface->Add(Theme, 0, wxEXPAND | wxALL, 5);
sbInterface->Add(sInterface, 0, wxEXPAND | wxALL, 5);
@@ -865,6 +871,10 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = UsePanicHandlers->IsChecked();
SetEnableAlert(UsePanicHandlers->IsChecked());
break;
+ case ID_INTERFACE_ONSCREENDISPLAYMESSAGES:
+ SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages = OnScreenDisplayMessages->IsChecked();
+ SetEnableAlert(OnScreenDisplayMessages->IsChecked());
+ break;
case ID_INTERFACE_THEME:
SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme = Theme->GetSelection();
main_frame->InitBitmaps();
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.h b/Source/Core/DolphinWX/Src/ConfigMain.h
index eae9f8996d..9b5dbf4243 100644
--- a/Source/Core/DolphinWX/Src/ConfigMain.h
+++ b/Source/Core/DolphinWX/Src/ConfigMain.h
@@ -86,6 +86,7 @@ private:
// Interface settings
ID_INTERFACE_CONFIRMSTOP,
ID_INTERFACE_USEPANICHANDLERS,
+ ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
ID_INTERFACE_THEME,
ID_INTERFACE_LANG,
ID_HOTKEY_CONFIG,
@@ -163,6 +164,7 @@ private:
// Interface
wxCheckBox* ConfirmStop;
wxCheckBox* UsePanicHandlers;
+ wxCheckBox* OnScreenDisplayMessages;
wxRadioBox* Theme;
wxChoice* InterfaceLang;
wxButton* HotkeyConfig;
diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
index 0b6b366c88..2917f1637d 100644
--- a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
+++ b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
@@ -319,7 +319,7 @@ void CCodeWindow::UpdateLists()
{
int idx = callers->Append(wxString::FromAscii(StringFromFormat
("< %s (%08x)", caller_symbol->name.c_str(), caller_addr).c_str()));
- callers->SetClientData(idx, (void*)caller_addr);
+ callers->SetClientData(idx, (void*)(u64)caller_addr);
}
}
@@ -332,7 +332,7 @@ void CCodeWindow::UpdateLists()
{
int idx = calls->Append(wxString::FromAscii(StringFromFormat
("> %s (%08x)", call_symbol->name.c_str(), call_addr).c_str()));
- calls->SetClientData(idx, (void*)call_addr);
+ calls->SetClientData(idx, (void*)(u64)call_addr);
}
}
}
diff --git a/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.cpp b/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.cpp
index cec986ad90..a4591d3994 100644
--- a/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.cpp
+++ b/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.cpp
@@ -139,7 +139,7 @@ void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
if (DSPCore_GetState() == DSPCORE_STEPPING)
{
DSPCore_Step();
- Refresh();
+ Update();
}
break;
@@ -155,10 +155,10 @@ void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
void Host_RefreshDSPDebuggerWindow()
{
if (m_DebuggerFrame)
- m_DebuggerFrame->Refresh();
+ m_DebuggerFrame->Update();
}
-void DSPDebuggerLLE::Refresh()
+void DSPDebuggerLLE::Update()
{
#if defined __WXGTK__
if (!wxIsMainThread())
diff --git a/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.h b/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.h
index 95bd3b4286..0e4feccef2 100644
--- a/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.h
+++ b/Source/Core/DolphinWX/Src/Debugger/DSPDebugWindow.h
@@ -50,7 +50,7 @@ public:
DSPDebuggerLLE(wxWindow *parent, wxWindowID id = wxID_ANY);
virtual ~DSPDebuggerLLE();
- void Refresh();
+ void Update();
private:
DECLARE_EVENT_TABLE();
diff --git a/Source/Core/DolphinWX/Src/FifoPlayerDlg.cpp b/Source/Core/DolphinWX/Src/FifoPlayerDlg.cpp
index 4579af762a..b5caf139d6 100644
--- a/Source/Core/DolphinWX/Src/FifoPlayerDlg.cpp
+++ b/Source/Core/DolphinWX/Src/FifoPlayerDlg.cpp
@@ -624,7 +624,6 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
int cmd = *objectdata++;
int stream_size = Common::swap16(objectdata);
objectdata += 2;
- int vertex_size = (objectdata_end - objectdata) / stream_size;
wxString newLabel = wxString::Format(wxT("%08X: %02X %04X "), obj_offset, cmd, stream_size);
if ((objectdata_end - objectdata) % stream_size) newLabel += _("NOTE: Stream size doesn't match actual data length\n");
while (objectdata < objectdata_end)
diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp
index 6b0e7b7678..c9408203ea 100644
--- a/Source/Core/DolphinWX/Src/Frame.cpp
+++ b/Source/Core/DolphinWX/Src/Frame.cpp
@@ -26,7 +26,6 @@
#include "Common.h" // Common
#include "FileUtil.h"
#include "Timer.h"
-#include "Setup.h"
#include "Globals.h" // Local
#include "Frame.h"
@@ -72,30 +71,7 @@ extern "C" {
};
-// Windows functions. Setting the cursor with wxSetCursor() did not work in
-// this instance. Probably because it's somehow reset from the WndProc() in
-// the child window
#ifdef _WIN32
-// Declare a blank icon and one that will be the normal cursor
-HCURSOR hCursor = NULL, hCursorBlank = NULL;
-
-// Create the default cursor
-void CreateCursor()
-{
- hCursor = LoadCursor( NULL, IDC_ARROW );
-}
-
-void MSWSetCursor(bool Show)
-{
- if(Show)
- SetCursor(hCursor);
- else
- {
- SetCursor(hCursorBlank);
- //wxSetCursor(wxCursor(wxNullCursor));
- }
-}
-
// I could not use FindItemByHWND() instead of this, it crashed on that occation I used it */
HWND MSWGetParent_(HWND Parent)
{
@@ -134,10 +110,11 @@ CPanel::CPanel(
case WM_USER_SETCURSOR:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
- main_frame->RendererHasFocus() && Core::GetState() == Core::CORE_RUN)
- MSWSetCursor(!SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor);
+ main_frame->RendererHasFocus() && Core::GetState() == Core::CORE_RUN &&
+ SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
+ SetCursor(wxCURSOR_BLANK);
else
- MSWSetCursor(true);
+ SetCursor(wxNullCursor);
break;
case WIIMOTE_DISCONNECT:
@@ -244,6 +221,8 @@ EVT_MENU(IDM_PLAYRECORD, CFrame::OnPlayRecording)
EVT_MENU(IDM_RECORDEXPORT, CFrame::OnRecordExport)
EVT_MENU(IDM_RECORDREADONLY, CFrame::OnRecordReadOnly)
EVT_MENU(IDM_TASINPUT, CFrame::OnTASInput)
+EVT_MENU(IDM_TOGGLE_PAUSEMOVIE, CFrame::OnTogglePauseMovie)
+EVT_MENU(IDM_SHOWLAG, CFrame::OnShowLag)
EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)
@@ -434,9 +413,7 @@ CFrame::CFrame(wxFrame* parent,
// Commit
m_Mgr->Update();
- // Create cursors
#ifdef _WIN32
- CreateCursor();
SetToolTip(wxT(""));
GetToolTip()->SetAutoPop(25000);
#endif
@@ -456,13 +433,6 @@ CFrame::CFrame(wxFrame* parent,
// Update controls
UpdateGUI();
-
- // If we are rerecording create the status bar now instead of later when a game starts
- #ifdef RERECORDING
- ModifyStatusBar();
- // It's to early for the OnHostMessage(), we will update the status when Ctrl or Space is pressed
- //Core::WriteStatus();
- #endif
}
// Destructor
CFrame::~CFrame()
@@ -500,20 +470,6 @@ void CFrame::OnActive(wxActivateEvent& event)
{
if (event.GetActive() && event.GetEventObject() == m_RenderFrame)
{
- // 32x32, 8bpp b/w image
- // We want all transparent, so we can just use the same buffer for
- // the "image" as for the transparency mask
- static const char cursor_data[32 * 32] = { 0 };
-
-#ifdef __WXGTK__
- wxCursor cursor_transparent = wxCursor(cursor_data, 32, 32, 6, 14,
- cursor_data, wxWHITE, wxBLACK);
-#else
- wxBitmap cursor_bitmap(cursor_data, 32, 32);
- cursor_bitmap.SetMask(new wxMask(cursor_bitmap));
- wxCursor cursor_transparent = wxCursor(cursor_bitmap.ConvertToImage());
-#endif
-
#ifdef __WXMSW__
::SetFocus((HWND)m_RenderParent->GetHandle());
#else
@@ -522,7 +478,7 @@ void CFrame::OnActive(wxActivateEvent& event)
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
Core::GetState() == Core::CORE_RUN)
- m_RenderParent->SetCursor(cursor_transparent);
+ m_RenderParent->SetCursor(wxCURSOR_BLANK);
}
else
{
@@ -652,12 +608,12 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
}
break;
-#ifdef __WXGTK__
case WM_USER_CREATE:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
break;
+#ifdef __WXGTK__
case IDM_PANIC:
{
wxString caption = event.GetString().BeforeFirst(':');
diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h
index 770d459220..8c8285f842 100644
--- a/Source/Core/DolphinWX/Src/Frame.h
+++ b/Source/Core/DolphinWX/Src/Frame.h
@@ -297,6 +297,8 @@ private:
void OnRecordExport(wxCommandEvent& event);
void OnRecordReadOnly(wxCommandEvent& event);
void OnTASInput(wxCommandEvent& event);
+ void OnTogglePauseMovie(wxCommandEvent& event);
+ void OnShowLag(wxCommandEvent& event);
void OnChangeDisc(wxCommandEvent& event);
void OnScreenshot(wxCommandEvent& event);
void OnActive(wxActivateEvent& event);
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index 86cd372f51..fa326adecc 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -27,9 +27,6 @@ window handle that is returned by CreateWindow() can be accessed from
Core::GetWindowHandle().
*/
-
-#include "Setup.h" // Common
-
#include "NetWindow.h"
#include "Common.h" // Common
#include "FileUtil.h"
@@ -142,9 +139,13 @@ void CFrame::CreateMenu()
emulationMenu->Append(IDM_RECORDEXPORT, GetMenuLabel(HK_EXPORT_RECORDING));
emulationMenu->Append(IDM_RECORDREADONLY, GetMenuLabel(HK_READ_ONLY_MODE), wxEmptyString, wxITEM_CHECK);
emulationMenu->Append(IDM_TASINPUT, _("TAS Input"));
+ emulationMenu->AppendCheckItem(IDM_TOGGLE_PAUSEMOVIE, _("Pause at end of movie"));
+ emulationMenu->Check(IDM_TOGGLE_PAUSEMOVIE, SConfig::GetInstance().m_PauseMovie);
+ emulationMenu->AppendCheckItem(IDM_SHOWLAG, _("Show lag counter"));
+ emulationMenu->Check(IDM_SHOWLAG, SConfig::GetInstance().m_ShowLag);
emulationMenu->Check(IDM_RECORDREADONLY, true);
emulationMenu->AppendSeparator();
-
+
emulationMenu->Append(IDM_FRAMESTEP, GetMenuLabel(HK_FRAME_ADVANCE), wxEmptyString);
wxMenu *skippingMenu = new wxMenu;
@@ -702,6 +703,18 @@ void CFrame::OnTASInput(wxCommandEvent& event)
g_TASInputDlg->Show(true);
}
+void CFrame::OnTogglePauseMovie(wxCommandEvent& WXUNUSED (event))
+{
+ SConfig::GetInstance().m_PauseMovie = !SConfig::GetInstance().m_PauseMovie;
+ SConfig::GetInstance().SaveSettings();
+}
+
+void CFrame::OnShowLag(wxCommandEvent& WXUNUSED (event))
+{
+ SConfig::GetInstance().m_ShowLag = !SConfig::GetInstance().m_ShowLag;
+ SConfig::GetInstance().SaveSettings();
+}
+
void CFrame::OnFrameStep(wxCommandEvent& event)
{
bool wasPaused = (Core::GetState() == Core::CORE_PAUSE);
@@ -732,7 +745,7 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
}
for (int i = 0; i < 4; i++) {
- if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER)
+ if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER || SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA)
controllers |= (1 << i);
if (g_wiimote_sources[i] != WIIMOTE_SRC_NONE)
@@ -1042,27 +1055,14 @@ void CFrame::DoPause()
{
Core::SetState(Core::CORE_PAUSE);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
- m_RenderParent->SetCursor(wxCURSOR_ARROW);
+ m_RenderParent->SetCursor(wxNullCursor);
}
else
{
- // 32x32, 8bpp b/w image
- // We want all transparent, so we can just use the same buffer for
- // the "image" as for the transparency mask
- static const char cursor_data[32 * 32] = { 0 };
-#ifdef __WXGTK__
- wxCursor cursor_transparent = wxCursor(cursor_data, 32, 32, 6, 14,
- cursor_data, wxWHITE, wxBLACK);
-#else
- wxBitmap cursor_bitmap(cursor_data, 32, 32);
- cursor_bitmap.SetMask(new wxMask(cursor_bitmap));
- wxCursor cursor_transparent = wxCursor(cursor_bitmap.ConvertToImage());
-#endif
-
Core::SetState(Core::CORE_RUN);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
RendererHasFocus())
- m_RenderParent->SetCursor(cursor_transparent);
+ m_RenderParent->SetCursor(wxCURSOR_BLANK);
}
UpdateGUI();
}
@@ -1138,7 +1138,7 @@ void CFrame::DoStop()
wxMouseEventHandler(CFrame::OnMouse),
(wxObject*)0, this);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
- m_RenderParent->SetCursor(wxCURSOR_ARROW);
+ m_RenderParent->SetCursor(wxNullCursor);
DoFullscreen(false);
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
m_RenderFrame->Destroy();
@@ -1307,9 +1307,8 @@ void CFrame::StatusBarMessage(const char * Text, ...)
const int MAX_BYTES = 1024*10;
char Str[MAX_BYTES];
va_list ArgPtr;
- int Cnt;
va_start(ArgPtr, Text);
- Cnt = vsnprintf(Str, MAX_BYTES, Text, ArgPtr);
+ vsnprintf(Str, MAX_BYTES, Text, ArgPtr);
va_end(ArgPtr);
if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(wxString::FromAscii(Str),0);
diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp
index e95558fc65..414138d41f 100644
--- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp
@@ -51,6 +51,7 @@
size_t CGameListCtrl::m_currentItem = 0;
size_t CGameListCtrl::m_numberItem = 0;
std::string CGameListCtrl::m_currentFilename;
+bool sorted = false;
static int CompareGameListItems(const GameListItem* iso1, const GameListItem* iso2,
long sortData = CGameListCtrl::COLUMN_TITLE)
@@ -284,6 +285,7 @@ void CGameListCtrl::Update()
InitBitmaps();
// add columns
+ InsertColumn(COLUMN_DUMMY,_T(""));
InsertColumn(COLUMN_PLATFORM, _T(""));
InsertColumn(COLUMN_BANNER, _("Banner"));
InsertColumn(COLUMN_TITLE, _("Title"));
@@ -303,6 +305,7 @@ void CGameListCtrl::Update()
#endif
// set initial sizes for columns
+ SetColumnWidth(COLUMN_DUMMY,0);
SetColumnWidth(COLUMN_PLATFORM, 35 + platform_padding);
SetColumnWidth(COLUMN_BANNER, 96 + platform_padding);
SetColumnWidth(COLUMN_TITLE, 200 + platform_padding);
@@ -320,9 +323,14 @@ void CGameListCtrl::Update()
// Sort items by Title
wxListEvent event;
- event.m_col = COLUMN_TITLE; last_column = 0;
+ event.m_col = SConfig::GetInstance().m_ListSort2;
+ last_column = 1;
OnColumnClick(event);
+ event.m_col = SConfig::GetInstance().m_ListSort;
+ OnColumnClick(event);
+ sorted = true;
+
SetColumnWidth(COLUMN_SIZE, wxLIST_AUTOSIZE);
}
else
@@ -414,9 +422,11 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
GameListItem& rISOFile = *m_ISOFiles[_Index];
m_gamePath.append(rISOFile.GetFileName() + '\n');
- // Insert a first row with the platform image, that will be used as the Index
- long ItemIndex = InsertItem(_Index, wxEmptyString,
- m_PlatformImageIndex[rISOFile.GetPlatform()]);
+ // Insert a first row with nothing in it, that will be used as the Index
+ long ItemIndex = InsertItem(_Index, wxEmptyString);
+
+ // Insert the platform's image in the first (visible) column
+ SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.GetPlatform()]);
if (rISOFile.GetImage().IsOk())
ImageIndex = m_imageListSmall->Add(rISOFile.GetImage());
@@ -652,7 +662,11 @@ void CGameListCtrl::ScanForISOs()
for (std::vector::const_iterator iter = drives.begin(); iter != drives.end(); ++iter)
{
+ #ifdef __APPLE__
std::auto_ptr gli(new GameListItem(*iter));
+ #else
+ std::unique_ptr gli(new GameListItem(*iter));
+ #endif
if (gli->IsValid())
m_ISOFiles.push_back(gli.release());
@@ -698,16 +712,19 @@ void CGameListCtrl::OnColumnClick(wxListEvent& event)
{
int current_column = event.GetColumn();
- if(last_column == current_column)
+ if (last_column == current_column)
{
last_sort = -last_sort;
}
else
{
+ if (sorted)
+ SConfig::GetInstance().m_ListSort2 = last_sort;
last_column = current_column;
last_sort = current_column;
}
-
+ if (sorted)
+ SConfig::GetInstance().m_ListSort = last_sort;
caller = this;
SortItems(wxListCompare, last_sort);
}
diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.h b/Source/Core/DolphinWX/Src/GameListCtrl.h
index 274cfdb7ee..5d97c12724 100644
--- a/Source/Core/DolphinWX/Src/GameListCtrl.h
+++ b/Source/Core/DolphinWX/Src/GameListCtrl.h
@@ -57,7 +57,8 @@ public:
enum
{
- COLUMN_PLATFORM = 0,
+ COLUMN_DUMMY = 0,
+ COLUMN_PLATFORM,
COLUMN_BANNER,
COLUMN_TITLE,
COLUMN_NOTES,
diff --git a/Source/Core/DolphinWX/Src/Globals.h b/Source/Core/DolphinWX/Src/Globals.h
index 8089a2622c..36a37de6cc 100644
--- a/Source/Core/DolphinWX/Src/Globals.h
+++ b/Source/Core/DolphinWX/Src/Globals.h
@@ -80,6 +80,8 @@ enum
IDM_RECORDEXPORT,
IDM_RECORDREADONLY,
IDM_TASINPUT,
+ IDM_TOGGLE_PAUSEMOVIE,
+ IDM_SHOWLAG,
IDM_FRAMESTEP,
IDM_SCREENSHOT,
IDM_BROWSE,
diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp
index 9734e97131..a3d3761e62 100644
--- a/Source/Core/DolphinWX/Src/ISOFile.cpp
+++ b/Source/Core/DolphinWX/Src/ISOFile.cpp
@@ -285,7 +285,7 @@ bool GameListItem::GetName(std::wstring& wName, int index) const
index++;
if ((index >=0) && (index < 10))
{
- if (m_wNames.size() > index)
+ if (m_wNames.size() > (size_t)index)
{
wName = m_wNames[index];
return true;
diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp
index f004989055..61139d985f 100644
--- a/Source/Core/DolphinWX/Src/ISOProperties.cpp
+++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp
@@ -687,14 +687,13 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolder, const int partitionNum)
{
char exportName[512];
- u32 index[2] = {0, 0}, offsetShift = 0;
+ u32 index[2] = {0, 0};
std::vector fst;
DiscIO::IFileSystem *FS = 0;
if (DiscIO::IsVolumeWiiDisc(OpenISO))
{
FS = WiiDisc.at(partitionNum).FileSystem;
- offsetShift = 2;
}
else
FS = pFileSystem;
diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp
index d38c90e07f..a5b19eca4c 100644
--- a/Source/Core/DolphinWX/Src/Main.cpp
+++ b/Source/Core/DolphinWX/Src/Main.cpp
@@ -28,7 +28,6 @@
#include "CPUDetect.h"
#include "IniFile.h"
#include "FileUtil.h"
-#include "Setup.h"
#include "Host.h" // Core
#include "HW/Wiimote.h"
@@ -116,37 +115,37 @@ bool DolphinApp::OnInit()
{
{
wxCMD_LINE_SWITCH, "h", "help",
- _("Show this help message"),
+ "Show this help message",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
},
{
wxCMD_LINE_SWITCH, "d", "debugger",
- _("Opens the debugger"),
+ "Opens the debugger",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_SWITCH, "l", "logger",
- _("Opens the logger"),
+ "Opens the logger",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, "e", "exec",
- _("Loads the specified file (DOL,ELF,GCM,ISO,WAD)"),
+ "Loads the specified file (DOL,ELF,GCM,ISO,WAD)",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_SWITCH, "b", "batch",
- _("Exit Dolphin with emulator"),
+ "Exit Dolphin with emulator",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, "V", "video_backend",
- _("Specify a video backend"),
+ "Specify a video backend",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, "A", "audio_emulation",
- _("Low level (LLE) or high level (HLE) audio"),
+ "Low level (LLE) or high level (HLE) audio",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
@@ -167,7 +166,6 @@ bool DolphinApp::OnInit()
BatchMode = parser.Found(wxT("batch"));
selectVideoBackend = parser.Found(wxT("video_backend"),
&videoBackendName);
- // TODO: This currently has no effect. Implement or delete.
selectAudioEmulation = parser.Found(wxT("audio_emulation"),
&audioEmulationName);
#endif // wxUSE_CMDLINE_PARSER
@@ -237,6 +235,14 @@ bool DolphinApp::OnInit()
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
std::string(videoBackendName.mb_str());
+ if (selectAudioEmulation)
+ {
+ if (audioEmulationName == "HLE")
+ SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = true;
+ else if (audioEmulationName == "LLE")
+ SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = false;
+ }
+
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
// Enable the PNG image handler for screenshots
diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.cpp b/Source/Core/DolphinWX/Src/TASInputDlg.cpp
index e566068ff1..b4f4c77397 100644
--- a/Source/Core/DolphinWX/Src/TASInputDlg.cpp
+++ b/Source/Core/DolphinWX/Src/TASInputDlg.cpp
@@ -751,7 +751,6 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event)
return;
}
- wxPoint ptM(event.GetPosition());
*x = 128;
*y = 128;
diff --git a/Source/Core/DolphinWX/Src/VideoConfigDiag.h b/Source/Core/DolphinWX/Src/VideoConfigDiag.h
index e6b13a4092..c7a19c6cb8 100644
--- a/Source/Core/DolphinWX/Src/VideoConfigDiag.h
+++ b/Source/Core/DolphinWX/Src/VideoConfigDiag.h
@@ -112,7 +112,7 @@ protected:
void Event_ProgressiveScan(wxCommandEvent &ev)
{
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", ev.GetInt());
- SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive = ev.GetInt();
+ SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive = ev.IsChecked();
ev.Skip();
}
diff --git a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h
index faa17dff2e..2b2e60de4a 100644
--- a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h
+++ b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h
@@ -61,7 +61,7 @@ public:
}
void OnReconnectOnLoad(wxCommandEvent& event)
{
- SConfig::GetInstance().m_WiimoteReconnectOnLoad = event.GetInt();
+ SConfig::GetInstance().m_WiimoteReconnectOnLoad = event.IsChecked();
event.Skip();
}
diff --git a/Source/Core/DolphinWX/Src/X11Utils.cpp b/Source/Core/DolphinWX/Src/X11Utils.cpp
index fe4cd70829..da21c41cb2 100644
--- a/Source/Core/DolphinWX/Src/X11Utils.cpp
+++ b/Source/Core/DolphinWX/Src/X11Utils.cpp
@@ -225,7 +225,7 @@ void XRRConfiguration::Update()
}
else
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
- "%a[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
+ "%m[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
for (int i = 0; i < screenResources->noutput; i++)
{
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
index 450080bfd2..c2030a059d 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
@@ -1,5 +1,7 @@
#include "Xlib.h"
+#include
+
namespace ciface
{
namespace Xlib
@@ -93,7 +95,7 @@ KeyboardMouse::Key::Key(Display* const display, KeyCode keycode, const char* key
KeySym keysym = 0;
do
{
- keysym = XKeycodeToKeysym(m_display, keycode, i);
+ keysym = XkbKeycodeToKeysym(m_display, keycode, i, 0);
i++;
}
while (keysym == NoSymbol && i < 8);
diff --git a/Source/Core/VideoCommon/Src/DLCache.cpp b/Source/Core/VideoCommon/Src/DLCache.cpp
index 5499fa26f1..c828ea3a03 100644
--- a/Source/Core/VideoCommon/Src/DLCache.cpp
+++ b/Source/Core/VideoCommon/Src/DLCache.cpp
@@ -361,9 +361,9 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
(cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT,
numVertices);
num_draw_call++;
- const int tc[12] = {
+ const u32 tc[12] = {
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
- g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const int)((g_VtxDesc.Hex >> 31) & 3)
+ g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3)
};
for(int i = 0; i < 12; i++)
{
@@ -563,9 +563,9 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
dl->InsertRegion(NewRegion);
memcpy(NewRegion->start_address, StartAddress, Vdatasize);
emitter.ABI_CallFunctionCCCP((void *)&VertexLoaderManager::RunCompiledVertices, cmd_byte & GX_VAT_MASK, (cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, numVertices, NewRegion->start_address);
- const int tc[12] = {
+ const u32 tc[12] = {
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
- g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const int)((g_VtxDesc.Hex >> 31) & 3)
+ g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3)
};
for(int i = 0; i < 12; i++)
{
diff --git a/Source/Core/VideoCommon/Src/Debugger.h b/Source/Core/VideoCommon/Src/Debugger.h
index bcce50f223..fde31e4268 100644
--- a/Source/Core/VideoCommon/Src/Debugger.h
+++ b/Source/Core/VideoCommon/Src/Debugger.h
@@ -72,21 +72,9 @@ void GFXDebuggerCheckAndPause(bool update);
void GFXDebuggerToPause(bool update);
void GFXDebuggerUpdateScreen();
-#undef ENABLE_GFX_DEBUGGER
-#if defined(_DEBUG) || defined(DEBUGFAST)
-#define ENABLE_GFX_DEBUGGER
-#endif
-
-#ifdef ENABLE_GFX_DEBUGGER
#define GFX_DEBUGGER_PAUSE_AT(event,update) {if (((GFXDebuggerToPauseAtNext & event) && --GFXDebuggerEventToPauseCount<=0) || GFXDebuggerPauseFlag) GFXDebuggerToPause(update);}
#define GFX_DEBUGGER_PAUSE_LOG_AT(event,update,dumpfunc) {if (((GFXDebuggerToPauseAtNext & event) && --GFXDebuggerEventToPauseCount<=0) || GFXDebuggerPauseFlag) {{dumpfunc};GFXDebuggerToPause(update);}}
#define GFX_DEBUGGER_LOG_AT(event,dumpfunc) {if (( GFXDebuggerToPauseAtNext & event ) ) {{dumpfunc};}}
-#else
-// Disable debugging calls in Release build
-#define GFX_DEBUGGER_PAUSE_AT(event,update)
-#define GFX_DEBUGGER_PAUSE_LOG_AT(event,update,dumpfunc)
-#define GFX_DEBUGGER_LOG_AT(event,dumpfunc)
-#endif // ENABLE_GFX_DEBUGGER
#endif // _GFX_DEBUGGER_H_
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp
index 565684297a..50aa21ebbf 100644
--- a/Source/Core/VideoCommon/Src/Fifo.cpp
+++ b/Source/Core/VideoCommon/Src/Fifo.cpp
@@ -16,7 +16,6 @@
// http://code.google.com/p/dolphin-emu/
#include "VideoConfig.h"
-#include "Setup.h"
#include "MemoryUtil.h"
#include "Thread.h"
#include "Atomic.h"
diff --git a/Source/Core/VideoCommon/Src/FramebufferManagerBase.cpp b/Source/Core/VideoCommon/Src/FramebufferManagerBase.cpp
index b234a7c865..c883714daf 100644
--- a/Source/Core/VideoCommon/Src/FramebufferManagerBase.cpp
+++ b/Source/Core/VideoCommon/Src/FramebufferManagerBase.cpp
@@ -10,6 +10,9 @@ XFBSourceBase *FramebufferManagerBase::m_realXFBSource; // Only used in Real XFB
FramebufferManagerBase::VirtualXFBListType FramebufferManagerBase::m_virtualXFBList; // Only used in Virtual XFB mode
const XFBSourceBase* FramebufferManagerBase::m_overlappingXFBArray[MAX_VIRTUAL_XFB];
+unsigned int FramebufferManagerBase::s_last_xfb_width = 1;
+unsigned int FramebufferManagerBase::s_last_xfb_height = 1;
+
FramebufferManagerBase::FramebufferManagerBase()
{
m_realXFBSource = NULL;
@@ -226,3 +229,31 @@ void FramebufferManagerBase::ReplaceVirtualXFB()
}
}
}
+
+int FramebufferManagerBase::ScaleToVirtualXfbWidth(int x, unsigned int backbuffer_width)
+{
+ if (g_ActiveConfig.RealXFBEnabled())
+ return x;
+
+ if (g_ActiveConfig.b3DVision)
+ {
+ // This works, yet the version in the else doesn't. No idea why.
+ return x * (int)backbuffer_width / (int)FramebufferManagerBase::LastXfbWidth();
+ }
+ else
+ return x * (int)Renderer::GetTargetRectangle().GetWidth() / (int)FramebufferManagerBase::LastXfbWidth();
+}
+
+int FramebufferManagerBase::ScaleToVirtualXfbHeight(int y, unsigned int backbuffer_height)
+{
+ if (g_ActiveConfig.RealXFBEnabled())
+ return y;
+
+ if (g_ActiveConfig.b3DVision)
+ {
+ // This works, yet the version in the else doesn't. No idea why.
+ return y * (int)backbuffer_height / (int)FramebufferManagerBase::LastXfbHeight();
+ }
+ else
+ return y * (int)Renderer::GetTargetRectangle().GetHeight() / (int)FramebufferManagerBase::LastXfbHeight();
+}
diff --git a/Source/Core/VideoCommon/Src/FramebufferManagerBase.h b/Source/Core/VideoCommon/Src/FramebufferManagerBase.h
index 26d360647d..e529bb1a39 100644
--- a/Source/Core/VideoCommon/Src/FramebufferManagerBase.h
+++ b/Source/Core/VideoCommon/Src/FramebufferManagerBase.h
@@ -50,6 +50,14 @@ public:
static void CopyToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc,float Gamma);
static const XFBSourceBase* const* GetXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount);
+ static void SetLastXfbWidth(unsigned int width) { s_last_xfb_width = width; }
+ static void SetLastXfbHeight(unsigned int height) { s_last_xfb_height = height; }
+ static unsigned int LastXfbWidth() { return s_last_xfb_width; }
+ static unsigned int LastXfbHeight() { return s_last_xfb_height; }
+
+ static int ScaleToVirtualXfbWidth(int x, unsigned int backbuffer_width);
+ static int ScaleToVirtualXfbHeight(int y, unsigned int backbuffer_height);
+
protected:
struct VirtualXFB
{
@@ -85,6 +93,9 @@ private:
static VirtualXFBListType m_virtualXFBList; // Only used in Virtual XFB mode
static const XFBSourceBase* m_overlappingXFBArray[MAX_VIRTUAL_XFB];
+
+ static unsigned int s_last_xfb_width;
+ static unsigned int s_last_xfb_height;
};
extern FramebufferManagerBase *g_framebuffer_manager;
diff --git a/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp b/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp
index f24bfc31b3..10cf5b84af 100644
--- a/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp
+++ b/Source/Core/VideoCommon/Src/OnScreenDisplay.cpp
@@ -19,6 +19,7 @@
#include "Common.h"
+#include "ConfigManager.h"
#include "OnScreenDisplay.h"
#include "RenderBase.h"
#include "Timer.h"
@@ -47,6 +48,8 @@ void AddMessage(const char* pstr, u32 ms)
void DrawMessages()
{
+ if(!SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages) return;
+
if (s_listMsgs.size() > 0)
{
int left = 25, top = 15;
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index bc7a12304f..cc48276253 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -129,15 +129,11 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo
return;
}
+ // numtexgens should be <= 8
for (unsigned int i = 0; i < bpmem.genMode.numtexgens; ++i)
- {
- if (18+i < 32)
- uid->values[0] |= xfregs.texMtxInfo[i].projection << (18+i); // 1
- else
- uid->values[1] |= xfregs.texMtxInfo[i].projection << (i - 14); // 1
- }
+ uid->values[0] |= xfregs.texMtxInfo[i].projection << (18+i); // 1
- uid->values[1] = bpmem.genMode.numindstages << 2; // 3
+ uid->values[1] = bpmem.genMode.numindstages; // 3
u32 indirectStagesUsed = 0;
for (unsigned int i = 0; i < bpmem.genMode.numindstages; ++i)
if (bpmem.tevind[i].IsActive() && bpmem.tevind[i].bt < bpmem.genMode.numindstages)
@@ -145,20 +141,20 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo
assert(indirectStagesUsed == (indirectStagesUsed & 0xF));
- uid->values[1] |= indirectStagesUsed << 5; // 4;
+ uid->values[1] |= indirectStagesUsed << 3; // 4;
for (unsigned int i = 0; i < bpmem.genMode.numindstages; ++i)
{
if (indirectStagesUsed & (1 << i))
{
- uid->values[1] |= (bpmem.tevindref.getTexCoord(i) < bpmem.genMode.numtexgens) << (9 + 3*i); // 1
+ uid->values[1] |= (bpmem.tevindref.getTexCoord(i) < bpmem.genMode.numtexgens) << (7 + 3*i); // 1
if (bpmem.tevindref.getTexCoord(i) < bpmem.genMode.numtexgens)
- uid->values[1] |= bpmem.tevindref.getTexCoord(i) << (10 + 3*i); // 2
+ uid->values[1] |= bpmem.tevindref.getTexCoord(i) << (8 + 3*i); // 2
}
}
u32* ptr = &uid->values[2];
- for (unsigned int i = 0; i < bpmem.genMode.numtevstages+1; ++i)
+ for (int i = 0; i < bpmem.genMode.numtevstages+1; ++i)
{
StageHash(i, ptr);
ptr += 4; // max: ptr = &uid->values[66]
@@ -626,7 +622,6 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
}
WRITE(p, " ) {\n");
- char* pmainstart = p;
int Pretest = AlphaPreTest();
if(Pretest >= 0 && !DepthTextureEnable)
{
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
index 1533f9348e..f195cd805b 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
@@ -302,6 +302,7 @@ void PixelShaderManager::SetConstants()
float GC_ALIGNED16(material[4]);
float NormalizationCoef = 1 / 255.0f;
+ // TODO: This code is wrong. i goes out of range for xfregs.ambColor.
for (int i = 0; i < 4; ++i)
{
if (nMaterialsChanged & (1 << i))
diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp
index 0bd1c89118..577570c568 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.cpp
+++ b/Source/Core/VideoCommon/Src/RenderBase.cpp
@@ -67,12 +67,7 @@ int Renderer::s_target_height;
int Renderer::s_backbuffer_width;
int Renderer::s_backbuffer_height;
-// ratio of backbuffer size and render area size
-float Renderer::xScale;
-float Renderer::yScale;
-
-unsigned int Renderer::s_XFB_width;
-unsigned int Renderer::s_XFB_height;
+TargetRectangle Renderer::target_rc;
int Renderer::s_LastEFBScale;
@@ -81,6 +76,11 @@ bool Renderer::XFBWrited;
bool Renderer::s_EnableDLCachingAfterRecording;
unsigned int Renderer::prev_efb_format = (unsigned int)-1;
+unsigned int Renderer::efb_scale_numeratorX = 1;
+unsigned int Renderer::efb_scale_numeratorY = 1;
+unsigned int Renderer::efb_scale_denominatorX = 1;
+unsigned int Renderer::efb_scale_denominatorY = 1;
+unsigned int Renderer::ssaa_multiplier = 1;
Renderer::Renderer() : frame_data(NULL), bLastFrameDumped(false)
@@ -98,6 +98,8 @@ Renderer::~Renderer()
// invalidate previous efb format
prev_efb_format = (unsigned int)-1;
+ efb_scale_numeratorX = efb_scale_numeratorY = efb_scale_denominatorX = efb_scale_denominatorY = ssaa_multiplier = 1;
+
#if defined _WIN32 || defined HAVE_LIBAV
if (g_ActiveConfig.bDumpFrames && bLastFrameDumped && bAVIDumping)
AVIDump::Stop();
@@ -121,64 +123,117 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
XFBWrited = true;
- // XXX: Without the VI, how would we know what kind of field this is? So
- // just use progressive.
if (g_ActiveConfig.bUseXFB)
{
FramebufferManagerBase::CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc,Gamma);
}
else
{
+ // XXX: Without the VI, how would we know what kind of field this is? So
+ // just use progressive.
g_renderer->Swap(xfbAddr, FIELD_PROGRESSIVE, fbWidth, fbHeight,sourceRc,Gamma);
Common::AtomicStoreRelease(s_swapRequested, false);
}
}
-void Renderer::CalculateTargetScale(int x, int y, int &scaledX, int &scaledY)
+int Renderer::EFBToScaledX(int x)
{
switch (g_ActiveConfig.iEFBScale)
{
- case 3: // 1.5x
- scaledX = (x / 2) * 3;
- scaledY = (y / 2) * 3;
- break;
- case 4: // 2x
- scaledX = x * 2;
- scaledY = y * 2;
- break;
- case 5: // 2.5x
- scaledX = (x / 2) * 5;
- scaledY = (y / 2) * 5;
- break;
- case 6: // 3x
- scaledX = x * 3;
- scaledY = y * 3;
- break;
- case 7: // 4x
- scaledX = x * 4;
- scaledY = y * 4;
- break;
+ case 0: // fractional
+ return (int)ssaa_multiplier * FramebufferManagerBase::ScaleToVirtualXfbWidth(x, s_backbuffer_width);
+
default:
- scaledX = x;
- scaledY = y;
- break;
+ return x * (int)ssaa_multiplier * (int)efb_scale_numeratorX / (int)efb_scale_denominatorX;
};
}
+int Renderer::EFBToScaledY(int y)
+{
+ switch (g_ActiveConfig.iEFBScale)
+ {
+ case 0: // fractional
+ return (int)ssaa_multiplier * FramebufferManagerBase::ScaleToVirtualXfbHeight(y, s_backbuffer_height);
+
+ default:
+ return y * (int)ssaa_multiplier * (int)efb_scale_numeratorY / (int)efb_scale_denominatorY;
+ };
+}
+
+void Renderer::CalculateTargetScale(int x, int y, int &scaledX, int &scaledY)
+{
+ if (g_ActiveConfig.iEFBScale == 0 || g_ActiveConfig.iEFBScale == 1)
+ {
+ scaledX = x;
+ scaledY = y;
+ }
+ else
+ {
+ scaledX = x * (int)efb_scale_numeratorX / (int)efb_scale_denominatorX;
+ scaledY = y * (int)efb_scale_numeratorY / (int)efb_scale_denominatorY;
+ }
+}
+
// return true if target size changed
-bool Renderer::CalculateTargetSize(int multiplier)
+bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, int multiplier)
{
int newEFBWidth, newEFBHeight;
+
+ // TODO: Ugly. Clean up
+ switch (s_LastEFBScale)
+ {
+ case 2: // 1x
+ efb_scale_numeratorX = efb_scale_numeratorY = 1;
+ efb_scale_denominatorX = efb_scale_denominatorY = 1;
+ break;
+
+ case 3: // 1.5x
+ efb_scale_numeratorX = efb_scale_numeratorY = 3;
+ efb_scale_denominatorX = efb_scale_denominatorY = 2;
+ break;
+
+ case 4: // 2x
+ efb_scale_numeratorX = efb_scale_numeratorY = 2;
+ efb_scale_denominatorX = efb_scale_denominatorY = 1;
+ break;
+
+ case 5: // 2.5x
+ efb_scale_numeratorX = efb_scale_numeratorY = 5;
+ efb_scale_denominatorX = efb_scale_denominatorY = 2;
+ break;
+
+ case 6: // 3x
+ efb_scale_numeratorX = efb_scale_numeratorY = 3;
+ efb_scale_denominatorX = efb_scale_denominatorY = 1;
+ break;
+
+ case 7: // 4x
+ efb_scale_numeratorX = efb_scale_numeratorY = 4;
+ efb_scale_denominatorX = efb_scale_denominatorY = 1;
+ break;
+
+ default: // fractional & integral handled later
+ break;
+ }
+
switch (s_LastEFBScale)
{
case 0: // fractional
- newEFBWidth = (int)(EFB_WIDTH * xScale);
- newEFBHeight = (int)(EFB_HEIGHT * yScale);
- break;
case 1: // integral
- newEFBWidth = EFB_WIDTH * (int)ceilf(xScale);
- newEFBHeight = EFB_HEIGHT * (int)ceilf(yScale);
+ newEFBWidth = FramebufferManagerBase::ScaleToVirtualXfbWidth(EFB_WIDTH, framebuffer_width);
+ newEFBHeight = FramebufferManagerBase::ScaleToVirtualXfbHeight(EFB_HEIGHT, framebuffer_height);
+
+ if (s_LastEFBScale == 1)
+ {
+ newEFBWidth = ((newEFBWidth-1) / EFB_WIDTH + 1) * EFB_WIDTH;
+ newEFBHeight = ((newEFBHeight-1) / EFB_HEIGHT + 1) * EFB_HEIGHT;
+ }
+ efb_scale_numeratorX = newEFBWidth;
+ efb_scale_denominatorX = EFB_WIDTH;
+ efb_scale_numeratorY = newEFBHeight;
+ efb_scale_denominatorY = EFB_HEIGHT;
break;
+
default:
CalculateTargetScale(EFB_WIDTH, EFB_HEIGHT, newEFBWidth, newEFBHeight);
break;
@@ -186,6 +241,7 @@ bool Renderer::CalculateTargetSize(int multiplier)
newEFBWidth *= multiplier;
newEFBHeight *= multiplier;
+ ssaa_multiplier = multiplier;
if (newEFBWidth != s_target_width || newEFBHeight != s_target_height)
{
@@ -311,27 +367,125 @@ void Renderer::DrawDebugText()
}
}
-void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
+// TODO: remove
+extern bool g_aspect_wide;
+
+void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height)
{
- if (g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB)
+ float FloatGLWidth = (float)backbuffer_width;
+ float FloatGLHeight = (float)backbuffer_height;
+ float FloatXOffset = 0;
+ float FloatYOffset = 0;
+
+ // The rendering window size
+ const float WinWidth = FloatGLWidth;
+ const float WinHeight = FloatGLHeight;
+
+ // Handle aspect ratio.
+ // Default to auto.
+ bool use16_9 = g_aspect_wide;
+
+ // Update aspect ratio hack values
+ // Won't take effect until next frame
+ // Don't know if there is a better place for this code so there isn't a 1 frame delay
+ if ( g_ActiveConfig.bWidescreenHack )
{
- xScale = 1.0f;
- yScale = 1.0f;
- }
- else
- {
- if (g_ActiveConfig.b3DVision)
+ float source_aspect = use16_9 ? (16.0f / 9.0f) : (4.0f / 3.0f);
+ float target_aspect;
+
+ switch ( g_ActiveConfig.iAspectRatio )
{
- // This works, yet the version in the else doesn't. No idea why.
- xScale = (float)(s_backbuffer_width-1) / (float)(s_XFB_width-1);
- yScale = (float)(s_backbuffer_height-1) / (float)(s_XFB_height-1);
+ case ASPECT_FORCE_16_9 :
+ target_aspect = 16.0f / 9.0f;
+ break;
+ case ASPECT_FORCE_4_3 :
+ target_aspect = 4.0f / 3.0f;
+ break;
+ case ASPECT_STRETCH :
+ target_aspect = WinWidth / WinHeight;
+ break;
+ default :
+ // ASPECT_AUTO == no hacking
+ target_aspect = source_aspect;
+ break;
+ }
+
+ float adjust = source_aspect / target_aspect;
+ if ( adjust > 1 )
+ {
+ // Vert+
+ g_Config.fAspectRatioHackW = 1;
+ g_Config.fAspectRatioHackH = 1/adjust;
}
else
{
- xScale = (float)(dst_rect.right - dst_rect.left - 1) / (float)(s_XFB_width-1);
- yScale = (float)(dst_rect.bottom - dst_rect.top - 1) / (float)(s_XFB_height-1);
+ // Hor+
+ g_Config.fAspectRatioHackW = adjust;
+ g_Config.fAspectRatioHackH = 1;
}
}
+ else
+ {
+ // Hack is disabled
+ g_Config.fAspectRatioHackW = 1;
+ g_Config.fAspectRatioHackH = 1;
+ }
+
+ // Check for force-settings and override.
+ if (g_ActiveConfig.iAspectRatio == ASPECT_FORCE_16_9)
+ use16_9 = true;
+ else if (g_ActiveConfig.iAspectRatio == ASPECT_FORCE_4_3)
+ use16_9 = false;
+
+ if (g_ActiveConfig.iAspectRatio != ASPECT_STRETCH)
+ {
+ // The rendering window aspect ratio as a proportion of the 4:3 or 16:9 ratio
+ float Ratio = (WinWidth / WinHeight) / (!use16_9 ? (4.0f / 3.0f) : (16.0f / 9.0f));
+ // Check if height or width is the limiting factor. If ratio > 1 the picture is too wide and have to limit the width.
+ if (Ratio > 1.0f)
+ {
+ // Scale down and center in the X direction.
+ FloatGLWidth /= Ratio;
+ FloatXOffset = (WinWidth - FloatGLWidth) / 2.0f;
+ }
+ // The window is too high, we have to limit the height
+ else
+ {
+ // Scale down and center in the Y direction.
+ FloatGLHeight *= Ratio;
+ FloatYOffset = FloatYOffset + (WinHeight - FloatGLHeight) / 2.0f;
+ }
+ }
+
+ // -----------------------------------------------------------------------
+ // Crop the picture from 4:3 to 5:4 or from 16:9 to 16:10.
+ // Output: FloatGLWidth, FloatGLHeight, FloatXOffset, FloatYOffset
+ // ------------------
+ if (g_ActiveConfig.iAspectRatio != ASPECT_STRETCH && g_ActiveConfig.bCrop)
+ {
+ float Ratio = !use16_9 ? ((4.0f / 3.0f) / (5.0f / 4.0f)) : (((16.0f / 9.0f) / (16.0f / 10.0f)));
+ // The width and height we will add (calculate this before FloatGLWidth and FloatGLHeight is adjusted)
+ float IncreasedWidth = (Ratio - 1.0f) * FloatGLWidth;
+ float IncreasedHeight = (Ratio - 1.0f) * FloatGLHeight;
+ // The new width and height
+ FloatGLWidth = FloatGLWidth * Ratio;
+ FloatGLHeight = FloatGLHeight * Ratio;
+ // Adjust the X and Y offset
+ FloatXOffset = FloatXOffset - (IncreasedWidth * 0.5f);
+ FloatYOffset = FloatYOffset - (IncreasedHeight * 0.5f);
+ }
+
+ int XOffset = (int)(FloatXOffset + 0.5f);
+ int YOffset = (int)(FloatYOffset + 0.5f);
+ int iWhidth = (int)ceil(FloatGLWidth);
+ int iHeight = (int)ceil(FloatGLHeight);
+ iWhidth -= iWhidth % 4; // ensure divisibility by 4 to make it compatible with all the video encoders
+ iHeight -= iHeight % 4;
+
+ target_rc.left = XOffset;
+ target_rc.top = YOffset;
+ target_rc.right = XOffset + iWhidth;
+ target_rc.bottom = YOffset + iHeight;
}
void Renderer::SetWindowSize(int width, int height)
diff --git a/Source/Core/VideoCommon/Src/RenderBase.h b/Source/Core/VideoCommon/Src/RenderBase.h
index e8d4c55a20..4da80c9752 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.h
+++ b/Source/Core/VideoCommon/Src/RenderBase.h
@@ -74,10 +74,6 @@ public:
static int GetBackbufferWidth() { return s_backbuffer_width; }
static int GetBackbufferHeight() { return s_backbuffer_height; }
- // XFB scale - TODO: Remove this and add two XFBToScaled functions instead
- static float GetXFBScaleX() { return xScale; }
- static float GetXFBScaleY() { return yScale; }
-
static void SetWindowSize(int width, int height);
// EFB coordinate conversion functions
@@ -85,9 +81,13 @@ public:
// Use this to convert a whole native EFB rect to backbuffer coordinates
virtual TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) = 0;
+ static const TargetRectangle& GetTargetRectangle() { return target_rc; }
+ static void UpdateDrawRectangle(int backbuffer_width, int backbuffer_height);
+
+
// Use this to upscale native EFB coordinates to IDEAL internal resolution
- static unsigned int EFBToScaledX(int x) { return x * GetTargetWidth() / EFB_WIDTH; }
- static unsigned int EFBToScaledY(int y) { return y * GetTargetHeight() / EFB_HEIGHT; }
+ static int EFBToScaledX(int x);
+ static int EFBToScaledY(int y);
// Floating point versions of the above - only use them if really necessary
static float EFBToScaledXf(float x) { return x * ((float)GetTargetWidth() / (float)EFB_WIDTH); }
@@ -133,8 +133,7 @@ public:
protected:
static void CalculateTargetScale(int x, int y, int &scaledX, int &scaledY);
- static bool CalculateTargetSize(int multiplier = 1);
- static void CalculateXYScale(const TargetRectangle& dst_rect);
+ static bool CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, int multiplier = 1);
static void CheckFifoRecording();
static void RecordVideoMemory();
@@ -159,12 +158,7 @@ protected:
static int s_backbuffer_width;
static int s_backbuffer_height;
- // ratio of backbuffer size and render area size - TODO: Remove these!
- static float xScale;
- static float yScale;
-
- static unsigned int s_XFB_width;
- static unsigned int s_XFB_height;
+ static TargetRectangle target_rc;
// can probably eliminate this static var
static int s_LastEFBScale;
@@ -176,6 +170,11 @@ protected:
private:
static unsigned int prev_efb_format;
+ static unsigned int efb_scale_numeratorX;
+ static unsigned int efb_scale_numeratorY;
+ static unsigned int efb_scale_denominatorX;
+ static unsigned int efb_scale_denominatorY;
+ static unsigned int ssaa_multiplier;
};
extern Renderer *g_renderer;
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
index a5c390df3d..7c47c35bb6 100644
--- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
@@ -205,8 +205,11 @@ void TextureCache::ClearRenderTargets()
tcend = textures.end();
for (; iter!=tcend; ++iter)
- if (iter->second->type != TCET_EC_DYNAMIC)
- iter->second->type = TCET_NORMAL;
+ if (iter->second->type == TCET_EC_VRAM)
+ {
+ delete iter->second;
+ textures.erase(iter++);
+ }
}
bool TextureCache::CheckForCustomTextureLODs(u64 tex_hash, int texformat, unsigned int levels)
@@ -782,7 +785,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
textures[dstAddr] = entry = g_texture_cache->CreateRenderTargetTexture(scaled_tex_w, scaled_tex_h);
// TODO: Using the wrong dstFormat, dumb...
- entry->SetGeneralParameters(dstAddr, 0, dstFormat, 0);
+ entry->SetGeneralParameters(dstAddr, 0, dstFormat, 1);
entry->SetDimensions(tex_w, tex_h, scaled_tex_w, scaled_tex_h);
entry->SetHashes(TEXHASH_INVALID);
entry->type = TCET_EC_VRAM;
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp
index fb34ce1bc1..5bffab8ee7 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp
@@ -224,14 +224,14 @@ void VertexLoader::CompileVertexTranslator()
#endif
// Colors
- const int col[2] = {m_VtxDesc.Color0, m_VtxDesc.Color1};
+ const u32 col[2] = {m_VtxDesc.Color0, m_VtxDesc.Color1};
// TextureCoord
// Since m_VtxDesc.Text7Coord is broken across a 32 bit word boundary, retrieve its value manually.
// If we didn't do this, the vertex format would be read as one bit offset from where it should be, making
// 01 become 00, and 10/11 become 01
- const int tc[8] = {
+ const u32 tc[8] = {
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
- m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const int)((m_VtxDesc.Hex >> 31) & 3)
+ m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const u32)((m_VtxDesc.Hex >> 31) & 3)
};
// Reset pipeline
@@ -770,7 +770,7 @@ void VertexLoader::AppendToString(std::string *dest) const
dest->append(StringFromFormat("Nrm: %i %s-%s ",
m_VtxAttr.NormalElements, posMode[m_VtxDesc.Normal], posFormats[m_VtxAttr.NormalFormat]));
}
- int color_mode[2] = {m_VtxDesc.Color0, m_VtxDesc.Color1};
+ u32 color_mode[2] = {m_VtxDesc.Color0, m_VtxDesc.Color1};
for (int i = 0; i < 2; i++)
{
if (color_mode[i])
@@ -778,7 +778,7 @@ void VertexLoader::AppendToString(std::string *dest) const
dest->append(StringFromFormat("C%i: %i %s-%s ", i, m_VtxAttr.color[i].Elements, posMode[color_mode[i]], colorFormat[m_VtxAttr.color[i].Comp]));
}
}
- int tex_mode[8] = {
+ u32 tex_mode[8] = {
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, m_VtxDesc.Tex7Coord
};
diff --git a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
index 316941a639..153e69a8c3 100644
--- a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
@@ -19,9 +19,12 @@
#ifdef _MSC_VER
#include
using stdext::hash_map;
-#else
+#elif defined __APPLE__
#include
using __gnu_cxx::hash_map;
+#else
+#include
+using std::unordered_map;
#endif
#include
true
@@ -129,7 +130,7 @@
..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)
- true
+ false
true
@@ -141,7 +142,8 @@
..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)
-
+ false
+
true
true
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp
index 0389085fae..cb94884eb7 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/FramebufferManager.cpp
@@ -181,15 +181,12 @@ XFBSourceBase* FramebufferManager::CreateXFBSource(unsigned int target_width, un
void FramebufferManager::GetTargetSize(unsigned int *width, unsigned int *height, const EFBRectangle& sourceRc)
{
- const float scaleX = Renderer::GetXFBScaleX();
- const float scaleY = Renderer::GetXFBScaleY();
-
TargetRectangle targetSource;
- targetSource.top = (int)(sourceRc.top *scaleY);
- targetSource.bottom = (int)(sourceRc.bottom *scaleY);
- targetSource.left = (int)(sourceRc.left *scaleX);
- targetSource.right = (int)(sourceRc.right * scaleX);
+ targetSource.top = ScaleToVirtualXfbHeight(sourceRc.top, Renderer::GetBackbufferHeight());
+ targetSource.bottom = ScaleToVirtualXfbHeight(sourceRc.bottom, Renderer::GetBackbufferHeight());
+ targetSource.left = ScaleToVirtualXfbWidth(sourceRc.left, Renderer::GetBackbufferWidth());
+ targetSource.right = ScaleToVirtualXfbWidth(sourceRc.right, Renderer::GetBackbufferWidth());
*width = targetSource.right - targetSource.left;
*height = targetSource.bottom - targetSource.top;
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
index 81efa3623f..830f16a9f6 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
@@ -16,7 +16,6 @@
// http://code.google.com/p/dolphin-emu/
#include
-#include
#include "Timer.h"
@@ -45,6 +44,8 @@
#include "BPFunctions.h"
#include "AVIDump.h"
#include "FPSCounter.h"
+#include "ConfigManager.h"
+#include
namespace DX11
{
@@ -348,17 +349,14 @@ Renderer::Renderer()
s_backbuffer_width = D3D::GetBackBufferWidth();
s_backbuffer_height = D3D::GetBackBufferHeight();
- s_XFB_width = MAX_XFB_WIDTH;
- s_XFB_height = MAX_XFB_HEIGHT;
+ FramebufferManagerBase::SetLastXfbWidth(MAX_XFB_WIDTH);
+ FramebufferManagerBase::SetLastXfbHeight(MAX_XFB_HEIGHT);
- TargetRectangle dst_rect;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
-
- CalculateXYScale(dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
s_LastAA = g_ActiveConfig.iMultisampleMode;
s_LastEFBScale = g_ActiveConfig.iEFBScale;
- CalculateTargetSize();
+ CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
SetupDeviceObjects();
@@ -901,7 +899,7 @@ void formatBufferDump(const char *in, char *out, int w, int h, int p)
// This function has the final picture. We adjust the aspect ratio here.
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
{
- if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
+ if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
{
if (g_ActiveConfig.bDumpFrames && frame_data)
AVIDump::AddFrame(frame_data);
@@ -927,13 +925,12 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
ResetAPIState();
// Prepare to copy the XFBs to our backbuffer
- TargetRectangle dst_rect;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
- int X = dst_rect.left;
- int Y = dst_rect.top;
- int Width = dst_rect.right - dst_rect.left;
- int Height = dst_rect.bottom - dst_rect.top;
+ int X = GetTargetRectangle().left;
+ int Y = GetTargetRectangle().top;
+ int Width = GetTargetRectangle().right - GetTargetRectangle().left;
+ int Height = GetTargetRectangle().bottom - GetTargetRectangle().top;
// TODO: Redundant checks...
if (X < 0) X = 0;
@@ -977,7 +974,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
MathUtil::Rectangle drawRc;
- if (g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
+ if (g_ActiveConfig.bUseRealXFB)
+ {
+ drawRc.top = 1;
+ drawRc.bottom = -1;
+ drawRc.left = -1;
+ drawRc.right = 1;
+ }
+ else
{
// use virtual xfb with offset
int xfbHeight = xfbSource->srcHeight;
@@ -998,13 +1002,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
//drawRc.left *= hScale;
//drawRc.right *= hScale;
}
- else
- {
- drawRc.top = 1;
- drawRc.bottom = -1;
- drawRc.left = -1;
- drawRc.right = 1;
- }
xfbSource->Draw(sourceRc, drawRc, 0, 0);
}
@@ -1021,7 +1018,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
// done with drawing the game stuff, good moment to save a screenshot
if (s_bScreenshot)
{
- SaveScreenshot(s_sScreenshotName, dst_rect);
+ SaveScreenshot(s_sScreenshotName, GetTargetRectangle());
s_bScreenshot = false;
}
@@ -1038,8 +1035,8 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::context->CopyResource(s_screenshot_texture, (ID3D11Resource*)D3D::GetBackBuffer()->GetTex());
if (!bLastFrameDumped)
{
- s_recordWidth = dst_rect.GetWidth();
- s_recordHeight = dst_rect.GetHeight();
+ s_recordWidth = GetTargetRectangle().GetWidth();
+ s_recordHeight = GetTargetRectangle().GetHeight();
bAVIDumping = AVIDump::Start(EmuWindow::GetParentWnd(), s_recordWidth, s_recordHeight);
if (!bAVIDumping)
{
@@ -1065,7 +1062,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
w = s_recordWidth;
h = s_recordHeight;
}
- char* source_ptr = (char*)map.pData + dst_rect.left*4 + dst_rect.top*map.RowPitch;
+ char* source_ptr = (char*)map.pData + GetTargetRectangle().left*4 + GetTargetRectangle().top*map.RowPitch;
formatBufferDump(source_ptr, frame_data, s_recordWidth, s_recordHeight, map.RowPitch);
AVIDump::AddFrame(frame_data);
D3D::context->Unmap(s_screenshot_texture, 0);
@@ -1094,11 +1091,18 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::font.DrawTextScaled(0, 0, 20, 0.0f, 0xFF00FFFF, fps);
}
+ if (SConfig::GetInstance().m_ShowLag)
+ {
+ char lag[10];
+ StringCchPrintfA(lag, 1000, "Lag: %llu\n", Movie::g_currentLagCount);
+ D3D::font.DrawTextScaled(0, 18, 20, 0.0f, 0xFF00FFFF, lag);
+ }
+
if (g_ActiveConfig.bShowInputDisplay)
{
char inputDisplay[1000];
StringCchPrintfA(inputDisplay, 1000, Movie::GetInputDisplay().c_str());
- D3D::font.DrawTextScaled(0, 30, 20, 0.0f, 0xFF00FFFF, inputDisplay);
+ D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, inputDisplay);
}
Renderer::DrawDebugText();
@@ -1106,13 +1110,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
{
char buf[32768];
Statistics::ToString(buf);
- D3D::font.DrawTextScaled(0, 30, 20, 0.0f, 0xFF00FFFF, buf);
+ D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, buf);
}
else if (g_ActiveConfig.bOverlayProjStats)
{
char buf[32768];
Statistics::ToStringProj(buf);
- D3D::font.DrawTextScaled(0, 30, 20, 0.0f, 0xFF00FFFF, buf);
+ D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, buf);
}
OSD::DrawMessages();
@@ -1134,15 +1138,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
bool xfbchanged = false;
- if (s_XFB_width != fbWidth || s_XFB_height != fbHeight)
+ if (FramebufferManagerBase::LastXfbWidth() != fbWidth || FramebufferManagerBase::LastXfbHeight() != fbHeight)
{
xfbchanged = true;
- s_XFB_width = fbWidth;
- s_XFB_height = fbHeight;
- if (s_XFB_width < 1) s_XFB_width = MAX_XFB_WIDTH;
- if (s_XFB_width > MAX_XFB_WIDTH) s_XFB_width = MAX_XFB_WIDTH;
- if (s_XFB_height < 1) s_XFB_height = MAX_XFB_HEIGHT;
- if (s_XFB_height > MAX_XFB_HEIGHT) s_XFB_height = MAX_XFB_HEIGHT;
+ unsigned int w = (fbWidth < 1 || fbWidth > MAX_XFB_WIDTH) ? MAX_XFB_WIDTH : fbWidth;
+ unsigned int h = (fbHeight < 1 || fbHeight > MAX_XFB_HEIGHT) ? MAX_XFB_HEIGHT : fbHeight;
+ FramebufferManagerBase::SetLastXfbWidth(w);
+ FramebufferManagerBase::SetLastXfbHeight(h);
}
// update FPS counter
@@ -1175,12 +1177,10 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
s_backbuffer_height = D3D::GetBackBufferHeight();
}
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
-
- CalculateXYScale(dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
s_LastEFBScale = g_ActiveConfig.iEFBScale;
- CalculateTargetSize();
+ CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), NULL);
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp
index 0a87a1baf5..1903bce989 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp
@@ -149,15 +149,12 @@ XFBSourceBase* FramebufferManager::CreateXFBSource(unsigned int target_width, un
void FramebufferManager::GetTargetSize(unsigned int *width, unsigned int *height, const EFBRectangle& sourceRc)
{
- const float scaleX = Renderer::GetXFBScaleX();
- const float scaleY = Renderer::GetXFBScaleY();
-
TargetRectangle targetSource;
- targetSource.top = (int)(sourceRc.top *scaleY);
- targetSource.bottom = (int)(sourceRc.bottom *scaleY);
- targetSource.left = (int)(sourceRc.left *scaleX);
- targetSource.right = (int)(sourceRc.right * scaleX);
+ targetSource.top = ScaleToVirtualXfbHeight(sourceRc.top, Renderer::GetBackbufferHeight());
+ targetSource.bottom = ScaleToVirtualXfbHeight(sourceRc.bottom, Renderer::GetBackbufferHeight());
+ targetSource.left = ScaleToVirtualXfbWidth(sourceRc.left, Renderer::GetBackbufferWidth());
+ targetSource.right = ScaleToVirtualXfbWidth(sourceRc.right, Renderer::GetBackbufferWidth());
*width = targetSource.right - targetSource.left;
*height = targetSource.bottom - targetSource.top;
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
index a59adb4793..a26b041ba0 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
@@ -17,7 +17,6 @@
#include
#include
-#include
#include "StringUtil.h"
#include "Common.h"
@@ -55,6 +54,10 @@
#include "Movie.h"
#include "BPFunctions.h"
#include "FPSCounter.h"
+#include "ConfigManager.h"
+
+#include
+
namespace DX9
{
@@ -279,19 +282,16 @@ Renderer::Renderer()
s_backbuffer_width = D3D::GetBackBufferWidth();
s_backbuffer_height = D3D::GetBackBufferHeight();
- s_XFB_width = MAX_XFB_WIDTH;
- s_XFB_height = MAX_XFB_HEIGHT;
+ FramebufferManagerBase::SetLastXfbWidth(MAX_XFB_WIDTH);
+ FramebufferManagerBase::SetLastXfbHeight(MAX_XFB_HEIGHT);
- TargetRectangle dst_rect;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
-
- CalculateXYScale(dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
s_LastAA = g_ActiveConfig.iMultisampleMode;
int SupersampleCoeficient = (s_LastAA % 3) + 1;
s_LastEFBScale = g_ActiveConfig.iEFBScale;
- CalculateTargetSize(SupersampleCoeficient);
+ CalculateTargetSize(s_backbuffer_width, s_backbuffer_height, SupersampleCoeficient);
// Make sure to use valid texture sizes
D3D::FixTextureSize(s_target_width, s_target_height);
@@ -706,8 +706,8 @@ void Renderer::UpdateViewport(Matrix44& vpCorrection)
// If GX viewport is off the render target, we must clamp our viewport
// within the bounds. Use the correction matrix to compensate.
ViewportCorrectionMatrix(vpCorrection,
- intendedX, intendedY, intendedWd, intendedHt,
- X, Y, Wd, Ht);
+ (float)intendedX, (float)intendedY, (float)intendedWd, (float)intendedHt,
+ (float)X, (float)Y, (float)Wd, (float)Ht);
D3DVIEWPORT9 vp;
vp.X = X;
@@ -836,7 +836,7 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
// This function has the final picture. We adjust the aspect ratio here.
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
{
- if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
+ if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
{
if (g_ActiveConfig.bDumpFrames && frame_data)
AVIDump::AddFrame(frame_data);
@@ -887,8 +887,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::dev->SetDepthStencilSurface(NULL);
D3D::dev->SetRenderTarget(0, D3D::GetBackBufferSurface());
- TargetRectangle dst_rect;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
D3DVIEWPORT9 vp;
// Clear full target screen (edges, borders etc)
@@ -908,10 +907,10 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::dev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
}
- int X = dst_rect.left;
- int Y = dst_rect.top;
- int Width = dst_rect.right - dst_rect.left;
- int Height = dst_rect.bottom - dst_rect.top;
+ int X = GetTargetRectangle().left;
+ int Y = GetTargetRectangle().top;
+ int Width = GetTargetRectangle().right - GetTargetRectangle().left;
+ int Height = GetTargetRectangle().bottom - GetTargetRectangle().top;
// Sanity check
if (X < 0) X = 0;
@@ -954,7 +953,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
MathUtil::Rectangle drawRc;
- if (!g_ActiveConfig.bUseRealXFB)
+ if (g_ActiveConfig.bUseRealXFB)
+ {
+ drawRc.top = -1;
+ drawRc.bottom = 1;
+ drawRc.left = -1;
+ drawRc.right = 1;
+ }
+ else
{
// use virtual xfb with offset
int xfbHeight = xfbSource->srcHeight;
@@ -968,20 +974,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
// The following code disables auto stretch. Kept for reference.
// scale draw area for a 1 to 1 pixel mapping with the draw target
- //float vScale = (float)fbHeight / (float)dst_rect.GetHeight();
- //float hScale = (float)fbWidth / (float)dst_rect.GetWidth();
+ //float vScale = (float)fbHeight / (float)GetTargetRectangle().GetHeight();
+ //float hScale = (float)fbWidth / (float)GetTargetRectangle().GetWidth();
//drawRc.top *= vScale;
//drawRc.bottom *= vScale;
//drawRc.left *= hScale;
//drawRc.right *= hScale;
}
- else
- {
- drawRc.top = -1;
- drawRc.bottom = 1;
- drawRc.left = -1;
- drawRc.right = 1;
- }
xfbSource->Draw(sourceRc, drawRc, Width, Height);
}
@@ -1018,7 +1017,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
if (s_bScreenshot)
{
std::lock_guard lk(s_criticalScreenshot);
- SaveScreenshot(s_sScreenshotName, dst_rect);
+ SaveScreenshot(s_sScreenshotName, GetTargetRectangle());
s_bScreenshot = false;
}
@@ -1032,8 +1031,8 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
HRESULT hr = D3D::dev->GetRenderTargetData(D3D::GetBackBufferSurface(),ScreenShootMEMSurface);
if (!bLastFrameDumped)
{
- s_recordWidth = dst_rect.GetWidth();
- s_recordHeight = dst_rect.GetHeight();
+ s_recordWidth = GetTargetRectangle().GetWidth();
+ s_recordHeight = GetTargetRectangle().GetHeight();
bAVIDumping = AVIDump::Start(EmuWindow::GetParentWnd(), s_recordWidth, s_recordHeight);
if (!bAVIDumping)
{
@@ -1050,7 +1049,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
if (bAVIDumping)
{
D3DLOCKED_RECT rect;
- if (SUCCEEDED(ScreenShootMEMSurface->LockRect(&rect, dst_rect.AsRECT(), D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY)))
+ if (SUCCEEDED(ScreenShootMEMSurface->LockRect(&rect, GetTargetRectangle().AsRECT(), D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY)))
{
if (!frame_data || w != s_recordWidth || h != s_recordHeight)
{
@@ -1091,23 +1090,31 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::font.DrawTextScaled(0, 0, 20, 20, 0.0f, 0xFF00FFFF, fps);
}
+ if (SConfig::GetInstance().m_ShowLag)
+ {
+ char lag[10];
+ StringCchPrintfA(lag, 1000, "Lag: %llu\n", Movie::g_currentLagCount);
+ D3D::font.DrawTextScaled(0, 18, 20, 20, 0.0f, 0xFF00FFFF, lag);
+ }
+
if (g_ActiveConfig.bShowInputDisplay)
{
char inputDisplay[1000];
StringCchPrintfA(inputDisplay, 1000, Movie::GetInputDisplay().c_str());
- D3D::font.DrawTextScaled(0, 30, 20, 20, 0.0f, 0xFF00FFFF, inputDisplay);
+ D3D::font.DrawTextScaled(0, 36, 20, 20, 0.0f, 0xFF00FFFF, inputDisplay);
}
+
Renderer::DrawDebugText();
if (g_ActiveConfig.bOverlayStats)
{
Statistics::ToString(st);
- D3D::font.DrawTextScaled(0, 30, 20, 20, 0.0f, 0xFF00FFFF, st);
+ D3D::font.DrawTextScaled(0, 36, 20, 20, 0.0f, 0xFF00FFFF, st);
}
else if (g_ActiveConfig.bOverlayProjStats)
{
Statistics::ToStringProj(st);
- D3D::font.DrawTextScaled(0, 30, 20, 20, 0.0f, 0xFF00FFFF, st);
+ D3D::font.DrawTextScaled(0, 36, 20, 20, 0.0f, 0xFF00FFFF, st);
}
OSD::DrawMessages();
@@ -1129,15 +1136,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
bool xfbchanged = false;
- if (s_XFB_width != fbWidth || s_XFB_height != fbHeight)
+ if (FramebufferManagerBase::LastXfbWidth() != fbWidth || FramebufferManagerBase::LastXfbHeight() != fbHeight)
{
xfbchanged = true;
- s_XFB_width = fbWidth;
- s_XFB_height = fbHeight;
- if (s_XFB_width < 1) s_XFB_width = MAX_XFB_WIDTH;
- if (s_XFB_width > MAX_XFB_WIDTH) s_XFB_width = MAX_XFB_WIDTH;
- if (s_XFB_height < 1) s_XFB_height = MAX_XFB_HEIGHT;
- if (s_XFB_height > MAX_XFB_HEIGHT) s_XFB_height = MAX_XFB_HEIGHT;
+ unsigned int w = (fbWidth < 1 || fbWidth > MAX_XFB_WIDTH) ? MAX_XFB_WIDTH : fbWidth;
+ unsigned int h = (fbHeight < 1 || fbHeight > MAX_XFB_HEIGHT) ? MAX_XFB_HEIGHT : fbHeight;
+ FramebufferManagerBase::SetLastXfbWidth(w);
+ FramebufferManagerBase::SetLastXfbHeight(h);
}
u32 newAA = g_ActiveConfig.iMultisampleMode;
@@ -1146,14 +1151,12 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
{
s_LastAA = newAA;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
-
- CalculateXYScale(dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
int SupersampleCoeficient = (s_LastAA % 3) + 1;
s_LastEFBScale = g_ActiveConfig.iEFBScale;
- CalculateTargetSize(SupersampleCoeficient);
+ CalculateTargetSize(s_backbuffer_width, s_backbuffer_height, SupersampleCoeficient);
D3D::dev->SetRenderTarget(0, D3D::GetBackBufferSurface());
D3D::dev->SetDepthStencilSurface(D3D::GetBackBufferDepthSurface());
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
index d3fd6050bf..5a80100a08 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
@@ -49,7 +49,7 @@
#include "D3DUtil.h"
#include "EmuWindow.h"
#include "VideoState.h"
-#include "render.h"
+#include "Render.h"
#include "DLCache.h"
#include "IniFile.h"
#include "Core.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
index 5110023ee3..d6abb014c4 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
@@ -18,7 +18,6 @@
#include "Globals.h"
#include "VideoConfig.h"
#include "IniFile.h"
-#include "Setup.h"
#include "Core.h"
#include "Host.h"
#include "VideoBackend.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index a6121e1436..77bb91d48b 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -62,6 +62,7 @@
#include "Host.h"
#include "BPFunctions.h"
#include "FPSCounter.h"
+#include "ConfigManager.h"
#include "main.h" // Local
#ifdef _WIN32
@@ -362,16 +363,14 @@ Renderer::Renderer()
if (!GLEW_ARB_texture_non_power_of_two)
WARN_LOG(VIDEO, "ARB_texture_non_power_of_two not supported.");
- s_XFB_width = MAX_XFB_WIDTH;
- s_XFB_height = MAX_XFB_HEIGHT;
+ // TODO: Move these somewhere else?
+ FramebufferManagerBase::SetLastXfbWidth(MAX_XFB_WIDTH);
+ FramebufferManagerBase::SetLastXfbHeight(MAX_XFB_HEIGHT);
- TargetRectangle dst_rect;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
-
- CalculateXYScale(dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
s_LastEFBScale = g_ActiveConfig.iEFBScale;
- CalculateTargetSize();
+ CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
// Because of the fixed framebuffer size we need to disable the resolution
// options while running
@@ -531,6 +530,9 @@ void Renderer::DrawDebugInfo()
if (g_ActiveConfig.bShowFPS)
p+=sprintf(p, "FPS: %d\n", s_fps);
+ if (SConfig::GetInstance().m_ShowLag)
+ p+=sprintf(p, "Lag: %llu\n", Movie::g_currentLagCount);
+
if (g_ActiveConfig.bShowInputDisplay)
p+=sprintf(p, "%s", Movie::GetInputDisplay().c_str());
@@ -993,7 +995,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
{
static int w = 0, h = 0;
- if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
+ if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
{
if (g_ActiveConfig.bDumpFrames && frame_data)
{
@@ -1013,7 +1015,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
if (field == FIELD_LOWER) xfbAddr -= fbWidth * 2;
u32 xfbCount = 0;
const XFBSourceBase* const* xfbSourceList = FramebufferManager::GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
- if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
+ if (g_ActiveConfig.VirtualXFBEnabled() && (!xfbSourceList || xfbCount == 0))
{
if (g_ActiveConfig.bDumpFrames && frame_data)
{
@@ -1029,8 +1031,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
ResetAPIState();
- TargetRectangle dst_rect;
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, true, &dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
+ TargetRectangle flipped_trc = GetTargetRectangle();
+
+ // Flip top and bottom for some reason; TODO: Fix the code to suck less?
+ int tmp = flipped_trc.top;
+ flipped_trc.top = flipped_trc.bottom;
+ flipped_trc.bottom = tmp;
// Textured triangles are necessary because of post-processing shaders
@@ -1039,7 +1046,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
OGL::TextureCache::DisableStage(i);
// Update GLViewPort
- glViewport(dst_rect.left, dst_rect.bottom, dst_rect.GetWidth(), dst_rect.GetHeight());
+ glViewport(flipped_trc.left, flipped_trc.bottom, flipped_trc.GetWidth(), flipped_trc.GetHeight());
GL_REPORT_ERRORD();
@@ -1070,7 +1077,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
MathUtil::Rectangle drawRc;
- if (!g_ActiveConfig.bUseRealXFB)
+ if (g_ActiveConfig.bUseRealXFB)
+ {
+ drawRc.top = 1;
+ drawRc.bottom = -1;
+ drawRc.left = -1;
+ drawRc.right = 1;
+ }
+ else
{
// use virtual xfb with offset
int xfbHeight = xfbSource->srcHeight;
@@ -1084,21 +1098,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
// The following code disables auto stretch. Kept for reference.
// scale draw area for a 1 to 1 pixel mapping with the draw target
- //float vScale = (float)fbHeight / (float)dst_rect.GetHeight();
- //float hScale = (float)fbWidth / (float)dst_rect.GetWidth();
+ //float vScale = (float)fbHeight / (float)flipped_trc.GetHeight();
+ //float hScale = (float)fbWidth / (float)flipped_trc.GetWidth();
//drawRc.top *= vScale;
//drawRc.bottom *= vScale;
//drawRc.left *= hScale;
//drawRc.right *= hScale;
}
- else
- {
- drawRc.top = 1;
- drawRc.bottom = -1;
- drawRc.left = -1;
- drawRc.right = 1;
- }
-
// Tell the OSD Menu about the current internal resolution
OSDInternalW = xfbSource->sourceRc.GetWidth(); OSDInternalH = xfbSource->sourceRc.GetHeight();
@@ -1170,7 +1176,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
if (s_bScreenshot)
{
std::lock_guard lk(s_criticalScreenshot);
- SaveScreenshot(s_sScreenshotName, dst_rect);
+ SaveScreenshot(s_sScreenshotName, flipped_trc);
// Reset settings
s_sScreenshotName.clear();
s_bScreenshot = false;
@@ -1181,16 +1187,16 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
if (g_ActiveConfig.bDumpFrames)
{
std::lock_guard lk(s_criticalScreenshot);
- if (!frame_data || w != dst_rect.GetWidth() ||
- h != dst_rect.GetHeight())
+ if (!frame_data || w != flipped_trc.GetWidth() ||
+ h != flipped_trc.GetHeight())
{
if (frame_data) delete[] frame_data;
- w = dst_rect.GetWidth();
- h = dst_rect.GetHeight();
+ w = flipped_trc.GetWidth();
+ h = flipped_trc.GetHeight();
frame_data = new char[3 * w * h];
}
glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glReadPixels(dst_rect.left, dst_rect.bottom, w, h, GL_BGR, GL_UNSIGNED_BYTE, frame_data);
+ glReadPixels(flipped_trc.left, flipped_trc.bottom, w, h, GL_BGR, GL_UNSIGNED_BYTE, frame_data);
if (GL_REPORT_ERROR() == GL_NO_ERROR && w > 0 && h > 0)
{
if (!bLastFrameDumped)
@@ -1245,11 +1251,11 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
{
std::lock_guard lk(s_criticalScreenshot);
std::string movie_file_name;
- w = dst_rect.GetWidth();
- h = dst_rect.GetHeight();
+ w = GetTargetRectangle().GetWidth();
+ h = GetTargetRectangle().GetHeight();
frame_data = new char[3 * w * h];
glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glReadPixels(dst_rect.left, dst_rect.bottom, w, h, GL_BGR, GL_UNSIGNED_BYTE, frame_data);
+ glReadPixels(GetTargetRectangle().left, GetTargetRectangle().bottom, w, h, GL_BGR, GL_UNSIGNED_BYTE, frame_data);
if (GL_REPORT_ERROR() == GL_NO_ERROR)
{
if (!bLastFrameDumped)
@@ -1292,15 +1298,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
bool xfbchanged = false;
- if (s_XFB_width != fbWidth || s_XFB_height != fbHeight)
+ if (FramebufferManagerBase::LastXfbWidth() != fbWidth || FramebufferManagerBase::LastXfbHeight() != fbHeight)
{
xfbchanged = true;
- s_XFB_width = fbWidth;
- s_XFB_height = fbHeight;
- if (s_XFB_width < 1) s_XFB_width = MAX_XFB_WIDTH;
- if (s_XFB_width > MAX_XFB_WIDTH) s_XFB_width = MAX_XFB_WIDTH;
- if (s_XFB_height < 1) s_XFB_height = MAX_XFB_HEIGHT;
- if (s_XFB_height > MAX_XFB_HEIGHT) s_XFB_height = MAX_XFB_HEIGHT;
+ unsigned int w = (fbWidth < 1 || fbWidth > MAX_XFB_WIDTH) ? MAX_XFB_WIDTH : fbWidth;
+ unsigned int h = (fbHeight < 1 || fbHeight > MAX_XFB_HEIGHT) ? MAX_XFB_HEIGHT : fbHeight;
+ FramebufferManagerBase::SetLastXfbWidth(w);
+ FramebufferManagerBase::SetLastXfbHeight(h);
}
bool WindowResized = false;
@@ -1316,11 +1320,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
if (xfbchanged || WindowResized || (s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode))
{
- ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect);
+ UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
- CalculateXYScale(dst_rect);
-
- if (CalculateTargetSize() || (s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode))
+ if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height) || s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode)
{
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
index 543fb9824d..fb26ba2781 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
@@ -88,7 +88,6 @@ Make AA apply instantly during gameplay if possible
#include "TextureConverter.h"
#include "PostProcessing.h"
#include "OnScreenDisplay.h"
-#include "Setup.h"
#include "DLCache.h"
#include "FramebufferManager.h"
#include "Core.h"
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWVertexLoader.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWVertexLoader.cpp
index 0e2cc7f99f..cc5ee66772 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/SWVertexLoader.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWVertexLoader.cpp
@@ -72,27 +72,27 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
tcScale[7] = 1.0f / float(1 << m_CurrentVat->g2.Tex7Frac);
//TexMtx
- const int tmDesc[8] = {
+ const u32 tmDesc[8] = {
g_VtxDesc.Tex0MatIdx, g_VtxDesc.Tex1MatIdx, g_VtxDesc.Tex2MatIdx, g_VtxDesc.Tex3MatIdx,
g_VtxDesc.Tex4MatIdx, g_VtxDesc.Tex5MatIdx, g_VtxDesc.Tex6MatIdx, g_VtxDesc.Tex7MatIdx
};
// Colors
- const int colDesc[2] = {g_VtxDesc.Color0, g_VtxDesc.Color1};
+ const u32 colDesc[2] = {g_VtxDesc.Color0, g_VtxDesc.Color1};
colElements[0] = m_CurrentVat->g0.Color0Elements;
colElements[1] = m_CurrentVat->g0.Color1Elements;
- const int colComp[2] = {m_CurrentVat->g0.Color0Comp, m_CurrentVat->g0.Color1Comp};
+ const u32 colComp[2] = {m_CurrentVat->g0.Color0Comp, m_CurrentVat->g0.Color1Comp};
// TextureCoord
- const int tcDesc[8] = {
+ const u32 tcDesc[8] = {
g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord, g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord,
- g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const int)((g_VtxDesc.Hex >> 31) & 3)
+ g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3)
};
- const int tcElements[8] = {
+ const u32 tcElements[8] = {
m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements,
m_CurrentVat->g1.Tex3CoordElements, m_CurrentVat->g1.Tex4CoordElements, m_CurrentVat->g2.Tex5CoordElements,
m_CurrentVat->g2.Tex6CoordElements, m_CurrentVat->g2.Tex7CoordElements
};
- const int tcFormat[8] = {
+ const u32 tcFormat[8] = {
m_CurrentVat->g0.Tex0CoordFormat, m_CurrentVat->g1.Tex1CoordFormat, m_CurrentVat->g1.Tex2CoordFormat,
m_CurrentVat->g1.Tex3CoordFormat, m_CurrentVat->g1.Tex4CoordFormat, m_CurrentVat->g2.Tex5CoordFormat,
m_CurrentVat->g2.Tex6CoordFormat, m_CurrentVat->g2.Tex7CoordFormat
diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props
index 4bd98b9d70..bb2f7e6efa 100644
--- a/Source/VSProps/Base.props
+++ b/Source/VSProps/Base.props
@@ -20,6 +20,9 @@
true
0x00400000
+
+ ..\..\..\Externals\wxWidgets3\include;%(AdditionalIncludeDirectories)
+
\ No newline at end of file
diff --git a/Tools/buildbot-try.sh b/Tools/buildbot-try.sh
new file mode 100755
index 0000000000..e71e92b61a
--- /dev/null
+++ b/Tools/buildbot-try.sh
@@ -0,0 +1,35 @@
+#! /bin/bash
+#
+# Submits a "buildbot try" message to the Dolphin buildbot with all the
+# required options.
+
+opt_file=$HOME/.buildbot/options
+
+if ! [ -f "$opt_file" ]; then
+ echo >&2 "error: no .buildbot/options configuration file found"
+ echo >&2 "Read the docs: http://code.google.com/p/dolphin-emu/wiki/BuildbotTry"
+ exit 1
+fi
+
+if ! which buildbot >/dev/null 2>&1; then
+ echo >&2 "error: buildbot is not installed"
+ echo >&2 "Install it from your package manager, or use 'pip install buildbot'"
+ exit 1
+fi
+
+if ! git branch | grep -q '^* '; then
+ echo "Unable to determine the current Git branch. Input the Git branch name:"
+ read branchname
+else
+ branchname=$(git branch | grep '^* ' | cut -d ' ' -f 2-)
+fi
+
+shortrev=$(git describe --always --long --dirty=+ | sed 's/-g[0-9a-f]*\(+*\)$/\1/')
+
+author=$(grep try_username "$opt_file" | cut -d "'" -f 2)
+
+echo "Branch name: $branchname"
+echo "Change author: $author"
+echo "Short rev: $shortrev"
+
+buildbot try --properties=branchname=$branchname,author=$author,shortrev=$shortrev $*