Merge branch 'master' of https://code.google.com/p/dolphin-emu into android-core-control

This commit is contained in:
Lioncash 2013-09-01 15:24:29 -04:00
commit d84312c799
113 changed files with 1818 additions and 751 deletions

View File

@ -773,11 +773,6 @@ if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
install(DIRECTORY Data/User/ DESTINATION ${datadir}/user PATTERN)
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN)
endif()
include(FindGettext)
if(GETTEXT_FOUND AND NOT DISABLE_WX)
file(GLOB LINGUAS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Languages/po/*.po)
GETTEXT_CREATE_TRANSLATIONS(Languages/po/dolphin-emu.pot ALL ${LINGUAS})
endif()
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|Darwin"))
install(FILES Data/license.txt DESTINATION ${datadir})
endif()

View File

@ -0,0 +1,19 @@
# GH5D52 - Over The Hedge
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =

View File

@ -1,19 +1,19 @@
# GH5E52 - Over The Hedge
[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 = 3
EmulationIssues = Black screen
EmulationStateId = 4
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =

View File

@ -0,0 +1,19 @@
# GH5F52 - Over The Hedge
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =

View File

@ -0,0 +1,19 @@
# GH5P52 - Over The Hedge
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =

View File

@ -1,19 +1,21 @@
# GXGE08 - MEGAMAN X COLLECTION
[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 =
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 0

View File

@ -1,22 +1,20 @@
# JADE01 - The Legend of Zelda A Link to the Past
[Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues =
EmulationIssues = Enable progressive scan for proper speed.
EmulationStateId = 4
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Video_Settings]
SafeTextureCacheColorSamples = 0

View File

@ -1,19 +1,21 @@
# JAEE01 - Donkey Kong Country
[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 = 0
EmulationIssues =
EmulationStateId = 4
EmulationIssues = Needs progressive scan for proper speed.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512

View File

@ -0,0 +1,20 @@
# JBKE01 - Breath of Fire II
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues = Needs progressive scan for proper speed.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 0
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,17 @@
# JCBE01 - Super Mario RPG
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues = Needs progressive scan for proper speed.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512

View File

@ -0,0 +1,15 @@
# JCWE01 - Super Mario Kart
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues = Enable progressive scan for proper speed.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]

View File

@ -1,23 +1,23 @@
# NABE01 - Mario Kart 64
[Core]
# Values set here will override the main dolphin settings.
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues =
EmulationIssues =
EmulationStateId = 4
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
Hack = -1
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,17 @@
# NAHE01 - Yoshi's Story
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 0

View File

@ -0,0 +1,18 @@
# NAKE01 - Pokémon Snap
[Core]
[EmuState]
EmulationStateId = 3
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,22 +1,22 @@
# R3RE8P - Sonic & Sega All-Stars Racing
[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 = Use direct 3d 11 for less graphic glitches.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,19 +1,22 @@
# R3RP8P - Sonic & Sega All-Stars Racing
[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 = Use direct 3d 11 for less graphic glitches.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,49 +1,20 @@
# RHOE8P - House Of The Dead: OVERKILL
[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 = Use dx11 plugin (r6945)
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
$Infinte Bomb Usage after Getting 1 [g6flavor]
04159D1C 60000000
$If Score Increase, MAX [ZiT]
C2142134 00000002
3CA03B9B 38A5C9FF
90A60178 00000000
$Infinite LIFE [ZiT]
04130ED4 60000000
$Infinite Bullet [ZiT]
04159FAC 907D0720
$CASH MAX [ZiT]
C214B118 00000002
3CA03B9B 38A5C9FF
90A300D8 00000000
$CASH MAX [ZiT]
C214B110 00000002
3CA03B9B 38A5C9FF
90A300DC 00000000
$If Score Increase, MAX [ZiT]
C2152674 00000002
3CA03B9B 38A5C9FF
90B60178 00000000
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,22 +1,20 @@
# RHOJ8P - House Of The Dead: OVERKILL
[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 = Use dx11 plugin (r6945)
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,22 +1,20 @@
# RHOP8P - House Of The Dead: OVERKILL
[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 = Use dx11 plugin (r6945)
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,34 +1,24 @@
# RM8E01 - Mario Party 8
[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
Issues=
EmulationIssues =
EmulationIssues = Direct 3d9 has issues with paint minigames.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
ForceFiltering = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True
DlistCachingEnable = False

View File

@ -0,0 +1,24 @@
# RM8J01 - Mario Party 8
[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 = Direct 3d9 has issues with paint minigames.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
ForceFiltering = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True
DlistCachingEnable = False

View File

@ -0,0 +1,24 @@
# RM8K01 - Mario Party 8
[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 = Direct 3d9 has issues with paint minigames.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
ForceFiltering = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True
DlistCachingEnable = False

View File

@ -1,33 +1,24 @@
# RM8P01 - Mario Party 8
[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 = Direct 3d9 has issues with paint minigames.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
ForceFiltering = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True
DlistCachingEnable = False

View File

@ -0,0 +1,18 @@
# RT3E54 - Rockstar Games presents Table Tennis
[Core]
[EmuState]
EmulationStateId = 3
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# RT3JEL - Rockstar Games presents Table Tennis
[Core]
[EmuState]
EmulationStateId = 3
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# RT3P54 - Rockstar Games presents Table Tennis
[Core]
[EmuState]
EmulationStateId = 3
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -1,19 +1,22 @@
# RUUE01 - Animal Crossing Wii
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,22 @@
# RUUJ01 - Animal Crossing Wii
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,22 @@
# RUUK01 - Animal Crossing Wii
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,18 +1,22 @@
# RUUP01 - Animal Crossing Wii
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,27 +1,21 @@
# RZTE01 - Wii Sports Resort
[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 wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,27 +1,21 @@
# RZTJ01 - Wii Sports Resort
[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 wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,27 +1,21 @@
# RZTK01 - Wii Sports Resort
[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 wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,27 +1,21 @@
# RZTP01 - Wii Sports Resort
[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 wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,27 +1,21 @@
# RZTW01 - Wii Sports Resort
[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 wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -1,27 +1,20 @@
# SJDE41 - Just Dance 3
[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 = Suffers from random ingame lock ups.
EmulationStateId = 4
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
MaxAnisotropy = 0

View File

@ -1,27 +1,21 @@
# SJDP41 - Just Dance 3
[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 = Suffers from random ingame lock ups.
EmulationStateId = 4
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
MaxAnisotropy = 0

View File

@ -1,27 +1,20 @@
# SJDY41 - Just Dance 3
[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 = Suffers from random ingame lock ups.
EmulationStateId = 4
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
MaxAnisotropy = 0

View File

@ -1,27 +1,20 @@
# SJDP41 - Just Dance 3
[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 = Suffers from random ingame lock ups.
EmulationStateId = 4
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Enhancements]
MaxAnisotropy = 0

View File

@ -1,31 +1,22 @@
# SOUE01 - The Legend of Zelda Skyward Sword
[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 wiimote and motion plus. Use direct 3d9 backend for less graphic issues.
EmulationIssues = Needs real wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBAccessEnable = True
DlistCachingEnable = False
EFBEmulateFormatChanges = True

View File

@ -1,31 +1,23 @@
# SOUJ01 - The Legend of Zelda Skyward Sword
[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 wiimote and motion plus. Use direct 3d9 backend for less graphic issues.
EmulationIssues = Needs real wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBAccessEnable = True
DlistCachingEnable = False
EFBEmulateFormatChanges = True

View File

@ -1,31 +1,23 @@
# SOUK01 - The Legend of Zelda Skyward Sword
[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 wiimote and motion plus. Use direct 3d9 backend for less graphic issues.
EmulationIssues = Needs real wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBAccessEnable = True
DlistCachingEnable = False
EFBEmulateFormatChanges = True

View File

@ -1,31 +1,23 @@
# SOUP01 - The Legend of Zelda Skyward Sword
[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 wiimote and motion plus. Use direct 3d9 backend for less graphic issues.
EmulationIssues = Needs real wiimote and motion plus.
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBAccessEnable = True
DlistCachingEnable = False
EFBEmulateFormatChanges = True

View File

@ -0,0 +1,17 @@
# W2GE08 - Phoenix Wright Ace Attorney Justice For All
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -0,0 +1,17 @@
# W3GE08 - Phoenix Wright Ace Attorney Trials and Tribulations
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Video_Hacks]
EFBEmulateFormatChanges = True
[Gecko]

View File

@ -0,0 +1,18 @@
# WB2ETL - Dangeresque 3
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# WB3ETL - 8-Bit Is Enough
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# WB6EGL - TV Show King
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# WBXETL - Homestar Ruiner
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# WBYETL - StrongBadia the Free
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# WBZETL - Baddest of the Bands
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -1,22 +1,22 @@
# WC6EUP - Chronos Twins DX
[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 = Disable EuRGB60 mode
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,22 @@
# WCHEJS - Chess Challenge!
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True
EFBToTextureEnable = False
EFBCopyEnable = True
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,18 @@
# WFUEQQ - Furry Legends
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -1,19 +1,21 @@
# WGSE08 - PWAA Ace Attorney
[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 =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -0,0 +1,20 @@
# WHWEFJ - HoopWorld
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 0
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,20 @@
# WHWPFJ - HoopWorld
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 0
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,22 +1,19 @@
# WPCE01 - Doc's Punch-Out!!
[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 = Disable EuRGB60 mode
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]

View File

@ -0,0 +1,18 @@
# WPUEGD - Bust A Move Plus
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,21 @@
# WTEELU - Tales of Elastic Boy Mission 1
[Core]
[EmuState]
EmulationStateId = 4
EmulationIssues =
[OnFrame]
[ActionReplay]
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
UseXFB = True
UseRealXFB = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -1,22 +1,21 @@
# WTKEGL - TV Show King 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 =
EmulationIssues =
[OnLoad]
# Add memory patches to be loaded once on boot here.
[OnFrame]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video]
ProjectionHack = 0
PH_SZNear = 0
PH_SZFar = 0
PH_ExtraParam = 0
PH_ZNear =
PH_ZFar =
[Gecko]
[Video_Settings]
SafeTextureCacheColorSamples = 512

View File

@ -82,6 +82,8 @@
<string name="opengl_es3">OpenGL ES 3</string>
<string name="video_backend">ビデオレンダラ</string>
<string name="video_backend_to_use">使用するビデオレンダラー</string>
<string name="show_fps">FPSを表示</string>
<string name="show_fps_descrip">エミュレーション速度の指標として、画面左上に毎秒レンダリングされた フレーム数を表示します。</string>
<string name="draw_onscreen_controls">画面上のコントロールを描画</string>
<string name="enhancements">画質向上の設定</string>

View File

@ -82,6 +82,8 @@
<string name="opengl_es3">OpenGL ES 3</string>
<string name="video_backend">Video Backend</string>
<string name="video_backend_to_use">Video backend to use</string>
<string name="show_fps">Show FPS</string>
<string name="show_fps_descrip">Show the number of frames rendered per second as a measure of emulation speed.</string>
<string name="draw_onscreen_controls">Draw on-screen controls</string>
<string name="enhancements">Enhancements</string>

View File

@ -3,66 +3,66 @@
<!-- Video Settings -->
<!-- Video Enhancements -->
<PreferenceScreen android:title="@string/enhancements">
<ListPreference
android:entries="@array/internalResolutionEntries"
android:entryValues="@array/internalResolutionValues"
android:key="internalResolution"
android:summary="@string/internal_resolution_descrip"
android:title="@string/internal_resolution"/>
<ListPreference
android:entries="@array/anisotropicFilteringEntries"
android:entryValues="@array/anisotropicFilteringValues"
android:key="anisotropicFiltering"
android:summary="@string/anisotropic_filtering_descrip"
android:title="@string/anisotropic_filtering"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="scaledEFBCopy"
android:summary="@string/scaled_efb_copy_descrip"
android:title="@string/scaled_efb_copy"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="perPixelLighting"
android:summary="@string/per_pixel_lighting_descrip"
android:title="@string/per_pixel_lighting"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="forceTextureFiltering"
android:summary="@string/force_texture_filtering_descrip"
android:title="@string/force_texture_filtering"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="disableFog"
android:summary="@string/disable_fog_descrip"
android:title="@string/disable_fog"/>
</PreferenceScreen>
<!-- Video Hacks -->
<PreferenceScreen android:title="@string/hacks">
<PreferenceCategory android:title="@string/embedded_frame_buffer">
<CheckBoxPreference
android:defaultValue="false"
android:key="skipEFBAccess"
android:summary="@string/skip_efb_access_descrip"
android:title="@string/skip_efb_access"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="ignoreFormatChanges"
android:summary="@string/ignore_format_changes_descrip"
android:title="@string/ignore_format_changes"/>
<ListPreference
android:defaultValue="Texture"
android:entries="@array/efbCopyMethodEntries"
@ -70,9 +70,9 @@
android:key="efbCopyMethod"
android:summary="@string/efb_copy_method_descrip"
android:title="@string/efb_copy_method"/>
</PreferenceCategory>
<!-- Texture Cache -->
<PreferenceCategory android:title="@string/texture_cache">
<ListPreference
@ -83,7 +83,7 @@
android:summary="@string/texture_cache_accuracy_descrip"
android:title="@string/texture_cache_accuracy"/>
</PreferenceCategory>
<!-- External Frame Buffer -->
<PreferenceCategory android:title="@string/external_frame_buffer">
<ListPreference
@ -94,36 +94,41 @@
android:summary="@string/external_frame_buffer_descrip"
android:title="@string/external_frame_buffer"/>
</PreferenceCategory>
<!-- Other Hacks -->
<PreferenceCategory android:title="@string/other">
<CheckBoxPreference
android:defaultValue="false"
android:key="cacheDisplayLists"
android:summary="@string/cache_display_lists_descrip"
android:title="@string/cache_display_lists"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="disableDestinationAlpha"
android:summary="@string/disable_destination_alpha_descrip"
android:title="@string/disable_destination_alpha"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="fastDepthCalculation"
android:summary="@string/fast_depth_calculation_descrip"
android:title="@string/fast_depth_calculation"/>
</PreferenceCategory>
</PreferenceScreen>
<ListPreference
android:key="gpuPref"
android:summary="@string/video_backend_to_use"
android:title="@string/video_backend" />
android:key="gpuPref"
android:summary="@string/video_backend_to_use"
android:title="@string/video_backend" />
<CheckBoxPreference
android:key="showFPS"
android:summary="@string/show_fps_descrip"
android:title="@string/show_fps"/>
<CheckBoxPreference
android:defaultValue="true"

View File

@ -28,14 +28,12 @@ import org.dolphinemu.dolphinemu.settings.VideoSettingsFragment;
public final class AboutFragment extends Fragment
{
private static Activity m_activity;
private ListView mMainList;
private AboutFragmentAdapter adapter;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
mMainList = (ListView) rootView.findViewById(R.id.gamelist);
ListView mMainList = (ListView) rootView.findViewById(R.id.gamelist);
String yes = getString(R.string.yes);
String no = getString(R.string.no);
@ -44,7 +42,7 @@ public final class AboutFragment extends Fragment
Input.add(new AboutFragmentItem(getString(R.string.build_revision), NativeLibrary.GetVersionString()));
Input.add(new AboutFragmentItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no));
adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
AboutFragmentAdapter adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
mMainList.setAdapter(adapter);
return mMainList;

View File

@ -18,10 +18,8 @@ import java.io.*;
/**
* The main activity of this emulator.
*
* @param <MainActivity> Main activity.
*/
public final class DolphinEmulator<MainActivity> extends Activity
public final class DolphinEmulator extends Activity
{
private void CopyAsset(String asset, String output)
{

View File

@ -14,7 +14,6 @@ import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.Menu;

View File

@ -112,7 +112,7 @@ public final class FolderBrowser extends Fragment
return mDrawerList;
}
private AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
@ -143,7 +143,6 @@ public final class FolderBrowser extends Fragment
{
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
int intDirectories = Integer.parseInt(Directories);
Directories = Integer.toString(intDirectories + 1);
// Check to see if a path set in the Dolphin config
// matches the one the user is trying to add. If it's

View File

@ -178,7 +178,7 @@ public final class GameListActivity extends Activity
}
}
private AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{

View File

@ -120,7 +120,7 @@ public final class GameListFragment extends Fragment
return mMainList;
}
private AdapterView.OnItemClickListener mGameItemClickListener = new AdapterView.OnItemClickListener()
private final AdapterView.OnItemClickListener mGameItemClickListener = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{

View File

@ -30,11 +30,10 @@ import org.dolphinemu.dolphinemu.R;
* within the input control mapping config.
*/
public final class InputConfigFragment extends PreferenceFragment
//implements PrefsActivity.OnGameConfigListener
{
private Activity m_activity;
private boolean firstEvent = true;
private static ArrayList<Float> m_values = new ArrayList<Float>();
private static final ArrayList<Float> m_values = new ArrayList<Float>();
/**
* Gets the descriptor for the given {@link InputDevice}.

View File

@ -37,7 +37,8 @@ public final class UserPreferences
editor.putString("cpuCorePref", getConfig("Dolphin.ini", "Core", "CPUCore", "3"));
editor.putBoolean("dualCorePref", getConfig("Dolphin.ini", "Core", "CPUThread", "False").equals("True"));
editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer"));
editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer"));
editor.putBoolean("showFPS", getConfig("gfx_opengl.ini", "Settings", "ShowFPS", "False").equals("True"));
editor.putBoolean("drawOnscreenControls", getConfig("Dolphin.ini", "Android", "ScreenControls", "True").equals("True"));
editor.putString("internalResolution", getConfig("gfx_opengl.ini", "Settings", "EFBScale", "2") );
@ -120,6 +121,9 @@ public final class UserPreferences
// Current video backend being used. Falls back to software rendering upon error.
String currentVideoBackend = prefs.getString("gpuPref", "Software Rendering");
// Whether or not FPS will be displayed on-screen.
boolean showingFPS = prefs.getBoolean("showFPS", false);
// Whether or not to draw on-screen controls.
boolean drawingOnscreenControls = prefs.getBoolean("drawOnscreenControls", true);
@ -172,6 +176,7 @@ public final class UserPreferences
// General Video Settings
NativeLibrary.SetConfig("Dolphin.ini", "Core", "GFXBackend", currentVideoBackend);
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "ShowFPS", showingFPS ? "True" : "False");
NativeLibrary.SetConfig("Dolphin.ini", "Android", "ScreenControls", drawingOnscreenControls ? "True" : "False");
// Video Hack Settings

View File

@ -16,9 +16,13 @@ import javax.microedition.khronos.opengles.GL10;
import org.dolphinemu.dolphinemu.R;
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
/**
* Responsible for handling the loading of the video preferences.
@ -195,6 +199,58 @@ public final class VideoSettingsFragment extends PreferenceFragment
videoBackends.setEntries(R.array.videoBackendEntriesNoGLES3);
videoBackends.setEntryValues(R.array.videoBackendValuesNoGLES3);
}
//
// Disable all options if Software Rendering is used.
//
// Note that the numeric value in 'getPreference()'
// denotes the placement on the UI. So if more elements are
// added to the video settings, these may need to change.
//
final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
final PreferenceScreen mainScreen = getPreferenceScreen();
if (videoBackends.getValue().equals("Software Renderer"))
{
mainScreen.getPreference(0).setEnabled(false);
mainScreen.getPreference(1).setEnabled(false);
mainScreen.getPreference(3).setEnabled(false);
mainScreen.getPreference(4).setEnabled(false);
}
else if (videoBackends.getValue().equals("OGL"))
{
mainScreen.getPreference(0).setEnabled(true);
mainScreen.getPreference(1).setEnabled(true);
mainScreen.getPreference(3).setEnabled(true);
mainScreen.getPreference(4).setEnabled(true);
}
// Also set a listener, so that if someone changes the video backend, it will disable
// the video settings, upon the user choosing "Software Rendering".
sPrefs.registerOnSharedPreferenceChangeListener(new OnSharedPreferenceChangeListener()
{
@Override
public void onSharedPreferenceChanged(SharedPreferences preference, String key)
{
if (key.equals("gpuPref"))
{
if (preference.getString(key, "Software Renderer").equals("Software Renderer"))
{
mainScreen.getPreference(0).setEnabled(false);
mainScreen.getPreference(1).setEnabled(false);
mainScreen.getPreference(3).setEnabled(false);
mainScreen.getPreference(4).setEnabled(false);
}
else if (preference.getString(key, "Software Renderer").equals("OGL"))
{
mainScreen.getPreference(0).setEnabled(true);
mainScreen.getPreference(1).setEnabled(true);
mainScreen.getPreference(3).setEnabled(true);
mainScreen.getPreference(4).setEnabled(true);
}
}
}
});
}
@Override

View File

@ -1154,7 +1154,10 @@ void ARMXEmitter::VMOV(ARMReg Dest, ARMReg Src)
else
{
// Move 64bit from Arm reg
_dbg_assert_msg_(DYNA_REC, false, "This VMOV doesn't support moving 64bit ARM to NEON");
ARMReg Src2 = (ARMReg)(Src + 1);
Dest = SubBase(Dest);
Write32(condition | (0xC4 << 20) | (Src2 << 16) | (Src << 12) \
| (0xB << 8) | ((Dest & 0x10) << 1) | (1 << 4) | (Dest & 0xF));
return;
}
}

View File

@ -25,15 +25,23 @@ extern const char *netplay_dolphin_ver;
#define STACKALIGN
#if __cplusplus >= 201103 || defined(_MSC_VER) || defined(__GXX_EXPERIMENTAL_CXX0X__)
#define HAVE_CXX11_SYNTAX 1
#endif
#if HAVE_CXX11_SYNTAX
// An inheritable class to disallow the copy constructor and operator= functions
class NonCopyable
{
protected:
NonCopyable() {}
NonCopyable(const NonCopyable&&) {}
void operator=(const NonCopyable&&) {}
private:
NonCopyable(const NonCopyable&);
void operator=(const NonCopyable&);
NonCopyable(NonCopyable&);
NonCopyable& operator=(NonCopyable& other);
};
#endif
#include "Log.h"
#include "CommonTypes.h"

View File

@ -853,7 +853,7 @@ IOFile::IOFile(IOFile&& other)
IOFile& IOFile::operator=(IOFile&& other)
{
IOFile((IOFile&&)other).Swap(*this);
Swap(other);
return *this;
}

View File

@ -143,7 +143,7 @@ bool ReadFileToString(bool text_file, const char *filename, std::string &str);
// simple wrapper for cstdlib file functions to
// hopefully will make error checking easier
// and make forgetting an fclose() harder
class IOFile
class IOFile : public NonCopyable
{
public:
IOFile();
@ -209,12 +209,11 @@ public:
// clear error state
void Clear() { m_good = true; std::clearerr(m_file); }
private:
IOFile(const IOFile&) /*= delete*/;
IOFile& operator=(const IOFile&) /*= delete*/;
std::FILE* m_file;
bool m_good;
private:
IOFile(IOFile&);
IOFile& operator=(IOFile& other);
};
} // namespace

View File

@ -9,7 +9,7 @@
#define __has_include(s) 0
#endif
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !ANDROID
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__
// GCC 4.4 provides <condition_variable>
#include <condition_variable>

View File

@ -9,7 +9,7 @@
#define __has_include(s) 0
#endif
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !ANDROID
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__
// GCC 4.4 provides <mutex>
#include <mutex>
#elif __has_include(<mutex>) && !ANDROID

View File

@ -9,7 +9,7 @@
#define __has_include(s) 0
#endif
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !ANDROID
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__
// GCC 4.4 provides <thread>
#ifndef _GLIBCXX_USE_SCHED_YIELD
#define _GLIBCXX_USE_SCHED_YIELD

View File

@ -19,6 +19,8 @@
#include "VolumeCreator.h"
#include "CommonPaths.h"
#include <memory>
static u32 state_checksum(u32 *buf, int len)
{
u32 checksum = 0;
@ -89,9 +91,17 @@ bool CBoot::Boot_WiiWAD(const char* _pFilename)
WII_IPC_HLE_Interface::SetDefaultContentFile(_pFilename);
CDolLoader DolLoader(pContent->m_pData, pContent->m_Size);
DolLoader.Load();
PC = DolLoader.GetEntryPoint() | 0x80000000;
std::unique_ptr<CDolLoader> pDolLoader;
if (pContent->m_pData)
{
pDolLoader.reset(new CDolLoader(pContent->m_pData, pContent->m_Size));
}
else
{
pDolLoader.reset(new CDolLoader(pContent->m_Filename.c_str()));
}
pDolLoader->Load();
PC = pDolLoader->GetEntryPoint() | 0x80000000;
// Pass the "#002 check"
// Apploader should write the IOS version and revision to 0x3140, and compare it

View File

@ -450,7 +450,7 @@ void SConfig::LoadSettings()
#elif defined __APPLE__
ini.Get("DSP", "Backend", &sBackend, BACKEND_COREAUDIO);
#elif defined _WIN32
ini.Get("DSP", "Backend", &sBackend, BACKEND_DIRECTSOUND);
ini.Get("DSP", "Backend", &sBackend, BACKEND_XAUDIO2);
#elif defined ANDROID
ini.Get("DSP", "Backend", &sBackend, BACKEND_OPENSLES);
#else

View File

@ -14,7 +14,7 @@ CUCode_AX::CUCode_AX(DSPHLE* dsp_hle, u32 crc)
: IUCode(dsp_hle, crc)
, m_work_available(false)
, m_cmdlist_size(0)
, m_run_on_thread(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread)
, m_run_on_thread(false)
{
WARN_LOG(DSPHLE, "Instantiating CUCode_AX: crc=%08x", crc);
m_rMailHandler.PushMail(DSP_INIT);
@ -22,6 +22,9 @@ CUCode_AX::CUCode_AX(DSPHLE* dsp_hle, u32 crc)
LoadResamplingCoefficients();
// DSP HLE on thread is always disabled because it causes audio
// issues/glitching (different timing characteristics). m_run_on_thread is
// always false.
if (m_run_on_thread)
m_axthread = std::thread(SpawnAXThread, this);
}

View File

@ -262,9 +262,7 @@ void Init()
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
AddDevice(Movie::IsUsingPad(i) ? (Movie::IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
else if (NetPlay::IsNetPlayRunning())
AddDevice((SIDevices) g_NetPlaySettings.m_Controllers[i], i);
else
else if (!NetPlay::IsNetPlayRunning())
AddDevice(SConfig::GetInstance().m_SIDevice[i], i);
}
@ -567,7 +565,7 @@ void AddDevice(ISIDevice* pDevice)
void AddDevice(const SIDevices _device, int _iDeviceNumber)
{
ISIDevice* pDevice = SIDevice_Create(_device, _iDeviceNumber);
ISIDevice *pDevice = SIDevice_Create(_device, _iDeviceNumber);
AddDevice(pDevice);
}

View File

@ -60,7 +60,7 @@ CWII_IPC_HLE_Device_es::CWII_IPC_HLE_Device_es(u32 _DeviceID, const std::string&
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
, m_pContentLoader(NULL)
, m_TitleID(-1)
, AccessIdentID(0x6000000)
, m_AccessIdentID(0x6000000)
{
}
@ -91,7 +91,7 @@ void CWII_IPC_HLE_Device_es::LoadWAD(const std::string& _rContentFile)
m_ContentFile = _rContentFile;
}
bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode)
void CWII_IPC_HLE_Device_es::OpenInternal()
{
m_pContentLoader = &DiscIO::CNANDContentManager::Access().GetNANDLoader(m_ContentFile);
@ -119,6 +119,57 @@ bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode)
}
INFO_LOG(WII_IPC_ES, "Set default title to %08x/%08x", (u32)(m_TitleID>>32), (u32)m_TitleID);
}
void CWII_IPC_HLE_Device_es::DoState(PointerWrap& p)
{
IWII_IPC_HLE_Device::DoState(p);
p.Do(m_ContentFile);
OpenInternal();
p.Do(m_AccessIdentID);
p.Do(m_TitleIDs);
u32 Count = m_ContentAccessMap.size();
p.Do(Count);
u32 CFD, Position;
u64 TitleID;
u16 Index;
if (p.GetMode() == PointerWrap::MODE_READ)
{
for (u32 i = 0; i < Count; i++)
{
p.Do(CFD);
p.Do(Position);
p.Do(TitleID);
p.Do(Index);
CFD = OpenTitleContent(CFD, TitleID, Index);
if (CFD != 0xffffffff)
{
m_ContentAccessMap[CFD].m_Position = Position;
}
}
}
else
{
for (auto itr = m_ContentAccessMap.begin(); itr != m_ContentAccessMap.end(); ++itr)
{
CFD = itr->first;
SContentAccess& Access = itr->second;
Position = Access.m_Position;
TitleID = Access.m_TitleID;
Index = Access.m_pContent->m_Index;
p.Do(CFD);
p.Do(Position);
p.Do(TitleID);
p.Do(Index);
}
}
}
bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode)
{
OpenInternal();
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
if (m_Active)
@ -131,11 +182,15 @@ bool CWII_IPC_HLE_Device_es::Close(u32 _CommandAddress, bool _bForce)
{
// Leave deletion of the INANDContentLoader objects to CNANDContentManager, don't do it here!
m_NANDContent.clear();
for (auto itr = m_ContentAccessMap.begin(); itr != m_ContentAccessMap.end(); ++itr)
{
delete itr->second.m_pFile;
}
m_ContentAccessMap.clear();
m_pContentLoader = NULL;
m_TitleIDs.clear();
m_TitleID = -1;
AccessIdentID = 0x6000000;
m_AccessIdentID = 0x6000000;
INFO_LOG(WII_IPC_ES, "ES: Close");
if (!_bForce)
@ -144,6 +199,45 @@ bool CWII_IPC_HLE_Device_es::Close(u32 _CommandAddress, bool _bForce)
return true;
}
u32 CWII_IPC_HLE_Device_es::OpenTitleContent(u32 CFD, u64 TitleID, u16 Index)
{
const DiscIO::INANDContentLoader& Loader = AccessContentDevice(TitleID);
if (!Loader.IsValid())
{
WARN_LOG(WII_IPC_ES, "ES: loader not valid for %llx", TitleID);
return 0xffffffff;
}
const DiscIO::SNANDContent* pContent = Loader.GetContentByIndex(Index);
if (pContent == NULL)
{
return 0xffffffff; //TODO: what is the correct error value here?
}
SContentAccess Access;
Access.m_Position = 0;
Access.m_pContent = pContent;
Access.m_TitleID = TitleID;
if (!pContent->m_pData)
{
std::string Filename = pContent->m_Filename;
INFO_LOG(WII_IPC_ES, "ES: load %s", Filename.c_str());
Access.m_pFile = new File::IOFile(Filename, "rb");
if (!Access.m_pFile->IsGood())
{
WARN_LOG(WII_IPC_ES, "ES: couldn't load %s", Filename.c_str());
return 0xffffffff;
}
}
m_ContentAccessMap[CFD] = Access;
return CFD;
}
bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
{
SIOCtlVBuffer Buffer(_CommandAddress);
@ -242,16 +336,11 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
u32 Index = Memory::Read_U32(Buffer.InBuffer[2].m_Address);
u32 CFD = AccessIdentID++;
m_ContentAccessMap[CFD].m_Position = 0;
m_ContentAccessMap[CFD].m_pContent = AccessContentDevice(TitleID).GetContentByIndex(Index);
_dbg_assert_msg_(WII_IPC_ES, m_ContentAccessMap[CFD].m_pContent != NULL, "No Content for TitleID: %08x/%08x at Index %x", (u32)(TitleID>>32), (u32)TitleID, Index);
// Fix for DLC by itsnotmailmail
if (m_ContentAccessMap[CFD].m_pContent == NULL)
CFD = 0xffffffff; //TODO: what is the correct error value here?
u32 CFD = OpenTitleContent(m_AccessIdentID++, TitleID, Index);
Memory::Write_U32(CFD, _CommandAddress + 0x4);
INFO_LOG(WII_IPC_ES, "IOCTL_ES_OPENTITLECONTENT: TitleID: %08x/%08x Index %i -> got CFD %x", (u32)(TitleID>>32), (u32)TitleID, Index, CFD);
return true;
}
break;
@ -260,19 +349,12 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
{
_dbg_assert_(WII_IPC_ES, Buffer.NumberInBuffer == 1);
_dbg_assert_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 0);
u32 CFD = AccessIdentID++;
u32 Index = Memory::Read_U32(Buffer.InBuffer[0].m_Address);
m_ContentAccessMap[CFD].m_Position = 0;
m_ContentAccessMap[CFD].m_pContent = AccessContentDevice(m_TitleID).GetContentByIndex(Index);
if (m_ContentAccessMap[CFD].m_pContent == NULL)
CFD = 0xffffffff; //TODO: what is the correct error value here?
u32 CFD = OpenTitleContent(m_AccessIdentID++, m_TitleID, Index);
Memory::Write_U32(CFD, _CommandAddress + 0x4);
INFO_LOG(WII_IPC_ES, "IOCTL_ES_OPENCONTENT: Index %i -> got CFD %x", Index, CFD);
return true;
}
break;
@ -286,12 +368,16 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
u32 Size = Buffer.PayloadBuffer[0].m_Size;
u32 Addr = Buffer.PayloadBuffer[0].m_Address;
_dbg_assert_(WII_IPC_ES, m_ContentAccessMap.find(CFD) != m_ContentAccessMap.end());
SContentAccess& rContent = m_ContentAccessMap[CFD];
auto itr = m_ContentAccessMap.find(CFD);
if (itr == m_ContentAccessMap.end())
{
Memory::Write_U32(-1, _CommandAddress + 0x4);
return true;
}
SContentAccess& rContent = itr->second;
_dbg_assert_(WII_IPC_ES, rContent.m_pContent->m_pData != NULL);
u8* pSrc = &rContent.m_pContent->m_pData[rContent.m_Position];
u8* pDest = Memory::GetPointer(Addr);
if (rContent.m_Position + Size > rContent.m_pContent->m_Size)
@ -301,8 +387,26 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
if (Size > 0)
{
if (pDest) {
memcpy(pDest, pSrc, Size);
if (pDest)
{
if (rContent.m_pContent->m_pData)
{
u8* pSrc = &rContent.m_pContent->m_pData[rContent.m_Position];
memcpy(pDest, pSrc, Size);
}
else
{
auto& pFile = rContent.m_pFile;
if (!pFile->Seek(rContent.m_Position, SEEK_SET))
{
ERROR_LOG(WII_IPC_ES, "ES: couldn't seek!");
}
WARN_LOG(WII_IPC_ES, "2 %p", pFile->GetHandle());
if (!pFile->ReadBytes(pDest, Size))
{
ERROR_LOG(WII_IPC_ES, "ES: short read; returning uninitialized data!");
}
}
rContent.m_Position += Size;
} else {
PanicAlertT("IOCTL_ES_READCONTENT - bad destination");
@ -323,11 +427,18 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
u32 CFD = Memory::Read_U32(Buffer.InBuffer[0].m_Address);
CContentAccessMap::iterator itr = m_ContentAccessMap.find(CFD);
m_ContentAccessMap.erase(itr);
INFO_LOG(WII_IPC_ES, "IOCTL_ES_CLOSECONTENT: CFD %x", CFD);
auto itr = m_ContentAccessMap.find(CFD);
if (itr == m_ContentAccessMap.end())
{
Memory::Write_U32(-1, _CommandAddress + 0x4);
return true;
}
delete itr->second.m_pFile;
m_ContentAccessMap.erase(itr);
Memory::Write_U32(0, _CommandAddress + 0x4);
return true;
}
@ -342,8 +453,13 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
u32 Addr = Memory::Read_U32(Buffer.InBuffer[1].m_Address);
u32 Mode = Memory::Read_U32(Buffer.InBuffer[2].m_Address);
_dbg_assert_(WII_IPC_ES, m_ContentAccessMap.find(CFD) != m_ContentAccessMap.end());
SContentAccess& rContent = m_ContentAccessMap[CFD];
auto itr = m_ContentAccessMap.find(CFD);
if (itr == m_ContentAccessMap.end())
{
Memory::Write_U32(-1, _CommandAddress + 0x4);
return true;
}
SContentAccess& rContent = itr->second;
switch (Mode)
{
@ -759,12 +875,19 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
if (pContent)
{
LoadWAD(Common::GetTitleContentPath(TitleID));
CDolLoader DolLoader(pContent->m_pData, pContent->m_Size);
DolLoader.Load(); // TODO: Check why sysmenu does not load the DOL correctly
PC = DolLoader.GetEntryPoint() | 0x80000000;
std::unique_ptr<CDolLoader> pDolLoader;
if (pContent->m_pData)
{
pDolLoader.reset(new CDolLoader(pContent->m_pData, pContent->m_Size));
}
else
{
pDolLoader.reset(new CDolLoader(pContent->m_Filename.c_str()));
}
pDolLoader->Load(); // TODO: Check why sysmenu does not load the DOL correctly
PC = pDolLoader->GetEntryPoint() | 0x80000000;
IOSv = ContentLoader.GetIosVersion();
bSuccess = true;
}
}
}
@ -908,7 +1031,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
const DiscIO::INANDContentLoader& CWII_IPC_HLE_Device_es::AccessContentDevice(u64 _TitleID)
{
if (m_pContentLoader->IsValid() && m_pContentLoader->GetTitleID() == _TitleID)
return* m_pContentLoader;
return *m_pContentLoader;
CTitleToContentMap::iterator itr = m_NANDContent.find(_TitleID);
if (itr != m_NANDContent.end())

View File

@ -8,6 +8,7 @@
#include <map>
#include "WII_IPC_HLE_Device.h"
#include "NANDContentLoader.h"
#include <memory>
class CWII_IPC_HLE_Device_es : public IWII_IPC_HLE_Device
{
@ -19,6 +20,10 @@ public:
void LoadWAD(const std::string& _rContentFile);
void OpenInternal();
virtual void DoState(PointerWrap& p);
virtual bool Open(u32 _CommandAddress, u32 _Mode);
virtual bool Close(u32 _CommandAddress, bool _bForce);
@ -108,10 +113,13 @@ private:
ES_HASH_SIZE_WRONG = -2014, // HASH !=20
};
struct SContentAccess
struct SContentAccess
{
u32 m_Position;
u64 m_TitleID;
const DiscIO::SNANDContent* m_pContent;
// This is a (raw) pointer to work around a MSVC bug.
File::IOFile* m_pFile;
};
typedef std::map<u32, SContentAccess> CContentAccessMap;
@ -124,13 +132,14 @@ private:
std::vector<u64> m_TitleIDs;
u64 m_TitleID;
u32 AccessIdentID;
u32 m_AccessIdentID;
static u8 *keyTable[11];
u64 GetCurrentTitleID() const;
const DiscIO::INANDContentLoader& AccessContentDevice(u64 _TitleID);
u32 OpenTitleContent(u32 CFD, u64 TitleID, u16 Index);
bool IsValid(u64 _TitleID) const;

View File

@ -709,14 +709,14 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtl(u32 _CommandAddress)
}
case IOCTL_SO_LISTEN:
{
INFO_LOG(WII_IPC_NET, "IOCTL_SO_LISTEN "
"BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
BufferIn, BufferInSize, BufferOut, BufferOutSize);
u32 fd = Memory::Read_U32(BufferIn);
u32 BACKLOG = Memory::Read_U32(BufferIn + 0x04);
u32 ret = listen(fd, BACKLOG);
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_LISTEN", false);
INFO_LOG(WII_IPC_NET, "IOCTL_SO_LISTEN = %d "
"BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
ReturnValue, BufferIn, BufferInSize, BufferOut, BufferOutSize);
break;
}
case IOCTL_SO_GETSOCKOPT:
@ -755,6 +755,13 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtl(u32 _CommandAddress)
s32 errorcode = Memory::Read_U32(BufferOut + 0x10);
INFO_LOG(WII_IPC_NET,"IOCTL_SO_GETSOCKOPT error code = %i", errorcode);
}
else if (optname == SO_ERROR)
{
s32 last_error = WiiSockMan::getInstance().getLastNetError();
Memory::Write_U32(sizeof(s32), BufferOut + 0xC);
Memory::Write_U32(last_error, BufferOut + 0x10);
}
break;
}
@ -767,14 +774,16 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtl(u32 _CommandAddress)
u8 optval[20];
Memory::ReadBigEData(optval, BufferIn + 0x10, optlen);
//TODO: bug booto about this, 0x2005 most likely timeout related, default value on wii is , 0x2001 is most likely tcpnodelay
if (level == 6 && (optname == 0x2005 || optname == 0x2001)){
return 0;
}
INFO_LOG(WII_IPC_NET, "IOCTL_SO_SETSOCKOPT(%08x, %08x, %08x, %08x) "
"BufferIn: (%08x, %i), BufferOut: (%08x, %i)"
"%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx",
fd, level, optname, optlen, BufferIn, BufferInSize, BufferOut, BufferOutSize, optval[0], optval[1], optval[2], optval[3], optval[4], optval[5], optval[6], optval[7], optval[8], optval[9], optval[10], optval[11], optval[12], optval[13], optval[14], optval[15], optval[16], optval[17], optval[18], optval[19]);
//TODO: bug booto about this, 0x2005 most likely timeout related, default value on wii is , 0x2001 is most likely tcpnodelay
if (level == 6 && (optname == 0x2005 || optname == 0x2001)){
ReturnValue = 0;
break;
}
// Do the level/optname translation
int nat_level = -1, nat_optname = -1;

