Merge branch 'master' into android-new-control-input-overlay

Conflicts:
	Source/Android/res/values-ja/strings.xml
	Source/Android/res/values/strings.xml
	Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
	Source/Android/src/org/dolphinemu/dolphinemu/emulation/EmulationActivity.java
	Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
	Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListActivity.java
	Source/Android/src/org/dolphinemu/dolphinemu/settings/video/VideoSettingsFragment.java
This commit is contained in:
Ryan Houdek 2013-11-24 16:12:00 -06:00
commit ba18f38e70
154 changed files with 1743 additions and 1079 deletions

View File

@ -524,11 +524,16 @@ else()
set(LZO lzo2)
endif()
if(ANDROID)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
check_lib(PNG png png.h QUIET)
endif()
if (PNG_FOUND)
message("Using shared libpng")
else()
message("Using static libpng from Externals")
add_subdirectory(Externals/libpng)
include_directories(Externals/libpng)
set(PNG libpng)
set(PNG png)
endif()
if(OPENAL_FOUND)

View File

@ -0,0 +1,34 @@
# G5TE69 - Tiger Woods PGA TOUR 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 =
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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False
[Video_Settings]
SafeTextureCacheColorSamples = 512

View File

@ -0,0 +1,34 @@
# G5TP69 - Tiger Woods PGA TOUR 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 =
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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False
[Video_Settings]
SafeTextureCacheColorSamples = 512

View File