View File

@ -37,21 +37,9 @@ char* WiiSockMan::DecodeError(s32 ErrorCode)
#endif
}
s32 WiiSockMan::getNetErrorCode(s32 ret, std::string caller, bool isRW)
s32 translateErrorCode(s32 native_error, bool isRW)
{
#ifdef _WIN32
s32 errorCode = WSAGetLastError();
#else
s32 errorCode = errno;
#endif
if (ret >= 0)
return ret;
DEBUG_LOG(WII_IPC_NET, "%s failed with error %d: %s, ret= %d",
caller.c_str(), errorCode, DecodeError(errorCode), ret);
switch (errorCode)
switch (native_error)
{
case ERRORCODE(EMSGSIZE):
ERROR_LOG(WII_IPC_NET, "Find out why this happened, looks like PEEK failure?");
@ -87,7 +75,29 @@ s32 WiiSockMan::getNetErrorCode(s32 ret, std::string caller, bool isRW)
default:
return -1;
}
}
s32 WiiSockMan::getNetErrorCode(s32 ret, std::string caller, bool isRW)
{
#ifdef _WIN32
s32 errorCode = WSAGetLastError();
#else
s32 errorCode = errno;
#endif
if (ret >= 0)
{
WiiSockMan::getInstance().setLastNetError(ret);
return ret;
}
INFO_LOG(WII_IPC_NET, "%s failed with error %d: %s, ret= %d",
caller.c_str(), errorCode, DecodeError(errorCode), ret);
s32 ReturnValue = translateErrorCode(errorCode, isRW);
WiiSockMan::getInstance().setLastNetError(ReturnValue);
return ReturnValue;
}
WiiSocket::~WiiSocket()
@ -224,7 +234,7 @@ void WiiSocket::update(bool read, bool write, bool except)
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferOut);
WiiSockMan::Convert(*wii_name, local_name);
socklen_t addrlen = wii_name->len;
socklen_t addrlen = sizeof(sockaddr_in);
int ret = (s32)accept(fd, (sockaddr*)&local_name, &addrlen);
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", false);
@ -235,7 +245,9 @@ void WiiSocket::update(bool read, bool write, bool except)
int ret = (s32)accept(fd, NULL, 0);
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", false);
}
WiiSockMan::getInstance().addSocket(ReturnValue);
INFO_LOG(WII_IPC_NET, "IOCTL_SO_ACCEPT "
"BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
BufferIn, BufferInSize, BufferOut, BufferOutSize);
@ -410,26 +422,25 @@ void WiiSocket::update(bool read, bool write, bool except)
{
case IOCTLV_SO_SENDTO:
{
u32 flags = Memory::Read_U32(BufferIn2 + 0x04);
u32 has_destaddr = Memory::Read_U32(BufferIn2 + 0x08);
char * data = (char*)Memory::GetPointer(BufferIn);
u32 flags = Common::swap32(BufferIn2 + 0x04);
u32 has_destaddr = Common::swap32(BufferIn2 + 0x08);
// Act as non blocking when SO_MSG_NONBLOCK is specified
forceNonBlock = ((flags & SO_MSG_NONBLOCK) == SO_MSG_NONBLOCK);
// send/sendto only handles PEEK
flags &= SO_MSG_PEEK | SO_MSG_OOB;
// send/sendto only handles MSG_OOB
flags &= SO_MSG_OOB;
u8 destaddr[28];
struct sockaddr_in* addr = (struct sockaddr_in*)&destaddr;
sockaddr_in local_name;
if (has_destaddr)
{
Memory::ReadBigEData((u8*)&destaddr, BufferIn2 + 0x0C, BufferInSize2 - 0x0C);
addr->sin_family = addr->sin_family >> 8;
{
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferIn2 + 0x0C);
WiiSockMan::Convert(*wii_name, local_name);
}
int ret = sendto(fd, data, BufferInSize, flags,
has_destaddr ? (struct sockaddr*)addr : NULL,
has_destaddr ? (struct sockaddr*)&local_name : NULL,
has_destaddr ? sizeof(sockaddr) : 0);
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_SENDTO", true);
@ -438,60 +449,60 @@ void WiiSocket::update(bool read, bool write, bool except)
has_destaddr ? "IOCTLV_SO_SENDTO " : "IOCTLV_SO_SEND ",
ReturnValue, fd, BufferIn, BufferInSize,
BufferIn2, BufferInSize2,
addr->sin_addr.s_addr & 0xFF,
(addr->sin_addr.s_addr >> 8) & 0xFF,
(addr->sin_addr.s_addr >> 16) & 0xFF,
(addr->sin_addr.s_addr >> 24) & 0xFF
local_name.sin_addr.s_addr & 0xFF,
(local_name.sin_addr.s_addr >> 8) & 0xFF,
(local_name.sin_addr.s_addr >> 16) & 0xFF,
(local_name.sin_addr.s_addr >> 24) & 0xFF
);
break;
}
case IOCTLV_SO_RECVFROM:
{
u32 sock = Memory::Read_U32(BufferIn);
u32 flags = Memory::Read_U32(BufferIn + 4);
char *buf = (char *)Memory::GetPointer(BufferOut);
int len = BufferOutSize;
struct sockaddr_in addr;
memset(&addr, 0, sizeof(sockaddr_in));
socklen_t fromlen = 0;
u32 flags = Memory::Read_U32(BufferIn + 0x04);
char * data = (char *)Memory::GetPointer(BufferOut);
int data_len = BufferOutSize;
sockaddr_in local_name;
memset(&local_name, 0, sizeof(sockaddr_in));
if (BufferOutSize2 != 0)
{
fromlen = BufferOutSize2 >= sizeof(struct sockaddr) ? BufferOutSize2 : sizeof(struct sockaddr);
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferOut2);
WiiSockMan::Convert(*wii_name, local_name);
}
// Act as non blocking when SO_MSG_NONBLOCK is specified
forceNonBlock = ((flags & SO_MSG_NONBLOCK) == SO_MSG_NONBLOCK);
// recv/recvfrom only handles PEEK
// recv/recvfrom only handles PEEK/OOB
flags &= SO_MSG_PEEK | SO_MSG_OOB;
#ifdef _WIN32
if (flags & MSG_PEEK){
if (flags & SO_MSG_PEEK){
unsigned long totallen = 0;
ioctlsocket(sock, FIONREAD, &totallen);
ioctlsocket(fd, FIONREAD, &totallen);
ReturnValue = totallen;
break;
}
#endif
int ret = recvfrom(sock, buf, len, flags,
fromlen ? (struct sockaddr*) &addr : NULL,
fromlen ? &fromlen : 0);
ReturnValue = WiiSockMan::getNetErrorCode(ret, fromlen ? "SO_RECVFROM" : "SO_RECV", true);
socklen_t addrlen = sizeof(sockaddr_in);
int ret = recvfrom(fd, data, data_len, flags,
BufferOutSize2 ? (struct sockaddr*) &local_name : NULL,
BufferOutSize2 ? &addrlen : 0);
ReturnValue = WiiSockMan::getNetErrorCode(ret, BufferOutSize2 ? "SO_RECVFROM" : "SO_RECV", true);
INFO_LOG(WII_IPC_NET, "%s(%d, %p) Socket: %08X, Flags: %08X, "
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut: (%08x, %i), BufferOut2: (%08x, %i)",
fromlen ? "IOCTLV_SO_RECVFROM " : "IOCTLV_SO_RECV ",
ReturnValue, buf, sock, flags,
BufferOutSize2 ? "IOCTLV_SO_RECVFROM " : "IOCTLV_SO_RECV ",
ReturnValue, data, fd, flags,
BufferIn, BufferInSize, BufferIn2, BufferInSize2,
BufferOut, BufferOutSize, BufferOut2, BufferOutSize2);
if (BufferOutSize2 != 0)
{
addr.sin_family = (addr.sin_family << 8) | (BufferOutSize2&0xFF);
Memory::WriteBigEData((u8*)&addr, BufferOut2, BufferOutSize2);
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferOut2);
WiiSockMan::Convert(local_name, *wii_name, addrlen);
}
break;
}
@ -506,7 +517,7 @@ void WiiSocket::update(bool read, bool write, bool except)
|| (!it->is_ssl && ReturnValue != -SO_EAGAIN && ReturnValue != -SO_EINPROGRESS && ReturnValue != -SO_EALREADY)
|| (it->is_ssl && ReturnValue != SSL_ERR_WAGAIN && ReturnValue != SSL_ERR_RAGAIN))
{
DEBUG_LOG(WII_IPC_NET, "IOCTL(V) Sock: %d ioctl/v: %d returned: %d nonBlock: %d forceNonBlock: %d",
DEBUG_LOG(WII_IPC_NET, "IOCTL(V) Sock: %08x ioctl/v: %d returned: %d nonBlock: %d forceNonBlock: %d",
fd, it->is_ssl ? it->ssl_type : it->net_type, ReturnValue, nonBlock, forceNonBlock);
WiiSockMan::EnqueueReply(it->_CommandAddress, ReturnValue);
it = pending_sockops.erase(it);
@ -532,6 +543,15 @@ void WiiSocket::doSock(u32 _CommandAddress, SSL_IOCTL type)
pending_sockops.push_back(so);
}
void WiiSockMan::addSocket(s32 fd)
{
if (fd >= 0)
{
WiiSocket& sock = WiiSockets[fd];
sock.setFd(fd);
}
}
s32 WiiSockMan::newSocket(s32 af, s32 type, s32 protocol)
{
if (NetPlay::IsNetPlayRunning()
@ -543,11 +563,7 @@ s32 WiiSockMan::newSocket(s32 af, s32 type, s32 protocol)
s32 fd = (s32)socket(af, type, protocol);
s32 ret = getNetErrorCode(fd, "newSocket", false);
if (ret >= 0)
{
WiiSocket& sock = WiiSockets[ret];
sock.setFd(ret);
}
addSocket(ret);
return ret;
}

View File

@ -210,7 +210,10 @@ public:
static void Convert(sockaddr_in const & from, WiiSockAddrIn& to, s32 addrlen=-1);
// NON-BLOCKING FUNCTIONS
s32 newSocket(s32 af, s32 type, s32 protocol);
void addSocket(s32 fd);
s32 delSocket(s32 s);
s32 getLastNetError() {return errono_last;}
void setLastNetError(s32 error) {errono_last = error;}
void clean()
{
@ -237,8 +240,9 @@ private:
WiiSockMan() {}; // Constructor? (the {} brackets) are needed here.
WiiSockMan(WiiSockMan const&); // Don't Implement
void operator=(WiiSockMan const&); // Don't implement
std::unordered_map<s32, WiiSocket> WiiSockets;
s32 errono_last;
};
#endif

View File

@ -8,6 +8,7 @@
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
#include "IPC_HLE/WII_IPC_HLE_WiiMote.h"
// for gcpad
#include "HW/SI.h"
#include "HW/SI_DeviceGCController.h"
#include "HW/SI_DeviceGCSteeringWheel.h"
#include "HW/SI_DeviceDanceMat.h"
@ -187,6 +188,8 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
for (PadMapping i = 0; i < 4; i++)
packet >> m_pad_map[i];
UpdateDevices();
m_dialog->Update();
}
break;
@ -233,8 +236,6 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> g_NetPlaySettings.m_DSPEnableJIT;
packet >> g_NetPlaySettings.m_DSPHLE;
packet >> g_NetPlaySettings.m_WriteToMemcard;
for (unsigned int i = 0; i < 4; ++i)
packet >> g_NetPlaySettings.m_Controllers[i];
}
m_dialog->OnMsgStartGame();
@ -422,6 +423,8 @@ bool NetPlayClient::StartGame(const std::string &path)
// boot game
m_dialog->BootGame(path);
UpdateDevices();
// temporary
NetWiimote nw;
for (unsigned int i = 0; i<4; ++i)
@ -437,6 +440,16 @@ bool NetPlayClient::ChangeGame(const std::string&)
return true;
}
// called from ---NETPLAY--- thread
void NetPlayClient::UpdateDevices()
{
for (PadMapping i = 0; i < 4; i++)
{
// XXX: add support for other device types? does it matter?
SerialInterface::AddDevice(m_pad_map[i] > 0 ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i);
}
}
// called from ---NETPLAY--- thread
void NetPlayClient::ClearBuffers()
{

View File

@ -117,6 +117,7 @@ protected:
PadMapping m_pad_map[4];
private:
void UpdateDevices();
void SendPadState(const PadMapping in_game_pad, const NetPad& np);
unsigned int OnData(sf::Packet& packet);

View File

@ -14,7 +14,6 @@ struct NetSettings
bool m_DSPHLE;
bool m_DSPEnableJIT;
bool m_WriteToMemcard;
u8 m_Controllers[4];
};
struct Rpt : public std::vector<u8>
@ -24,7 +23,7 @@ struct Rpt : public std::vector<u8>
typedef std::vector<Rpt> NetWiimote;
#define NETPLAY_VERSION "Dolphin NetPlay 2013-08-23"
#define NETPLAY_VERSION "Dolphin NetPlay 2013-08-31"
// messages
enum

View File

@ -441,8 +441,6 @@ bool NetPlayServer::StartGame(const std::string &path)
spac << m_settings.m_DSPEnableJIT;
spac << m_settings.m_DSPHLE;
spac << m_settings.m_WriteToMemcard;
for (unsigned int i = 0; i < 4; ++i)
spac << m_settings.m_Controllers[i];
std::lock_guard<std::recursive_mutex> lkp(m_crit.players);
std::lock_guard<std::recursive_mutex> lks(m_crit.send);

View File

@ -122,6 +122,10 @@ public:
void GetCarryAndClear(ARMReg reg);
void FinalizeCarry(ARMReg reg);
// TODO: This shouldn't be here
void StoreFromReg(ARMReg dest, ARMReg value, int accessSize, s32 offset);
void LoadToReg(ARMReg dest, ARMReg addr, int accessSize, s32 offset);
// OPCODES
void unknown_instruction(UGeckoInstruction _inst);
void Default(UGeckoInstruction _inst);
@ -193,6 +197,7 @@ public:
void sthu(UGeckoInstruction _inst);
void stw(UGeckoInstruction _inst);
void stwu(UGeckoInstruction _inst);
void stwx(UGeckoInstruction _inst);
// Floating point
void fabsx(UGeckoInstruction _inst);
@ -207,6 +212,7 @@ public:
// Floating point loadStore
void lfs(UGeckoInstruction _inst);
void lfd(UGeckoInstruction _inst);
void stfs(UGeckoInstruction _inst);
// Paired Singles
void ps_add(UGeckoInstruction _inst);