@ -0,0 +1,31 @@
# G6WE69 - Tiger Woods PGA TOUR 06
[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 =
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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False

View File

@ -0,0 +1,31 @@
# G6WP69 - Tiger Woods PGA TOUR 06
[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 =
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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False

View File

@ -0,0 +1,23 @@
# GAKE5D - Midway Arcade Treasures
[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]
# Add memory patches to be applied every frame here.
[ActionReplay]
# Add action replay cheats here.
[Video_Settings]
SafeTextureCacheColorSamples = 0

View File

@ -0,0 +1,24 @@
# GAYE5D - Midway Arcade Treasures 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 =
[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_Settings]
SafeTextureCacheColorSamples = 0
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,33 @@
# GCCJ01 - FINAL FANTASY Crystal Chronicles
[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 =
[Video_Settings]
SafeTextureCacheColorSamples = 512
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -0,0 +1,32 @@
# GCCJGC - FINAL FANTASY Crystal Chronicles
[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 =
[Video_Settings]
SafeTextureCacheColorSamples = 512
[Video_Hacks]
EFBEmulateFormatChanges = True

View File

@ -0,0 +1,31 @@
# GE3E5D - Midway Arcade Treasures 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 = 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 =
[Video_Settings]
SafeTextureCacheColorSamples = 0
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,19 @@
# GFXE5D - Freestyle Metal X
[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
[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.

View File

@ -26,7 +26,8 @@ PH_ZNear =
PH_ZFar =
[Video_Settings]
VSync = False
UseXFB = True
UseRealXFB = False
[Video_Hacks]
DlistCachingEnable = False

View File

@ -26,7 +26,8 @@ PH_ZNear =
PH_ZFar =
[Video_Settings]
VSync = False
UseXFB = True
UseRealXFB = False
[Video_Hacks]
DlistCachingEnable = False

View File

@ -26,7 +26,8 @@ PH_ZNear =
PH_ZFar =
[Video_Settings]
VSync = False
UseXFB = True
UseRealXFB = False
[Video_Hacks]
DlistCachingEnable = False

View File

@ -6,7 +6,7 @@
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = Slow and cutscenes are black
EmulationIssues = Needs real xfb for the videos to show up.
[OnLoad]
# Add memory patches to be loaded once on boot here.
@ -17,3 +17,6 @@ EmulationIssues = Slow and cutscenes are black
[ActionReplay]
# Add action replay cheats here.
[Video_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GHNX71 - Hunter: The Reckoning
[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 show up.
[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_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GNED78 - Finding Nemo
[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 show up.
[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_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GNEE78 - Finding Nemo
[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 show up.
[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_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GNEF78 - Finding Nemo
[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 show up.
[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_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GNEP78 - Finding Nemo
[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 show up.
[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_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GNES78 - Finding Nemo
[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 show up.
[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_Settings]
UseXFB = True
UseRealXFB = True

View File

@ -0,0 +1,22 @@
# GT4D52 - Tony Hawk's Pro Skater 4
[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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False

View File

@ -0,0 +1,22 @@
# GT4E52 - Tony Hawk's Pro Skater 4
[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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False

View File

@ -0,0 +1,22 @@
# GT4F52 - Tony Hawk's Pro Skater 4
[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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False

View File

@ -0,0 +1,22 @@
# GT4P52 - Tony Hawk's Pro Skater 4
[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_Hacks]
EFBCopyEnable = True
EFBToTextureEnable = False

View File

@ -0,0 +1,33 @@
# GYQE01 - Mario Superstar Baseball
[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 = Player's shadow needs efb to ram and texture cache set to safe to appear properly.
[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
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -6,6 +6,7 @@
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = Player's shadow needs efb to ram and texture cache set to safe to appear properly.
[OnLoad]
# Add memory patches to be loaded once on boot here.
@ -16,3 +17,17 @@ EmulationStateId = 4
[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
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -6,6 +6,7 @@
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = Player's shadow needs efb to ram and texture cache set to safe to appear properly.
[OnLoad]
# Add memory patches to be loaded once on boot here.
@ -16,3 +17,17 @@ EmulationStateId = 4
[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
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,34 @@
# SG8EG9 - Yogi Bear
[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 =
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]
UseXFB = True
UseRealXFB = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -0,0 +1,34 @@
# SG8PAF - Yogi Bear
[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 =
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]
UseXFB = True
UseRealXFB = False
[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True

View File

@ -20,3 +20,6 @@ EmulationIssues =
[Video]
ProjectionHack = 0
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -0,0 +1,30 @@
# WHUEGL - Ghost Mansion Party
[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 =
[Video_Settings]
UseXFB = True
UseRealXFB = False

View File

@ -868,8 +868,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
${SRCS_GENERICOSX}
${SRCS_OSX}
${SRCS_UNIX})
include_directories(../libpng)
add_subdirectory(../libpng ../libpng)
set(LIBS
png
iconv

View File

@ -8,8 +8,12 @@
<!-- Save State Slots -->
<item
android:id="@+id/saveStateRoot"
android:id="@+id/takeScreenshot"
android:showAsAction="ifRoom"
android:title="@string/overlay_screenshot"/>
<item
android:id="@+id/saveStateRoot"
android:showAsAction="never"
android:title="@string/overlay_savestate">
<menu>
<item android:id="@+id/saveSlot1"
@ -32,7 +36,7 @@
<!-- Load State Slots -->
<item
android:id="@+id/loadStateRoot"
android:showAsAction="ifRoom"
android:showAsAction="never"
android:title="@string/overlay_loadstate">
<menu>
<item android:id="@+id/loadSlot1"

View File

@ -11,6 +11,7 @@
<!-- About Fragment -->
<string name="build_revision">ビルドのバージョン</string>
<string name="supports_gles3">サポートのOpenGL ES 3</string>
<string name="supports_neon">サポートのNEON</string>
<!-- Folder Browser -->
<string name="current_dir">現在のディレクトリ: %1$s</string>
@ -25,12 +26,17 @@
<string name="settings">設定</string>
<string name="about">について</string>
<!-- Game List Activity - Device Compatibility AlertDialog -->
<string name="device_compat_warning">デバイスの互換性の警告</string>
<string name="device_compat_warning_msg">この電話は、NEON拡張をサポートしていません。 おそらくDolphinを実行することはできません。\nあなたはとにかくそれを実行してみますか</string>
<!-- Game List Fragment -->
<string name="file_clicked">クリックされたファイル: %1$s</string>
<!-- Emulation Window Overlay -->
<string name="enable_input_overlay">入力オーバーレイを有効</string>
<string name="disable_input_overlay">入力オーバーレイを無効</string>
<string name="overlay_screenshot">スクリーンショットを撮る</string>
<string name="overlay_savestate">ステートセーブ</string>
<string name="overlay_loadstate">ステートロード</string>
<string name="overlay_exit_emulation">終了</string>

View File

@ -11,6 +11,7 @@
<!-- About Fragment -->
<string name="build_revision">Build Revision</string>
<string name="supports_gles3">Supports OpenGL ES 3</string>
<string name="supports_neon">Supports NEON</string>
<!-- Folder Browser -->
<string name="current_dir">Current Dir: %1$s</string>
@ -25,12 +26,17 @@
<string name="settings">Settings</string>
<string name="about">About</string>
<!-- Game List Activity - Device Compatibility AlertDialog -->
<string name="device_compat_warning">Device Compatibility Warning</string>
<string name="device_compat_warning_msg">Your phone doesn\'t support NEON which makes it incapable of running Dolphin Mobile?\nDo you want to try anyway?</string>
<!-- Game List Fragment -->
<string name="file_clicked">File clicked: %1$s</string>
<!-- Emulation Overlay -->
<string name="enable_input_overlay">Enable Input Overlay</string>
<string name="disable_input_overlay">Disable Input Overlay</string>
<string name="overlay_screenshot">Take Screenshot</string>
<string name="overlay_savestate">Save State</string>
<string name="overlay_loadstate">Load State</string>
<string name="overlay_exit_emulation">Exit</string>

View File

@ -29,21 +29,21 @@ public final class AboutFragment extends ListFragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
ListView mMainList = (ListView) rootView.findViewById(R.id.gamelist);
ListView rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
String yes = getString(R.string.yes);
String no = getString(R.string.no);
final String yes = getString(R.string.yes);
final String no = getString(R.string.no);
List<AboutFragmentItem> Input = new ArrayList<AboutFragmentItem>();
Input.add(new AboutFragmentItem(getString(R.string.build_revision), NativeLibrary.GetVersionString()));
Input.add(new AboutFragmentItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no));
Input.add(new AboutFragmentItem(getString(R.string.supports_neon), NativeLibrary.SupportsNEON() ? yes : no));
AboutFragmentAdapter adapter = new AboutFragmentAdapter(getActivity(), R.layout.about_layout, Input);
mMainList.setAdapter(adapter);
mMainList.setEnabled(false); // Makes the list view non-clickable.
rootView.setAdapter(adapter);
rootView.setEnabled(false); // Makes the list view non-clickable.
return mMainList;
return rootView;
}
// Represents an item in the AboutFragment.
@ -94,18 +94,17 @@ public final class AboutFragment extends ListFragment
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null)
if (convertView == null)
{
LayoutInflater vi = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(id, parent, false);
LayoutInflater vi = LayoutInflater.from(ctx);
convertView = vi.inflate(id, parent, false);
}
final AboutFragmentItem item = items.get(position);
if (item != null)
{
TextView title = (TextView) v.findViewById(R.id.AboutItemTitle);
TextView subtitle = (TextView) v.findViewById(R.id.AboutItemSubTitle);
TextView title = (TextView) convertView.findViewById(R.id.AboutItemTitle);
TextView subtitle = (TextView) convertView.findViewById(R.id.AboutItemSubTitle);
if (title != null)
title.setText(item.getTitle());
@ -114,7 +113,7 @@ public final class AboutFragment extends ListFragment
subtitle.setText(item.getSubTitle());
}
return v;
return convertView;
}
}
}

View File

@ -86,4 +86,9 @@ public final class DolphinEmulator extends Activity
UserPreferences.LoadIniToPrefs(this);
}
}
protected void onRestart()
{
super.onRestart();
finish(); // If we are ever returning to this activity then we are exiting.
}
}

View File

@ -152,6 +152,19 @@ public final class NativeLibrary
*/
public static native String GetVersionString();
/**
* Returns if the phone supports NEON or not
*
* @return true if it supports NEON, false otherwise.
*/
public static native boolean SupportsNEON();
/**
* Saves a screen capture of the game
*
*/
public static native void SaveScreenShot();
/**
* Saves a game state to the slot number.
*

View File

@ -64,12 +64,14 @@ public final class EmulationActivity extends Activity
//
// Due to a bug in Adreno, it renders the screen rotated 90 degrees when using OpenGL
// Flip the width and height when on Adreno to work around this.
// This bug is fixed in Qualcomm driver v53
// Mali isn't affected by this bug.
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
if (sharedPrefs.getString("gpuPref", "Software Rendering").equals("OGL")
&& VideoSettingsFragment.SupportsGLES3()
&& VideoSettingsFragment.m_GLVendor != null
&& VideoSettingsFragment.m_GLVendor.equals("Qualcomm"))
&& VideoSettingsFragment.m_GLVendor.equals("Qualcomm")
&& VideoSettingsFragment.m_QualcommVersion < 53.0f)
NativeLibrary.SetDimensions((int)screenHeight, (int)screenWidth);
else
NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
@ -204,6 +206,11 @@ public final class EmulationActivity extends Activity
return true;
}
// Screenshot capturing
case R.id.takeScreenshot:
NativeLibrary.SaveScreenShot();
return true;
// Save state slots
case R.id.saveSlot1:
NativeLibrary.SaveState(0);

View File

@ -37,14 +37,15 @@ import org.dolphinemu.dolphinemu.gamelist.GameListActivity;
public final class FolderBrowser extends ListFragment
{
private FolderBrowserAdapter adapter;
private ListView mFolderBrowserList;
private ListView rootView;
private static File currentDir = null;
// Populates the FolderView with the given currDir's contents.
private void Fill(File currDir)
{
// Change the activity title to reflect the current directory the FolderBrowser is in.
// Clear the adapter of previous items.
adapter.clear();
// Set the activity title to the current directory the FolderBrowser is in.
getActivity().setTitle(String.format(getString(R.string.current_dir), currDir.getName()));
File[] dirs = currDir.listFiles();
@ -96,9 +97,9 @@ public final class FolderBrowser extends ListFragment
if (!currDir.getPath().equalsIgnoreCase("/"))
dir.add(0, new FolderBrowserItem("..", getString(R.string.parent_directory), currDir.getParent()));
adapter = new FolderBrowserAdapter(getActivity(), R.layout.gamelist_folderbrowser_list, dir);
mFolderBrowserList = (ListView) rootView.findViewById(R.id.gamelist);
mFolderBrowserList.setAdapter(adapter);
// Add the items to the adapter and notify the adapter users of its new contents.
adapter.addAll(dir);
adapter.notifyDataSetChanged();
}
@Override
@ -122,10 +123,12 @@ public final class FolderBrowser extends ListFragment
if(currentDir == null)
currentDir = new File(Environment.getExternalStorageDirectory().getPath());
rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
ListView rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
adapter = new FolderBrowserAdapter(getActivity(), R.layout.gamelist_folderbrowser_list_item);
rootView.setAdapter(adapter);
Fill(currentDir);
return mFolderBrowserList;
return rootView;
}
private void FolderSelected()

View File

@ -6,15 +6,12 @@
package org.dolphinemu.dolphinemu.folderbrowser;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import org.dolphinemu.dolphinemu.R;
@ -27,79 +24,89 @@ import org.dolphinemu.dolphinemu.R;
*/
public final class FolderBrowserAdapter extends ArrayAdapter<FolderBrowserItem>
{
// ViewHolder which is used to hold onto
// items within a listview. This is done
// so that findViewById is not needed to
// be excessively called over and over.
private static final class ViewHolder
{
TextView title;
TextView subtitle;
ImageView icon;
}
private final Context context;
private final int id;
private final List<FolderBrowserItem> items;
private ViewHolder viewHolder;
/**
* Constructor
*
* @param context The current {@link Context}.
* @param resourceId The resource ID for a layout file containing a layout to use when instantiating views.
* @param objects The objects to represent in the {@link ListView}.
*/
public FolderBrowserAdapter(Context context, int resourceId, List<FolderBrowserItem> objects)
public FolderBrowserAdapter(Context context, int resourceId)
{
super(context, resourceId, objects);
super(context, resourceId);
this.context = context;
this.id = resourceId;
this.items = objects;
}
@Override
public FolderBrowserItem getItem(int i)
{
return items.get(i);
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null)
if (convertView == null)
{
LayoutInflater vi = LayoutInflater.from(context);
v = vi.inflate(id, parent, false);
convertView = vi.inflate(id, parent, false);
// Initialize the ViewHolder and store it.
viewHolder = new ViewHolder();
viewHolder.title = (TextView) convertView.findViewById(R.id.ListItemTitle);
viewHolder.subtitle = (TextView) convertView.findViewById(R.id.ListItemSubTitle);
viewHolder.icon = (ImageView) convertView.findViewById(R.id.ListItemIcon);
convertView.setTag(viewHolder);
}
else // Can recover the holder.
{
viewHolder = (ViewHolder) convertView.getTag();
}
final FolderBrowserItem item = items.get(position);
final FolderBrowserItem item = getItem(position);
if (item != null)
{
ImageView icon = (ImageView) v.findViewById(R.id.ListItemIcon);
TextView title = (TextView) v.findViewById(R.id.ListItemTitle);
TextView subtitle = (TextView) v.findViewById(R.id.ListItemSubTitle);
if(title != null)
if (viewHolder.title != null)
{
title.setText(item.getName());
viewHolder.title.setText(item.getName());
}
if(subtitle != null)
if (viewHolder.subtitle != null)
{
// Remove the subtitle for all folders, except for the parent directory folder.
if (item.isDirectory() && !item.getSubtitle().equals(context.getString(R.string.parent_directory)))
{
subtitle.setVisibility(View.GONE);
viewHolder.subtitle.setVisibility(View.GONE);
}
else
{
subtitle.setText(item.getSubtitle());
viewHolder.subtitle.setVisibility(View.VISIBLE);
viewHolder.subtitle.setText(item.getSubtitle());
}
}
if (icon != null)
if (viewHolder.icon != null)
{
if (item.isDirectory())
{
icon.setImageResource(R.drawable.ic_menu_folder);
viewHolder.icon.setImageResource(R.drawable.ic_menu_folder);
}
else
{
icon.setImageResource(R.drawable.ic_menu_file);
viewHolder.icon.setImageResource(R.drawable.ic_menu_file);
}
}
}
return v;
return convertView;
}
}

View File

@ -9,10 +9,11 @@ package org.dolphinemu.dolphinemu.gamelist;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
@ -41,7 +42,6 @@ public final class GameListActivity extends Activity
implements GameListFragment.OnGameListZeroListener
{
private int mCurFragmentNum = 0;
private Fragment mCurFragment;
private ActionBarDrawerToggle mDrawerToggle;
private DrawerLayout mDrawerLayout;
@ -102,10 +102,36 @@ public final class GameListActivity extends Activity
};
mDrawerLayout.setDrawerListener(mDrawerToggle);
// Display the game list fragment.
mCurFragment = new GameListFragment();
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
// Display the game list fragment on activity creation,
// but only if no previous states have been saved.
if (savedInstanceState == null)
{
final GameListFragment gameList = new GameListFragment();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.content_frame, gameList);
ft.commit();
}
// Create an alert telling them that their phone sucks
if (Build.CPU_ABI.contains("arm") && !NativeLibrary.SupportsNEON())
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.device_compat_warning);
builder.setMessage(R.string.device_compat_warning_msg);
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Do Nothing. Just create the Yes button
}
});
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
finish();
}
});
builder.show();
}
}
/**
@ -129,9 +155,10 @@ public final class GameListActivity extends Activity
setTitle(R.string.app_name);
mCurFragmentNum = 0;
mCurFragment = new GameListFragment();
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
final GameListFragment gameList = new GameListFragment();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.content_frame, gameList);
ft.commit();
invalidateOptionsMenu();
}
break;
@ -139,9 +166,11 @@ public final class GameListActivity extends Activity
case 1: // Folder Browser
{
mCurFragmentNum = 1;
mCurFragment = new FolderBrowser();
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
final FolderBrowser folderBrowser = new FolderBrowser();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.content_frame, folderBrowser);
ft.addToBackStack(null);
ft.commit();
invalidateOptionsMenu();
}
break;
@ -156,9 +185,11 @@ public final class GameListActivity extends Activity
case 3: // About
{
mCurFragmentNum = 3;
mCurFragment = new AboutFragment();
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
final AboutFragment aboutFragment = new AboutFragment();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.content_frame, aboutFragment);
ft.addToBackStack(null);
ft.commit();
invalidateOptionsMenu();
}
break;
@ -245,7 +276,7 @@ public final class GameListActivity extends Activity
NativeLibrary.SetConfig("Dolphin.ini", "General", "GCMPathes", "0");
// Now finally, clear the game list.
((GameListFragment) mCurFragment).clearGameList();
((GameListFragment) getFragmentManager().findFragmentById(R.id.content_frame)).clearGameList();
}
});
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
@ -261,6 +292,22 @@ public final class GameListActivity extends Activity
return super.onOptionsItemSelected(item);
}
@Override
public void onSaveInstanceState(Bundle outState)
{
super.onSaveInstanceState(outState);
outState.putInt("currentFragmentNum", mCurFragmentNum);
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState)
{
super.onRestoreInstanceState(savedInstanceState);
mCurFragmentNum = savedInstanceState.getInt("currentFragmentNum");
}
@Override
public void onBackPressed()
{

View File

@ -12,11 +12,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import java.util.List;
import org.dolphinemu.dolphinemu.R;
/**
@ -28,46 +25,36 @@ public final class GameListAdapter extends ArrayAdapter<GameListItem>
{
private final Context context;
private final int id;
private final List<GameListItem>items;
/**
* Constructor
*
* @param context The current {@link Context}.
* @param resourceId The resource ID for a layout file containing a layout to use when instantiating views.
* @param objects The objects to represent in the {@link ListView}.
*/
public GameListAdapter(Context context, int resourceId, List<GameListItem> objects)
public GameListAdapter(Context context, int resourceId)
{
super(context, resourceId, objects);
super(context, resourceId);
this.context = context;
this.id = resourceId;
this.items = objects;
}
@Override
public GameListItem getItem(int i)
{
return items.get(i);
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null)
if (convertView == null)
{
LayoutInflater vi = LayoutInflater.from(context);
v = vi.inflate(id, parent, false);
convertView = vi.inflate(id, parent, false);
}
final GameListItem item = items.get(position);
final GameListItem item = getItem(position);
if (item != null)
{
TextView title = (TextView) v.findViewById(R.id.ListItemTitle);
TextView subtitle = (TextView) v.findViewById(R.id.ListItemSubTitle);
ImageView icon = (ImageView) v.findViewById(R.id.ListItemIcon);
TextView title = (TextView) convertView.findViewById(R.id.ListItemTitle);
TextView subtitle = (TextView) convertView.findViewById(R.id.ListItemSubTitle);
ImageView icon = (ImageView) convertView.findViewById(R.id.ListItemIcon);
if (title != null)
title.setText(item.getName());
@ -83,7 +70,7 @@ public final class GameListAdapter extends ArrayAdapter<GameListItem>
}
}
return v;
return convertView;
}
}

View File

@ -35,7 +35,6 @@ import org.dolphinemu.dolphinemu.emulation.EmulationActivity;
public final class GameListFragment extends ListFragment
{
private GameListAdapter mGameAdapter;
private static GameListActivity mMe;
private OnGameListZeroListener mCallback;
/**
@ -84,7 +83,7 @@ public final class GameListFragment extends ListFragment
if (!entry.isHidden() && !entry.isDirectory())
{
if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
fls.add(new GameListItem(mMe, entryName, String.format(getString(R.string.file_size), entry.length()), entry.getAbsolutePath()));
fls.add(new GameListItem(getActivity(), entryName, String.format(getString(R.string.file_size), entry.length()), entry.getAbsolutePath()));
}
}
}
@ -94,8 +93,9 @@ public final class GameListFragment extends ListFragment
}
Collections.sort(fls);
mGameAdapter = new GameListAdapter(mMe, R.layout.gamelist_folderbrowser_list, fls);
setListAdapter(mGameAdapter);
// Add all the items to the adapter
mGameAdapter.addAll(fls);
mGameAdapter.notifyDataSetChanged();
if (fls.isEmpty())
{
@ -106,12 +106,13 @@ public final class GameListFragment extends ListFragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
ListView mMainList = (ListView) rootView.findViewById(R.id.gamelist);
ListView rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
mGameAdapter = new GameListAdapter(getActivity(), R.layout.gamelist_folderbrowser_list_item);
rootView.setAdapter(mGameAdapter);
Fill();
return mMainList;
return rootView;
}
@Override
@ -120,12 +121,12 @@ public final class GameListFragment extends ListFragment
GameListItem item = mGameAdapter.getItem(position);
// Show a toast indicating which game was clicked.
Toast.makeText(mMe, String.format(getString(R.string.file_clicked), item.getPath()), Toast.LENGTH_SHORT).show();
Toast.makeText(getActivity(), String.format(getString(R.string.file_clicked), item.getPath()), Toast.LENGTH_SHORT).show();
// Start the emulation activity and send the path of the clicked ROM to it.
Intent intent = new Intent(mMe, EmulationActivity.class);
Intent intent = new Intent(getActivity(), EmulationActivity.class);
intent.putExtra("SelectedGame", item.getPath());
mMe.startActivity(intent);
startActivity(intent);
}
@Override
@ -138,7 +139,6 @@ public final class GameListFragment extends ListFragment
try
{
mCallback = (OnGameListZeroListener) activity;
mMe = (GameListActivity) activity;
}
catch (ClassCastException e)
{

View File

@ -27,6 +27,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
public static String m_GLVendor;
public static String m_GLRenderer;
public static String m_GLExtensions;
public static float m_QualcommVersion;
/**
* Class which provides a means to retrieve various
@ -163,7 +164,6 @@ public final class VideoSettingsFragment extends PreferenceFragment
{
int mVStart = m_GLVersion.indexOf("V@") + 2;
int mVEnd = 0;
float mVersion;
for (int a = mVStart; a < m_GLVersion.length(); ++a)
{
@ -174,20 +174,12 @@ public final class VideoSettingsFragment extends PreferenceFragment
}
}
mVersion = Float.parseFloat(m_GLVersion.substring(mVStart, mVEnd));
m_QualcommVersion = Float.parseFloat(m_GLVersion.substring(mVStart, mVEnd));
if (mVersion >= 14.0f)
if (m_QualcommVersion >= 14.0f)
mSupportsGLES3 = true;
}
}
if (!mSupportsGLES3 &&
m_GLVendor != null && m_GLVendor.equals("NVIDIA Corporation") &&
m_GLRenderer != null && m_GLRenderer.equals("NVIDIA Tegra") &&
m_GLExtensions != null && m_GLExtensions.contains("GL_OES_depth24"))
{
// Is a Tegra 4 since it supports 24bit depth
mSupportsGLES3 = true;
}
return mSupportsGLES3;
}

View File

@ -54,23 +54,22 @@ public final class SideMenuAdapter extends ArrayAdapter<SideMenuItem>
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null)
if (convertView == null)
{
LayoutInflater vi = LayoutInflater.from(context);
v = vi.inflate(id, null);
convertView = vi.inflate(id, null);
}
final SideMenuItem item = items.get(position);
if (item != null)
{
TextView title = (TextView) v.findViewById(R.id.SideMenuTitle);
TextView title = (TextView) convertView.findViewById(R.id.SideMenuTitle);
if (title != null)
title.setText(item.getName());
}
return v;
return convertView;
}
}

View File

@ -43,6 +43,12 @@ struct CPUInfo
bool bAVX;
bool bFMA;
bool bAES;
// FXSAVE/FXRSTOR
bool bFXSR;
// This flag indicates that the hardware supports some mode
// in which denormal inputs _and_ outputs are automatically set to (signed) zero.
// TODO: ARM
bool bFlushToZero;
bool bLAHFSAHF64;
bool bLongMode;

View File

@ -36,7 +36,7 @@ namespace FPURoundMode
void SetPrecisionMode(u32 mode);
void SetSIMDMode(u32 mode);
void SetSIMDMode(u32 roundingMode, u32 nonIEEEMode);
/*
* There are two different flavors of float to int conversion:

View File

@ -26,7 +26,7 @@ namespace FPURoundMode
void SetPrecisionMode(u32 mode)
{
}
void SetSIMDMode(u32 mode)
void SetSIMDMode(u32 mode, u32 nonIEEEMode)
{
}
void SaveSIMDState()

View File

@ -64,10 +64,10 @@ inline float FlushToZero(float f)
return x.f;
}
inline double FlushToZeroAsFloat(double d)
inline double FlushToZero(double d)
{
IntDouble x; x.d = d;
if ((x.i & DOUBLE_EXP) < 0x3800000000000000ULL)
if ((x.i & DOUBLE_EXP) == 0)
x.i &= DOUBLE_SIGN; // turn into signed zero
return x.d;
}

View File

@ -162,6 +162,34 @@ void CPUInfo::Detect()
if ((cpu_id[2] >> 20) & 1) bSSE4_2 = true;
if ((cpu_id[2] >> 25) & 1) bAES = true;
// To check DAZ support, we first need to check FXSAVE support.
if ((cpu_id[3] >> 24) & 1)
{
// We can use FXSAVE.
bFXSR = true;
GC_ALIGNED16(u8 fx_state[512]);
memset(fx_state, 0, sizeof(fx_state));
#ifdef _WIN32
#ifdef _M_IX86
_fxsave(fx_state);
#elif defined (_M_X64)
_fxsave64(fx_state);
#endif
#else
__asm__("fxsave %0" : "=m" (fx_state));
#endif
// lowest byte of MXCSR_MASK
if ((fx_state[0x1C] >> 6) & 1)
{
// On x86, the FTZ field (supported since SSE1) only flushes denormal _outputs_ to zero,
// now that we checked DAZ support (flushing denormal _inputs_ to zero),
// we can set our generic flag.
bFlushToZero = true;
}
}
// AVX support requires 3 separate checks:
// - Is the AVX bit set in CPUID?
// - Is the XSAVE bit set in CPUID?
@ -222,7 +250,12 @@ std::string CPUInfo::Summarize()
{
std::string sum(cpu_string);
if (bSSE) sum += ", SSE";
if (bSSE2) sum += ", SSE2";
if (bSSE2)
{
sum += ", SSE2";
if (!bFlushToZero)
sum += " (but not DAZ!)";
}
if (bSSE3) sum += ", SSE3";
if (bSSSE3) sum += ", SSSE3";
if (bSSE4_1) sum += ", SSE4.1";

View File

@ -4,6 +4,7 @@
#include "Common.h"
#include "FPURoundMode.h"
#include "CPUDetect.h"
#ifndef _WIN32
static const unsigned short FPU_ROUND_NEAR = 0 << 10;
@ -14,8 +15,11 @@ static const unsigned short FPU_ROUND_MASK = 3 << 10;
#include <xmmintrin.h>
#endif
const u32 MASKS = 0x1F80; // mask away the interrupts.
// OR-mask for disabling FPU exceptions (bits 7-12 in the MXCSR register)
const u32 EXCEPTION_MASK = 0x1F80;
// Denormals-Are-Zero (non-IEEE mode: denormal inputs are set to +/- 0)
const u32 DAZ = 0x40;
// Flush-To-Zero (non-IEEE mode: denormal outputs are set to +/- 0)
const u32 FTZ = 0x8000;
namespace FPURoundMode
@ -79,16 +83,28 @@ namespace FPURoundMode
//but still - set any useful sse options here
#endif
}
void SetSIMDMode(u32 mode)
void SetSIMDMode(u32 roundingMode, u32 nonIEEEMode)
{
static const u32 ssetable[4] =
// lookup table for FPSCR.RN-to-MXCSR.RC translation
static const u32 roundingModeLUT[4] =
{
(0 << 13) | MASKS,
(3 << 13) | MASKS,
(2 << 13) | MASKS,
(1 << 13) | MASKS,
(0 << 13) | EXCEPTION_MASK, // nearest
(3 << 13) | EXCEPTION_MASK, // -inf
(2 << 13) | EXCEPTION_MASK, // +inf
(1 << 13) | EXCEPTION_MASK, // zero
};
u32 csr = ssetable[mode];
u32 csr = roundingModeLUT[roundingMode];
static const u32 denormalLUT[2] =
{
FTZ, // flush-to-zero only
FTZ | DAZ, // flush-to-zero and denormals-are-zero (may not be supported)
};
if (nonIEEEMode)
{
csr |= denormalLUT[cpu_info.bFlushToZero];
}
_mm_setcsr(csr);
}

View File

@ -17,8 +17,8 @@
#include "PowerPCDisasm.h"
#include "Console.h"
#define CASE1(x) if (memcmp(cmd, x, 2*sizeof(TCHAR))==0)
#define CASE(x) else if (memcmp(cmd, x, 4*sizeof(TCHAR))==0)
#define CASE1(x) if (!strcmp(cmd, (x)))
#define CASE(x) else if (!strcmp(cmd, (x)))
void Console_Submit(const char *cmd)
{
@ -27,7 +27,7 @@ void Console_Submit(const char *cmd)
Core::StartTrace(false);
INFO_LOG(CONSOLE, "Read tracing started.");
}
CASE1("w")
CASE("w")
{
Core::StartTrace(true);
INFO_LOG(CONSOLE, "Write tracing started.");
@ -141,3 +141,6 @@ void Console_Submit(const char *cmd)
ERROR_LOG(CONSOLE, "Invalid command");
}
}
#undef CASE1
#undef CASE

View File

@ -113,13 +113,17 @@ static bool VerifyRoms(const char *irom_filename, const char *coef_filename)
}
if (rom_idx == 1)
PanicAlertT("You are using an old free DSP ROM made by the Dolphin Team.\n"
"Only games using the Zelda UCode will work correctly.\n");
{
DSPHost_OSD_AddMessage("You are using an old free DSP ROM made by the Dolphin Team.", 6000);
DSPHost_OSD_AddMessage("Only games using the Zelda UCode will work correctly.", 6000);
}
if (rom_idx == 2)
PanicAlertT("You are using a free DSP ROM made by the Dolphin Team.\n"
"All Wii games will work correctly, and most GC games should "
"also work fine, but the GBA/IPL/CARD UCodes will not work.\n");
{
DSPHost_OSD_AddMessage("You are using a free DSP ROM made by the Dolphin Team.", 8000);
DSPHost_OSD_AddMessage("All Wii games will work correctly, and most GC games should ", 8000);
DSPHost_OSD_AddMessage("also work fine, but the GBA/IPL/CARD UCodes will not work.\n", 8000);
}
return true;
}

View File

@ -12,6 +12,7 @@
u8 DSPHost_ReadHostMemory(u32 addr);
void DSPHost_WriteHostMemory(u8 value, u32 addr);
void DSPHost_OSD_AddMessage(const std::string& str, u32 ms);
bool DSPHost_OnThread();
bool DSPHost_Wii();
void DSPHost_InterruptRequest();

View File

@ -86,7 +86,7 @@ bool FifoDataFile::Save(const char *filename)
header.xfRegsSize = XF_REGS_SIZE;
header.frameListOffset = frameListOffset;
header.frameCount = m_Frames.size();
header.frameCount = (u32)m_Frames.size();
header.flags = m_Flags;
@ -111,7 +111,7 @@ bool FifoDataFile::Save(const char *filename)
dstFrame.fifoStart = srcFrame.fifoStart;
dstFrame.fifoEnd = srcFrame.fifoEnd;
dstFrame.memoryUpdatesOffset = memoryUpdatesOffset;
dstFrame.numMemoryUpdates = srcFrame.memoryUpdates.size();
dstFrame.numMemoryUpdates = (u32)srcFrame.memoryUpdates.size();
// Write frame info
u64 frameOffset = frameListOffset + (i * sizeof(FileFrameInfo));

View File

@ -234,7 +234,7 @@ u32 FifoPlaybackAnalyzer::DecodeCommand(u8 *data)
break;
}
return data - dataStart;
return (u32)(data - dataStart);
}
void FifoPlaybackAnalyzer::StoreEfbCopyRegion()

View File

@ -105,7 +105,9 @@ bool FifoPlayer::Play()
u32 FifoPlayer::GetFrameObjectCount()
{
if (m_CurrentFrame < m_FrameInfo.size())
return m_FrameInfo[m_CurrentFrame].objectStarts.size();
{
return (u32)(m_FrameInfo[m_CurrentFrame].objectStarts.size());
}
return 0;
}
@ -172,7 +174,7 @@ void FifoPlayer::WriteFrame(const FifoFrameInfo &frame, const AnalyzedFrameInfo
m_FrameFifoSize = frame.fifoDataSize;
// Determine start and end objects
u32 numObjects = info.objectStarts.size();
u32 numObjects = (u32)(info.objectStarts.size());
u32 drawStart = std::min(numObjects, m_ObjectRangeStart);
u32 drawEnd = std::min(numObjects - 1, m_ObjectRangeEnd);
@ -181,7 +183,9 @@ void FifoPlayer::WriteFrame(const FifoFrameInfo &frame, const AnalyzedFrameInfo
// Skip memory updates during frame if true
if (m_EarlyMemoryUpdates)
memoryUpdate = frame.memoryUpdates.size();
{
memoryUpdate = (u32)(frame.memoryUpdates.size());
}
if (numObjects > 0)
{

View File

@ -83,9 +83,9 @@ void FifoRecorder::WriteGPCommand(u8 *data, u32 size)
if (m_FrameEnded && m_FifoData.size() > 0)
{
size_t dataSize = m_FifoData.size();
m_CurrentFrame.fifoDataSize = dataSize;
m_CurrentFrame.fifoDataSize = (u32)dataSize;
m_CurrentFrame.fifoData = new u8[dataSize];
memcpy(m_CurrentFrame.fifoData, &m_FifoData[0], dataSize);
memcpy(m_CurrentFrame.fifoData, m_FifoData.data(), dataSize);
sMutex.lock();
@ -129,7 +129,7 @@ void FifoRecorder::WriteMemory(u32 address, u32 size, MemoryUpdate::Type type)
// Record memory update
MemoryUpdate memUpdate;
memUpdate.address = address;
memUpdate.fifoPosition = m_FifoData.size();
memUpdate.fifoPosition = (u32)(m_FifoData.size());
memUpdate.size = size;
memUpdate.type = type;
memUpdate.data = new u8[size];

View File

@ -469,36 +469,42 @@ void ProcessVoice(PB_TYPE& pb, const AXBuffers& buffers, u16 count, AXMixControl
// Mix LRS, AUXA and AUXB depending on mixer_control
// TODO: Handle DPL2 on AUXB.
if (mctrl & MIX_L)
MixAdd(buffers.left, samples, count, &pb.mixer.left, &pb.dpop.left, mctrl & MIX_L_RAMP);
if (mctrl & MIX_R)
MixAdd(buffers.right, samples, count, &pb.mixer.right, &pb.dpop.right, mctrl & MIX_R_RAMP);
if (mctrl & MIX_S)
MixAdd(buffers.surround, samples, count, &pb.mixer.surround, &pb.dpop.surround, mctrl & MIX_S_RAMP);
#define MIX_ON(C) (0 != (mctrl & MIX_##C))
#define RAMP_ON(C) (0 != (mctrl & MIX_##C##_RAMP))
if (mctrl & MIX_AUXA_L)
MixAdd(buffers.auxA_left, samples, count, &pb.mixer.auxA_left, &pb.dpop.auxA_left, mctrl & MIX_AUXA_L_RAMP);
if (mctrl & MIX_AUXA_R)
MixAdd(buffers.auxA_right, samples, count, &pb.mixer.auxA_right, &pb.dpop.auxA_right, mctrl & MIX_AUXA_R_RAMP);
if (mctrl & MIX_AUXA_S)
MixAdd(buffers.auxA_surround, samples, count, &pb.mixer.auxA_surround, &pb.dpop.auxA_surround, mctrl & MIX_AUXA_S_RAMP);
if (MIX_ON(L))
MixAdd(buffers.left, samples, count, &pb.mixer.left, &pb.dpop.left, RAMP_ON(L));
if (MIX_ON(R))
MixAdd(buffers.right, samples, count, &pb.mixer.right, &pb.dpop.right, RAMP_ON(R));
if (MIX_ON(S))
MixAdd(buffers.surround, samples, count, &pb.mixer.surround, &pb.dpop.surround, RAMP_ON(S));
if (mctrl & MIX_AUXB_L)
MixAdd(buffers.auxB_left, samples, count, &pb.mixer.auxB_left, &pb.dpop.auxB_left, mctrl & MIX_AUXB_L_RAMP);
if (mctrl & MIX_AUXB_R)
MixAdd(buffers.auxB_right, samples, count, &pb.mixer.auxB_right, &pb.dpop.auxB_right, mctrl & MIX_AUXB_R_RAMP);
if (mctrl & MIX_AUXB_S)
MixAdd(buffers.auxB_surround, samples, count, &pb.mixer.auxB_surround, &pb.dpop.auxB_surround, mctrl & MIX_AUXB_S_RAMP);
if (MIX_ON(AUXA_L))
MixAdd(buffers.auxA_left, samples, count, &pb.mixer.auxA_left, &pb.dpop.auxA_left, RAMP_ON(AUXA_L));
if (MIX_ON(AUXA_R))
MixAdd(buffers.auxA_right, samples, count, &pb.mixer.auxA_right, &pb.dpop.auxA_right, RAMP_ON(AUXA_R));
if (MIX_ON(AUXA_S))
MixAdd(buffers.auxA_surround, samples, count, &pb.mixer.auxA_surround, &pb.dpop.auxA_surround, RAMP_ON(AUXA_S));
if (MIX_ON(AUXB_L))
MixAdd(buffers.auxB_left, samples, count, &pb.mixer.auxB_left, &pb.dpop.auxB_left, RAMP_ON(AUXB_L));
if (MIX_ON(AUXB_R))
MixAdd(buffers.auxB_right, samples, count, &pb.mixer.auxB_right, &pb.dpop.auxB_right, RAMP_ON(AUXB_R));
if (MIX_ON(AUXB_S))
MixAdd(buffers.auxB_surround, samples, count, &pb.mixer.auxB_surround, &pb.dpop.auxB_surround, RAMP_ON(AUXB_S));
#ifdef AX_WII
if (mctrl & MIX_AUXC_L)
MixAdd(buffers.auxC_left, samples, count, &pb.mixer.auxC_left, &pb.dpop.auxC_left, mctrl & MIX_AUXC_L_RAMP);
if (mctrl & MIX_AUXC_R)
MixAdd(buffers.auxC_right, samples, count, &pb.mixer.auxC_right, &pb.dpop.auxC_right, mctrl & MIX_AUXC_R_RAMP);
if (mctrl & MIX_AUXC_S)
MixAdd(buffers.auxC_surround, samples, count, &pb.mixer.auxC_surround, &pb.dpop.auxC_surround, mctrl & MIX_AUXC_S_RAMP);
if (MIX_ON(AUXC_L))
MixAdd(buffers.auxC_left, samples, count, &pb.mixer.auxC_left, &pb.dpop.auxC_left, RAMP_ON(AUXC_L));
if (MIX_ON(AUXC_R))
MixAdd(buffers.auxC_right, samples, count, &pb.mixer.auxC_right, &pb.dpop.auxC_right, RAMP_ON(AUXC_R));
if (MIX_ON(AUXC_S))
MixAdd(buffers.auxC_surround, samples, count, &pb.mixer.auxC_surround, &pb.dpop.auxC_surround, RAMP_ON(AUXC_S));
#endif
#undef MIX_ON
#undef RAMP_ON
// Optionally, phase shift left or right channel to simulate 3D sound.
if (pb.initial_time_delay.on)
{
@ -524,8 +530,8 @@ void ProcessVoice(PB_TYPE& pb, const AXBuffers& buffers, u16 count, AXMixControl
pb.remote_src.cur_addr_frac = curr_pos & 0xFFFF;
// Mix to main[0-3] and aux[0-3]
#define WMCHAN_MIX_ON(n) ((pb.remote_mixer_control >> (2 * n)) & 3)
#define WMCHAN_MIX_RAMP(n) ((pb.remote_mixer_control >> (2 * n)) & 2)
#define WMCHAN_MIX_ON(n) (0 != ((pb.remote_mixer_control >> (2 * n)) & 3))
#define WMCHAN_MIX_RAMP(n) (0 != ((pb.remote_mixer_control >> (2 * n)) & 2))
if (WMCHAN_MIX_ON(0))
MixAdd(buffers.wm_main0, wm_samples, wm_count, &pb.remote_mixer.main0, &pb.remote_dpop.main0, WMCHAN_MIX_RAMP(0));
@ -544,6 +550,8 @@ void ProcessVoice(PB_TYPE& pb, const AXBuffers& buffers, u16 count, AXMixControl
if (WMCHAN_MIX_ON(7))
MixAdd(buffers.wm_aux3, wm_samples, wm_count, &pb.remote_mixer.aux3, &pb.remote_dpop.aux3, WMCHAN_MIX_RAMP(7));
}
#undef WMCHAN_MIX_RAMP
#undef WMCHAN_MIX_ON
#endif
}

View File

@ -13,6 +13,7 @@
#include "../../ConfigManager.h"
#include "../../PowerPC/PowerPC.h"
#include "Host.h"
#include "OnScreenDisplay.h"
// The user of the DSPCore library must supply a few functions so that the
// emulation core can access the environment it runs in. If the emulation
@ -29,6 +30,11 @@ void DSPHost_WriteHostMemory(u8 value, u32 addr)
DSP::WriteARAM(value, addr);
}
void DSPHost_OSD_AddMessage(const std::string& str, u32 ms)
{
OSD::AddMessage(str, ms);
}
bool DSPHost_OnThread()
{
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;

View File

@ -325,7 +325,7 @@ void ChangeDisc(const char* _newFileName)
{
Movie::g_bDiscChange = true;
std::string fileName = _newFileName;
int sizeofpath = fileName.find_last_of("/\\") + 1;
auto sizeofpath = fileName.find_last_of("/\\") + 1;
if (fileName.substr(sizeofpath).length() > 40)
{
PanicAlert("Saving iso filename to .dtm failed; max file name length is 40 characters.");

View File

@ -191,7 +191,7 @@ void CEXIMemoryCard::CmdDone()
void CEXIMemoryCard::CmdDoneLater(u64 cycles)
{
CoreTiming::RemoveEvent(et_cmd_done);
CoreTiming::ScheduleEvent(cycles, et_cmd_done, (u64)card_index);
CoreTiming::ScheduleEvent((int)cycles, et_cmd_done, (u64)card_index);
}
void CEXIMemoryCard::SetCS(int cs)

View File

@ -40,19 +40,19 @@ GCMemcard::GCMemcard(const char *filename, bool forceCreation, bool sjis)
PanicAlertT("File has the extension \"%s\"\nvalid extensions are (.raw/.gcp)", fileType.c_str());
return;
}
u32 size = mcdFile.GetSize();
auto size = mcdFile.GetSize();
if (size < MC_FST_BLOCKS*BLOCK_SIZE)
{
PanicAlertT("%s failed to load as a memorycard \nfile is not large enough to be a valid memory card file (0x%x bytes)", filename, size);
PanicAlertT("%s failed to load as a memorycard \nfile is not large enough to be a valid memory card file (0x%x bytes)", filename, (unsigned) size);
return;
}
if (size % BLOCK_SIZE)
{
PanicAlertT("%s failed to load as a memorycard \n Card file size is invalid (0x%x bytes)", filename, size);
PanicAlertT("%s failed to load as a memorycard \n Card file size is invalid (0x%x bytes)", filename, (unsigned) size);
return;
}
m_sizeMb = (size/BLOCK_SIZE) / MBIT_TO_BLOCKS;
m_sizeMb = (u16)((size/BLOCK_SIZE) / MBIT_TO_BLOCKS);
switch (m_sizeMb)
{
case MemCard59Mb:
@ -63,7 +63,7 @@ GCMemcard::GCMemcard(const char *filename, bool forceCreation, bool sjis)
case MemCard2043Mb:
break;
default:
PanicAlertT("%s failed to load as a memorycard \n Card size is invalid (0x%x bytes)", filename, size);
PanicAlertT("%s failed to load as a memorycard \n Card size is invalid (0x%x bytes)", filename, (unsigned) size);
return;
}
}

View File

@ -209,5 +209,5 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
bool GCPad::GetMicButton() const
{
return m_buttons->controls.back()->control_ref->State();
return (0.0f != m_buttons->controls.back()->control_ref->State());
}

View File

@ -32,7 +32,7 @@
namespace WiimoteEmu
{
void Spy(Wiimote* wm_, const void* data_, int size_)
void Spy(Wiimote* wm_, const void* data_, size_t size_)
{
#if 0
// enable log
@ -1275,7 +1275,7 @@ void Wiimote::DoState(PointerWrap& p)
else
{
std::queue<ReadRequest> tmp_queue(m_read_requests);
size = m_read_requests.size();
size = (u32)(m_read_requests.size());
p.Do(size);
while (!tmp_queue.empty())
{

View File

@ -765,7 +765,7 @@ void Wiimote::Update()
if (-1 == rptf_size)
{
std::copy(rpt.begin(), rpt.end(), data);
rptf_size = rpt.size();
rptf_size = (s8)(rpt.size());
}
}
}

View File

@ -96,7 +96,7 @@ inline double trim(double a)
class Wiimote : public ControllerEmu
{
friend class WiimoteReal::Wiimote;
friend void Spy(Wiimote* wm_, const void* data_, int size_);
friend void Spy(Wiimote* wm_, const void* data_, size_t size_);
public:
enum
@ -245,7 +245,7 @@ private:
} m_reg_speaker;
};
void Spy(Wiimote* wm_, const void* data_, int size_);
void Spy(Wiimote* wm_, const void* data_, size_t size_);
}

View File

@ -72,7 +72,7 @@ int Wiimote::IORead(u8* buf)
return 0;
}
int Wiimote::IOWrite(const u8* buf, int len)
int Wiimote::IOWrite(const u8* buf, size_t len)
{
return 0;
}

View File

@ -263,9 +263,9 @@ int Wiimote::IORead(u8* buf)
return r;
}
int Wiimote::IOWrite(u8 const* buf, int len)
int Wiimote::IOWrite(u8 const* buf, size_t len)
{
return write(int_sock, buf, len);
return write(int_sock, buf, (int)len);
}
}; // WiimoteReal

View File

@ -140,7 +140,7 @@ namespace WiimoteReal
{
int _IOWrite(HANDLE &dev_handle, OVERLAPPED &hid_overlap_write, enum win_bt_stack_t &stack, const u8* buf, int len);
int _IOWrite(HANDLE &dev_handle, OVERLAPPED &hid_overlap_write, enum win_bt_stack_t &stack, const u8* buf, size_t len);
int _IORead(HANDLE &dev_handle, OVERLAPPED &hid_overlap_read, u8* buf, int index);
void _IOWakeup(HANDLE &dev_handle, OVERLAPPED &hid_overlap_read);
@ -247,7 +247,7 @@ void WiimoteScanner::FindWiimotes(std::vector<Wiimote*> & found_wiimotes, Wiimot
// SLEEP(2000);
}
int CheckDeviceType_Write(HANDLE &dev_handle, const u8* buf, int size, int attempts)
int CheckDeviceType_Write(HANDLE &dev_handle, const u8* buf, size_t size, int attempts)
{
OVERLAPPED hid_overlap_write = OVERLAPPED();
hid_overlap_write.hEvent = CreateEvent(NULL, true, false, NULL);
@ -641,7 +641,7 @@ int Wiimote::IORead(u8* buf)
}
int _IOWrite(HANDLE &dev_handle, OVERLAPPED &hid_overlap_write, enum win_bt_stack_t &stack, const u8* buf, int len)
int _IOWrite(HANDLE &dev_handle, OVERLAPPED &hid_overlap_write, enum win_bt_stack_t &stack, const u8* buf, size_t len)
{
WiimoteEmu::Spy(NULL, buf, len);
@ -663,7 +663,7 @@ int _IOWrite(HANDLE &dev_handle, OVERLAPPED &hid_overlap_write, enum win_bt_stac
}
case MSBT_STACK_MS:
{
auto result = HidD_SetOutputReport(dev_handle, const_cast<u8*>(buf) + 1, len - 1);
auto result = HidD_SetOutputReport(dev_handle, const_cast<u8*>(buf) + 1, (ULONG)(len - 1));
//FlushFileBuffers(dev_handle);
if (!result)
@ -715,7 +715,7 @@ int _IOWrite(HANDLE &dev_handle, OVERLAPPED &hid_overlap_write, enum win_bt_stac
return 0;
}
int Wiimote::IOWrite(const u8* buf, int len)
int Wiimote::IOWrite(const u8* buf, size_t len)
{
return _IOWrite(dev_handle, hid_overlap_write, stack, buf, len);
}

View File

@ -310,14 +310,14 @@ int Wiimote::IORead(unsigned char *buf)
return inputlen;
}
int Wiimote::IOWrite(const unsigned char *buf, int len)
int Wiimote::IOWrite(const unsigned char *buf, size_t len)
{
IOReturn ret;
if (!IsConnected())
return 0;
ret = [ichan writeAsync: const_cast<void*>((void *)buf) length: len refcon: nil];
ret = [ichan writeAsync: const_cast<void*>((void *)buf) length: (int)len refcon: nil];
if (ret == kIOReturnSuccess)
return len;

View File

@ -239,7 +239,9 @@ bool Wiimote::Write()
IOWrite(rpt.data(), rpt.size());
if (is_speaker_data)
{
m_last_audio_report.Update();
}
m_write_reports.Pop();
return true;
@ -293,8 +295,10 @@ void Wiimote::Update()
// Send the report
if (!rpt.empty() && m_channel > 0)
{
Core::Callback_WiimoteInterruptChannel(index, m_channel,
rpt.data(), rpt.size());
rpt.data(), (u32)rpt.size());
}
}
void Wiimote::Prepare(int _index)

View File

@ -106,7 +106,7 @@ private:
void WriteReport(Report rpt);
int IORead(u8* buf);
int IOWrite(u8 const* buf, int len);
int IOWrite(u8 const* buf, size_t len);
void IOWakeup();
void ThreadFunc();

View File

@ -83,7 +83,7 @@ static u64 last_reply_time;
void EnqueReplyCallback(u64 userdata, int)
{
std::lock_guard<std::mutex> lk(s_reply_queue);
reply_queue.push_back(userdata);
reply_queue.push_back((u32)userdata);
}
void Init()
@ -546,7 +546,9 @@ void ExecuteCommand(u32 _Address)
const s64 ticks_til_last_reply = last_reply_time - CoreTiming::GetTicks();
if (ticks_til_last_reply > 0)
reply_delay = ticks_til_last_reply;
{
reply_delay = (int)ticks_til_last_reply;
}
last_reply_time = CoreTiming::GetTicks() + reply_delay;

View File

@ -133,7 +133,7 @@ void CWII_IPC_HLE_Device_es::DoState(PointerWrap& p)
p.Do(m_AccessIdentID);
p.Do(m_TitleIDs);
u32 Count = m_ContentAccessMap.size();
u32 Count = (u32)(m_ContentAccessMap.size());
p.Do(Count);
u32 CFD, Position;

View File

@ -571,7 +571,7 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
}
else
{
u32 size = entry.size;
u32 size = (u32)entry.size;
p.Do(size);
File::IOFile handle(entry.physicalName, "rb");

View File

@ -385,12 +385,12 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
Memory::WriteBigEData((const u8*)&wii_device, OffsetBuffer, Align(wii_device.bLength, 4));
OffsetBuffer += Align(wii_device.bLength, 4);
bool deviceValid = true;
bool isHID = false;
for (c = 0; deviceValid && c < desc.bNumConfigurations; c++)
{
struct libusb_config_descriptor *config = NULL;
int cRet = libusb_get_config_descriptor(device, c, &config);
// do not try to use usb devices with more than one interface, games can crash
if(cRet == 0 && config->bNumInterfaces <= MAX_HID_INTERFACES)
{
@ -402,10 +402,14 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
for (ic = 0; ic < config->bNumInterfaces; ic++)
{
const struct libusb_interface *interfaceContainer = &config->interface[ic];
for (i = 0; i < interfaceContainer->num_altsetting; i++)
{
const struct libusb_interface_descriptor *interface = &interfaceContainer->altsetting[i];
if (interface->bInterfaceClass == LIBUSB_CLASS_HID)
isHID = true;
WiiHIDInterfaceDescriptor wii_interface;
ConvertInterfaceToWii(&wii_interface, interface);
Memory::WriteBigEData((const u8*)&wii_interface, OffsetBuffer, Align(wii_interface.bLength, 4));
@ -435,6 +439,12 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
}
} // configs
if (!isHID)
{
deviceValid = false;
OffsetBuffer = OffsetStart;
}
if (deviceValid)
{
Memory::Write_U32(OffsetBuffer-OffsetStart, OffsetStart); // fill in length

View File

@ -866,7 +866,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRoleChange(bdaddr_t _bd, bool
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventNumberOfCompletedPackets()
{
SQueuedEvent Event(sizeof(hci_event_hdr_t) + sizeof(hci_num_compl_pkts_ep) + sizeof(hci_num_compl_pkts_info) * m_WiiMotes.size(), 0);
SQueuedEvent Event((u32)(sizeof(hci_event_hdr_t) + sizeof(hci_num_compl_pkts_ep) + (sizeof(hci_num_compl_pkts_info) * m_WiiMotes.size())), 0);
INFO_LOG(WII_IPC_WIIMOTE, "Event: SendEventNumberOfCompletedPackets");

View File

@ -445,10 +445,11 @@ void NetPlayClient::SendWiimoteState(const PadMapping in_game_pad, const NetWiim
sf::Packet spac;
spac << (MessageId)NP_MSG_WIIMOTE_DATA;
spac << in_game_pad;
u8 size = nw.size();
spac << size;
for (unsigned int i = 0; i < size; ++i)
spac << nw.data()[i];
spac << (u8)nw.size();
for (auto it : nw)
{
spac << it;
}
std::lock_guard<std::recursive_mutex> lks(m_crit.send);
m_socket.Send(spac);

View File

@ -153,7 +153,7 @@ unsigned int NetPlayServer::OnConnect(sf::SocketTCP& socket)
rpac >> player.name;
// give new client first available id
player.pid = m_players.size() + 1;
player.pid = (PlayerId)(m_players.size() + 1);
// try to automatically assign new user a pad
for (unsigned int m = 0; m < 4; ++m)
@ -435,12 +435,14 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, sf::SocketTCP& socket)
case NP_MSG_PONG :
{
const u32 ping = m_ping_timer.GetTimeElapsed();
const u32 ping = (u32)m_ping_timer.GetTimeElapsed();
u32 ping_key = 0;
packet >> ping_key;
if (m_ping_key == ping_key)
{
player.ping = ping;
}
sf::Packet spac;
spac << (MessageId)NP_MSG_PLAYER_PING_DATA;

View File

@ -5,6 +5,7 @@
#ifndef _INTERPRETER_FPUTILS_H
#define _INTERPRETER_FPUTILS_H
#include "CPUDetect.h"
#include "Interpreter.h"
#include "MathUtil.h"
@ -69,28 +70,22 @@ inline void UpdateFPSCR()
inline double ForceSingle(double _x)
{
//if (FPSCR.RN != 0)
// PanicAlert("RN = %d at %x", (int)FPSCR.RN, PC);
if (FPSCR.NI)
_x = FlushToZeroAsFloat(_x);
double x = static_cast<float>(_x);
// convert to float...
float x = _x;
if (!cpu_info.bFlushToZero && FPSCR.NI)
{
x = FlushToZero(x);
}
// ...and back to double:
return x;
}
inline double ForceDouble(double d)
{
//if (FPSCR.RN != 0)
// PanicAlert("RN = %d at %x", (int)FPSCR.RN, PC);
//if (FPSCR.NI)
//{
// IntDouble x; x.d = d;
//if ((x.i & DOUBLE_EXP) == 0)
// x.i &= DOUBLE_SIGN; // turn into signed zero
// return x.d;
//}
if (!cpu_info.bFlushToZero && FPSCR.NI)
{
d = FlushToZero(d);
}
return d;
}

View File

@ -48,15 +48,8 @@ static void FPSCRtoFPUSettings(UReg_FPSCR fp)
// Pokemon Colosseum does this. Gah.
}
// Also corresponding SSE rounding mode setting
if (FPSCR.NI)
{
// Either one of these two breaks Beyond Good & Evil.
// if (cpu_info.bSSSE3)
// csr |= DAZ;
// csr |= FTZ;
}
FPURoundMode::SetSIMDMode(FPSCR.RN);
// Set SSE rounding mode and denormal handling
FPURoundMode::SetSIMDMode(FPSCR.RN, FPSCR.NI);
}
void Interpreter::mtfsb0x(UGeckoInstruction _inst)

View File

@ -276,7 +276,7 @@ void Jit64::Cleanup()
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
}
void Jit64::WriteExit(u32 destination, int exit_num)
void Jit64::WriteExit(u32 destination)
{
Cleanup();
@ -284,8 +284,9 @@ void Jit64::WriteExit(u32 destination, int exit_num)
//If nobody has taken care of this yet (this can be removed when all branches are done)
JitBlock *b = js.curBlock;
b->exitAddress[exit_num] = destination;
b->exitPtrs[exit_num] = GetWritableCodePtr();
JitBlock::LinkData linkData;
linkData.exitAddress = destination;
linkData.exitPtrs = GetWritableCodePtr();
// Link opportunity!
if (jo.enableBlocklink)
@ -295,12 +296,14 @@ void Jit64::WriteExit(u32 destination, int exit_num)
{
// It exists! Joy of joy!
JMP(blocks.GetBlock(block)->checkedEntry, true);
b->linkStatus[exit_num] = true;
linkData.linkStatus = true;
return;
}
}
MOV(32, M(&PC), Imm32(destination));
JMP(asm_routines.dispatcher, true);
b->linkData.push_back(linkData);
}
void Jit64::WriteExitDestInEAX()
@ -625,7 +628,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(0xFFFFFFFF));
FixupBranch noBreakpoint = J_CC(CC_Z);
WriteExit(ops[i].address, 0);
WriteExit(ops[i].address);
SetJumpTarget(noBreakpoint);
}
@ -707,7 +710,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
{
gpr.Flush(FLUSH_ALL);
fpr.Flush(FLUSH_ALL);
WriteExit(nextPC, 0);
WriteExit(nextPC);
}
b->flags = js.block_flags;

View File

@ -99,7 +99,7 @@ public:
// Utilities for use by opcodes
void WriteExit(u32 destination, int exit_num);
void WriteExit(u32 destination);
void WriteExitDestInEAX();
void WriteExceptionExit();
void WriteExternalExceptionExit();
@ -182,7 +182,7 @@ public:
void ps_sum(UGeckoInstruction inst);
void ps_muls(UGeckoInstruction inst);
void fp_arith_s(UGeckoInstruction inst);
void fp_arith(UGeckoInstruction inst);
void frsqrtex(UGeckoInstruction inst);
void fcmpx(UGeckoInstruction inst);

View File

@ -320,12 +320,12 @@ static GekkoOPTemplate table31_2[] =
static GekkoOPTemplate table59[] =
{
{18, &Jit64::Default}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}},
{20, &Jit64::fp_arith_s}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
{21, &Jit64::fp_arith_s}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}},
{18, &Jit64::fp_arith}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}},
{20, &Jit64::fp_arith}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
{21, &Jit64::fp_arith}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}},
// {22, &Jit64::Default}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, // Not implemented on gekko
{24, &Jit64::Default}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}},
{25, &Jit64::fp_arith_s}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}},
{25, &Jit64::fp_arith}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}},
{28, &Jit64::fmaddXX}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
{29, &Jit64::fmaddXX}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}},
{30, &Jit64::fmaddXX}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
@ -354,12 +354,12 @@ static GekkoOPTemplate table63[] =
static GekkoOPTemplate table63_2[] =
{
{18, &Jit64::Default}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}},
{20, &Jit64::Default}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}},
{21, &Jit64::Default}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}},
{18, &Jit64::fp_arith}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}},
{20, &Jit64::fp_arith}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}},
{21, &Jit64::fp_arith}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}},
{22, &Jit64::Default}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}},
{23, &Jit64::Default}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}},
{25, &Jit64::fp_arith_s}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}},
{25, &Jit64::fp_arith}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}},
{26, &Jit64::frsqrtex}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}},
{28, &Jit64::fmaddXX}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}},
{29, &Jit64::fmaddXX}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}},

View File

@ -166,7 +166,7 @@ int RegCache::SanityCheck() const
void RegCache::DiscardRegContentsIfCached(int preg)
{
if (regs[preg].away && regs[preg].location.IsSimpleReg())
if (IsBound(preg))
{
X64Reg xr = regs[preg].location.GetSimpleReg();
xregs[xr].free = true;

View File

@ -93,7 +93,7 @@ public:
const OpArg &R(int preg) const {return regs[preg].location;}
X64Reg RX(int preg) const
{
if (regs[preg].away && regs[preg].location.IsSimpleReg())
if (IsBound(preg))
return regs[preg].location.GetSimpleReg();
PanicAlert("Not so simple - %i", preg);
return (X64Reg)-1;
@ -111,6 +111,11 @@ public:
return xregs[xreg].free && !xlocks[xreg];
}
bool IsBound(int preg) const
{
return regs[preg].away && regs[preg].location.IsSimpleReg();
}
X64Reg GetFreeXReg();

View File

@ -91,7 +91,7 @@ void Jit64::bx(UGeckoInstruction inst)
// make idle loops go faster
js.downcountAmount += 8;
}
WriteExit(destination, 0);
WriteExit(destination);
}
// TODO - optimize to hell and beyond
@ -136,13 +136,13 @@ void Jit64::bcx(UGeckoInstruction inst)
destination = SignExt16(inst.BD << 2);
else
destination = js.compilerPC + SignExt16(inst.BD << 2);
WriteExit(destination, 0);
WriteExit(destination);
if ((inst.BO & BO_DONT_CHECK_CONDITION) == 0)
SetJumpTarget( pConditionDontBranch );
if ((inst.BO & BO_DONT_DECREMENT_FLAG) == 0)
SetJumpTarget( pCTRDontBranch );
WriteExit(js.compilerPC + 4, 1);
WriteExit(js.compilerPC + 4);
}
void Jit64::bcctrx(UGeckoInstruction inst)
@ -190,7 +190,7 @@ void Jit64::bcctrx(UGeckoInstruction inst)
WriteExitDestInEAX();
// Would really like to continue the block here, but it ends. TODO.
SetJumpTarget(b);
WriteExit(js.compilerPC + 4, 1);
WriteExit(js.compilerPC + 4);
}
}
@ -245,5 +245,5 @@ void Jit64::bclrx(UGeckoInstruction inst)
SetJumpTarget( pConditionDontBranch );
if ((inst.BO & BO_DONT_DECREMENT_FLAG) == 0)
SetJumpTarget( pCTRDontBranch );
WriteExit(js.compilerPC + 4, 1);
WriteExit(js.compilerPC + 4);
}

View File

@ -85,7 +85,7 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single,
fpr.UnlockAll();
}
void Jit64::fp_arith_s(UGeckoInstruction inst)
void Jit64::fp_arith(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITFloatingPointOff)
@ -106,7 +106,7 @@ void Jit64::fp_arith_s(UGeckoInstruction inst)
case 21: fp_tri_op(inst.FD, inst.FA, inst.FB, true, single, &XEmitter::ADDSD, &XEmitter::VADDSD); break; //add
case 25: fp_tri_op(inst.FD, inst.FA, inst.FC, true, single, &XEmitter::MULSD, &XEmitter::VMULSD); break; //mul
default:
_assert_msg_(DYNA_REC, 0, "fp_arith_s WTF!!!");
_assert_msg_(DYNA_REC, 0, "fp_arith WTF!!!");
}
}
@ -224,16 +224,28 @@ void Jit64::fmrx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITFloatingPointOff)
if (inst.Rc) {
if (inst.Rc)
{
Default(inst); return;
}
int d = inst.FD;
int b = inst.FB;
fpr.Lock(b, d);
fpr.BindToRegister(d, d == b, true);
MOVSD(XMM0, fpr.R(b));
MOVSD(fpr.R(d), XMM0);
fpr.UnlockAll();
if (d != b)
{
fpr.Lock(b, d);
// we don't need to load d, but if it already is, it must be marked as dirty
if (fpr.IsBound(d))
{
fpr.BindToRegister(d);
}
fpr.BindToRegister(b, true, false);
// caveat: the order of ModRM:r/m, ModRM:reg is deliberate!
// "MOVSD reg, mem" zeros out the upper half of the destination register
MOVSD(fpr.R(d), fpr.RX(b));
fpr.UnlockAll();
}
}
void Jit64::fcmpx(UGeckoInstruction inst)

View File

@ -400,7 +400,7 @@ void Jit64::cmpXX(UGeckoInstruction inst)
destination = SignExt16(js.next_inst.BD << 2);
else
destination = js.next_compilerPC + SignExt16(js.next_inst.BD << 2);
WriteExit(destination, 0);
WriteExit(destination);
}
else if ((js.next_inst.OPCD == 19) && (js.next_inst.SUBOP10 == 528)) // bcctrx
{
@ -424,7 +424,7 @@ void Jit64::cmpXX(UGeckoInstruction inst)
}
else
{
WriteExit(js.next_compilerPC + 4, 0);
WriteExit(js.next_compilerPC + 4);
}
js.cancel = true;
@ -507,7 +507,7 @@ void Jit64::cmpXX(UGeckoInstruction inst)
destination = SignExt16(js.next_inst.BD << 2);
else
destination = js.next_compilerPC + SignExt16(js.next_inst.BD << 2);
WriteExit(destination, 0);
WriteExit(destination);
}
else if ((js.next_inst.OPCD == 19) && (js.next_inst.SUBOP10 == 528)) // bcctrx
{
@ -534,7 +534,7 @@ void Jit64::cmpXX(UGeckoInstruction inst)
if (!!(4 & test_bit) == condition) SetJumpTarget(continue2);
if (!!(2 & test_bit) == condition) SetJumpTarget(continue1);
WriteExit(js.next_compilerPC + 4, 1);
WriteExit(js.next_compilerPC + 4);
js.cancel = true;
}
@ -2221,5 +2221,5 @@ void Jit64::twx(UGeckoInstruction inst)
SetJumpTarget(exit3);
SetJumpTarget(exit4);
SetJumpTarget(exit5);
WriteExit(js.compilerPC + 4, 1);
WriteExit(js.compilerPC + 4);
}

View File

@ -480,5 +480,5 @@ void Jit64::stmw(UGeckoInstruction inst)
void Jit64::icbi(UGeckoInstruction inst)
{
Default(inst);
WriteExit(js.compilerPC + 4, 0);
WriteExit(js.compilerPC + 4);
}

View File

@ -137,7 +137,7 @@ void Jit64::mtmsr(UGeckoInstruction inst)
SetJumpTarget(noExceptionsPending);
SetJumpTarget(eeDisabled);
WriteExit(js.compilerPC + 4, 0);
WriteExit(js.compilerPC + 4);
js.firstFPInstructionFound = false;
}

View File

@ -552,7 +552,8 @@ static void regEmitICmpInst(RegInfo& RI, InstLoc I, CCFlags flag) {
static void regWriteExit(RegInfo& RI, InstLoc dest) {
if (isImm(*dest)) {
RI.Jit->WriteExit(RI.Build->GetImmValue(dest), RI.exitNumber++);
RI.exitNumber++;
RI.Jit->WriteExit(RI.Build->GetImmValue(dest));
} else {
RI.Jit->WriteExitDestInOpArg(regLocForInst(RI, dest));
}
@ -564,7 +565,7 @@ static bool checkIsSNAN() {
return MathUtil::IsSNAN(isSNANTemp[0][0]) || MathUtil::IsSNAN(isSNANTemp[1][0]);
}
static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit) {
static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, u32 exitAddress) {
//printf("Writing block: %x\n", js.blockStart);
RegInfo RI(Jit, ibuild->getFirstInst(), ibuild->getNumInsts());
RI.Build = ibuild;
@ -1791,7 +1792,7 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit) {
Jit->ABI_CallFunction(reinterpret_cast<void *>(&PowerPC::CheckBreakPoints));
Jit->TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(0xFFFFFFFF));
FixupBranch noBreakpoint = Jit->J_CC(CC_Z);
Jit->WriteExit(InstLoc, 0);
Jit->WriteExit(InstLoc);
Jit->SetJumpTarget(noBreakpoint);
break;
}
@ -1819,10 +1820,10 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit) {
}
}
Jit->WriteExit(jit->js.curBlock->exitAddress[0], 0);
Jit->WriteExit(exitAddress);
Jit->UD2();
}
void JitIL::WriteCode() {
DoWriteCode(&ibuild, this);
void JitIL::WriteCode(u32 exitAddress) {
DoWriteCode(&ibuild, this, exitAddress);
}

View File

@ -381,7 +381,7 @@ void JitIL::Cleanup()
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
}
void JitIL::WriteExit(u32 destination, int exit_num)
void JitIL::WriteExit(u32 destination)
{
Cleanup();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling) {
@ -391,8 +391,9 @@ void JitIL::WriteExit(u32 destination, int exit_num)
//If nobody has taken care of this yet (this can be removed when all branches are done)
JitBlock *b = js.curBlock;
b->exitAddress[exit_num] = destination;
b->exitPtrs[exit_num] = GetWritableCodePtr();
JitBlock::LinkData linkData;
linkData.exitAddress = destination;
linkData.exitPtrs = GetWritableCodePtr();
// Link opportunity!
int block = blocks.GetBlockNumberFromStartAddress(destination);
@ -400,13 +401,14 @@ void JitIL::WriteExit(u32 destination, int exit_num)
{
// It exists! Joy of joy!
JMP(blocks.GetBlock(block)->checkedEntry, true);
b->linkStatus[exit_num] = true;
linkData.linkStatus = true;
}
else
{
MOV(32, M(&PC), Imm32(destination));
JMP(asm_routines.dispatcher, true);
}
b->linkData.push_back(linkData);
}
void JitIL::WriteExitDestInOpArg(const Gen::OpArg& arg)
@ -541,14 +543,16 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
// Analyze the block, collect all instructions it is made of (including inlining,
// if that is enabled), reorder instructions for optimal performance, and join joinable instructions.
b->exitAddress[0] = em_address;
u32 exitAddress = em_address;
u32 merged_addresses[32];
const int capacity_of_merged_addresses = sizeof(merged_addresses) / sizeof(merged_addresses[0]);
int size_of_merged_addresses = 0;
if (!memory_exception)
{
// If there is a memory exception inside a block (broken_block==true), compile up to that instruction.
b->exitAddress[0] = PPCAnalyst::Flatten(em_address, &size, &js.st, &js.gpa, &js.fpa, broken_block, code_buf, blockSize, merged_addresses, capacity_of_merged_addresses, size_of_merged_addresses);
// TODO
exitAddress = PPCAnalyst::Flatten(em_address, &size, &js.st, &js.gpa, &js.fpa, broken_block, code_buf, blockSize, merged_addresses, capacity_of_merged_addresses, size_of_merged_addresses);
}
PPCAnalyst::CodeOp *ops = code_buf->codebuffer;
@ -707,7 +711,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
}
// Perform actual code generation
WriteCode();
WriteCode(exitAddress);
b->codeSize = (u32)(GetCodePtr() - normalEntry);
b->originalSize = size;

View File

@ -105,7 +105,7 @@ public:
// Utilities for use by opcodes
void WriteExit(u32 destination, int exit_num);
void WriteExit(u32 destination);
void WriteExitDestInOpArg(const Gen::OpArg& arg);
void WriteExceptionExit();
void WriteRfiExitDestInOpArg(const Gen::OpArg& arg);
@ -121,7 +121,7 @@ public:
void regimmop(int d, int a, bool binary, u32 value, Operation doop, void (Gen::XEmitter::*op)(int, const Gen::OpArg&, const Gen::OpArg&), bool Rc = false, bool carry = false);
void fp_tri_op(int d, int a, int b, bool reversible, bool dupe, void (Gen::XEmitter::*op)(Gen::X64Reg, Gen::OpArg));
void WriteCode();
void WriteCode(u32 exitAddress);
// OPCODES
void unknown_instruction(UGeckoInstruction _inst) override;

View File

@ -186,15 +186,16 @@ void JitArm::WriteExceptionExit()
MOVI2R(A, (u32)asm_routines.testExceptions);
B(A);
}
void JitArm::WriteExit(u32 destination, int exit_num)
void JitArm::WriteExit(u32 destination)
{
Cleanup();
DoDownCount();
//If nobody has taken care of this yet (this can be removed when all branches are done)
JitBlock *b = js.curBlock;
b->exitAddress[exit_num] = destination;
b->exitPtrs[exit_num] = GetWritableCodePtr();
JitBlock::LinkData linkData;
linkData.exitAddress = destination;
linkData.exitPtrs = GetWritableCodePtr();
// Link opportunity!
int block = blocks.GetBlockNumberFromStartAddress(destination);
@ -202,7 +203,7 @@ void JitArm::WriteExit(u32 destination, int exit_num)
{
// It exists! Joy of joy!
B(blocks.GetBlock(block)->checkedEntry);
b->linkStatus[exit_num] = true;
linkData.linkStatus = true;
}
else
{
@ -212,6 +213,8 @@ void JitArm::WriteExit(u32 destination, int exit_num)
MOVI2R(A, (u32)asm_routines.dispatcher);
B(A);
}
b->linkData.push_back(linkData);
}
void STACKALIGN JitArm::Run()
@ -496,7 +499,7 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo
if (broken_block)
{
printf("Broken Block going to 0x%08x\n", nextPC);
WriteExit(nextPC, 0);
WriteExit(nextPC);
}
b->flags = js.block_flags;

View File

@ -109,7 +109,7 @@ public:
// Utilities for use by opcodes
void WriteExit(u32 destination, int exit_num);
void WriteExit(u32 destination);
void WriteExitDestInR(ARMReg Reg);
void WriteRfiExitDestInR(ARMReg Reg);
void WriteExceptionExit();

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