View File

@ -107,14 +107,11 @@ void JitArm::fsubx(UGeckoInstruction inst)
if (inst.Rc) Helper_UpdateCR1(vD);
}
// Breaks Animal Crossing
void JitArm::fmulsx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(FloatingPoint)
Default(inst); return;
ARMReg vA = fpr.R0(inst.FA);
ARMReg vC = fpr.R0(inst.FC);
ARMReg vD0 = fpr.R0(inst.FD);
@ -122,6 +119,7 @@ void JitArm::fmulsx(UGeckoInstruction inst)
VMUL(vD0, vA, vC);
VMOV(vD1, vD0);
fpr.Flush(); // Shouldn't be needed. Missing a flush somewhere
if (inst.Rc) Helper_UpdateCR1(vD0);
}
void JitArm::fmulx(UGeckoInstruction inst)

View File

@ -31,12 +31,36 @@
#include "JitRegCache.h"
#include "JitAsm.h"
#ifdef ANDROID
#define FASTMEM 0
#else
#define FASTMEM 1
#endif
void JitArm::stb(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStore)
ARMReg RS = gpr.R(inst.RS);
#if 0 // FASTMEM
// R10 contains the dest address
ARMReg Value = R11;
ARMReg RA;
if (inst.RA)
RA = gpr.R(inst.RA);
MOV(Value, RS);
if (inst.RA)
{
MOVI2R(R10, inst.SIMM_16, false);
ADD(R10, R10, RA);
}
else
{
MOVI2R(R10, (u32)inst.SIMM_16, false);
NOP(1);
}
StoreFromReg(R10, Value, 16, 0);
#else
ARMReg ValueReg = gpr.GetReg();
ARMReg Addr = gpr.GetReg();
ARMReg Function = gpr.GetReg();
@ -58,6 +82,7 @@ void JitArm::stb(UGeckoInstruction inst)
BL(Function);
POP(4, R0, R1, R2, R3);
gpr.Unlock(ValueReg, Addr, Function);
#endif
}
void JitArm::stbu(UGeckoInstruction inst)
@ -97,6 +122,25 @@ void JitArm::sth(UGeckoInstruction inst)
JITDISABLE(LoadStore)
ARMReg RS = gpr.R(inst.RS);
#if 0 // FASTMEM
// R10 contains the dest address
ARMReg Value = R11;
ARMReg RA;
if (inst.RA)
RA = gpr.R(inst.RA);
MOV(Value, RS);
if (inst.RA)
{
MOVI2R(R10, inst.SIMM_16, false);
ADD(R10, R10, RA);
}
else
{
MOVI2R(R10, (u32)inst.SIMM_16, false);
NOP(1);
}
StoreFromReg(R10, Value, 16, 0);
#else
ARMReg ValueReg = gpr.GetReg();
ARMReg Addr = gpr.GetReg();
ARMReg Function = gpr.GetReg();
@ -118,6 +162,7 @@ void JitArm::sth(UGeckoInstruction inst)
BL(Function);
POP(4, R0, R1, R2, R3);
gpr.Unlock(ValueReg, Addr, Function);
#endif
}
void JitArm::sthu(UGeckoInstruction inst)
{
@ -158,6 +203,29 @@ void JitArm::stw(UGeckoInstruction inst)
JITDISABLE(LoadStore)
ARMReg RS = gpr.R(inst.RS);
#if FASTMEM
// R10 contains the dest address
if (Core::g_CoreStartupParameter.bFastmem)
{
ARMReg Value = R11;
ARMReg RA;
if (inst.RA)
RA = gpr.R(inst.RA);
MOV(Value, RS);
if (inst.RA)
{
MOVI2R(R10, inst.SIMM_16, false);
ADD(R10, R10, RA);
}
else
{
MOVI2R(R10, (u32)inst.SIMM_16, false);
NOP(1);
}
StoreFromReg(R10, Value, 32, 0);
}
else
#endif
{
ARMReg ValueReg = gpr.GetReg();
ARMReg Addr = gpr.GetReg();
@ -214,6 +282,113 @@ void JitArm::stwu(UGeckoInstruction inst)
gpr.Unlock(ValueReg, Addr, Function);
}
void JitArm::stwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStore)
u32 a = inst.RA, b = inst.RB, s = inst.RB;
if (a) {
// Doesn't work
Default(inst); return;
}
ARMReg RB = gpr.R(b);
ARMReg RS = gpr.R(s);
ARMReg ValueReg = gpr.GetReg();
ARMReg Addr = gpr.GetReg();
ARMReg Function = gpr.GetReg();
if (a)
ADD(Addr, gpr.R(a), RB);
else
MOV(Addr, RB);
MOV(ValueReg, RS);
fpr.Flush();
MOVI2R(Function, (u32)&Memory::Write_U32);
PUSH(4, R0, R1, R2, R3);
MOV(R0, ValueReg);
MOV(R1, Addr);
BL(Function);
POP(4, R0, R1, R2, R3);
gpr.Unlock(ValueReg, Addr, Function);
}
void JitArm::StoreFromReg(ARMReg dest, ARMReg value, int accessSize, s32 offset)
{
ARMReg rA = gpr.GetReg();
// All this gets replaced on backpatch
MOVI2R(rA, Memory::MEMVIEW32_MASK, false); // 1-2
AND(dest, dest, rA); // 3
MOVI2R(rA, (u32)Memory::base, false); // 4-5
ADD(dest, dest, rA); // 6
switch (accessSize)
{
case 32:
REV(value, value); // 7
break;
case 16:
REV16(value, value);
break;
case 8:
NOP(1);
break;
}
switch (accessSize)
{
case 32:
STR(value, dest); // 8
break;
case 16:
STRH(value, dest);
break;
case 8:
STRB(value, dest);
break;
}
gpr.Unlock(rA);
}
void JitArm::LoadToReg(ARMReg dest, ARMReg addr, int accessSize, s32 offset)
{
ARMReg rA = gpr.GetReg();
MOVI2R(rA, offset, false); // -3
ADD(addr, addr, rA); // - 1
// All this gets replaced on backpatch
MOVI2R(rA, Memory::MEMVIEW32_MASK, false); // 2
AND(addr, addr, rA); // 3
MOVI2R(rA, (u32)Memory::base, false); // 5
ADD(addr, addr, rA); // 6
switch (accessSize)
{
case 32:
LDR(dest, addr); // 7
break;
case 16:
LDRH(dest, addr);
break;
case 8:
LDRB(dest, addr);
break;
}
switch (accessSize)
{
case 32:
REV(dest, dest); // 9
break;
case 16:
REV16(dest, dest);
break;
case 8:
NOP(1);
break;
}
gpr.Unlock(rA);
}
void JitArm::lbz(UGeckoInstruction inst)
{
INSTRUCTION_START
@ -225,6 +400,24 @@ void JitArm::lbz(UGeckoInstruction inst)
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
CMP(rA, EXCEPTION_DSI);
FixupBranch DoNotLoad = B_CC(CC_EQ);
#if FASTMEM
// Backpatch route
// Gets loaded in to RD
// Address is in R10
if (Core::g_CoreStartupParameter.bFastmem)
{
gpr.Unlock(rA, rB);
if (inst.RA)
{
ARMReg RA = gpr.R(inst.RA);
MOV(R10, RA); // - 4
}
else
MOV(R10, 0); // - 4
LoadToReg(RD, R10, 8, inst.SIMM_16);
}
else
#endif
{
if (inst.RA)
{
@ -258,6 +451,22 @@ void JitArm::lhz(UGeckoInstruction inst)
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
CMP(rA, EXCEPTION_DSI);
FixupBranch DoNotLoad = B_CC(CC_EQ);
#if FASTMEM
// Backpatch route
// Gets loaded in to RD
// Address is in R10
gpr.Unlock(rA, rB);
if (inst.RA)
{
ARMReg RA = gpr.R(inst.RA);
MOV(R10, RA); // - 4
}
else
MOV(R10, 0); // - 4
LoadToReg(RD, R10, 16, (u32)inst.SIMM_16);
#else
if (inst.RA)
{
MOVI2R(rB, inst.SIMM_16);
@ -275,6 +484,7 @@ void JitArm::lhz(UGeckoInstruction inst)
POP(4, R0, R1, R2, R3);
MOV(RD, rA);
gpr.Unlock(rA, rB);
#endif
SetJumpTarget(DoNotLoad);
}
void JitArm::lha(UGeckoInstruction inst)
@ -321,6 +531,25 @@ void JitArm::lwz(UGeckoInstruction inst)
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
CMP(rA, EXCEPTION_DSI);
FixupBranch DoNotLoad = B_CC(CC_EQ);
#if FASTMEM
// Backpatch route
// Gets loaded in to RD
// Address is in R10
if (Core::g_CoreStartupParameter.bFastmem)
{
gpr.Unlock(rA, rB);
if (inst.RA)
{
ARMReg RA = gpr.R(inst.RA);
MOV(R10, RA); // - 4
}
else
MOV(R10, 0); // - 4
LoadToReg(RD, R10, 32, (u32)inst.SIMM_16);
}
else
#endif
{
if (inst.RA)
{
@ -381,6 +610,24 @@ void JitArm::lwzx(UGeckoInstruction inst)
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
CMP(rA, EXCEPTION_DSI);
FixupBranch DoNotLoad = B_CC(CC_EQ);
#if FASTMEM
// Backpatch route
// Gets loaded in to RD
// Address is in R10
if (Core::g_CoreStartupParameter.bFastmem)
{
gpr.Unlock(rA, rB);
if (inst.RA)
{
ARMReg RA = gpr.R(inst.RA);
ADD(R10, RA, RB); // - 4
}
else
MOV(R10, RB); // -4
LoadToReg(RD, R10, 32, 0);
}
else
#endif
{
if (inst.RA)
{

View File

@ -39,6 +39,9 @@ void JitArm::lfs(UGeckoInstruction inst)
ARMReg rA = gpr.GetReg();
ARMReg rB = gpr.GetReg();
fpr.Flush();
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
CMP(rA, EXCEPTION_DSI);
FixupBranch DoNotLoad = B_CC(CC_EQ);
@ -52,7 +55,6 @@ void JitArm::lfs(UGeckoInstruction inst)
else
MOVI2R(rB, (u32)inst.SIMM_16);
fpr.Flush();
MOVI2R(rA, (u32)&Memory::Read_F32);
PUSH(4, R0, R1, R2, R3);
@ -61,6 +63,9 @@ void JitArm::lfs(UGeckoInstruction inst)
ARMReg v0 = fpr.R0(inst.FD);
ARMReg v1 = fpr.R1(inst.FD);
#if !defined(__ARM_PCS_VFP) // SoftFP returns in R0
VMOV(S0, R0);
#endif
VCVT(v0, S0, 0);
VCVT(v1, S0, 0);
@ -77,6 +82,9 @@ void JitArm::lfd(UGeckoInstruction inst)
ARMReg rA = gpr.GetReg();
ARMReg rB = gpr.GetReg();
fpr.Flush();
LDR(rA, R9, PPCSTATE_OFF(Exceptions));
CMP(rA, EXCEPTION_DSI);
FixupBranch DoNotLoad = B_CC(CC_EQ);
@ -90,7 +98,6 @@ void JitArm::lfd(UGeckoInstruction inst)
else
MOVI2R(rB, (u32)inst.SIMM_16);
fpr.Flush();
MOVI2R(rA, (u32)&Memory::Read_F64);
PUSH(4, R0, R1, R2, R3);
@ -98,10 +105,48 @@ void JitArm::lfd(UGeckoInstruction inst)
BL(rA);
ARMReg v0 = fpr.R0(inst.FD);
#if !defined(__ARM_PCS_VFP) // SoftFP returns in R0 and R1
VMOV(v0, R0);
#else
VMOV(v0, D0);
#endif
POP(4, R0, R1, R2, R3);
gpr.Unlock(rA, rB);
SetJumpTarget(DoNotLoad);
}
void JitArm::stfs(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
ARMReg rA = gpr.GetReg();
ARMReg rB = gpr.GetReg();
ARMReg v0 = fpr.R0(inst.FS);
VCVT(S0, v0, 0);
fpr.Flush();
if (inst.RA)
{
MOVI2R(rB, inst.SIMM_16);
ARMReg RA = gpr.R(inst.RA);
ADD(rB, rB, RA);
}
else
MOVI2R(rB, (u32)inst.SIMM_16);
MOVI2R(rA, (u32)&Memory::Write_U32);
PUSH(4, R0, R1, R2, R3);
VMOV(R0, S0);
MOV(R1, rB);
BL(rA);
POP(4, R0, R1, R2, R3);
gpr.Unlock(rA, rB);
}

View File

@ -102,7 +102,7 @@ static GekkoOPTemplate primarytable[] =
{50, &JitArm::lfd}, //"lfd", OPTYPE_LOADFP, FL_IN_A}},
{51, &JitArm::Default}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}},
{52, &JitArm::Default}, //"stfs", OPTYPE_STOREFP, FL_IN_A}},
{52, &JitArm::stfs}, //"stfs", OPTYPE_STOREFP, FL_IN_A}},
{53, &JitArm::Default}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}},
{54, &JitArm::Default}, //"stfd", OPTYPE_STOREFP, FL_IN_A}},
{55, &JitArm::Default}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}},
@ -249,7 +249,7 @@ static GekkoOPTemplate table31[] =
{597, &JitArm::Default}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}},
//store word
{151, &JitArm::Default}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
{151, &JitArm::stwx}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
{183, &JitArm::Default}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}},
//store halfword
@ -293,7 +293,7 @@ static GekkoOPTemplate table31[] =
{659, &JitArm::Default}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}},
{4, &JitArm::Break}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}},
{598, &JitArm::Default}, //"sync", OPTYPE_SYSTEM, 0, 2}},
{598, &JitArm::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}},
{982, &JitArm::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}},
// Unused instructions on GC

View File

@ -44,7 +44,12 @@ JitArmAsmRoutineManager asm_routines;
void JitArmAsmRoutineManager::Generate()
{
enterCode = GetCodePtr();
PUSH(2, R11, _LR); // R11 is frame pointer in Debug.
PUSH(9, R4, R5, R6, R7, R8, R9, R10, R11, _LR);
// Take care to 8-byte align stack for function calls.
// We are misaligned here because of an odd number of args for PUSH.
// It's not like x86 where you need to account for an extra 4 bytes
// consumed by CALL.
SUB(_SP, _SP, 4);
MOVI2R(R0, (u32)&CoreTiming::downcount);
MOVI2R(R9, (u32)&PowerPC::ppcState.spr[0]);
@ -129,7 +134,9 @@ void JitArmAsmRoutineManager::Generate()
SetJumpTarget(Exit);
POP(2, R11, _PC);
ADD(_SP, _SP, 4);
POP(9, R4, R5, R6, R7, R8, R9, R10, R11, _PC); // Returns
FlushIcache();
}

View File

@ -5,7 +5,7 @@
#include "NANDContentLoader.h"
#include <algorithm>
#include <cctype>
#include <cctype>
#include "Crypto/aes.h"
#include "MathUtil.h"
#include "FileUtil.h"
@ -42,7 +42,7 @@ void CSharedContent::UpdateLocation()
CSharedContent::~CSharedContent()
{}
std::string CSharedContent::GetFilenameFromSHA1(u8* _pHash)
std::string CSharedContent::GetFilenameFromSHA1(const u8* _pHash)
{
for (size_t i=0; i<m_Elements.size(); i++)
{
@ -58,7 +58,7 @@ std::string CSharedContent::GetFilenameFromSHA1(u8* _pHash)
return "unk";
}
std::string CSharedContent::AddSharedContent(u8* _pHash)
std::string CSharedContent::AddSharedContent(const u8* _pHash)
{
std::string szFilename = GetFilenameFromSHA1(_pHash);
if (strcasecmp(szFilename.c_str(), "unk") == 0)
@ -170,8 +170,11 @@ const SNANDContent* CNANDContentLoader::GetContentByIndex(int _Index) const
{
for (size_t i=0; i<m_Content.size(); i++)
{
if (m_Content[i].m_Index == _Index)
return &m_Content[i];
const SNANDContent* pContent = &m_Content[i];
if (pContent->m_Index == _Index)
{
return pContent;
}
}
return NULL;
}
@ -210,8 +213,8 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
File::IOFile pTMDFile(TMDFileName, "rb");
if (!pTMDFile)
{
DEBUG_LOG(DISCIO, "CreateFromDirectory: error opening %s",
TMDFileName.c_str());
WARN_LOG(DISCIO, "CreateFromDirectory: error opening %s",
TMDFileName.c_str());
return false;
}
u32 pTMDSize = (u32)File::GetSize(TMDFileName);
@ -219,8 +222,7 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
pTMDFile.ReadBytes(pTMD, (size_t)pTMDSize);
pTMDFile.Close();
}
if (!pTMD)
return false;
memcpy(m_TMDView, pTMD + 0x180, TMD_VIEW_SIZE);
memcpy(m_TMDHeader, pTMD, TMD_HEADER_SIZE);
@ -262,35 +264,20 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
}
rContent.m_pData = NULL;
char szFilename[1024];
if (rContent.m_Type & 0x8000) // shared app
{
std::string Filename = CSharedContent::AccessInstance().GetFilenameFromSHA1(rContent.m_SHA1Hash);
strcpy(szFilename, Filename.c_str());
rContent.m_Filename = CSharedContent::AccessInstance().GetFilenameFromSHA1(rContent.m_SHA1Hash);
}
else
{
sprintf(szFilename, "%s/%08x.app", m_Path.c_str(), rContent.m_ContentID);
rContent.m_Filename = StringFromFormat("%s/%08x.app", m_Path.c_str(), rContent.m_ContentID);
}
INFO_LOG(DISCIO, "NANDContentLoader: load %s", szFilename);
File::IOFile pFile(szFilename, "rb");
if (pFile)
// Be graceful about incorrect tmds.
if (File::Exists(rContent.m_Filename))
{
const u64 ContentSize = File::GetSize(szFilename);
rContent.m_pData = new u8[(u32)ContentSize];
_dbg_assert_msg_(BOOT, rContent.m_Size==ContentSize, "TMDLoader: Incorrect filesize (%s %i). Your NAND dump may be corrupt.", szFilename, i);
pFile.ReadBytes(rContent.m_pData, (size_t)ContentSize);
}
else
{
ERROR_LOG(DISCIO, "NANDContentLoader: error opening %s", szFilename);
delete [] pTMD;
return false;
rContent.m_Size = (u32) File::GetSize(rContent.m_Filename);
}
}
@ -493,7 +480,7 @@ u64 CNANDContentManager::Install_WiiWAD(std::string &fileName)
for (u32 i = 0; i < ContentLoader.GetContentSize(); i++)
{
SNANDContent Content = ContentLoader.GetContent()[i];
const SNANDContent& Content = ContentLoader.GetContent()[i];
pTMDFile.WriteBytes(Content.m_Header, INANDContentLoader::CONTENT_HEADER_SIZE);

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