Merge pull request #1 from stenzek/master

update
This commit is contained in:
RaydenX93 2020-09-06 11:16:02 +02:00 committed by GitHub
commit 529927e043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
169 changed files with 7524 additions and 2890 deletions

View file

@ -233,9 +233,46 @@ jobs:
name: "android"
path: "duckstation-android-aarch64.apk"
macos-build:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: Install packages
shell: bash
run: |
brew install qt5 sdl2
- name: Clone mac externals
shell: bash
run: |
git clone https://github.com/stenzek/duckstation-ext-mac.git dep/mac
- name: Compile build
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDL_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 ..
cmake --build . --parallel 2
- name: Zip macOS .app
shell: bash
run: |
cd build/bin
zip -r duckstation-mac-release.zip DuckStation.app/
- name: Upload macOS .app
uses: actions/upload-artifact@v1
with:
name: "macos-x64"
path: "build/bin/duckstation-mac-release.zip"
create-release:
needs: [windows-build, windows-libretro-build, linux-build, linux-libretro-build, android-build]
needs: [windows-build, windows-libretro-build, linux-build, linux-libretro-build, android-build, macos-build]
runs-on: "ubuntu-latest"
if: github.ref == 'refs/heads/master'
steps:
@ -279,6 +316,11 @@ jobs:
with:
name: "android"
- name: Download Mac App
uses: actions/download-artifact@v1
with:
name: "macos-x64"
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
@ -296,4 +338,5 @@ jobs:
linux-libretro/duckstation_libretro_linux_aarch64.so.zip
linux-libretro/duckstation_libretro_android_aarch64.so.zip
android/duckstation-android-aarch64.apk
macos-x64/duckstation-mac-release.zip

3
.gitignore vendored
View file

@ -37,3 +37,6 @@ CMakeLists.txt.user
# python bytecode
__pycache__
# other repos
/dep/mac

View file

@ -0,0 +1,46 @@
# This module can be used in two different ways.
#
# When invoked as `cmake -P DolphinPostprocessBundle.cmake`, it fixes up an
# application folder to be standalone. It bundles all required libraries from
# the system and fixes up library IDs. Any additional shared libraries, like
# plugins, that are found under Contents/MacOS/ will be made standalone as well.
#
# When called with `include(DolphinPostprocessBundle)`, it defines a helper
# function `dolphin_postprocess_bundle` that sets up the command form of the
# module as a post-build step.
if(CMAKE_GENERATOR)
# Being called as include(DolphinPostprocessBundle), so define a helper function.
set(_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION "${CMAKE_CURRENT_LIST_FILE}")
function(dolphin_postprocess_bundle target)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -DDOLPHIN_BUNDLE_PATH="$<TARGET_FILE_DIR:${target}>/../.."
-P "${_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION}"
)
endfunction()
return()
endif()
get_filename_component(DOLPHIN_BUNDLE_PATH "${DOLPHIN_BUNDLE_PATH}" ABSOLUTE)
message(STATUS "Fixing up application bundle: ${DOLPHIN_BUNDLE_PATH}")
# Make sure to fix up any additional shared libraries (like plugins) that are
# needed.
file(GLOB_RECURSE extra_libs "${DOLPHIN_BUNDLE_PATH}/Contents/MacOS/*.dylib")
# BundleUtilities doesn't support DYLD_FALLBACK_LIBRARY_PATH behavior, which
# makes it sometimes break on libraries that do weird things with @rpath. Specify
# equivalent search directories until https://gitlab.kitware.com/cmake/cmake/issues/16625
# is fixed and in our minimum CMake version.
set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib")
# BundleUtilities is overly verbose, so disable most of its messages
function(message)
if(NOT ARGV MATCHES "^STATUS;")
_message(${ARGV})
endif()
endfunction()
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle("${DOLPHIN_BUNDLE_PATH}" "${extra_libs}" "${extra_dirs}")

View file

@ -29,6 +29,8 @@ The following people have contributed to the project in some way, and are credit
- @heckez-sys
- @Damaniel
- @RaydenX93
- @gp2man
- @Richard-L
## Special Thanks
The following people did not directly contribute to the emulator, but it would not be in the state if not for them.

View file

@ -13,6 +13,8 @@ A "BIOS" ROM image is required to to start the emulator and to play games. You c
## Latest News
- 2020/09/01: Many additional user settings available, including memory cards and enhancements. Now you can set these per-game.
- 2020/08/25: Automated builds for macOS now available.
- 2020/08/22: XInput controller backend added.
- 2020/08/20: Per-game setting overrides added. Mostly for compatibility, but some options are customizable.
- 2020/08/19: CPU PGXP mode added. It is very slow and incompatible with the recompiler, only use for games which need it.
@ -96,6 +98,20 @@ To download:
- Run `chmod a+x` on the downloaded AppImage -- following this step, the AppImage can be run like a typical executable.
- Optionally use a program such as [appimaged](https://github.com/AppImage/appimaged) or [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) for desktop integration. [AppImageUpdate](https://github.com/AppImage/AppImageUpdate) can be used alongside appimaged to easily update your DuckStation AppImage.
### macOS
To download:
- Go to https://github.com/stenzek/duckstation/releases/tag/latest, and download the Mac build. This is a zip archive containing the prebuilt binary.
- Alternatively, direct download link: https://github.com/stenzek/duckstation/releases/download/latest/duckstation-mac-release.zip
- Extract the zip archive. If you're using Safari, apparently this happens automatically. This will give you DuckStation.app.
- Right click DuckStation.app, and click Open. As the package is not signed (Mac certificates are expensive), you must do this the first time you open it. Subsequent runs can be done by double-clicking.
macOS support is considered experimental and not actively supported by the developer; the builds are provided here as a courtesy. Please feel free to submit issues, but it may be some time before
they are investigated.
**macOS builds do not support automatic updates yet.** If there is sufficient demand, this may be something I will consider.
### Android
A prebuilt APK is now available for Android. However, please keep in mind that the Android version is not yet feature complete, it is more of a preview of things to come. You will need a device running a 64-bit AArch64 userland (anything made in the last few years).
@ -170,12 +186,11 @@ Requirements:
- Qt 5 (`brew install qt5`)
1. Clone the repository. Submodules aren't necessary, there is only one and it is only used for Windows.
2. Clone the mac externals repository (for MoltenVK): `git clone https://github.com/stenzek/duckstation-ext-mac.git dep/mac`.
2. Create a build directory, either in-tree or elsewhere, e.g. `mkdir build-release`, `cd build-release`.
3. Run cmake to configure the build system: `cmake -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 ..`. You may need to tweak `Qt5_DIR` depending on your system.
4. Compile the source code: `make`. Use `make -jN` where `N` is the number of CPU cores in your system for a faster build.
5. Run the binary, located in the build directory under `bin/duckstation-sdl`, or `bin/duckstation-qt`.
Application bundles/.apps are currently not created, so you can't launch it via Finder yet. This is planned for the future.
5. Run the binary, located in the build directory under `bin/duckstation-sdl`, or `bin/DuckStation.app` for Qt.
### Android
**NOTE:** The Android frontend is still incomplete, not all functionality is available yet. User directory is hardcoded to `/sdcard/duckstation` for now.

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View file

@ -24,6 +24,10 @@ android {
version "3.10.2"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
externalNativeBuild {
cmake {

View file

@ -5,10 +5,10 @@
#include "common/string.h"
#include "common/timestamp.h"
#include "core/controller.h"
#include "core/game_list.h"
#include "core/gpu.h"
#include "core/host_display.h"
#include "core/system.h"
#include "frontend-common/game_list.h"
#include "frontend-common/imgui_styles.h"
#include "frontend-common/opengl_host_display.h"
#include "frontend-common/vulkan_host_display.h"
@ -20,7 +20,14 @@ Log_SetChannel(AndroidHostInterface);
static JavaVM* s_jvm;
static jclass s_AndroidHostInterface_class;
static jmethodID s_AndroidHostInterface_constructor;
static jfieldID s_AndroidHostInterface_field_nativePointer;
static jfieldID s_AndroidHostInterface_field_mNativePointer;
static jmethodID s_AndroidHostInterface_method_reportError;
static jmethodID s_AndroidHostInterface_method_reportMessage;
static jmethodID s_EmulationActivity_method_reportError;
static jmethodID s_EmulationActivity_method_reportMessage;
static jmethodID s_EmulationActivity_method_onEmulationStarted;
static jmethodID s_EmulationActivity_method_onEmulationStopped;
static jmethodID s_EmulationActivity_method_onGameTitleChanged;
namespace AndroidHelpers {
// helper for retrieving the current per-thread jni environment
@ -36,7 +43,7 @@ JNIEnv* GetJNIEnv()
AndroidHostInterface* GetNativeClass(JNIEnv* env, jobject obj)
{
return reinterpret_cast<AndroidHostInterface*>(
static_cast<uintptr_t>(env->GetLongField(obj, s_AndroidHostInterface_field_nativePointer)));
static_cast<uintptr_t>(env->GetLongField(obj, s_AndroidHostInterface_field_mNativePointer)));
}
std::string JStringToString(JNIEnv* env, jstring str)
@ -95,12 +102,26 @@ void AndroidHostInterface::RequestExit()
void AndroidHostInterface::ReportError(const char* message)
{
HostInterface::ReportError(message);
CommonHostInterface::ReportError(message);
JNIEnv* env = AndroidHelpers::GetJNIEnv();
jstring message_jstr = env->NewStringUTF(message);
if (m_emulation_activity_object)
env->CallVoidMethod(m_emulation_activity_object, s_EmulationActivity_method_reportError, message_jstr);
else
env->CallVoidMethod(m_java_object, s_AndroidHostInterface_method_reportError, message_jstr);
}
void AndroidHostInterface::ReportMessage(const char* message)
{
HostInterface::ReportMessage(message);
CommonHostInterface::ReportMessage(message);
JNIEnv* env = AndroidHelpers::GetJNIEnv();
jstring message_jstr = env->NewStringUTF(message);
if (m_emulation_activity_object)
env->CallVoidMethod(m_emulation_activity_object, s_EmulationActivity_method_reportMessage, message_jstr);
else
env->CallVoidMethod(m_java_object, s_AndroidHostInterface_method_reportMessage, message_jstr);
}
std::string AndroidHostInterface::GetStringSettingValue(const char* section, const char* key, const char* default_value)
@ -141,22 +162,17 @@ void AndroidHostInterface::UpdateInputMap()
CommonHostInterface::UpdateInputMap(m_settings_interface);
}
bool AndroidHostInterface::StartEmulationThread(ANativeWindow* initial_surface, SystemBootParameters boot_params)
bool AndroidHostInterface::StartEmulationThread(jobject emulation_activity, ANativeWindow* initial_surface,
SystemBootParameters boot_params, bool resume_state)
{
Assert(!IsEmulationThreadRunning());
emulation_activity = AndroidHelpers::GetJNIEnv()->NewGlobalRef(emulation_activity);
Log_DevPrintf("Starting emulation thread...");
m_emulation_thread_stop_request.store(false);
m_emulation_thread =
std::thread(&AndroidHostInterface::EmulationThreadEntryPoint, this, initial_surface, std::move(boot_params));
m_emulation_thread_started.Wait();
if (!m_emulation_thread_start_result.load())
{
m_emulation_thread.join();
Log_ErrorPrint("Failed to start emulation in thread");
return false;
}
m_emulation_thread = std::thread(&AndroidHostInterface::EmulationThreadEntryPoint, this, emulation_activity,
initial_surface, std::move(boot_params), resume_state);
return true;
}
@ -196,36 +212,48 @@ void AndroidHostInterface::RunOnEmulationThread(std::function<void()> function,
m_callback_mutex.unlock();
}
void AndroidHostInterface::EmulationThreadEntryPoint(ANativeWindow* initial_surface, SystemBootParameters boot_params)
void AndroidHostInterface::EmulationThreadEntryPoint(jobject emulation_activity, ANativeWindow* initial_surface,
SystemBootParameters boot_params, bool resume_state)
{
JNIEnv* thread_env;
if (s_jvm->AttachCurrentThread(&thread_env, nullptr) != JNI_OK)
{
Log_ErrorPrintf("Failed to attach JNI to thread");
m_emulation_thread_start_result.store(false);
m_emulation_thread_started.Signal();
ReportError("Failed to attach JNI to thread");
return;
}
CreateImGuiContext();
m_surface = initial_surface;
ApplySettings();
m_emulation_activity_object = emulation_activity;
ApplySettings(true);
// Boot system.
if (!BootSystem(boot_params))
bool boot_result = false;
if (resume_state)
{
Log_ErrorPrintf("Failed to boot system on emulation thread (file:%s).", boot_params.filename.c_str());
if (boot_params.filename.empty())
boot_result = ResumeSystemFromMostRecentState();
else
boot_result = ResumeSystemFromState(boot_params.filename.c_str(), true);
}
else
{
boot_result = BootSystem(boot_params);
}
if (!boot_result)
{
ReportFormattedError("Failed to boot system on emulation thread (file:%s).", boot_params.filename.c_str());
DestroyImGuiContext();
m_emulation_thread_start_result.store(false);
m_emulation_thread_started.Signal();
thread_env->CallVoidMethod(m_emulation_activity_object, s_EmulationActivity_method_onEmulationStopped);
thread_env->DeleteGlobalRef(m_emulation_activity_object);
m_emulation_activity_object = {};
s_jvm->DetachCurrentThread();
return;
}
// System is ready to go.
m_emulation_thread_start_result.store(true);
m_emulation_thread_started.Signal();
thread_env->CallVoidMethod(m_emulation_activity_object, s_EmulationActivity_method_onEmulationStarted);
while (!m_emulation_thread_stop_request.load())
{
// run any events
@ -264,8 +292,11 @@ void AndroidHostInterface::EmulationThreadEntryPoint(ANativeWindow* initial_surf
}
}
DestroySystem();
thread_env->CallVoidMethod(m_emulation_activity_object, s_EmulationActivity_method_onEmulationStopped);
PowerOffSystem();
DestroyImGuiContext();
thread_env->DeleteGlobalRef(m_emulation_activity_object);
m_emulation_activity_object = {};
s_jvm->DetachCurrentThread();
}
@ -308,9 +339,27 @@ void AndroidHostInterface::ReleaseHostDisplay()
m_display.reset();
}
void AndroidHostInterface::OnSystemDestroyed()
{
CommonHostInterface::OnSystemDestroyed();
ClearOSDMessages();
}
void AndroidHostInterface::OnRunningGameChanged()
{
CommonHostInterface::OnRunningGameChanged();
if (m_emulation_activity_object)
{
JNIEnv* env = AndroidHelpers::GetJNIEnv();
jstring title_string = env->NewStringUTF(System::GetRunningTitle().c_str());
env->CallVoidMethod(m_emulation_activity_object, s_EmulationActivity_method_onGameTitleChanged, title_string);
}
}
void AndroidHostInterface::SurfaceChanged(ANativeWindow* surface, int format, int width, int height)
{
Log_InfoPrintf("SurfaceChanged %p %d %d %d", surface, format, width, height);
ReportFormattedMessage("SurfaceChanged %p %d %d %d", surface, format, width, height);
if (m_surface == surface)
{
if (m_display)
@ -412,10 +461,11 @@ void AndroidHostInterface::RefreshGameList(bool invalidate_cache, bool invalidat
m_game_list->Refresh(invalidate_cache, invalidate_database);
}
void AndroidHostInterface::ApplySettings()
void AndroidHostInterface::ApplySettings(bool display_osd_messages)
{
Settings old_settings = std::move(g_settings);
CommonHostInterface::LoadSettings(m_settings_interface);
CommonHostInterface::FixIncompatibleSettings(display_osd_messages);
CheckForSettingsChanges(old_settings);
}
@ -439,10 +489,26 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
return -1;
}
if ((s_AndroidHostInterface_constructor = env->GetMethodID(s_AndroidHostInterface_class, "<init>", "()V")) ==
nullptr ||
(s_AndroidHostInterface_field_nativePointer =
env->GetFieldID(s_AndroidHostInterface_class, "nativePointer", "J")) == nullptr)
jclass emulation_activity_class;
if ((s_AndroidHostInterface_constructor =
env->GetMethodID(s_AndroidHostInterface_class, "<init>", "(Landroid/content/Context;)V")) == nullptr ||
(s_AndroidHostInterface_field_mNativePointer =
env->GetFieldID(s_AndroidHostInterface_class, "mNativePointer", "J")) == nullptr ||
(s_AndroidHostInterface_method_reportError =
env->GetMethodID(s_AndroidHostInterface_class, "reportError", "(Ljava/lang/String;)V")) == nullptr ||
(s_AndroidHostInterface_method_reportMessage =
env->GetMethodID(s_AndroidHostInterface_class, "reportMessage", "(Ljava/lang/String;)V")) == nullptr ||
(emulation_activity_class = env->FindClass("com/github/stenzek/duckstation/EmulationActivity")) == nullptr ||
(s_EmulationActivity_method_reportError =
env->GetMethodID(emulation_activity_class, "reportError", "(Ljava/lang/String;)V")) == nullptr ||
(s_EmulationActivity_method_reportMessage =
env->GetMethodID(emulation_activity_class, "reportMessage", "(Ljava/lang/String;)V")) == nullptr ||
(s_EmulationActivity_method_onEmulationStarted =
env->GetMethodID(emulation_activity_class, "onEmulationStarted", "()V")) == nullptr ||
(s_EmulationActivity_method_onEmulationStopped =
env->GetMethodID(emulation_activity_class, "onEmulationStopped", "()V")) == nullptr ||
(s_EmulationActivity_method_onGameTitleChanged =
env->GetMethodID(emulation_activity_class, "onGameTitleChanged", "(Ljava/lang/String;)V")) == nullptr)
{
Log_ErrorPrint("AndroidHostInterface lookups failed");
return -1;
@ -457,12 +523,13 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
#define DEFINE_JNI_ARGS_METHOD(return_type, name, ...) \
extern "C" JNIEXPORT return_type JNICALL Java_com_github_stenzek_duckstation_##name(JNIEnv* env, __VA_ARGS__)
DEFINE_JNI_ARGS_METHOD(jobject, AndroidHostInterface_create, jobject unused, jobject context_object, jstring user_directory)
DEFINE_JNI_ARGS_METHOD(jobject, AndroidHostInterface_create, jobject unused, jobject context_object,
jstring user_directory)
{
Log::SetDebugOutputParams(true, nullptr, LOGLEVEL_DEBUG);
// initialize the java side
jobject java_obj = env->NewObject(s_AndroidHostInterface_class, s_AndroidHostInterface_constructor);
jobject java_obj = env->NewObject(s_AndroidHostInterface_class, s_AndroidHostInterface_constructor, context_object);
if (!java_obj)
{
Log_ErrorPrint("Failed to create Java AndroidHostInterface");
@ -483,7 +550,7 @@ DEFINE_JNI_ARGS_METHOD(jobject, AndroidHostInterface_create, jobject unused, job
return nullptr;
}
env->SetLongField(java_obj, s_AndroidHostInterface_field_nativePointer,
env->SetLongField(java_obj, s_AndroidHostInterface_field_mNativePointer,
static_cast<long>(reinterpret_cast<uintptr_t>(cpp_obj)));
return java_obj;
@ -494,8 +561,8 @@ DEFINE_JNI_ARGS_METHOD(jboolean, AndroidHostInterface_isEmulationThreadRunning,
return AndroidHelpers::GetNativeClass(env, obj)->IsEmulationThreadRunning();
}
DEFINE_JNI_ARGS_METHOD(jboolean, AndroidHostInterface_startEmulationThread, jobject obj, jobject surface,
jstring filename, jstring state_filename)
DEFINE_JNI_ARGS_METHOD(jboolean, AndroidHostInterface_startEmulationThread, jobject obj, jobject emulationActivity,
jobject surface, jstring filename, jboolean resume_state, jstring state_filename)
{
ANativeWindow* native_surface = ANativeWindow_fromSurface(env, surface);
if (!native_surface)
@ -509,7 +576,8 @@ DEFINE_JNI_ARGS_METHOD(jboolean, AndroidHostInterface_startEmulationThread, jobj
SystemBootParameters boot_params;
boot_params.filename = AndroidHelpers::JStringToString(env, filename);
return AndroidHelpers::GetNativeClass(env, obj)->StartEmulationThread(native_surface, std::move(boot_params));
return AndroidHelpers::GetNativeClass(env, obj)->StartEmulationThread(emulationActivity, native_surface,
std::move(boot_params), resume_state);
}
DEFINE_JNI_ARGS_METHOD(void, AndroidHostInterface_stopEmulationThread, jobject obj)
@ -526,7 +594,8 @@ DEFINE_JNI_ARGS_METHOD(void, AndroidHostInterface_surfaceChanged, jobject obj, j
AndroidHostInterface* hi = AndroidHelpers::GetNativeClass(env, obj);
hi->RunOnEmulationThread(
[hi, native_surface, format, width, height]() { hi->SurfaceChanged(native_surface, format, width, height); }, true);
[hi, native_surface, format, width, height]() { hi->SurfaceChanged(native_surface, format, width, height); },
false);
}
DEFINE_JNI_ARGS_METHOD(void, AndroidHostInterface_setControllerType, jobject obj, jint index, jstring controller_type)
@ -629,11 +698,11 @@ DEFINE_JNI_ARGS_METHOD(void, AndroidHostInterface_applySettings, jobject obj)
AndroidHostInterface* hi = AndroidHelpers::GetNativeClass(env, obj);
if (hi->IsEmulationThreadRunning())
{
hi->RunOnEmulationThread([hi]() { hi->ApplySettings(); });
hi->RunOnEmulationThread([hi]() { hi->ApplySettings(false); });
}
else
{
hi->ApplySettings();
hi->ApplySettings(false);
}
}

View file

@ -35,7 +35,8 @@ public:
float GetFloatSettingValue(const char* section, const char* key, float default_value = 0.0f) override;
bool IsEmulationThreadRunning() const { return m_emulation_thread.joinable(); }
bool StartEmulationThread(ANativeWindow* initial_surface, SystemBootParameters boot_params);
bool StartEmulationThread(jobject emulation_activity, ANativeWindow* initial_surface,
SystemBootParameters boot_params, bool resume_state);
void RunOnEmulationThread(std::function<void()> function, bool blocking = false);
void StopEmulationThread();
@ -46,7 +47,7 @@ public:
void SetControllerAxisState(u32 index, s32 button_code, float value);
void RefreshGameList(bool invalidate_cache, bool invalidate_database);
void ApplySettings();
void ApplySettings(bool display_osd_messages);
protected:
void SetUserDirectory() override;
@ -56,13 +57,18 @@ protected:
bool AcquireHostDisplay() override;
void ReleaseHostDisplay() override;
void OnSystemDestroyed() override;
void OnRunningGameChanged() override;
private:
void EmulationThreadEntryPoint(ANativeWindow* initial_surface, SystemBootParameters boot_params);
void EmulationThreadEntryPoint(jobject emulation_activity, ANativeWindow* initial_surface,
SystemBootParameters boot_params, bool resume_state);
void CreateImGuiContext();
void DestroyImGuiContext();
jobject m_java_object = {};
jobject m_emulation_activity_object = {};
AndroidSettingsInterface m_settings_interface;
@ -73,8 +79,6 @@ private:
std::thread m_emulation_thread;
std::atomic_bool m_emulation_thread_stop_request{false};
std::atomic_bool m_emulation_thread_start_result{false};
Common::Event m_emulation_thread_started;
};
namespace AndroidHelpers {

View file

@ -4,37 +4,57 @@ import android.content.Context;
import android.os.Environment;
import android.util.Log;
import android.view.Surface;
import android.widget.Toast;
public class AndroidHostInterface
{
private long nativePointer;
import com.google.android.material.snackbar.Snackbar;
public class AndroidHostInterface {
private long mNativePointer;
private Context mContext;
static public native AndroidHostInterface create(Context context, String userDirectory);
public AndroidHostInterface(long nativePointer)
{
this.nativePointer = nativePointer;
public AndroidHostInterface(Context context) {
this.mContext = context;
}
public void reportError(String message) {
Toast.makeText(mContext, message, Toast.LENGTH_LONG).show();
}
public void reportMessage(String message) {
Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();
}
public native boolean isEmulationThreadRunning();
public native boolean startEmulationThread(Surface surface, String filename, String state_filename);
public native boolean startEmulationThread(EmulationActivity emulationActivity, Surface surface, String filename, boolean resumeState, String state_filename);
public native void stopEmulationThread();
public native void surfaceChanged(Surface surface, int format, int width, int height);
// TODO: Find a better place for this.
public native void setControllerType(int index, String typeName);
public native void setControllerButtonState(int index, int buttonCode, boolean pressed);
public native void setControllerAxisState(int index, int axisCode, float value);
public static native int getControllerButtonCode(String controllerType, String buttonName);
public static native int getControllerAxisCode(String controllerType, String axisName);
public native void refreshGameList(boolean invalidateCache, boolean invalidateDatabase);
public native GameListEntry[] getGameListEntries();
public native void resetSystem();
public native void loadState(boolean global, int slot);
public native void saveState(boolean global, int slot);
public native void applySettings();
static {
@ -42,6 +62,7 @@ public class AndroidHostInterface
}
static private AndroidHostInterface mInstance;
static public boolean createInstance(Context context) {
// Set user path.
String externalStorageDirectory = Environment.getExternalStorageDirectory().getAbsolutePath();
@ -57,6 +78,7 @@ public class AndroidHostInterface
static public boolean hasInstance() {
return mInstance != null;
}
static public AndroidHostInterface getInstance() {
return mInstance;
}

View file

@ -3,6 +3,7 @@ package com.github.stenzek.duckstation;
import android.annotation.SuppressLint;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
@ -11,14 +12,12 @@ import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.MenuItem;
import android.widget.FrameLayout;
import android.widget.Toast;
import androidx.core.app.NavUtils;
import androidx.preference.PreferenceManager;
/**
@ -30,77 +29,69 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
* Settings interfaces.
*/
SharedPreferences mPreferences;
private boolean getBooleanSetting(String key, boolean defaultValue) {
return mPreferences.getBoolean(key, defaultValue);
}
private void setBooleanSetting(String key, boolean value) {
SharedPreferences.Editor editor = mPreferences.edit();
editor.putBoolean(key, value);
editor.apply();
}
private String getStringSetting(String key, String defaultValue) {
return mPreferences.getString(key, defaultValue);
}
/**
* Touchscreen controller overlay
*/
TouchscreenControllerView mTouchscreenController;
private boolean mTouchscreenControllerVisible = true;
public void reportError(String message) {
Log.e("EmulationActivity", message);
/**
* Whether or not the system UI should be auto-hidden after
* {@link #AUTO_HIDE_DELAY_MILLIS} milliseconds.
*/
private static final boolean AUTO_HIDE = true;
/**
* If {@link #AUTO_HIDE} is set, the number of milliseconds to wait after
* user interaction before hiding the system UI.
*/
private static final int AUTO_HIDE_DELAY_MILLIS = 3000;
/**
* Some older devices needs a small delay between UI widget updates
* and a change of the status and navigation bar.
*/
private static final int UI_ANIMATION_DELAY = 300;
private final Handler mHideHandler = new Handler();
private EmulationSurfaceView mContentView;
private final Runnable mHidePart2Runnable = new Runnable() {
@SuppressLint("InlinedApi")
@Override
public void run() {
// Delayed removal of status and navigation bar
// Note that some of these constants are new as of API 16 (Jelly Bean)
// and API 19 (KitKat). It is safe to use them, as they are inlined
// at compile-time and do nothing on earlier devices.
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Object lock = new Object();
runOnUiThread(() -> {
// Toast.makeText(this, message, Toast.LENGTH_LONG);
new AlertDialog.Builder(this)
.setTitle("Error")
.setMessage(message)
.setPositiveButton("OK", (dialog, button) -> {
dialog.dismiss();
synchronized (lock) {
lock.notify();
}
};
private final Runnable mShowPart2Runnable = new Runnable() {
@Override
public void run() {
// Delayed display of UI elements
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.show();
})
.create()
.show();
});
synchronized (lock) {
try {
lock.wait();
} catch (InterruptedException e) {
}
}
};
private boolean mVisible;
private final Runnable mHideRunnable = new Runnable() {
@Override
public void run() {
hide();
}
};
public void reportMessage(String message) {
Log.i("EmulationActivity", message);
runOnUiThread(() -> {
Toast.makeText(this, message, Toast.LENGTH_SHORT);
});
}
public void onEmulationStarted() {
}
public void onEmulationStopped() {
runOnUiThread(() -> {
finish();
});
}
public void onGameTitleChanged(String title) {
runOnUiThread(() -> {
setTitle(title);
});
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
@ -114,16 +105,11 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
return;
}
String bootPath = getIntent().getStringExtra("bootPath");
String bootSaveStatePath = getIntent().getStringExtra("bootSaveStatePath");
boolean resumeState = getIntent().getBooleanExtra("resumeState", false);
final String bootPath = getIntent().getStringExtra("bootPath");
final boolean resumeState = getIntent().getBooleanExtra("resumeState", false);
final String bootSaveStatePath = getIntent().getStringExtra("saveStatePath");
if (!AndroidHostInterface.getInstance()
.startEmulationThread(holder.getSurface(), bootPath, bootSaveStatePath)) {
Log.e("EmulationActivity", "Failed to start emulation thread");
finishActivity(0);
return;
}
AndroidHostInterface.getInstance().startEmulationThread(this, holder.getSurface(), bootPath, resumeState, bootSaveStatePath);
}
@Override
@ -146,14 +132,14 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
actionBar.setDisplayHomeAsUpEnabled(true);
}
mVisible = true;
mSystemUIVisible = true;
mContentView = findViewById(R.id.fullscreen_content);
mContentView.getHolder().addCallback(this);
mContentView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (mVisible)
hide();
if (mSystemUIVisible)
hideSystemUI();
}
});
@ -173,11 +159,16 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
hideSystemUI();
}
// Trigger the initial hide() shortly after the activity has been
// created, to briefly hint to the user that UI controls
// are available.
delayedHide(100);
@Override
protected void onStop() {
super.onStop();
if (AndroidHostInterface.getInstance().isEmulationThreadRunning()) {
AndroidHostInterface.getInstance().stopEmulationThread();
}
}
@Override
@ -228,37 +219,79 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
@Override
public void onBackPressed() {
if (mVisible) {
if (mSystemUIVisible) {
finish();
return;
}
show();
showSystemUI();
}
private void hide() {
/**
* Some older devices needs a small delay between UI widget updates
* and a change of the status and navigation bar.
*/
private static final int UI_ANIMATION_DELAY = 300;
private final Handler mSystemUIHideHandler = new Handler();
private EmulationSurfaceView mContentView;
private final Runnable mHidePart2Runnable = new Runnable() {
@SuppressLint("InlinedApi")
@Override
public void run() {
// Delayed removal of status and navigation bar
// Note that some of these constants are new as of API 16 (Jelly Bean)
// and API 19 (KitKat). It is safe to use them, as they are inlined
// at compile-time and do nothing on earlier devices.
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
}
};
private final Runnable mShowPart2Runnable = new Runnable() {
@Override
public void run() {
// Delayed display of UI elements
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.show();
}
}
};
private boolean mSystemUIVisible;
private final Runnable mHideRunnable = new Runnable() {
@Override
public void run() {
hideSystemUI();
}
};
private void hideSystemUI() {
// Hide UI first
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.hide();
}
mVisible = false;
mSystemUIVisible = false;
// Schedule a runnable to remove the status and navigation bar after a delay
mHideHandler.removeCallbacks(mShowPart2Runnable);
mHideHandler.postDelayed(mHidePart2Runnable, UI_ANIMATION_DELAY);
mSystemUIHideHandler.removeCallbacks(mShowPart2Runnable);
mSystemUIHideHandler.postDelayed(mHidePart2Runnable, UI_ANIMATION_DELAY);
}
@SuppressLint("InlinedApi")
private void show() {
private void showSystemUI() {
// Show the system bar
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
mVisible = true;
mSystemUIVisible = true;
// Schedule a runnable to display UI elements after a delay
mHideHandler.removeCallbacks(mHidePart2Runnable);
mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);
mSystemUIHideHandler.removeCallbacks(mHidePart2Runnable);
mSystemUIHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);
}
/**
@ -266,10 +299,16 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
* previously scheduled calls.
*/
private void delayedHide(int delayMillis) {
mHideHandler.removeCallbacks(mHideRunnable);
mHideHandler.postDelayed(mHideRunnable, delayMillis);
mSystemUIHideHandler.removeCallbacks(mHideRunnable);
mSystemUIHideHandler.postDelayed(mHideRunnable, delayMillis);
}
/**
* Touchscreen controller overlay
*/
TouchscreenControllerView mTouchscreenController;
private boolean mTouchscreenControllerVisible = true;
private void setTouchscreenControllerVisibility(boolean visible) {
mTouchscreenControllerVisible = visible;
mTouchscreenController.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);

View file

@ -17,13 +17,13 @@ import java.lang.reflect.Array;
import java.lang.reflect.Method;
public final class FileUtil {
static String TAG="TAG";
static String TAG = "TAG";
private static final String PRIMARY_VOLUME_NAME = "primary";
@Nullable
public static String getFullPathFromTreeUri(@Nullable final Uri treeUri, Context con) {
if (treeUri == null) return null;
String volumePath = getVolumePath(getVolumeIdFromTreeUri(treeUri),con);
String volumePath = getVolumePath(getVolumeIdFromTreeUri(treeUri), con);
if (volumePath == null) return File.separator;
if (volumePath.endsWith(File.separator))
volumePath = volumePath.substring(0, volumePath.length() - 1);
@ -37,8 +37,7 @@ public final class FileUtil {
return volumePath + documentPath;
else
return volumePath + File.separator + documentPath;
}
else return volumePath;
} else return volumePath;
}

View file

@ -12,6 +12,8 @@ import android.widget.TextView;
import androidx.preference.PreferenceManager;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Set;
public class GameList {
@ -25,10 +27,19 @@ public class GameList {
mEntries = new GameListEntry[0];
}
private class GameListEntryComparator implements Comparator<GameListEntry> {
@Override
public int compare(GameListEntry left, GameListEntry right) {
return left.getTitle().compareTo(right.getTitle());
}
}
public void refresh(boolean invalidateCache, boolean invalidateDatabase) {
// Search and get entries from native code
AndroidHostInterface.getInstance().refreshGameList(invalidateCache, invalidateDatabase);
mEntries = AndroidHostInterface.getInstance().getGameListEntries();
Arrays.sort(mEntries, new GameListEntryComparator());
mAdapter.notifyDataSetChanged();
}

View file

@ -7,14 +7,12 @@ import android.widget.TextView;
import androidx.core.content.ContextCompat;
public class GameListEntry {
public enum EntryType
{
public enum EntryType {
Disc,
PSExe
}
public enum CompatibilityRating
{
public enum CompatibilityRating {
Unknown,
DoesntBoot,
CrashesInIntro,
@ -72,15 +70,21 @@ public class GameListEntry {
return mTitle;
}
public String getModifiedTime() { return mModifiedTime; }
public String getModifiedTime() {
return mModifiedTime;
}
public DiscRegion getRegion() {
return mRegion;
}
public EntryType getType() { return mType; }
public EntryType getType() {
return mType;
}
public CompatibilityRating getCompatibilityRating() { return mCompatibilityRating; }
public CompatibilityRating getCompatibilityRating() {
return mCompatibilityRating;
}
public void fillView(View view) {
((TextView) view.findViewById(R.id.game_list_view_entry_title)).setText(mTitle);

View file

@ -28,27 +28,26 @@ import android.view.MenuItem;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.PopupMenu;
import android.widget.Toast;
import java.util.HashSet;
import java.util.Set;
import java.util.prefs.Preferences;
import static com.google.android.material.snackbar.Snackbar.make;
public class MainActivity extends AppCompatActivity {
private static final int REQUEST_EXTERNAL_STORAGE_PERMISSIONS = 1;
private static final int REQUEST_ADD_DIRECTORY_TO_GAME_LIST = 2;
private GameList mGameList;
private ListView mGameListView;
private boolean mHasExternalStoragePermissions = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!AndroidHostInterface.hasInstance() && !AndroidHostInterface.createInstance(this)) {
Log.i("MainActivity", "Failed to create host interface");
throw new RuntimeException("Failed to create host interface");
}
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@ -86,6 +85,14 @@ public class MainActivity extends AppCompatActivity {
menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
int id = item.getItemId();
if (id == R.id.game_list_entry_menu_start_game) {
startEmulation(mGameList.getEntry(position).getPath(), false);
return true;
} else if (id == R.id.game_list_entry_menu_resume_game) {
startEmulation(mGameList.getEntry(position).getPath(), true);
return true;
}
return false;
}
});
@ -93,6 +100,18 @@ public class MainActivity extends AppCompatActivity {
return true;
}
});
mHasExternalStoragePermissions = checkForExternalStoragePermissions();
if (mHasExternalStoragePermissions)
completeStartup();
}
private void completeStartup() {
if (!AndroidHostInterface.hasInstance() && !AndroidHostInterface.createInstance(this)) {
Log.i("MainActivity", "Failed to create host interface");
throw new RuntimeException("Failed to create host interface");
}
mGameList.refresh(false, false);
}
@ -122,12 +141,17 @@ public class MainActivity extends AppCompatActivity {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_add_game_directory) {
if (id == R.id.action_resume) {
startEmulation(null, true);
} else if (id == R.id.action_start_bios) {
startEmulation(null, false);
} else if (id == R.id.action_add_game_directory) {
startAddGameDirectory();
} else if (id == R.id.action_scan_for_new_games) {
mGameList.refresh(false, false);
} if (id == R.id.action_rescan_all_games) {
mGameList.refresh(true, false);
}
if (id == R.id.action_rescan_all_games) {
mGameList.refresh(true, true);
}
if (id == R.id.action_settings) {
Intent intent = new Intent(this, SettingsActivity.class);
@ -190,19 +214,21 @@ public class MainActivity extends AppCompatActivity {
int[] grantResults) {
// check that all were successful
for (int i = 0; i < grantResults.length; i++) {
if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {
Snackbar.make(mGameListView,
"External storage permissions are required to start emulation.",
Snackbar.LENGTH_LONG);
if (grantResults[i] == PackageManager.PERMISSION_GRANTED) {
if (!mHasExternalStoragePermissions) {
mHasExternalStoragePermissions = true;
completeStartup();
}
} else {
Toast.makeText(this,
"External storage permissions are required to use DuckStation.",
Toast.LENGTH_LONG);
finish();
}
}
}
private boolean startEmulation(String bootPath, boolean resumeState) {
if (!checkForExternalStoragePermissions()) {
return false;
}
Intent intent = new Intent(this, EmulationActivity.class);
intent.putExtra("bootPath", bootPath);
intent.putExtra("resumeState", resumeState);

View file

@ -19,25 +19,24 @@ public class TouchscreenControllerButtonView extends View {
private String mButtonName = "";
private ButtonStateChangedListener mListener;
public interface ButtonStateChangedListener
{
public interface ButtonStateChangedListener {
void onButtonStateChanged(TouchscreenControllerButtonView view, boolean pressed);
}
public TouchscreenControllerButtonView(Context context) {
super(context);
init(context,null, 0);
init(context, null, 0);
}
public TouchscreenControllerButtonView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context,attrs, 0);
init(context, attrs, 0);
}
public TouchscreenControllerButtonView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context,attrs, defStyle);
init(context, attrs, defStyle);
}
private void init(Context context, AttributeSet attrs, int defStyle) {
@ -80,15 +79,12 @@ public class TouchscreenControllerButtonView extends View {
}
@Override
public boolean onTouchEvent(MotionEvent event)
{
public boolean onTouchEvent(MotionEvent event) {
final boolean oldState = mPressed;
switch (event.getAction())
{
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
{
case MotionEvent.ACTION_POINTER_DOWN: {
mPressed = true;
invalidate();
@ -99,8 +95,7 @@ public class TouchscreenControllerButtonView extends View {
}
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP:
{
case MotionEvent.ACTION_POINTER_UP: {
mPressed = false;
invalidate();
@ -114,8 +109,7 @@ public class TouchscreenControllerButtonView extends View {
return super.onTouchEvent(event);
}
public boolean isPressed()
{
public boolean isPressed() {
return mPressed;
}
@ -127,13 +121,11 @@ public class TouchscreenControllerButtonView extends View {
mButtonName = buttonName;
}
public int getButtonCode()
{
public int getButtonCode() {
return mButtonCode;
}
public void setButtonCode(int code)
{
public void setButtonCode(int code) {
mButtonCode = code;
}
@ -153,8 +145,7 @@ public class TouchscreenControllerButtonView extends View {
mUnpressedDrawable = unpressedDrawable;
}
public void setButtonStateChangedListener(ButtonStateChangedListener listener)
{
public void setButtonStateChangedListener(ButtonStateChangedListener listener) {
mListener = listener;
}
}

View file

@ -50,9 +50,8 @@ public class TouchscreenControllerView extends FrameLayout implements Touchscree
linkButton(view, R.id.controller_button_r2, "R2");
}
private void linkButton(View view, int id, String buttonName)
{
TouchscreenControllerButtonView buttonView = (TouchscreenControllerButtonView)view.findViewById(id);
private void linkButton(View view, int id, String buttonName) {
TouchscreenControllerButtonView buttonView = (TouchscreenControllerButtonView) view.findViewById(id);
buttonView.setButtonName(buttonName);
buttonView.setButtonStateChangedListener(this);

View file

@ -1,36 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://raw.githubusercontent.com/Shusshu/android-flags/master/flags/src/main/res/drawable/flag_us2.xml -->
<vector android:height="15dp" android:viewportHeight="15"
android:viewportWidth="21" android:width="21dp"
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillType="evenOdd" android:pathData="M0,0h21v15h-21z"
android:strokeColor="#00000000" android:strokeWidth="1">
<?xml version="1.0" encoding="utf-8"?><!-- https://raw.githubusercontent.com/Shusshu/android-flags/master/flags/src/main/res/drawable/flag_us2.xml -->
<vector android:height="15dp"
android:viewportHeight="15"
android:viewportWidth="21"
android:width="21dp"
xmlns:aapt="http://schemas.android.com/aapt"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillType="evenOdd"
android:pathData="M0,0h21v15h-21z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="10.5" android:endY="15"
android:startX="10.5" android:startY="0" android:type="linear">
<item android:color="#FFFFFFFF" android:offset="0"/>
<item android:color="#FFF0F0F0" android:offset="1"/>
<gradient
android:endX="10.5"
android:endY="15"
android:startX="10.5"
android:startY="0"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#FFF0F0F0"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:fillType="evenOdd" android:pathData="M0,0h21v15h-21z"
android:strokeColor="#00000000" android:strokeWidth="1">
<path
android:fillType="evenOdd"
android:pathData="M0,0h21v15h-21z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="10.5" android:endY="15"
android:startX="10.5" android:startY="0" android:type="linear">
<item android:color="#FF043CAE" android:offset="0"/>
<item android:color="#FF00339A" android:offset="1"/>
<gradient
android:endX="10.5"
android:endY="15"
android:startX="10.5"
android:startY="0"
android:type="linear">
<item
android:color="#FF043CAE"
android:offset="0" />
<item
android:color="#FF00339A"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:fillType="evenOdd"
<path
android:fillType="evenOdd"
android:pathData="M10.5,3L9.7929,3.2071L10,2.5L9.7929,1.7929L10.5,2L11.2071,1.7929L11,2.5L11.2071,3.2071L10.5,3ZM10.5,13L9.7929,13.2071L10,12.5L9.7929,11.7929L10.5,12L11.2071,11.7929L11,12.5L11.2071,13.2071L10.5,13ZM15.5,8L14.7929,8.2071L15,7.5L14.7929,6.7929L15.5,7L16.2071,6.7929L16,7.5L16.2071,8.2071L15.5,8ZM5.5,8L4.7929,8.2071L5,7.5L4.7929,6.7929L5.5,7L6.2071,6.7929L6,7.5L6.2071,8.2071L5.5,8ZM14.8301,5.5L14.123,5.7071L14.3301,5L14.123,4.2929L14.8301,4.5L15.5372,4.2929L15.3301,5L15.5372,5.7071L14.8301,5.5ZM6.1699,10.5L5.4628,10.7071L5.6699,10L5.4628,9.2929L6.1699,9.5L6.877,9.2929L6.6699,10L6.877,10.7071L6.1699,10.5ZM13,3.6699L12.2929,3.877L12.5,3.1699L12.2929,2.4628L13,2.6699L13.7071,2.4628L13.5,3.1699L13.7071,3.877L13,3.6699ZM8,12.3301L7.2929,12.5372L7.5,11.8301L7.2929,11.123L8,11.3301L8.7071,11.123L8.5,11.8301L8.7071,12.5372L8,12.3301ZM14.8301,10.5L14.123,10.7071L14.3301,10L14.123,9.2929L14.8301,9.5L15.5372,9.2929L15.3301,10L15.5372,10.7071L14.8301,10.5ZM6.1699,5.5L5.4628,5.7071L5.6699,5L5.4628,4.2929L6.1699,4.5L6.877,4.2929L6.6699,5L6.877,5.7071L6.1699,5.5ZM13,12.3301L12.2929,12.5372L12.5,11.8301L12.2929,11.123L13,11.3301L13.7071,11.123L13.5,11.8301L13.7071,12.5372L13,12.3301ZM8,3.6699L7.2929,3.877L7.5,3.1699L7.2929,2.4628L8,2.6699L8.7071,2.4628L8.5,3.1699L8.7071,3.877L8,3.6699Z"
android:strokeColor="#00000000" android:strokeWidth="1">
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="10.5" android:endY="13.2071"
android:startX="10.5" android:startY="1.7929" android:type="linear">
<item android:color="#FFFFD429" android:offset="0"/>
<item android:color="#FFFFCC00" android:offset="1"/>
<gradient
android:endX="10.5"
android:endY="13.2071"
android:startX="10.5"
android:startY="1.7929"
android:type="linear">
<item
android:color="#FFFFD429"
android:offset="0" />
<item
android:color="#FFFFCC00"
android:offset="1" />
</gradient>
</aapt:attr>
</path>

View file

@ -1,26 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://raw.githubusercontent.com/Shusshu/android-flags/master/flags/src/main/res/drawable/flag_hp.xml -->
<vector android:height="15dp" android:viewportHeight="15"
android:viewportWidth="21" android:width="21dp"
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillType="evenOdd" android:pathData="M0,0h21v15h-21z"
android:strokeColor="#00000000" android:strokeWidth="1">
<?xml version="1.0" encoding="utf-8"?><!-- https://raw.githubusercontent.com/Shusshu/android-flags/master/flags/src/main/res/drawable/flag_hp.xml -->
<vector android:height="15dp"
android:viewportHeight="15"
android:viewportWidth="21"
android:width="21dp"
xmlns:aapt="http://schemas.android.com/aapt"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillType="evenOdd"
android:pathData="M0,0h21v15h-21z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="10.5" android:endY="15"
android:startX="10.5" android:startY="0" android:type="linear">
<item android:color="#FFFFFFFF" android:offset="0"/>
<item android:color="#FFF0F0F0" android:offset="1"/>
<gradient
android:endX="10.5"
android:endY="15"
android:startX="10.5"
android:startY="0"
android:type="linear">
<item
android:color="#FFFFFFFF"
android:offset="0" />
<item
android:color="#FFF0F0F0"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:fillType="evenOdd"
<path
android:fillType="evenOdd"
android:pathData="M10.5,7.5m-4.5,0a4.5,4.5 0,1 1,9 0a4.5,4.5 0,1 1,-9 0"
android:strokeColor="#00000000" android:strokeWidth="1">
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="10.5" android:endY="12"
android:startX="10.5" android:startY="3" android:type="linear">
<item android:color="#FFD81441" android:offset="0"/>
<item android:color="#FFBB0831" android:offset="1"/>
<gradient
android:endX="10.5"
android:endY="12"
android:startX="10.5"
android:startY="3"
android:type="linear">
<item
android:color="#FFD81441"
android:offset="0" />
<item
android:color="#FFBB0831"
android:offset="1" />
</gradient>
</aapt:attr>
</path>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://raw.githubusercontent.com/Shusshu/android-flags/master/flags/src/main/res/drawable/flag_us2.xml -->
<?xml version="1.0" encoding="utf-8"?><!-- https://raw.githubusercontent.com/Shusshu/android-flags/master/flags/src/main/res/drawable/flag_us2.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="21dp"
android:height="21dp"
@ -48,32 +47,56 @@
android:fillColor="#192f5d"
android:pathData="M0 0h5.2v7h-5.2Z" />
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="4.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="4.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
@ -81,32 +104,56 @@
<group android:translateY="1.4">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="4.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="4.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
@ -115,32 +162,56 @@
<group android:translateY="2.9">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="4.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="4.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
@ -149,32 +220,56 @@
<group android:translateY="4.3">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="4.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="4.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
@ -183,32 +278,56 @@
<group android:translateY="5.6">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="4.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="4.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
@ -217,112 +336,200 @@
<!-- Odd stars -->
<group android:translateY="0.7" android:translateX="0.4">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateY="0.7"
android:translateX="0.4">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
</group>
<group android:translateY="2.1" android:translateX="0.4">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateY="2.1"
android:translateX="0.4">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
</group>
<group android:translateY="3.6" android:translateX="0.4">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateY="3.6"
android:translateX="0.4">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
</group>
<group android:translateY="5.0" android:translateX="0.4">
<group android:translateX="0.2" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateY="5.0"
android:translateX="0.4">
<group
android:translateX="0.2"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.0" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.0"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="1.8" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="1.8"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="2.6" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="2.6"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />
</group>
<group android:translateX="3.4" android:translateY="0.2" android:scaleX="0.009" android:scaleY="0.012">
<group
android:translateX="3.4"
android:translateY="0.2"
android:scaleX="0.009"
android:scaleY="0.012">
<path
android:fillColor="#fff"
android:pathData="M 48,54 L 31,42 15,54 21,35 6,23 25,23 32,4 40,23 58,23 42,35 z" />

View file

@ -6,5 +6,5 @@
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M8,5v14l11,-7z"/>
android:pathData="M8,5v14l11,-7z" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="M13.2292,13.2292m-10.5833,0a10.5833,10.5833 0,1 1,21.1667 0a10.5833,10.5833 0,1 1,-21.1667 0"
android:strokeLineJoin="round"
@ -15,5 +15,5 @@
android:fillColor="#00000000"
android:strokeColor="#ff0000"
android:fillAlpha="1"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="M13.2292,13.2292m-10.5833,0a10.5833,10.5833 0,1 1,21.1667 0a10.5833,10.5833 0,1 1,-21.1667 0"
android:strokeLineJoin="round"
@ -15,5 +15,5 @@
android:fillColor="#00000000"
android:strokeColor="#ff0000"
android:fillAlpha="1"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="m5.2917,5.2917 l15.875,15.875"
android:strokeAlpha="1"
@ -15,7 +15,7 @@
android:strokeWidth="1.05833333"
android:fillColor="#ffffff"
android:strokeColor="#008080"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
<path
android:pathData="m5.2917,21.1667 l15.875,-15.875"
android:strokeAlpha="1"
@ -23,5 +23,5 @@
android:strokeWidth="1.05833333"
android:fillColor="#00000000"
android:strokeColor="#008080"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="m5.2917,5.2917 l15.875,15.875"
android:strokeAlpha="1"
@ -15,7 +15,7 @@
android:strokeWidth="1.05833333"
android:fillColor="#ffffff"
android:strokeColor="#008080"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
<path
android:pathData="m5.2917,21.1667 l15.875,-15.875"
android:strokeAlpha="1"
@ -23,5 +23,5 @@
android:strokeWidth="1.05833333"
android:fillColor="#00000000"
android:strokeColor="#008080"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m9.6928,4.0428h0.6959v4.5579h2.5046v0.5857L9.6928,9.1863Z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
<path
android:pathData="m13.8028,8.6007h1.1369v-3.924l-1.2368,0.2481v-0.6339l1.2299,-0.248h0.6959v4.5579h1.1369v0.5857h-2.9628z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m9.6928,4.0428h0.6959v4.5579h2.5046v0.5857L9.6928,9.1863Z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
<path
android:pathData="m13.8028,8.6007h1.1369v-3.924l-1.2368,0.2481v-0.6339l1.2299,-0.248h0.6959v4.5579h1.1369v0.5857h-2.9628z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m9.6928,4.0428h0.6959v4.5579h2.5046v0.5857L9.6928,9.1863Z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
<path
android:pathData="m14.2816,8.6007h2.4288v0.5857h-3.2659v-0.5857q0.3962,-0.41 1.0783,-1.099 0.6856,-0.6925 0.8613,-0.8923 0.3342,-0.3755 0.4651,-0.6339 0.1344,-0.2618 0.1344,-0.5133 0,-0.41 -0.2894,-0.6683 -0.2859,-0.2584 -0.7476,-0.2584 -0.3273,0 -0.6925,0.1137 -0.3617,0.1137 -0.7751,0.3445v-0.7028q0.4203,-0.1688 0.7855,-0.2549 0.3652,-0.0861 0.6683,-0.0861 0.7993,0 1.2747,0.3996 0.4754,0.3996 0.4754,1.068 0,0.3169 -0.1206,0.6029 -0.1171,0.2825 -0.4306,0.6683 -0.0861,0.0999 -0.5478,0.5788 -0.4616,0.4754 -1.3022,1.3333z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m9.6928,4.0428h0.6959v4.5579h2.5046v0.5857L9.6928,9.1863Z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
<path
android:pathData="m14.2816,8.6007h2.4288v0.5857h-3.2659v-0.5857q0.3962,-0.41 1.0783,-1.099 0.6856,-0.6925 0.8613,-0.8923 0.3342,-0.3755 0.4651,-0.6339 0.1344,-0.2618 0.1344,-0.5133 0,-0.41 -0.2894,-0.6683 -0.2859,-0.2584 -0.7476,-0.2584 -0.3273,0 -0.6925,0.1137 -0.3617,0.1137 -0.7751,0.3445v-0.7028q0.4203,-0.1688 0.7855,-0.2549 0.3652,-0.0861 0.6683,-0.0861 0.7993,0 1.2747,0.3996 0.4754,0.3996 0.4754,1.068 0,0.3169 -0.1206,0.6029 -0.1171,0.2825 -0.4306,0.6683 -0.0861,0.0999 -0.5478,0.5788 -0.4616,0.4754 -1.3022,1.3333z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m11.6703,6.8213q0.2239,0.0758 0.4341,0.3238 0.2136,0.248 0.4272,0.6821l0.7062,1.4056h-0.7476l-0.658,-1.3195q-0.2549,-0.5168 -0.4961,-0.6856 -0.2377,-0.1688 -0.6511,-0.1688L9.927,7.059v2.1739L9.2311,9.2329v-5.1435h1.571q0.8819,0 1.316,0.3686 0.4341,0.3686 0.4341,1.1128 0,0.4858 -0.2274,0.8062 -0.2239,0.3204 -0.6546,0.4444zM9.927,4.6612v1.8259h0.8751q0.503,0 0.7579,-0.2308 0.2584,-0.2343 0.2584,-0.6856 0,-0.4513 -0.2584,-0.6787 -0.2549,-0.2308 -0.7579,-0.2308z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
<path
android:pathData="m14.3195,8.6472h1.1369v-3.924l-1.2368,0.2481v-0.6339l1.2299,-0.248h0.6959v4.5579h1.1369v0.5857h-2.9628z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m11.6703,6.8213q0.2239,0.0758 0.4341,0.3238 0.2136,0.248 0.4272,0.6821l0.7062,1.4056h-0.7476l-0.658,-1.3195q-0.2549,-0.5168 -0.4961,-0.6856 -0.2377,-0.1688 -0.6511,-0.1688L9.927,7.059v2.1739L9.2311,9.2329v-5.1435h1.571q0.8819,0 1.316,0.3686 0.4341,0.3686 0.4341,1.1128 0,0.4858 -0.2274,0.8062 -0.2239,0.3204 -0.6546,0.4444zM9.927,4.6612v1.8259h0.8751q0.503,0 0.7579,-0.2308 0.2584,-0.2343 0.2584,-0.6856 0,-0.4513 -0.2584,-0.6787 -0.2549,-0.2308 -0.7579,-0.2308z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
<path
android:pathData="m14.3195,8.6472h1.1369v-3.924l-1.2368,0.2481v-0.6339l1.2299,-0.248h0.6959v4.5579h1.1369v0.5857h-2.9628z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m11.6703,6.8213q0.2239,0.0758 0.4341,0.3238 0.2136,0.248 0.4272,0.6821l0.7062,1.4056h-0.7476l-0.658,-1.3195q-0.2549,-0.5168 -0.4961,-0.6856 -0.2377,-0.1688 -0.6511,-0.1688L9.927,7.059v2.1739L9.2311,9.2329v-5.1435h1.571q0.8819,0 1.316,0.3686 0.4341,0.3686 0.4341,1.1128 0,0.4858 -0.2274,0.8062 -0.2239,0.3204 -0.6546,0.4444zM9.927,4.6612v1.8259h0.8751q0.503,0 0.7579,-0.2308 0.2584,-0.2343 0.2584,-0.6856 0,-0.4513 -0.2584,-0.6787 -0.2549,-0.2308 -0.7579,-0.2308z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
<path
android:pathData="m14.7984,8.6472h2.4288v0.5857h-3.2659v-0.5857q0.3962,-0.41 1.0783,-1.099 0.6856,-0.6925 0.8613,-0.8923 0.3342,-0.3755 0.4651,-0.6339 0.1344,-0.2618 0.1344,-0.5133 0,-0.41 -0.2894,-0.6683 -0.2859,-0.2584 -0.7476,-0.2584 -0.3273,0 -0.6925,0.1137 -0.3617,0.1137 -0.7751,0.3445v-0.7028q0.4203,-0.1688 0.7855,-0.2549 0.3652,-0.0861 0.6683,-0.0861 0.7993,0 1.2747,0.3996 0.4754,0.3996 0.4754,1.068 0,0.3169 -0.1206,0.6029 -0.1171,0.2825 -0.4306,0.6683 -0.0861,0.0999 -0.5478,0.5788 -0.4616,0.4754 -1.3022,1.3333z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#000000"
android:strokeColor="#e6e6e6"
android:fillAlpha="0"/>
android:fillAlpha="0" />
</vector>

View file

@ -10,19 +10,19 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
<path
android:pathData="m11.6703,6.8213q0.2239,0.0758 0.4341,0.3238 0.2136,0.248 0.4272,0.6821l0.7062,1.4056h-0.7476l-0.658,-1.3195q-0.2549,-0.5168 -0.4961,-0.6856 -0.2377,-0.1688 -0.6511,-0.1688L9.927,7.059v2.1739L9.2311,9.2329v-5.1435h1.571q0.8819,0 1.316,0.3686 0.4341,0.3686 0.4341,1.1128 0,0.4858 -0.2274,0.8062 -0.2239,0.3204 -0.6546,0.4444zM9.927,4.6612v1.8259h0.8751q0.503,0 0.7579,-0.2308 0.2584,-0.2343 0.2584,-0.6856 0,-0.4513 -0.2584,-0.6787 -0.2549,-0.2308 -0.7579,-0.2308z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
<path
android:pathData="m14.7984,8.6472h2.4288v0.5857h-3.2659v-0.5857q0.3962,-0.41 1.0783,-1.099 0.6856,-0.6925 0.8613,-0.8923 0.3342,-0.3755 0.4651,-0.6339 0.1344,-0.2618 0.1344,-0.5133 0,-0.41 -0.2894,-0.6683 -0.2859,-0.2584 -0.7476,-0.2584 -0.3273,0 -0.6925,0.1137 -0.3617,0.1137 -0.7751,0.3445v-0.7028q0.4203,-0.1688 0.7855,-0.2549 0.3652,-0.0861 0.6683,-0.0861 0.7993,0 1.2747,0.3996 0.4754,0.3996 0.4754,1.068 0,0.3169 -0.1206,0.6029 -0.1171,0.2825 -0.4306,0.6683 -0.0861,0.0999 -0.5478,0.5788 -0.4616,0.4754 -1.3022,1.3333z"
android:strokeAlpha="1"
android:strokeWidth="0.13229167"
android:fillColor="#1a1a1a"
android:strokeColor="#000000"
android:fillAlpha="1"/>
android:fillAlpha="1" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#6e6e6f"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#6e6e6f"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="M5.2917,5.2917L21.1667,5.2917v15.875L5.2917,21.1667v-15.875"
android:strokeAlpha="1"
@ -16,5 +16,5 @@
android:fillColor="#00000000"
android:fillAlpha="1"
android:strokeColor="#ff00ff"
android:strokeLineCap="square"/>
android:strokeLineCap="square" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="M5.2917,5.2917L21.1667,5.2917v15.875L5.2917,21.1667v-15.875"
android:strokeAlpha="1"
@ -16,5 +16,5 @@
android:fillColor="#00000000"
android:fillAlpha="1"
android:strokeColor="#ff00ff"
android:strokeLineCap="square"/>
android:strokeLineCap="square" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.265"
android:fillColor="#00000000"
android:strokeColor="#6e6e6f"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.265"
android:fillColor="#4d4d4d"
android:strokeColor="#6e6e6f"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="M5.2917,19.0398L21.1667,19.0398l-7.9375,-13.7481 -7.8548,13.6049"
android:strokeAlpha="1"
@ -15,5 +15,5 @@
android:strokeWidth="1.05833328"
android:fillColor="#00000000"
android:strokeColor="#00ff00"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
</vector>

View file

@ -7,7 +7,7 @@
android:pathData="M13.2292,13.2292m-12.5677,0a12.5677,12.5677 0,1 1,25.1354 0a12.5677,12.5677 0,1 1,-25.1354 0"
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#ffffff"/>
android:strokeColor="#ffffff" />
<path
android:pathData="M5.2917,19.0398L21.1667,19.0398l-7.9375,-13.7481 -7.8548,13.6049"
android:strokeAlpha="1"
@ -15,5 +15,5 @@
android:strokeWidth="1.05833328"
android:fillColor="#00000000"
android:strokeColor="#00ff00"
android:strokeLineCap="round"/>
android:strokeLineCap="round" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -10,5 +10,5 @@
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -12,8 +12,7 @@
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.40909088"
android:strokeLineCap="butt">
</path>
android:strokeLineCap="butt"></path>
<path
android:pathData="M23.25,0.4688C22.7846,0.5006 22.3322,0.5727 21.875,0.625L21.8438,0.625L20.75,6.5938C18.9673,6.9997 17.2901,7.6887 15.7813,8.625L10.875,5.0938C9.5487,6.1234 8.3418,7.3243 7.2813,8.625L10.6875,13.5938C9.6533,15.1743 8.8755,16.979 8.4375,18.875C8.4374,18.884 8.4374,18.9047 8.4375,18.9063L2.5,19.8438C2.3914,20.7304 2.3438,21.6467 2.3438,22.5625C2.3438,23.3118 2.3644,24.0511 2.4375,24.7813L8.375,25.8438C8.7973,27.9056 9.5995,29.8313 10.7188,31.5313L7.1875,36.375C8.1988,37.6305 9.3664,38.7736 10.625,39.7813L15.625,36.3438C17.3724,37.4585 19.3231,38.2401 21.4375,38.625L22.375,44.5313C23.0412,44.5919 23.7243,44.5938 24.4063,44.5938C25.3689,44.5938 26.2885,44.5573 27.2188,44.4375L28.3438,38.4063C30.3513,37.9067 32.2372,37.04 33.875,35.875L38.6875,39.375C39.9355,38.3132 41.0768,37.0927 42.0625,35.7813L38.5625,30.7188C39.5104,29.0818 40.1671,27.2756 40.5,25.3438L46.4063,24.4063C46.458,23.7899 46.4688,23.1922 46.4688,22.5625C46.4688,21.4683 46.3416,20.3954 46.1875,19.3438L40.1875,18.25C39.7173,16.5138 38.9458,14.8939 37.9688,13.4375L41.5,8.5938C40.4054,7.2551 39.1568,6.0186 37.7813,4.9688L32.6875,8.4688C31.2235,7.6029 29.648,6.9386 27.9375,6.5625L27,0.625C26.1467,0.5246 25.2864,0.4688 24.4063,0.4688C24.1684,0.4688 23.9236,0.4613 23.6875,0.4688C23.5724,0.4724 23.4585,0.4621 23.3438,0.4688C23.3127,0.4706 23.281,0.4666 23.25,0.4688zM24.0625,15.6563C24.1767,15.6505 24.2907,15.6563 24.4063,15.6563C28.1054,15.6563 31.125,18.6759 31.125,22.375C31.125,26.0741 28.1054,29.0625 24.4063,29.0625C20.7071,29.0625 17.7188,26.0741 17.7188,22.375C17.7188,18.7915 20.5233,15.8358 24.0625,15.6563z"
android:strokeAlpha="1"
@ -22,8 +21,7 @@
android:strokeColor="#808080"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="butt">
</path>
android:strokeLineCap="butt"></path>
<path
android:pathData="M32.13,22.3608A7.7197,7.7197 45,1 1,16.6905 22.3608A7.7197,7.7197 135,1 1,32.13 22.3608z"
android:strokeAlpha="0.64772725"
@ -33,7 +31,7 @@
android:strokeColor="#ffffff"
android:fillType="nonZero"
android:fillAlpha="0.64772725"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
<path
android:pathData="M22.5578,1.6501L21.6796,7.4291C20.0086,7.8097 16.9349,8.9735 15.5206,9.8511L10.8486,6.3639C9.6054,7.3291 9.5201,7.3945 8.5261,8.6137L11.9041,13.6236C10.9347,15.1051 9.7703,17.7451 9.3522,19.6317C9.3522,19.6317 3.4328,20.6296 3.4328,20.6296C3.3311,21.4606 3.38,23.2394 3.4485,23.9238L9.1027,24.9423C9.4985,26.875 10.9797,29.9859 12.0289,31.5794L8.4533,36.3034C9.4012,37.4803 9.591,37.5879 10.7707,38.5324L15.5519,35.0296C17.1898,36.0745 20.4409,37.3455 22.4228,37.7063L23.2075,43.4125C23.8319,43.4693 25.557,43.6288 26.4289,43.5165L27.3071,37.5764C29.1889,37.1081 32.4403,35.7734 33.9754,34.6815L38.7515,38.1323C39.9213,37.137 39.9318,36.9871 40.8557,35.7578L37.3165,30.7271C38.205,29.1927 39.3537,26.1918 39.6657,24.381L45.4604,23.4196C45.5089,22.8419 45.5113,21.2308 45.3669,20.245L39.4631,19.2264C39.0224,17.599 37.5099,14.6665 36.5941,13.3013L40.3464,8.5773C39.3204,7.3226 38.939,7.1504 37.6496,6.1664L32.7073,9.7056C31.335,8.894 28.5987,7.6569 26.9953,7.3044L26.1223,1.6501C25.3224,1.556 23.0149,1.5978 22.5578,1.6501z"
android:strokeAlpha="0.34659088"
@ -43,5 +41,5 @@
android:strokeColor="#ffffff"
android:fillType="nonZero"
android:fillAlpha="0.34659088"
android:strokeLineCap="butt"/>
android:strokeLineCap="butt" />
</vector>

View file

@ -12,49 +12,43 @@
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.55"
android:strokeLineCap="butt">
</path>
android:strokeLineCap="butt"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeColor="#00000000"
android:fillType="nonZero">
</path>
android:fillType="nonZero"></path>
<path
android:strokeWidth="1"
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="1"
android:strokeColor="#808080"
android:fillType="nonZero">
</path>
android:fillType="nonZero"></path>
<path
android:fillColor="#FF000000"
android:pathData="M24.347,14.8958C18.7044,14.8958 14.2428,19.4886 14.2428,25C14.2428,30.6426 18.8356,35.1042 24.347,35.1042C29.9896,35.1042 34.4512,30.5114 34.4512,25C34.4512,19.3574 29.8584,14.8958 24.347,14.8958L24.347,14.8958zM24.347,30.5114C21.3289,30.5114 18.8356,28.0181 18.8356,25C18.8356,21.9819 21.3289,19.4886 24.347,19.4886C27.3651,19.4886 29.8584,21.9819 29.8584,25C29.8584,28.0181 27.3651,30.5114 24.347,30.5114z"
android:strokeAlpha="0.10999995"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.10999995"/>
android:fillAlpha="0.10999995" />
<path
android:pathData="M29.9221,5.6692L26.3255,19.6639C27.4502,19.9634 28.3497,20.6594 28.9606,21.6224L41.3529,14.0732C38.8176,9.9434 34.7487,6.9051 29.9221,5.6692z"
android:strokeAlpha="1"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1">
</path>
android:fillAlpha="1"></path>
<path
android:pathData="M17.3078,43.7661L22.0431,30.1146C20.9468,29.7236 20.1077,28.956 19.5779,27.946L6.6069,34.4506C8.7939,38.7748 12.5993,42.1375 17.3078,43.7661z"
android:strokeAlpha="1"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1">
</path>
android:fillAlpha="1"></path>
<path
android:strokeWidth="1"
android:pathData="M24.347,5.2024C13.3735,5.2024 4.5494,14.0265 4.5494,25C4.5494,35.9735 13.3735,44.7976 24.347,44.7976C35.3205,44.7976 44.1446,35.9735 44.1446,25C44.1446,14.0265 35.3205,5.2024 24.347,5.2024L24.347,5.2024z"
android:strokeAlpha="0.5464481"
android:fillColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.5464481">
</path>
android:fillAlpha="0.5464481"></path>
<path
android:pathData="M30.494,25.019A6.0988,6.0988 0,1 1,18.2964 25.019A6.0988,6.0988 0,1 1,30.494 25.019z"
android:strokeAlpha="0.6721311"
@ -63,48 +57,41 @@
android:fillColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.21265164"
android:strokeLineCap="butt">
</path>
android:strokeLineCap="butt"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="0.1142857"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.1142857">
</path>
android:fillAlpha="0.1142857"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="0.09714284"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.09714284">
</path>
android:fillAlpha="0.09714284"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="0.71428573"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.71428573">
</path>
android:fillAlpha="0.71428573"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="0.62285715"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.62285715">
</path>
android:fillAlpha="0.62285715"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="0.3714286"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.3714286">
</path>
android:fillAlpha="0.3714286"></path>
<path
android:pathData="M24.347,4.1667C12.7994,4.1667 3.5137,13.4524 3.5137,25C3.5137,36.5476 12.7994,45.8333 24.347,45.8333C35.8946,45.8333 45.1803,36.5476 45.1803,25C45.1803,13.4524 35.8946,4.1667 24.347,4.1667L24.347,4.1667zM24.347,30C21.6089,30 19.347,27.7381 19.347,25C19.347,22.2619 21.6089,20 24.347,20C27.0851,20 29.347,22.2619 29.347,25C29.347,27.7381 27.0851,30 24.347,30z"
android:strokeAlpha="0.23428573"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.23428573">
</path>
android:fillAlpha="0.23428573"></path>
</vector>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -12,6 +11,17 @@
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView2"
android:layout_width="64dp"
android:layout_height="match_parent"
app:srcCompat="@mipmap/ic_launcher_foreground" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
@ -19,9 +29,11 @@
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</LinearLayout>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_main"/>
<include layout="@layout/content_main" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_resume"

View file

@ -15,6 +15,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -3,11 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<group android:id="@+id/actions">
<item android:id="@+id/reset"
<item
android:id="@+id/reset"
android:title="Reset" />
<item android:id="@+id/quick_load"
<item
android:id="@+id/quick_load"
android:title="Quick Load" />
<item android:id="@+id/quick_save"
<item
android:id="@+id/quick_save"
android:title="Quick Save" />
</group>
<group android:id="@+id/quick_settings">

View file

@ -1,22 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/game_list_entry_menu_info"
android:title="Show Information" />
android:id="@+id/game_list_entry_menu_start_game"
android:title="Start Game" />
<item
android:id="@+id/game_list_entry_menu_fast_boot"
android:title="@string/settings_console_fast_boot" />
<item
android:id="@+id/game_list_entry_menu_slow_boot"
android:title="Slow Boot" />
<item
android:id="@+id/game_list_entry_menu_load_state"
android:title="Load State" >
<menu >
<item android:title="Item" />
<item android:title="Item" />
</menu>
</item>
android:id="@+id/game_list_entry_menu_resume_game"
android:title="Resume Game" />
</menu>

View file

@ -1,16 +1,28 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.github.stenzek.duckstation.MainActivity" >
tools:context="com.github.stenzek.duckstation.MainActivity">
<group android:id="@+id/start_menu">
<item
android:id="@+id/action_resume"
android:title="Resume Last Session" />
<item
android:id="@+id/action_start_bios"
android:title="Start BIOS" />
</group>
<group android:id="@+id/game_list">
<item android:id="@+id/action_add_game_directory"
<item
android:id="@+id/action_add_game_directory"
android:title="Add Game Directory" />
<item android:id="@+id/action_scan_for_new_games"
<item
android:id="@+id/action_scan_for_new_games"
android:title="Scan For New Games" />
<item android:id="@+id/action_rescan_all_games"
<item
android:id="@+id/action_rescan_all_games"
android:title="Rescan All Games" />
</group>
<item android:id="@+id/action_settings"
<item
android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never" />

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

View file

@ -32,22 +32,22 @@
<item>Software</item>
</string-array>
<string-array name="settings_gpu_resolution_scale_entries">
<item>1x (1024x512 VRAM)</item>
<item>2x (2048x1024 VRAM)</item>
<item>3x (3072x1536 VRAM)</item>
<item>4x (4096x2048 VRAM)</item>
<item>5x (5120x2560 VRAM)</item>
<item>6x (6144x3072 VRAM)</item>
<item>7x (7168x3584 VRAM)</item>
<item>8x (8192x4096 VRAM)</item>
<item>9x (9216x4608 VRAM)</item>
<item>10x (10240x5120 VRAM)</item>
<item>11x (11264x5632 VRAM)</item>
<item>12x (12288x6144 VRAM)</item>
<item>13x (13312x6656 VRAM)</item>
<item>14x (14336x7168 VRAM)</item>
<item>15x (15360x7680 VRAM)</item>
<item>16x (16384x8192 VRAM)</item>
<item>1x</item>
<item>2x</item>
<item>3x (for 720p)</item>
<item>4x</item>
<item>5x (for 1080p)</item>
<item>6x (for 1440p)</item>
<item>7x</item>
<item>8x</item>
<item>9x (for 4K)</item>
<item>10x</item>
<item>11x</item>
<item>12x</item>
<item>13x</item>
<item>14x</item>
<item>15x</item>
<item>16x</item>
</string-array>
<string-array name="settings_gpu_resolution_scale_values">
<item>1</item>

View file

@ -30,11 +30,11 @@
<string name="settings_osd_show_show_vps">Show VPS</string>
<!-- CPU Preferences -->
<string name="settings_cpu_execution_mode">Execution Mode</string>
<string name="settings_cpu_execution_mode">CPU Execution Mode</string>
<string name="settings_cpu_execution_mode_default">Interpreter</string>
<!-- GPU Preferences -->
<string name="settings_gpu_renderer">Renderer</string>
<string name="settings_gpu_renderer">GPU Renderer</string>
<string name="settings_gpu_display_linear_filtering">Display Linear Filtering</string>
<string name="settings_gpu_resolution_scale">Resolution Scale</string>
<string name="settings_gpu_true_color">True 24-Bit Color (Disables Dithering)</string>

View file

@ -17,18 +17,67 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory app:title="Game List">
<Preference
app:key="GameList/SearchPaths"
app:title="Game Search Directories"/>
<CheckBoxPreference
app:key="GameList/SearchRecursively"
app:title="Search Directories Recursively"
app:defaultValue="true" />
<EditTextPreference
app:key="GameList/RedumpDatPath"
app:title="Redump Database Path"
<PreferenceCategory app:title="General">
<SwitchPreferenceCompat
app:key="Main/SpeedLimiterEnabled"
app:title="@string/settings_behavior_enable_speed_limiter"
app:defaultValue="true"
app:summary="Throttles the emulation speed to the chosen speed above. If unchecked, the emulator will run as fast as possible, which may not be playable." />
<SwitchPreferenceCompat
app:key="Main/SaveStateOnExit"
app:title="Save State On Exit"
app:defaultValue="true"
app:summary="Automatically saves the emulator state when powering down or exiting. You can then resume directly from where you left off next time." />
<SwitchPreferenceCompat
app:key="Display/VSync"
app:title="Video Sync"
app:defaultValue="true"
app:summary="Enable this option to match DuckStation's refresh rate with your current monitor or screen. VSync is automatically disabled when it is not possible (e.g. running at non-100% speed)." />
<SwitchPreferenceCompat
app:key="Audio/Sync"
app:title="Audio Sync"
app:defaultValue="true"
app:summary="Throttles the emulation speed based on the audio backend pulling audio frames. This helps to remove noises or crackling if emulation is too fast. Sync will automatically be disabled if not running at 100% speed." />
<ListPreference
app:key="CPU/ExecutionMode"
app:title="@string/settings_cpu_execution_mode"
app:entries="@array/settings_cpu_execution_mode_entries"
app:entryValues="@array/settings_cpu_execution_mode_values"
app:defaultValue="Recompiler"
app:useSimpleSummaryProvider="true" />
<ListPreference
app:key="GPU/Renderer"
app:title="@string/settings_gpu_renderer"
app:entries="@array/gpu_renderer_entries"
app:entryValues="@array/gpu_renderer_values"
app:defaultValue="OpenGL"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_osd_header">
<SwitchPreferenceCompat
app:key="Display/ShowOSDMessages"
app:title="@string/settings_osd_show_messages"
app:defaultValue="true"
app:summary="Shows on-screen-display messages when events occur such as save states being created/loaded, screenshots being taken, etc." />
<SwitchPreferenceCompat
app:key="Display/ShowSpeed"
app:title="@string/settings_osd_show_speed"
app:defaultValue="false"
app:summary="Sets the target emulation speed. It is not guaranteed that this speed will be reached, and if not, the emulator will run as fast as it can manage." />
<SwitchPreferenceCompat
app:key="Display/ShowFPS"
app:title="@string/settings_osd_show_show_fps"
app:defaultValue="false"
app:summary="Shows the internal frame rate of the game in the top-right corner of the display." />
<SwitchPreferenceCompat
app:key="Display/ShowVPS"
app:title="@string/settings_osd_show_show_vps"
app:defaultValue="false"
app:summary="Shows the number of frames (or v-syncs) displayed per second by the system in the top-right corner of the display." />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_console_header">
@ -41,79 +90,15 @@
app:defaultValue="@string/settings_console_region_default"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="BIOS/PatchTTYEnable"
app:title="@string/settings_console_tty_output"
app:defaultValue="false"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="BIOS/PatchFastBoot"
app:title="@string/settings_console_fast_boot"
app:defaultValue="false"
app:useSimpleSummaryProvider="true" />
app:summary="Skips the BIOS shell/intro, booting directly into the game. Usually safe to enable, but some games break." />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_behavior_header">
<SwitchPreferenceCompat
app:key="Main/SpeedLimiterEnabled"
app:title="@string/settings_behavior_enable_speed_limiter"
app:defaultValue="true"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="Main/StartPaused"
app:title="@string/settings_behavior_pause_on_start"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="Audio/Sync"
app:title="@string/settings_host_synchronization_sync_to_audio"
app:defaultValue="true"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_osd_header">
<SwitchPreferenceCompat
app:key="Display/ShowOSDMessages"
app:title="@string/settings_osd_show_messages"
app:defaultValue="true"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="Display/ShowSpeed"
app:title="@string/settings_osd_show_speed"
app:defaultValue="false"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="Display/ShowFPS"
app:title="@string/settings_osd_show_show_fps"
app:defaultValue="false"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="Display/ShowVPS"
app:title="@string/settings_osd_show_show_vps"
app:defaultValue="false"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_cpu_header">
<ListPreference
app:key="CPU/ExecutionMode"
app:title="@string/settings_cpu_execution_mode"
app:entries="@array/settings_cpu_execution_mode_entries"
app:entryValues="@array/settings_cpu_execution_mode_values"
app:defaultValue="Recompiler"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_gpu_header">
<ListPreference
app:key="GPU/Renderer"
app:title="@string/settings_gpu_renderer"
app:entries="@array/gpu_renderer_entries"
app:entryValues="@array/gpu_renderer_values"
app:defaultValue="OpenGL"
app:useSimpleSummaryProvider="true" />
<PreferenceCategory app:title="Enhancements">
<ListPreference
app:key="GPU/ResolutionScale"
app:title="@string/settings_gpu_resolution_scale"
@ -122,54 +107,57 @@
app:defaultValue="1"
app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
app:key="GPU/TrueColor"
app:title="@string/settings_gpu_true_color"
app:defaultValue="false"/>
</PreferenceCategory>
<PreferenceCategory app:title="Enhancements">
<SwitchPreferenceCompat
app:key="GPU/TrueColor"
app:title="True Color Rendering (24-bit, disables dithering)"
app:defaultValue="false"/>
app:summary="Forces the precision of colours output to the console's framebuffer to use the full 8 bits of precision per channel. This produces nicer looking gradients at the cost of making some colours look slightly different. Disabling the option also enables dithering, which makes the transition between colours less sharp by applying a pattern around those pixels. Most games are compatible with this option, but there is a number which aren't and will have broken effects with it enabled. Only applies to the hardware renderers." />
<SwitchPreferenceCompat
app:key="GPU/ScaledDithering"
app:title="Scaled Dithering (scale dither pattern to resolution)"
app:defaultValue="true"/>
app:defaultValue="true"
app:summary="Scales the dither pattern to the resolution scale of the emulated GPU. This makes the dither pattern much less obvious at higher resolutions. Usually safe to enable, and only supported by the hardware renderers." />
<SwitchPreferenceCompat
app:key="GPU/DisableInterlacing"
app:title="Disable Interlacing (force progressive render/scan)"
app:defaultValue="true"/>
app:defaultValue="true"
app:summary="Forces the rendering and display of frames to progressive mode. This removes the &quot;combing&quot; effect seen in 480i games by rendering them in 480p. Usually safe to enable." />
<SwitchPreferenceCompat
app:key="GPU/TextureFiltering"
app:title="Bilinear Texture Filtering"
app:defaultValue="false"
app:summary="Smooths out the blockyness of magnified textures on 3D object by using bilinear filtering. Will have a greater effect on higher resolution scales. Only applies to the hardware renderers." />
<SwitchPreferenceCompat
app:key="GPU/ForceNTSCTimings"
app:title="Force NTSC Timings (60hz-on-PAL)"
app:defaultValue="false"/>
app:defaultValue="false"
app:summary="Uses NTSC frame timings when the console is in PAL mode, forcing PAL games to run at 60hz. For most games which have a speed tied to the framerate, this will result in the game running approximately 17% faster. For variable frame rate games, it may not affect the speed." />
<SwitchPreferenceCompat
app:key="GPU/WidescreenHack"
app:title="Widescreen Hack"
app:defaultValue="false"
app:summary="Scales vertex positions in screen-space to a widescreen aspect ratio, essentially increasing the field of view from 4:3 to 16:9 in 3D games. For 2D games, or games which use pre-rendered backgrounds, this enhancement will not work as expected. May not be compatible with all games." />
<SwitchPreferenceCompat
app:key="GPU/PGXPEnable"
app:title="PGXP Geometry Correction"
app:defaultValue="false"/>
app:defaultValue="false"
app:summary="Reduces &quot;wobbly&quot; polygons and &quot;warping&quot; textures that are common in PS1 games. >Only works with the hardware renderers. May not be compatible with all games." />
<SwitchPreferenceCompat
app:key="GPU/PGXPCulling"
app:title="PGXP Culling Correction"
app:defaultValue="true"/>
app:defaultValue="true"
app:summary="Increases the precision of polygon culling, reducing the number of holes in geometry. Requires geometry correction enabled." />
<SwitchPreferenceCompat
app:key="GPU/PGXPTextureCorrection"
app:title="PGXP Texture Correction"
app:defaultValue="true"/>
<SwitchPreferenceCompat
app:key="GPU/PGXPVertexCache"
app:title="PGXP Vertex Cache"
app:defaultValue="false"/>
app:summary="Uses perspective-correct interpolation for texture coordinates and colors, straightening out warped textures. Requires geometry correction enabled." />
</PreferenceCategory>
@ -193,18 +181,15 @@
<SwitchPreferenceCompat
app:key="Display/LinearFiltering"
app:title="Linear Upscaling"
app:defaultValue="true"/>
app:defaultValue="true"
app:summary="Uses bilinear texture filtering when displaying the console's framebuffer to the screen. Disabling filtering will producer a sharper, blockier/pixelated image. Enabling will smooth out the image. The option will be less noticable the higher the resolution scale." />
<SwitchPreferenceCompat
app:key="Display/IntegerScaling"
app:title="Integer Upscaling"
app:defaultValue="false"/>
app:defaultValue="false"
app:summary="Adds padding to the display area to ensure that the ratio between pixels on the host to pixels in the console is an integer number. May result in a sharper image in some 2D games." />
<SwitchPreferenceCompat
app:key="Display/VSync"
app:title="VSync"
app:defaultValue="true"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="Controller">
@ -242,4 +227,26 @@
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="Advanced Settings">
<SwitchPreferenceCompat
app:key="GPU/PGXPVertexCache"
app:title="PGXP Vertex Cache"
app:defaultValue="false"
app:summary="Uses screen coordinates as a fallback when tracking vertices through memory fails. May improve PGXP compatibility." />
<SwitchPreferenceCompat
app:key="GPU/PGXPCPU"
app:title="PGXP CPU Mode"
app:defaultValue="false"
app:summary="Tries to track vertex manipulation through the CPU. Some games require this option for PGXP to be effective. Very slow, and incompatible with the recompiler." />
<SwitchPreferenceCompat
app:key="CPU/RecompilerICache"
app:title="CPU Recompiler ICache"
app:defaultValue="false"
app:summary="Determines whether the CPU's instruction cache is simulated in the recompiler. Improves accuracy at a small cost to performance. If games are running too fast, try enabling this option." />
<SwitchPreferenceCompat
app:key="BIOS/PatchTTYEnable"
app:title="@string/settings_console_tty_output"
app:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>

View file

@ -6,27 +6,11 @@ skip_tags: true
image:
- Visual Studio 2019
- Ubuntu1804
- macOS
install:
- cmd: >-
git submodule update --init --depth 1
- sh: >-
if [ "$APPVEYOR_BUILD_WORKER_IMAGE" == "Ubuntu1804" ]; then
sudo apt-get update
sudo apt-get install -y cmake ninja-build ccache libsdl2-dev libgtk2.0-dev qtbase5-dev qtbase5-dev-tools qtbase5-private-dev qt5-default
elif [ "$APPVEYOR_BUILD_WORKER_IMAGE" == "macOS" ]; then
brew install qt5 sdl2
fi
build_script:
- cmd: >-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
@ -44,46 +28,4 @@ build_script:
appveyor PushArtifact duckstation-win64-release.7z
- sh: >-
if [ "$APPVEYOR_BUILD_WORKER_IMAGE" == "Ubuntu1804" ]; then
mkdir -p build-release
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDL_FRONTEND=ON -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -G Ninja ..
ninja
../appimage/generate-appimages.sh $(pwd)
if [ $? -eq 0 ]; then
mv duckstation-qt-x64.AppImage duckstation-qt-x64-release.AppImage
mv duckstation-sdl-x64.AppImage duckstation-sdl-x64-release.AppImage
7za a -r duckstation-linux-x64-release.7z duckstation-*.AppImage
appveyor PushArtifact duckstation-linux-x64-release.7z
else
echo "Failed to create AppImages, no AppImage artifact will be pushed"
fi
elif [ "$APPVEYOR_BUILD_WORKER_IMAGE" == "macOS" ]; then
mkdir build-release
cd build-release
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_SDL_FRONTEND=YES -DBUILD_QT_FRONTEND=YES -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 ..
make
fi
test: off

View file

@ -215,6 +215,10 @@
<compatibility>No Issues</compatibility>
<version-tested>0.1-1391-g5f9481dd</version-tested>
</entry>
<entry code="SLUS-00303" compatibility="5" region="NTSC-U" title="Allied General (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
</entry>
<entry code="SLUS-00239" compatibility="5" region="NTSC-U" title="Alone in the Dark - One-Eyed Jack's Revenge (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1323-ga6acd33</version-tested>
@ -259,6 +263,10 @@
<compatibility>No Issues</compatibility>
<version-tested>0.1-1336-gd711baa</version-tested>
</entry>
<entry code="SLUS-00264" compatibility="5" region="NTSC-U" title="Andretti Racing (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
</entry>
<entry code="SLPS-00163" compatibility="5" region="NTSC-J" title="Angel Graffiti - Anata e no Profile (Japan)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1304-gc8b6712</version-tested>
@ -474,6 +482,10 @@
<compatibility>No Issues</compatibility>
<version-tested>0.1-1304-gc8b6712</version-tested>
</entry>
<entry code="SLUS-00483" compatibility="5" region="NTSC-U" title="Battle Arena Toshinden 3 (USA) (En,Ja)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
</entry>
<entry code="SLES-00334" compatibility="5" region="PAL" title="Bedlam (Europe) (En,Fr,De,Es,It,Nl)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
@ -717,10 +729,9 @@
<compatibility>No Issues</compatibility>
<version-tested>0.1-1490-g76978986</version-tested>
</entry>
<entry code="SLUS-01041" compatibility="3" region="NTSC-U" title="Chrono Cross (USA) (Disc 1)">
<compatibility>Crashes In-Game</compatibility>
<version-tested>0.1-1409-ge198e315</version-tested>
<comments>Graphical errors in ingame menu. If you try to check the status, the game freezes in black screen (Issues #533 and #503).</comments>
<entry code="SLUS-01041" compatibility="5" region="NTSC-U" title="Chrono Cross (Disc 1)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1600-g032127a7</version-tested>
</entry>
<entry code="SLUS-00792" compatibility="5" region="NTSC-U" title="Civilization II (USA)">
<compatibility>No Issues</compatibility>
@ -734,6 +745,10 @@
<compatibility>No Issues</compatibility>
<version-tested>0.1-1337-gcaf9943</version-tested>
</entry>
<entry code="SLUS-00866" compatibility="5" region="NTSC-U" title="Colony Wars - Red Sun (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
</entry>
<entry code="SCUS-94294" compatibility="5" region="NTSC-U" title="Contender (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1400-gb527118c</version-tested>
@ -839,6 +854,11 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1425-g05f0ce6d</version-tested>
</entry>
<entry code="SLUS-00658" compatibility="4" region="NTSC-U" title="DBZ - Dead Ball Zone (USA) (En,Fr,De,Es,It)">
<compatibility>Speed Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
<comments>Speed issues ingame (Issue #695).</comments>
</entry>
<entry code="SLUS-01280" compatibility="5" region="NTSC-U" title="Dance Dance Revolution (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1308-g622e50fa</version-tested>
@ -910,6 +930,14 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-908-g9f22684</version-tested>
</entry>
<entry code="SLUS-01210" compatibility="5" region="NTSC-U" title="Disney Presents Tigger's Honey Hunt (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
</entry>
<entry code="SLUS-01152" compatibility="5" region="NTSC-U" title="Disney's 102 Dalmatians - Puppies to the Rescue (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
</entry>
<entry code="SLUS-01242" compatibility="5" region="NTSC-U" title="Disney's Donald Duck - Goin' Quackers (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1333-g5a955a4</version-tested>
@ -922,6 +950,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1333-g5a955a4</version-tested>
</entry>
<entry code="SCUS-94646" compatibility="5" region="NTSC-U" title="Disney's Lilo &amp; Stitch (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
</entry>
<entry code="SCUS-94456" compatibility="5" region="NTSC-U" title="Disney's Tarzan (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1333-g5a955a4</version-tested>
@ -955,6 +987,10 @@ Tetris with Card Captor Sakura (Japan)
<version-tested>0.1-908-g9f22684</version-tested>
<upscaling-issues>Broken when upscaling</upscaling-issues>
</entry>
<entry code="SLUS-00493" compatibility="5" region="NTSC-U" title="Dragon Ball GT - Final Bout (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
</entry>
<entry code="SLUS-01550" compatibility="5" region="NTSC-U" title="Dragon Ball Z - Ultimate Battle 22 (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1336-gd711baa</version-tested>
@ -1020,6 +1056,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-896-gc8a00c5</version-tested>
</entry>
<entry code="SLUS-00809" compatibility="5" region="NTSC-U" title="Ehrgeiz - God Bless the Ring">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SCUS-94243" compatibility="5" region="NTSC-U" title="Einhaender (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-896-gc8a00c5</version-tested>
@ -1054,6 +1094,10 @@ Tetris with Card Captor Sakura (Japan)
<upscaling-issues>The playable character gain &quot;yellow horns&quot; (actually, 2 broken polygons in head) if the upscaling is used (Issue 427).</upscaling-issues>
<version-tested>0.1-1425-g05f0ce6d</version-tested>
</entry>
<entry code="SLUS-00395" compatibility="5" region="NTSC-U" title="Fantastic Four (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00920" compatibility="5" region="NTSC-U" title="Fear Effect (USA) (Disc 1)">
<compatibility>No Issues</compatibility>
<upscaling-issues>If use fast forward some controllers buttons may not function properly.</upscaling-issues>
@ -1063,11 +1107,27 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1336-gd711baa</version-tested>
</entry>
<entry code="SLUS-00711" compatibility="5" region="NTSC-U" title="Fifth Element, The (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00433" compatibility="5" region="NTSC-U" title="Fighting Force (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00934" compatibility="5" region="NTSC-U" title="Fighting Force 2 (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00331" compatibility="5" region="NTSC-U" title="Final Doom (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
<upscaling-issues>Rendering is broken with any upscaling.</upscaling-issues>
</entry>
<entry code="SLUS-00900" compatibility="5" region="NTSC-U" title="Final Fantasy Anthology - Final Fantasy VI (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
</entry>
<entry code="SLES-02965" compatibility="5" region="PAL" title="Final Fantasy IX (Europe) (Disc 1)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1308-g622e50fa</version-tested>
@ -1140,8 +1200,21 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
</entry>
<entry code="SLUS-00870" compatibility="2" region="NTSC-U" title="Formula One 99 (USA) (En,Fr,Es)">
<compatibility>Crashes In Intro</compatibility>
<entry code="SLPS-02158" compatibility="5" region="NTSC-J" title="Finger Flashing">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00546" compatibility="4" region="NTSC-U" title="Formula 1 Championship Edition (USA) (En,Fr,De,Es,It)">
<compatibility>Graphical/Audio Issues</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
<comments>Some graphics issues in random races</comments>
</entry>
<entry code="SCES-03404" compatibility="3" region="PAL" title="Formula One 2001 (Europe) (En,Fi)">
<compatibility>Crashes In-Game</compatibility>
</entry>
<entry code="SLUS-00870" compatibility="5" region="NTSC-U" title="Formula One 99 (USA) (En,Fr,Es)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1614-g914f3ad4</version-tested>
<comments>Blackscreen after the first Loading screen (Issue #54).</comments>
</entry>
<entry code="SLUS-01129" compatibility="5" region="NTSC-U" title="FoxKids.com - Micro Maniacs Racing (USA)">
@ -1167,10 +1240,18 @@ Tetris with Card Captor Sakura (Japan)
<entry code="SLPS-00624" compatibility="5" region="NTSC-J" title="GaiaSeed: Project Seed Trap">
<compatibility>No Issues</compatibility>
</entry>
<entry code="SLUS-01258" compatibility="5" region="NTSC-U" title="Galaga - Destination Earth (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00986" compatibility="5" region="NTSC-U" title="Galerians (USA) (Disc 1)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1425-g05f0ce6d</version-tested>
</entry>
<entry code="ARCDXEXE" compatibility="1" region="NTSC-U" title="GameShark 2 Version 2 Code Archive Disc Version 1 (USA) (Unl)">
<compatibility>Doesn't Boot</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
</entry>
<entry code="SLPM-86155" compatibility="5" region="NTSC-J" title="Ganbare Goemon - Kuru nara Koi! Ayashige Ikka no Kuroi Kage">
<compatibility>No Issues</compatibility>
</entry>
@ -1194,6 +1275,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1308-g622e50fa</version-tested>
</entry>
<entry code="SLUS-00024" compatibility="5" region="NTSC-U" title="Geom Cube (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00042" compatibility="5" region="NTSC-U" title="Gex (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1304-gc8b6712</version-tested>
@ -1250,6 +1335,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
</entry>
<entry code="SLUS-00127" compatibility="5" region="NTSC-U" title="Grand Slam (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00106" compatibility="5" region="NTSC-U" title="Grand Theft Auto (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1308-g622e50fa</version-tested>
@ -1262,6 +1351,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1425-g05f0ce6d</version-tested>
</entry>
<entry code="SLUS-01466" compatibility="5" region="NTSC-U" title="Gubble (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLPS-01357" compatibility="5" region="NTSC-J" title="Guilty Gear">
<compatibility>No Issues</compatibility>
</entry>
@ -1322,6 +1415,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-887-g1eecd50</version-tested>
</entry>
<entry code="SLUS-00150" compatibility="5" region="NTSC-U" title="Incredible Hulk, The - The Pantheon Saga (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
</entry>
<entry code="SLPS-01793" compatibility="5" region="NTSC-J" title="Initial D (Japan)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
@ -1685,6 +1782,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1308-g622e50fa</version-tested>
</entry>
<entry code="SLPS-00435" compatibility="5" region="NTSC-J" title="Megatudo 2096 (Japan)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1614-g914f3ad4</version-tested>
</entry>
<entry code="SLES-01047" compatibility="5" region="PAL" title="Men in Black - The Game (Europe)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1308-g622e50fa</version-tested>
@ -1859,6 +1960,10 @@ Tetris with Card Captor Sakura (Japan)
<entry code="SLUS-00329" compatibility="5" region="NTSC-U" title="NBA Hangtime">
<compatibility>No Issues</compatibility>
</entry>
<entry code="SLUS-00388" compatibility="5" region="NTSC-U" title="NBA Jam Extreme (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1614-g914f3ad4</version-tested>
</entry>
<entry code="SLUS-00060" compatibility="5" region="NTSC-U" title="NBA Live 96 (USA)">
<compatibility>No Issues</compatibility>
<comments>Issue 419</comments>
@ -1918,6 +2023,14 @@ Tetris with Card Captor Sakura (Japan)
<version-tested>0.1-1443-g7ab521f7</version-tested>
<comments>After the initial FMV, the game crashes (Issue #717).</comments>
</entry>
<entry code="SLUS-01352" compatibility="5" region="NTSC-U" title="Nickelodeon SpongeBob SquarePants - SuperSponge (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-01047" compatibility="5" region="NTSC-U" title="Nicktoons Racing (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLPM-87048" compatibility="5" region="NTSC-J" title="Night Raid (Japan)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-884-g096ed21</version-tested>
@ -2075,6 +2188,24 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1530-g6d75f42e</version-tested>
</entry>
<entry code="SCUS-94952" compatibility="4" region="NTSC-U" title="PlayStation Picks (USA) (SCUS-94952)">
<compatibility>Graphical/Audio Issues</compatibility>
<version-tested>0.1-1539-gf704cc64</version-tested>
<comments>In Battle Arena Toshinden demo, game runs at a strange fast speed than it should be (Issue #695).</comments>
</entry>
<entry code="SCUS-94960" compatibility="5" region="NTSC-U" title="PlayStation Picks (USA) (SCUS-94960)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1539-gf704cc64</version-tested>
<comments>Can hang if speed up in Star Wars Rebel Assaut 2 demo.</comments>
</entry>
<entry code="SCUS-94440" compatibility="5" region="NTSC-U" title="PlayStation Underground 3.1 (USA) (Disc 1)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1539-gf704cc64</version-tested>
</entry>
<entry code="SCUS-94161" compatibility="5" region="NTSC-U" title="PlayStation Underground Number 1 (USA) (Disc 1)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1539-gf704cc64</version-tested>
</entry>
<entry code="SLPS-01360" compatibility="5" region="NTSC-J" title="Pocket Fighter (Japan)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-884-g096ed21</version-tested>
@ -2104,6 +2235,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-774-g5a1b008</version-tested>
</entry>
<entry code="SLUS-01343" compatibility="5" region="NTSC-U" title="Power Shovel (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1539-gf704cc64</version-tested>
</entry>
<entry code="SLUS-01423" compatibility="5" region="NTSC-U" title="Powerpuff Girls, The - Chemical X-Traction (USA) (En,Es)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1529-ga895c027</version-tested>
@ -2306,6 +2441,10 @@ Tetris with Card Captor Sakura (Japan)
<version-tested>0.1-1334-g10f2366</version-tested>
<comments>The menu music is messing completely (Issue #662). </comments>
</entry>
<entry code="SLUS-01053" compatibility="5" region="NTSC-U" title="Road Rash - Jailbreak (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00524" compatibility="5" region="NTSC-U" title="Road Rash 3D (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1333-g5a955a4</version-tested>
@ -2834,6 +2973,11 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1265-gdd9a419</version-tested>
</entry>
<entry code="SLES-00024" compatibility="4" region="PAL" title="Tomb Raider (Europe) (No EDC)">
<compatibility>Graphical/Audio Issues</compatibility>
<version-tested>0.1-1558-gf852be74</version-tested>
<comments>Game needs forced 60hz timing to run at correct speed, but rendered cutscenes desync as a consequence.</comments>
</entry>
<entry code="SLUS-00152" compatibility="5" region="NTSC-U" title="Tomb Raider (USA) (Rev 3)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
@ -2850,6 +2994,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
</entry>
<entry code="SLUS-00691" compatibility="5" region="NTSC-U" title="Tomb Raider III - Adventures of Lara Croft (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1580-g136a9d60</version-tested>
</entry>
<entry code="SCUS-94236" compatibility="5" region="NTSC-U" title="Tomba! (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
@ -3054,6 +3202,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<version-tested>0.1-1333-g5a955a4</version-tested>
</entry>
<entry code="SLUS-01444" compatibility="5" region="NTSC-U" title="X-Bladez - Inline Skater (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00141" compatibility="5" region="NTSC-U" title="X-COM - UFO Defense">
<compatibility>No Issues</compatibility>
</entry>
@ -3062,6 +3214,10 @@ Tetris with Card Captor Sakura (Japan)
<upscaling-issues>Small grafics errors when the cursor is over the text (don't know if this bug occurs in the real hardware).</upscaling-issues>
<version-tested>0.1-1304-gc8b6712</version-tested>
</entry>
<entry code="SLUS-00044" compatibility="5" region="NTSC-U" title="X-Men - Children of the Atom (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLUS-00774" compatibility="5" region="NTSC-U" title="X-Men - Mutant Academy (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-986-gfc911de1</version-tested>
@ -3074,6 +3230,10 @@ Tetris with Card Captor Sakura (Japan)
<compatibility>No Issues</compatibility>
<upscaling-issues>Sprite glitches</upscaling-issues>
</entry>
<entry code="SLUS-00627" compatibility="5" region="NTSC-U" title="X-Men vs. Street Fighter (USA)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1608-g79aaf908</version-tested>
</entry>
<entry code="SLPS-01063" compatibility="5" region="NTSC-J" title="X.Racing (Japan)">
<compatibility>No Issues</compatibility>
<version-tested>0.1-1448-g472f1c1c</version-tested>

View file

@ -3,69 +3,69 @@
# Croc - Legend of the Gobbos (USA) (SLUS-00530)
[SLUS-00530]
EnablePGXPCPUMode = true
ForcePGXPCPUMode = true
# Croc 2 (USA) (SLUS-00634)
[SLUS-00634]
EnablePGXPCPUMode = true
ForcePGXPCPUMode = true
# Doom (USA) (Rev 1) (SLUS-00077)
[SLUS-00077]
DisableUpscaling = true
ForceDigitalController = true
# Pop'n Music 6 (Japan) (SLPM-87089)
[SLPM-87089]
EnableInterlacing = true
ForceInterlacing = true
# Mr. Driller G (Japan) (SLPS-03336)
[SLPS-03336]
EnableInterlacing = true
ForceInterlacing = true
# Pro Pinball - Big Race USA (USA) (SLUS-01260)
[SLUS-01260]
ForceSoftwareRenderer = true
EnableInterlacing = true
ForceInterlacing = true
# Pro Pinball - Fantastic Journey (USA) (SLUS-01261)
[SLUS-01261]
ForceSoftwareRenderer = true
EnableInterlacing = true
ForceInterlacing = true
# True Pinball (USA) (SLUS-00337)
[SLUS-00337]
EnableInterlacing = true
ForceInterlacing = true
# Dead or Alive (USA) (SLUS-00606)
[SLUS-00606]
EnableInterlacing = true
ForceInterlacing = true
# Shinobi no Sato no Jintori Gassen (Japan) (SLPS-03553)
[SLPS-03553]
EnableInterlacing = true
ForceInterlacing = true
# Time Bokan Series: Bokan desu yo (SLPS-01211)
[SLPS-01211]
EnableInterlacing = true
ForceInterlacing = true
# Rat Attack! (USA) (SLUS-00656)
[SLUS-00656]
EnableInterlacing = true
ForceInterlacing = true
# Arcade Party Pak (USA) (SLUS-00952)
[SLUS-00952]
EnableInterlacing = true
ForceInterlacing = true
# SLUS-01222 (Colin McRae Rally 2.0 (USA) (En,Fr,Es))
@ -73,3 +73,125 @@ EnableInterlacing = true
DisplayActiveStartOffset = 64
DisplayActiveEndOffset = 68
# SLUS-00297 (Star Wars - Dark Forces (USA))
[SLUS-00297]
DisableUpscaling = true
DisablePGXP = true
ForceDigitalController = true
# SCUS-94302 (Destruction Derby (USA))
[SCUS-94302]
ForceDigitalController = true
# SCUS-94900 (Crash Bandicoot (USA))
[SCUS-94900]
ForceDigitalController = true
# SCUS-94350 (Destruction Derby 2 (USA))
[SCUS-94350]
ForceDigitalController = true
# PCPX-96085 (Gran Turismo (Japan) (Demo 1))
[PCPX-96085]
ForceDigitalController = true
# SLUS-00106 (Grand Theft Auto (USA))
[SLUS-00106]
ForceDigitalController = true
# SLUS-00590 (Need for Speed - V-Rally (USA))
[SLUS-00590]
ForceDigitalController = true
# SLUS-00403 (Rage Racer (USA))
[SLUS-00403]
ForceDigitalController = true
# SCUS-94300 (Ridge Racer (USA))
[SCUS-94300]
ForceDigitalController = true
# SLUS-00214 (Ridge Racer Revolution (USA))
[SLUS-00214]
ForceDigitalController = true
# SLUS-00204 (Road & Track Presents - The Need for Speed (USA))
[SLUS-00204]
ForceDigitalController = true
# SLUS-00006 (Tekken (USA))
[SLUS-00006]
ForceDigitalController = true
# SLUS-00213 (Tekken 2 (USA))
[SLUS-00213]
ForceDigitalController = true
# SCES-00344 (Crash Bandicoot (Europe))
[SCES-00344]
ForceDigitalController = true
# SLUS-00355 (Duke Nukem - Total Meltdown (USA))
[SLUS-00355]
DisableUpscaling = true
ForceDigitalController = true
# SLUS-00331 (Final Doom (USA))
[SLUS-00331]
DisableUpscaling = true
ForceDigitalController = true
# SLUS-00106 (Grand Theft Auto (USA))
[SLUS-00106]
ForceDigitalController = true
# SLUS-00005 (Rayman (USA))
[SLUS-00005]
ForceDigitalController = true
# SLUS-01265 (Rayman Brain Games (USA))
[SLUS-01265]
ForceDigitalController = true
# SLUS-00601 (Skullmonkeys (USA))
[SLUS-00601]
ForceDigitalController = true
# SLPS-00435 (Megatudo 2096 (Japan))
[SLPS-00435]
ForceRecompilerICache = true
# SLUS-00388 (NBA Jam Extreme (USA))
[SLUS-00388]
ForceRecompilerICache = true
# SCES-02834 (Crash Bash (Europe) (En,Fr,De,Es,It))
[SCES-02834]
ForceRecompilerICache = true
# SLUS-00870 (Formula One 99 (USA) (En,Fr,Es))
[SLUS-00870]
ForceInterpreter = true

View file

@ -1,11 +1,8 @@
add_subdirectory(cubeb)
add_subdirectory(glad)
add_subdirectory(googletest)
add_subdirectory(imgui)
add_subdirectory(libcue)
add_subdirectory(simpleini)
add_subdirectory(stb)
add_subdirectory(tinyxml2)
add_subdirectory(zlib)
add_subdirectory(minizip)
add_subdirectory(lzma)
@ -13,10 +10,15 @@ add_subdirectory(libFLAC)
add_subdirectory(libchdr)
add_subdirectory(xxhash)
add_subdirectory(rapidjson)
add_subdirectory(glslang)
add_subdirectory(vulkan-loader)
if(NOT BUILD_LIBRETRO_CORE)
add_subdirectory(imgui)
add_subdirectory(simpleini)
add_subdirectory(tinyxml2)
endif()
if(ENABLE_DISCORD_PRESENCE)
add_subdirectory(discord-rpc)
endif()

View file

@ -18,20 +18,3 @@ target_include_directories(imgui PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" "
target_include_directories(imgui INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_definitions(imgui PRIVATE "imgui_STATIC")
target_sources(imgui PRIVATE
include/imgui_impl_opengl3.h
src/imgui_impl_opengl3.cpp
)
target_link_libraries(imgui PRIVATE glad)
target_sources(imgui PRIVATE
include/imgui_impl_vulkan.h
src/imgui_impl_vulkan.cpp
)
target_link_libraries(imgui PRIVATE vulkan-loader)
if(WIN32)
target_sources(imgui PRIVATE include/imgui_impl_dx11.h src/imgui_impl_dx11.cpp)
endif()

View file

@ -37,9 +37,6 @@
<ItemGroup>
<ClInclude Include="include\imconfig.h" />
<ClInclude Include="include\imgui.h" />
<ClInclude Include="include\imgui_impl_dx11.h" />
<ClInclude Include="include\imgui_impl_opengl3.h" />
<ClInclude Include="include\imgui_impl_vulkan.h" />
<ClInclude Include="include\imgui_stdlib.h" />
<ClInclude Include="src\imgui_internal.h" />
<ClInclude Include="src\imstb_rectpack.h" />
@ -49,20 +46,9 @@
<ItemGroup>
<ClCompile Include="src\imgui.cpp" />
<ClCompile Include="src\imgui_draw.cpp" />
<ClCompile Include="src\imgui_impl_dx11.cpp" />
<ClCompile Include="src\imgui_impl_opengl3.cpp" />
<ClCompile Include="src\imgui_impl_vulkan.cpp" />
<ClCompile Include="src\imgui_stdlib.cpp" />
<ClCompile Include="src\imgui_widgets.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\glad\glad.vcxproj">
<Project>{43540154-9e1e-409c-834f-b84be5621388}</Project>
</ProjectReference>
<ProjectReference Include="..\vulkan-loader\vulkan-loader.vcxproj">
<Project>{9c8ddeb0-2b8f-4f5f-ba86-127cdf27f035}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BB08260F-6FBC-46AF-8924-090EE71360C6}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
@ -211,7 +197,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>imgui_STATIC;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp17</LanguageStandard>
<ConformanceMode>true</ConformanceMode>
@ -231,7 +217,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>imgui_STATIC;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp17</LanguageStandard>
<ConformanceMode>true</ConformanceMode>
@ -251,7 +237,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>imgui_STATIC;WIN32;_ITERATOR_DEBUG_LEVEL=1;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
@ -273,7 +259,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>imgui_STATIC;WIN32;_ITERATOR_DEBUG_LEVEL=1;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
@ -295,7 +281,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo /utf-8 %(AdditionalOptions)</AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
@ -318,7 +304,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo /utf-8 %(AdditionalOptions)</AdditionalOptions>
<WholeProgramOptimization>true</WholeProgramOptimization>
@ -342,7 +328,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo /utf-8 %(AdditionalOptions)</AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
@ -365,7 +351,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo /utf-8 %(AdditionalOptions)</AdditionalOptions>
<WholeProgramOptimization>true</WholeProgramOptimization>

View file

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="include\imgui_impl_dx11.h" />
<ClInclude Include="include\imgui_impl_opengl3.h" />
<ClInclude Include="include\imconfig.h" />
<ClInclude Include="include\imgui.h" />
<ClInclude Include="src\imgui_internal.h" />
@ -10,15 +8,11 @@
<ClInclude Include="src\imstb_textedit.h" />
<ClInclude Include="src\imstb_truetype.h" />
<ClInclude Include="include\imgui_stdlib.h" />
<ClInclude Include="include\imgui_impl_vulkan.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\imgui_impl_opengl3.cpp" />
<ClCompile Include="src\imgui_widgets.cpp" />
<ClCompile Include="src\imgui.cpp" />
<ClCompile Include="src\imgui_draw.cpp" />
<ClCompile Include="src\imgui_impl_dx11.cpp" />
<ClCompile Include="src\imgui_stdlib.cpp" />
<ClCompile Include="src\imgui_impl_vulkan.cpp" />
</ItemGroup>
</Project>

View file

@ -7,6 +7,8 @@
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include "vulkan_loader.h"
@ -14,6 +16,10 @@
#include <dlfcn.h>
#endif
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#define VULKAN_MODULE_ENTRY_POINT(name, required) PFN_##name name;
#define VULKAN_INSTANCE_ENTRY_POINT(name, required) PFN_##name name;
#define VULKAN_DEVICE_ENTRY_POINT(name, required) PFN_##name name;
@ -111,6 +117,25 @@ bool LoadVulkanLibrary()
char* libvulkan_env = getenv("LIBVULKAN_PATH");
if (libvulkan_env)
vulkan_module = dlopen(libvulkan_env, RTLD_NOW);
if (!vulkan_module)
{
unsigned path_size = 0;
_NSGetExecutablePath(nullptr, &path_size);
std::string path;
path.resize(path_size);
if (_NSGetExecutablePath(path.data(), &path_size) == 0)
{
path[path_size] = 0;
size_t pos = path.rfind('/');
if (pos != std::string::npos)
{
path.erase(pos);
path += "/../Frameworks/libvulkan.dylib";
vulkan_module = dlopen(path.c_str(), RTLD_NOW);
}
}
}
if (!vulkan_module)
vulkan_module = dlopen("libvulkan.dylib", RTLD_NOW);
#else

View file

@ -84,8 +84,8 @@ bool AutoStagingTexture::EnsureSize(ID3D11DeviceContext* context, u32 width, u32
if (m_texture && m_width >= width && m_height >= height && m_format == format)
return true;
ID3D11Device* device;
context->GetDevice(&device);
ComPtr<ID3D11Device> device;
context->GetDevice(device.GetAddressOf());
CD3D11_TEXTURE2D_DESC new_desc(format, width, height, 1, 1, 0,
for_uploading ? D3D11_USAGE_DYNAMIC : D3D11_USAGE_STAGING,

View file

@ -17,7 +17,7 @@
// Force inline in non-debug helper
#ifdef _DEBUG
#define ALWAYS_INLINE_RELEASE
#define ALWAYS_INLINE_RELEASE inline
#else
#define ALWAYS_INLINE_RELEASE ALWAYS_INLINE
#endif

View file

@ -209,10 +209,8 @@ void StagingTexture::Flush()
void StagingTexture::ReadTexels(u32 src_x, u32 src_y, u32 width, u32 height, void* out_ptr, u32 out_stride)
{
Assert(m_staging_buffer.GetType() != StagingBuffer::Type::Upload);
if (!PrepareForAccess())
return;
Assert((src_x + width) <= m_width && (src_y + height) <= m_height);
PrepareForAccess();
// Offset pointer to point to start of region being copied out.
const char* current_ptr = m_staging_buffer.GetMapPointer();
@ -239,10 +237,9 @@ void StagingTexture::ReadTexels(u32 src_x, u32 src_y, u32 width, u32 height, voi
void StagingTexture::ReadTexel(u32 x, u32 y, void* out_ptr)
{
Assert(m_staging_buffer.GetType() != StagingBuffer::Type::Upload);
if (!PrepareForAccess())
return;
Assert(x < m_width && y < m_height);
PrepareForAccess();
const char* src_ptr = GetMappedPointer() + y * GetMappedStride() + x * m_texel_size;
std::memcpy(out_ptr, src_ptr, m_texel_size);
}
@ -250,10 +247,8 @@ void StagingTexture::ReadTexel(u32 x, u32 y, void* out_ptr)
void StagingTexture::WriteTexels(u32 dst_x, u32 dst_y, u32 width, u32 height, const void* in_ptr, u32 in_stride)
{
Assert(m_staging_buffer.GetType() != StagingBuffer::Type::Readback);
if (!PrepareForAccess())
return;
Assert((dst_x + width) <= m_width && (dst_y + height) <= m_height);
PrepareForAccess();
// Offset pointer to point to start of region being copied to.
char* current_ptr = GetMappedPointer();
@ -279,23 +274,18 @@ void StagingTexture::WriteTexels(u32 dst_x, u32 dst_y, u32 width, u32 height, co
void StagingTexture::WriteTexel(u32 x, u32 y, const void* in_ptr)
{
if (!PrepareForAccess())
return;
Assert(x < m_width && y < m_height);
PrepareForAccess();
char* dest_ptr = GetMappedPointer() + y * m_map_stride + x * m_texel_size;
std::memcpy(dest_ptr, in_ptr, m_texel_size);
}
bool StagingTexture::PrepareForAccess()
void StagingTexture::PrepareForAccess()
{
Assert(IsMapped());
if (m_needs_flush)
{
if (IsMapped())
Unmap();
Flush();
}
return IsMapped() || Map();
}
} // namespace Vulkan

View file

@ -73,7 +73,7 @@ public:
void WriteTexel(u32 x, u32 y, const void* in_ptr);
private:
bool PrepareForAccess();
void PrepareForAccess();
StagingBuffer m_staging_buffer;
u64 m_flush_fence_counter = 0;

View file

@ -24,10 +24,6 @@ add_library(core
digital_controller.h
dma.cpp
dma.h
game_list.cpp
game_list.h
game_settings.cpp
game_settings.h
gpu.cpp
gpu.h
gpu_commands.cpp
@ -98,7 +94,7 @@ set(RECOMPILER_SRCS
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(core PUBLIC Threads::Threads common imgui tinyxml2 zlib vulkan-loader simpleini)
target_link_libraries(core PUBLIC Threads::Threads common zlib vulkan-loader)
target_link_libraries(core PRIVATE glad stb)
if(WIN32)
@ -126,3 +122,8 @@ elseif(${CPU_ARCH} STREQUAL "aarch64")
else()
message("Not building recompiler")
endif()
if(NOT BUILD_LIBRETRO_CORE)
target_link_libraries(core PRIVATE imgui)
target_compile_definitions(core PRIVATE "WITH_IMGUI=1")
endif()

View file

@ -466,25 +466,31 @@ std::optional<s32> AnalogController::StaticGetButtonCodeByName(std::string_view
Controller::AxisList AnalogController::StaticGetAxisNames()
{
#define A(n) \
{ \
#n, static_cast < s32>(Axis::n) \
}
return {A(LeftX), A(LeftY), A(RightX), A(RightY)};
#undef A
return {{TRANSLATABLE("AnalogController", "LeftX"), static_cast<s32>(Axis::LeftX), AxisType::Full},
{TRANSLATABLE("AnalogController", "LeftY"), static_cast<s32>(Axis::LeftY), AxisType::Full},
{TRANSLATABLE("AnalogController", "RightX"), static_cast<s32>(Axis::RightX), AxisType::Full},
{TRANSLATABLE("AnalogController", "RightY"), static_cast<s32>(Axis::RightY), AxisType::Full}};
}
Controller::ButtonList AnalogController::StaticGetButtonNames()
{
#define B(n) \
{ \
#n, static_cast < s32>(Button::n) \
}
return {B(Up), B(Down), B(Left), B(Right), B(Select), B(Start), B(Triangle), B(Cross), B(Circle),
B(Square), B(L1), B(L2), B(R1), B(R2), B(L3), B(R3), B(Analog)};
#undef B
return {{TRANSLATABLE("AnalogController", "Up"), static_cast<s32>(Button::Up)},
{TRANSLATABLE("AnalogController", "Down"), static_cast<s32>(Button::Down)},
{TRANSLATABLE("AnalogController", "Left"), static_cast<s32>(Button::Left)},
{TRANSLATABLE("AnalogController", "Right"), static_cast<s32>(Button::Right)},
{TRANSLATABLE("AnalogController", "Select"), static_cast<s32>(Button::Select)},
{TRANSLATABLE("AnalogController", "Start"), static_cast<s32>(Button::Start)},
{TRANSLATABLE("AnalogController", "Triangle"), static_cast<s32>(Button::Triangle)},
{TRANSLATABLE("AnalogController", "Cross"), static_cast<s32>(Button::Cross)},
{TRANSLATABLE("AnalogController", "Circle"), static_cast<s32>(Button::Circle)},
{TRANSLATABLE("AnalogController", "Square"), static_cast<s32>(Button::Square)},
{TRANSLATABLE("AnalogController", "L1"), static_cast<s32>(Button::L1)},
{TRANSLATABLE("AnalogController", "L2"), static_cast<s32>(Button::L2)},
{TRANSLATABLE("AnalogController", "R1"), static_cast<s32>(Button::R1)},
{TRANSLATABLE("AnalogController", "R2"), static_cast<s32>(Button::R2)},
{TRANSLATABLE("AnalogController", "L3"), static_cast<s32>(Button::L3)},
{TRANSLATABLE("AnalogController", "R3"), static_cast<s32>(Button::R3)},
{TRANSLATABLE("AnalogController", "Analog"), static_cast<s32>(Button::Analog)}};
}
u32 AnalogController::StaticGetVibrationMotorCount()
@ -495,11 +501,14 @@ u32 AnalogController::StaticGetVibrationMotorCount()
Controller::SettingList AnalogController::StaticGetSettings()
{
static constexpr std::array<SettingInfo, 2> settings = {
{{SettingInfo::Type::Boolean, "AutoEnableAnalog", "Enable Analog Mode on Reset",
"Automatically enables analog mode when the console is reset/powered on.", "false"},
{SettingInfo::Type::Float, "AxisScale", "Analog Axis Scale",
{{SettingInfo::Type::Boolean, "AutoEnableAnalog", TRANSLATABLE("AnalogController", "Enable Analog Mode on Reset"),
TRANSLATABLE("AnalogController", "Automatically enables analog mode when the console is reset/powered on."),
"false"},
{SettingInfo::Type::Float, "AxisScale", TRANSLATABLE("AnalogController", "Analog Axis Scale"),
TRANSLATABLE(
"AnalogController",
"Sets the analog stick axis scaling factor. A value between 1.30 and 1.40 is recommended when using recent "
"controllers, e.g. DualShock 4, Xbox One Controller.",
"controllers, e.g. DualShock 4, Xbox One Controller."),
"1.00f", "0.01f", "1.50f", "0.01f"}}};
return SettingList(settings.begin(), settings.end());

View file

@ -742,10 +742,153 @@ ALWAYS_INLINE static TickCount DoDMAAccess(u32 offset, u32& value)
namespace CPU {
template<bool add_ticks, bool icache_read = false, u32 word_count = 1>
ALWAYS_INLINE_RELEASE void DoInstructionRead(PhysicalMemoryAddress address, void* data)
{
using namespace Bus;
address &= PHYSICAL_MEMORY_ADDRESS_MASK;
if (address < RAM_MIRROR_END)
{
std::memcpy(data, &g_ram[address & RAM_MASK], sizeof(u32) * word_count);
if constexpr (add_ticks)
g_state.pending_ticks += (icache_read ? 1 : 4) * word_count;
}
else if (address >= BIOS_BASE && address < (BIOS_BASE + BIOS_SIZE))
{
std::memcpy(data, &g_bios[(address - BIOS_BASE) & BIOS_MASK], sizeof(u32));
if constexpr (add_ticks)
g_state.pending_ticks += m_bios_access_time[static_cast<u32>(MemoryAccessSize::Word)] * word_count;
}
else
{
CPU::RaiseException(address, Cop0Registers::CAUSE::MakeValueForException(Exception::IBE, false, false, 0));
std::memset(data, 0, sizeof(u32) * word_count);
}
}
TickCount GetInstructionReadTicks(VirtualMemoryAddress address)
{
using namespace Bus;
address &= PHYSICAL_MEMORY_ADDRESS_MASK;
if (address < RAM_MIRROR_END)
{
return 4;
}
else if (address >= BIOS_BASE && address < (BIOS_BASE + BIOS_SIZE))
{
return m_bios_access_time[static_cast<u32>(MemoryAccessSize::Word)];
}
else
{
return 0;
}
}
TickCount GetICacheFillTicks(VirtualMemoryAddress address)
{
using namespace Bus;
address &= PHYSICAL_MEMORY_ADDRESS_MASK;
if (address < RAM_MIRROR_END)
{
return 1 * (ICACHE_LINE_SIZE / sizeof(u32));
}
else if (address >= BIOS_BASE && address < (BIOS_BASE + BIOS_SIZE))
{
return m_bios_access_time[static_cast<u32>(MemoryAccessSize::Word)] * (ICACHE_LINE_SIZE / sizeof(u32));
}
else
{
return 0;
}
}
void CheckAndUpdateICacheTags(u32 line_count, TickCount uncached_ticks)
{
VirtualMemoryAddress current_pc = g_state.regs.pc & ICACHE_TAG_ADDRESS_MASK;
if (IsCachedAddress(current_pc))
{
TickCount ticks = 0;
TickCount cached_ticks_per_line = GetICacheFillTicks(current_pc);
for (u32 i = 0; i < line_count; i++, current_pc += ICACHE_LINE_SIZE)
{
const u32 line = GetICacheLine(current_pc);
if (g_state.icache_tags[line] != current_pc)
{
g_state.icache_tags[line] = current_pc;
ticks += cached_ticks_per_line;
}
}
g_state.pending_ticks += ticks;
}
else
{
g_state.pending_ticks += uncached_ticks;
}
}
u32 FillICache(VirtualMemoryAddress address)
{
const u32 line = GetICacheLine(address);
g_state.icache_tags[line] = GetICacheTagForAddress(address);
u8* line_data = &g_state.icache_data[line * ICACHE_LINE_SIZE];
DoInstructionRead<true, true, 4>(address & ~(ICACHE_LINE_SIZE - 1u), line_data);
const u32 offset = GetICacheLineOffset(address);
u32 result;
std::memcpy(&result, &line_data[offset], sizeof(result));
return result;
}
void ClearICache()
{
std::memset(g_state.icache_data.data(), 0, ICACHE_SIZE);
g_state.icache_tags.fill(ICACHE_INVALD_BIT | ICACHE_DISABLED_BIT);
}
ALWAYS_INLINE_RELEASE static u32 ReadICache(VirtualMemoryAddress address)
{
const u32 line = GetICacheLine(address);
const u8* line_data = &g_state.icache_data[line * ICACHE_LINE_SIZE];
const u32 offset = GetICacheLineOffset(address);
u32 result;
std::memcpy(&result, &line_data[offset], sizeof(result));
return result;
}
ALWAYS_INLINE_RELEASE static void WriteICache(VirtualMemoryAddress address, u32 value)
{
const u32 line = GetICacheLine(address);
const u32 offset = GetICacheLineOffset(address);
g_state.icache_tags[line] = GetICacheTagForAddress(address) | ICACHE_INVALD_BIT;
std::memcpy(&g_state.icache_data[line * ICACHE_LINE_SIZE + offset], &value, sizeof(value));
}
static void WriteCacheControl(u32 value)
{
Log_WarningPrintf("Cache control <- 0x%08X", value);
g_state.cache_control = value;
CacheControl changed_bits{g_state.cache_control.bits ^ value};
g_state.cache_control.bits = value;
if (changed_bits.icache_enable)
{
if (g_state.cache_control.icache_enable)
{
for (u32 i = 0; i < ICACHE_LINES; i++)
g_state.icache_tags[i] &= ~ICACHE_DISABLED_BIT;
}
else
{
for (u32 i = 0; i < ICACHE_LINES; i++)
g_state.icache_tags[i] |= ICACHE_DISABLED_BIT;
}
}
}
template<MemoryAccessType type, MemoryAccessSize size>
@ -797,8 +940,11 @@ static ALWAYS_INLINE TickCount DoMemoryAccess(VirtualMemoryAddress address, u32&
if constexpr (type == MemoryAccessType::Write)
{
if (g_state.cop0_regs.sr.Isc)
{
WriteICache(address, value);
return 0;
}
}
address &= PHYSICAL_MEMORY_ADDRESS_MASK;
if ((address & DCACHE_LOCATION_MASK) == DCACHE_LOCATION)
@ -829,7 +975,7 @@ static ALWAYS_INLINE TickCount DoMemoryAccess(VirtualMemoryAddress address, u32&
if (address == 0xFFFE0130)
{
if constexpr (type == MemoryAccessType::Read)
value = g_state.cache_control;
value = g_state.cache_control.bits;
else
WriteCacheControl(value);
@ -849,6 +995,10 @@ static ALWAYS_INLINE TickCount DoMemoryAccess(VirtualMemoryAddress address, u32&
{
return DoRAMAccess<type, size>(address, value);
}
else if (address >= BIOS_BASE && address < (BIOS_BASE + BIOS_SIZE))
{
return DoBIOSAccess<type, size>(static_cast<u32>(address - BIOS_BASE), value);
}
else if (address < EXP1_BASE)
{
return DoInvalidAccess(type, size, address, value);
@ -921,14 +1071,6 @@ static ALWAYS_INLINE TickCount DoMemoryAccess(VirtualMemoryAddress address, u32&
{
return DoEXP2Access<type, size>(address & EXP2_MASK, value);
}
else if (address < BIOS_BASE)
{
return DoInvalidAccess(type, size, address, value);
}
else if (address < (BIOS_BASE + BIOS_SIZE))
{
return DoBIOSAccess<type, size>(static_cast<u32>(address - BIOS_BASE), value);
}
else
{
return DoInvalidAccess(type, size, address, value);
@ -961,19 +1103,76 @@ static bool DoAlignmentCheck(VirtualMemoryAddress address)
bool FetchInstruction()
{
DebugAssert(Common::IsAlignedPow2(g_state.regs.npc, 4));
if (DoMemoryAccess<MemoryAccessType::Read, MemoryAccessSize::Word>(g_state.regs.npc, g_state.next_instruction.bits) <
0)
using namespace Bus;
PhysicalMemoryAddress address = g_state.regs.npc;
switch (address >> 29)
{
// Bus errors don't set BadVaddr.
RaiseException(g_state.regs.npc, Cop0Registers::CAUSE::MakeValueForException(Exception::IBE, false, false, 0));
case 0x00: // KUSEG 0M-512M
case 0x04: // KSEG0 - physical memory cached
{
#if 0
// TODO: icache
TickCount cycles;
DoInstructionRead(address, cycles, g_state.next_instruction.bits);
#else
if (CompareICacheTag(address))
g_state.next_instruction.bits = ReadICache(address);
else
g_state.next_instruction.bits = FillICache(address);
#endif
}
break;
case 0x05: // KSEG1 - physical memory uncached
{
DoInstructionRead<true, false, 1>(address, &g_state.next_instruction.bits);
}
break;
case 0x01: // KUSEG 512M-1024M
case 0x02: // KUSEG 1024M-1536M
case 0x03: // KUSEG 1536M-2048M
case 0x06: // KSEG2
case 0x07: // KSEG2
default:
{
CPU::RaiseException(address, Cop0Registers::CAUSE::MakeValueForException(Exception::IBE, false, false, 0));
return false;
}
}
g_state.regs.pc = g_state.regs.npc;
g_state.regs.npc += sizeof(g_state.next_instruction.bits);
return true;
}
bool SafeReadInstruction(VirtualMemoryAddress addr, u32* value)
{
switch (addr >> 29)
{
case 0x00: // KUSEG 0M-512M
case 0x04: // KSEG0 - physical memory cached
case 0x05: // KSEG1 - physical memory uncached
{
DoInstructionRead<false, false, 1>(addr, value);
return true;
}
case 0x01: // KUSEG 512M-1024M
case 0x02: // KUSEG 1024M-1536M
case 0x03: // KUSEG 1536M-2048M
case 0x06: // KSEG2
case 0x07: // KSEG2
default:
{
return false;
}
}
}
bool ReadMemoryByte(VirtualMemoryAddress addr, u8* value)
{
u32 temp = 0;

View file

@ -78,41 +78,6 @@ extern std::bitset<CPU_CODE_CACHE_PAGE_COUNT> m_ram_code_bits;
extern u8 g_ram[RAM_SIZE]; // 2MB RAM
extern u8 g_bios[BIOS_SIZE]; // 512K BIOS ROM
/// Returns the address which should be used for code caching (i.e. removes mirrors).
ALWAYS_INLINE PhysicalMemoryAddress UnmirrorAddress(PhysicalMemoryAddress address)
{
// RAM
if (address < 0x800000)
return address & UINT32_C(0x1FFFFF);
else
return address;
}
/// Returns true if the address specified is cacheable (RAM or BIOS).
ALWAYS_INLINE bool IsCacheableAddress(PhysicalMemoryAddress address)
{
return (address < RAM_MIRROR_END) || (address >= BIOS_BASE && address < (BIOS_BASE + BIOS_SIZE));
}
/// Reads a cachable address (RAM or BIOS).
ALWAYS_INLINE u32 ReadCacheableAddress(PhysicalMemoryAddress address)
{
u32 value;
if (address < RAM_MIRROR_END)
{
std::memcpy(&value, &g_ram[address & RAM_MASK], sizeof(value));
return value;
}
else
{
std::memcpy(&value, &g_bios[address & BIOS_MASK], sizeof(value));
return value;
}
}
/// Returns true if the address specified is writable (RAM).
ALWAYS_INLINE bool IsRAMAddress(PhysicalMemoryAddress address) { return address < RAM_MIRROR_END; }
/// Flags a RAM region as code, so we know when to invalidate blocks.
ALWAYS_INLINE void SetRAMCodePage(u32 index) { m_ram_code_bits[index] = true; }

View file

@ -3,12 +3,13 @@
#include "common/log.h"
#include "common/state_wrapper.h"
#include "dma.h"
#include "game_list.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "settings.h"
#include "spu.h"
#include "system.h"
#ifdef WITH_IMGUI
#include "imgui.h"
#endif
Log_SetChannel(CDROM);
struct CommandInfo
@ -444,7 +445,7 @@ void CDROM::InsertMedia(std::unique_ptr<CDImage> media)
RemoveMedia();
// set the region from the system area of the disc
m_disc_region = GameList::GetRegionForImage(media.get());
m_disc_region = System::GetRegionForImage(media.get());
Log_InfoPrintf("Inserting new media, disc region: %s, console region: %s", Settings::GetDiscRegionName(m_disc_region),
Settings::GetConsoleRegionName(System::GetRegion()));
@ -1596,6 +1597,7 @@ void CDROM::BeginPlaying(u8 track_bcd, TickCount ticks_late /* = 0 */, bool afte
m_secondary_status.ClearActiveBits();
m_secondary_status.motor_on = true;
m_secondary_status.playing_cdda = true;
ClearSectorBuffers();
ResetAudioDecoder();
@ -2241,11 +2243,8 @@ void CDROM::ProcessCDDASector(const u8* raw_sector, const CDImage::SubChannelQ&
// For CDDA sectors, the whole sector contains the audio data.
Log_DevPrintf("Read sector %u as CDDA", m_current_lba);
// These bits/reporting doesn't happen if we're reading with the CDDA mode bit set.
if (m_drive_state == DriveState::Playing)
{
m_secondary_status.playing_cdda = true;
if (m_mode.report_audio)
// The reporting doesn't happen if we're reading with the CDDA mode bit set.
if (m_drive_state == DriveState::Playing && m_mode.report_audio)
{
const u8 frame_nibble = subq.absolute_frame_bcd >> 4;
if (m_last_cdda_report_frame_nibble != frame_nibble)
@ -2278,7 +2277,6 @@ void CDROM::ProcessCDDASector(const u8* raw_sector, const CDImage::SubChannelQ&
SetAsyncInterrupt(Interrupt::DataReady);
}
}
}
// Apply volume when pushing sectors to SPU.
if (m_muted)
@ -2344,6 +2342,7 @@ void CDROM::ClearSectorBuffers()
void CDROM::DrawDebugWindow()
{
#ifdef WITH_IMGUI
static const ImVec4 active_color{1.0f, 1.0f, 1.0f, 1.0f};
static const ImVec4 inactive_color{0.4f, 0.4f, 0.4f, 1.0f};
const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x;
@ -2524,4 +2523,5 @@ void CDROM::DrawDebugWindow()
}
ImGui::End();
#endif
}

View file

@ -14,8 +14,14 @@ class HostInterface;
class Controller
{
public:
enum class AxisType : u8
{
Full,
Half
};
using ButtonList = std::vector<std::pair<std::string, s32>>;
using AxisList = std::vector<std::pair<std::string, s32>>;
using AxisList = std::vector<std::tuple<std::string, s32, AxisType>>;
using SettingList = std::vector<SettingInfo>;
Controller();

View file

@ -59,8 +59,6 @@
<ClCompile Include="cpu_recompiler_register_cache.cpp" />
<ClCompile Include="cpu_types.cpp" />
<ClCompile Include="digital_controller.cpp" />
<ClCompile Include="game_list.cpp" />
<ClCompile Include="game_settings.cpp" />
<ClCompile Include="gpu_commands.cpp" />
<ClCompile Include="gpu_hw_d3d11.cpp" />
<ClCompile Include="gpu_hw_shadergen.cpp" />
@ -107,8 +105,6 @@
<ClInclude Include="cpu_recompiler_thunks.h" />
<ClInclude Include="cpu_recompiler_types.h" />
<ClInclude Include="digital_controller.h" />
<ClInclude Include="game_list.h" />
<ClInclude Include="game_settings.h" />
<ClInclude Include="gpu_hw_d3d11.h" />
<ClInclude Include="gpu_hw_shadergen.h" />
<ClInclude Include="gpu_hw_vulkan.h" />
@ -147,14 +143,14 @@
<ProjectReference Include="..\..\dep\imgui\imgui.vcxproj">
<Project>{bb08260f-6fbc-46af-8924-090ee71360c6}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\simpleini\simpleini.vcxproj">
<Project>{3773f4cc-614e-4028-8595-22e08ca649e3}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\stb\stb.vcxproj">
<Project>{ed601289-ac1a-46b8-a8ed-17db9eb73423}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\tinyxml2\tinyxml2.vcxproj">
<Project>{933118a9-68c5-47b4-b151-b03c93961623}</Project>
<ProjectReference Include="..\..\dep\vulkan-loader\vulkan-loader.vcxproj">
<Project>{9c8ddeb0-2b8f-4f5f-ba86-127cdf27f035}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\zlib\zlib.vcxproj">
<Project>{7ff9fdb9-d504-47db-a16a-b08071999620}</Project>
</ProjectReference>
<ProjectReference Include="..\common\common.vcxproj">
<Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project>
@ -304,10 +300,10 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<LanguageStandard>stdcpp17</LanguageStandard>
@ -330,10 +326,10 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<LanguageStandard>stdcpp17</LanguageStandard>
@ -356,10 +352,10 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_ITERATOR_DEBUG_LEVEL=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUGFAST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_ITERATOR_DEBUG_LEVEL=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUGFAST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
@ -385,10 +381,10 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_ITERATOR_DEBUG_LEVEL=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUGFAST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_ITERATOR_DEBUG_LEVEL=1;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUGFAST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
@ -415,8 +411,8 @@
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>false</WholeProgramOptimization>
<LanguageStandard>stdcpp17</LanguageStandard>
@ -442,8 +438,8 @@
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LanguageStandard>stdcpp17</LanguageStandard>
@ -470,8 +466,8 @@
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>false</WholeProgramOptimization>
<LanguageStandard>stdcpp17</LanguageStandard>
@ -497,8 +493,8 @@
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_IMGUI=1;WITH_RECOMPILER=1;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)dep\msvc\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xbyak\xbyak;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\vulkan-loader\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LanguageStandard>stdcpp17</LanguageStandard>

View file

@ -31,7 +31,6 @@
<ClCompile Include="cpu_recompiler_code_generator.cpp" />
<ClCompile Include="cpu_recompiler_code_generator_generic.cpp" />
<ClCompile Include="cpu_types.cpp" />
<ClCompile Include="game_list.cpp" />
<ClCompile Include="cpu_recompiler_code_generator_aarch64.cpp" />
<ClCompile Include="sio.cpp" />
<ClCompile Include="controller.cpp" />
@ -47,7 +46,6 @@
<ClCompile Include="resources.cpp" />
<ClCompile Include="host_interface_progress_callback.cpp" />
<ClCompile Include="pgxp.cpp" />
<ClCompile Include="game_settings.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="types.h" />
@ -82,7 +80,6 @@
<ClInclude Include="cpu_recompiler_register_cache.h" />
<ClInclude Include="cpu_recompiler_thunks.h" />
<ClInclude Include="cpu_recompiler_code_generator.h" />
<ClInclude Include="game_list.h" />
<ClInclude Include="sio.h" />
<ClInclude Include="controller.h" />
<ClInclude Include="analog_controller.h" />
@ -98,6 +95,5 @@
<ClInclude Include="gte_types.h" />
<ClInclude Include="pgxp.h" />
<ClInclude Include="cpu_core_private.h" />
<ClInclude Include="game_settings.h" />
</ItemGroup>
</Project>

View file

@ -139,8 +139,7 @@ static void ExecuteImpl()
{
if (HasPendingInterrupt())
{
// TODO: Fill in m_next_instruction...
SafeReadMemoryWord(g_state.regs.pc, &g_state.next_instruction.bits);
SafeReadInstruction(g_state.regs.pc, &g_state.next_instruction.bits);
DispatchInterrupt();
next_block_key = GetNextBlockKey();
}
@ -165,6 +164,9 @@ static void ExecuteImpl()
LogCurrentState();
#endif
if (g_settings.cpu_recompiler_icache)
CheckAndUpdateICacheTags(block->icache_line_count, block->uncached_fetch_ticks);
InterpretCachedBlock<pgxp_mode>(*block);
if (g_state.pending_ticks >= g_state.downcount)
@ -247,7 +249,7 @@ void ExecuteRecompiler()
{
if (HasPendingInterrupt())
{
SafeReadMemoryWord(g_state.regs.pc, &g_state.next_instruction.bits);
SafeReadInstruction(g_state.regs.pc, &g_state.next_instruction.bits);
DispatchInterrupt();
}
@ -351,7 +353,8 @@ bool RevalidateBlock(CodeBlock* block)
{
for (const CodeBlockInstruction& cbi : block->instructions)
{
u32 new_code = Bus::ReadCacheableAddress(cbi.pc & PHYSICAL_MEMORY_ADDRESS_MASK);
u32 new_code = 0;
SafeReadInstruction(cbi.pc, &new_code);
if (cbi.instruction.bits != new_code)
{
Log_DebugPrintf("Block 0x%08X changed at PC 0x%08X - %08X to %08X - recompiling.", block->GetPC(), cbi.pc,
@ -395,16 +398,12 @@ bool CompileBlock(CodeBlock* block)
__debugbreak();
#endif
u32 last_cache_line = ICACHE_LINES;
for (;;)
{
CodeBlockInstruction cbi = {};
const PhysicalMemoryAddress phys_addr = pc & PHYSICAL_MEMORY_ADDRESS_MASK;
if (!Bus::IsCacheableAddress(phys_addr))
break;
cbi.instruction.bits = Bus::ReadCacheableAddress(phys_addr);
if (!IsInvalidInstruction(cbi.instruction))
if (!SafeReadInstruction(pc, &cbi.instruction.bits) || !IsInvalidInstruction(cbi.instruction))
break;
cbi.pc = pc;
@ -416,6 +415,18 @@ bool CompileBlock(CodeBlock* block)
cbi.has_load_delay = InstructionHasLoadDelay(cbi.instruction);
cbi.can_trap = CanInstructionTrap(cbi.instruction, InUserMode());
if (g_settings.cpu_recompiler_icache)
{
const u32 icache_line = GetICacheLine(pc);
if (icache_line != last_cache_line)
{
block->icache_line_count++;
block->icache_line_count = GetICacheFillTicks(pc);
last_cache_line = icache_line;
}
block->uncached_fetch_ticks += GetInstructionReadTicks(pc);
}
// instruction is decoded now
block->instructions.push_back(cbi);
pc += sizeof(cbi.instruction.bits);

View file

@ -61,6 +61,8 @@ struct CodeBlock
std::vector<CodeBlock*> link_predecessors;
std::vector<CodeBlock*> link_successors;
TickCount uncached_fetch_ticks = 0;
u32 icache_line_count = 0;
bool invalidated = false;
const u32 GetPC() const { return key.GetPC(); }

View file

@ -61,6 +61,7 @@ void Initialize()
void Shutdown()
{
// GTE::Shutdown();
PGXP::Shutdown();
}
void Reset()
@ -80,6 +81,8 @@ void Reset()
g_state.cop0_regs.sr.bits = 0;
g_state.cop0_regs.cause.bits = 0;
ClearICache();
GTE::Reset();
SetPC(RESET_VECTOR);
@ -117,14 +120,18 @@ bool DoState(StateWrapper& sw)
sw.Do(&g_state.load_delay_value);
sw.Do(&g_state.next_load_delay_reg);
sw.Do(&g_state.next_load_delay_value);
sw.Do(&g_state.cache_control);
sw.Do(&g_state.cache_control.bits);
sw.DoBytes(g_state.dcache.data(), g_state.dcache.size());
if (!GTE::DoState(sw))
return false;
if (sw.IsReading())
{
ClearICache();
if (g_settings.gpu_pgxp_enable)
PGXP::Initialize();
}
return !sw.HasError();
}
@ -1416,7 +1423,6 @@ void InterpretCachedBlock(const CodeBlock& block)
{
// set up the state so we've already fetched the instruction
DebugAssert(g_state.regs.pc == block.GetPC());
g_state.regs.npc = block.GetPC() + 4;
for (const CodeBlockInstruction& cbi : block.instructions)

View file

@ -19,7 +19,32 @@ enum : PhysicalMemoryAddress
DCACHE_LOCATION = UINT32_C(0x1F800000),
DCACHE_LOCATION_MASK = UINT32_C(0xFFFFFC00),
DCACHE_OFFSET_MASK = UINT32_C(0x000003FF),
DCACHE_SIZE = UINT32_C(0x00000400)
DCACHE_SIZE = UINT32_C(0x00000400),
ICACHE_SIZE = UINT32_C(0x00001000),
ICACHE_SLOTS = ICACHE_SIZE / sizeof(u32),
ICACHE_LINE_SIZE = 16,
ICACHE_LINES = ICACHE_SIZE / ICACHE_LINE_SIZE,
ICACHE_SLOTS_PER_LINE = ICACHE_SLOTS / ICACHE_LINES,
ICACHE_TAG_ADDRESS_MASK = 0xFFFFFFF0u
};
enum : u32
{
ICACHE_DISABLED_BIT = 0x01,
ICACHE_INVALD_BIT = 0x02,
};
union CacheControl
{
u32 bits;
BitField<u32, bool, 0, 1> lock_mode;
BitField<u32, bool, 1, 1> invalidate_mode;
BitField<u32, bool, 2, 1> tag_test_mode;
BitField<u32, bool, 3, 1> dcache_scratchpad;
BitField<u32, bool, 7, 1> dcache_enable;
BitField<u32, u8, 8, 2> icache_fill_size; // actually dcache? icache always fills to 16 bytes
BitField<u32, bool, 11, 1> icache_enable;
};
struct State
@ -49,13 +74,15 @@ struct State
Reg next_load_delay_reg = Reg::count;
u32 next_load_delay_value = 0;
u32 cache_control = 0;
CacheControl cache_control{ 0 };
// GTE registers are stored here so we can access them on ARM with a single instruction
GTE::Regs gte_regs = {};
// data cache (used as scratchpad)
std::array<u8, DCACHE_SIZE> dcache = {};
std::array<u32, ICACHE_LINES> icache_tags = {};
std::array<u8, ICACHE_SIZE> icache_data = {};
};
extern State g_state;
@ -64,6 +91,7 @@ void Initialize();
void Shutdown();
void Reset();
bool DoState(StateWrapper& sw);
void ClearICache();
/// Executes interpreter loop.
void Execute();

View file

@ -34,8 +34,38 @@ ALWAYS_INLINE static void DispatchInterrupt()
g_state.regs.pc);
}
// icache stuff
ALWAYS_INLINE bool IsCachedAddress(VirtualMemoryAddress address)
{
// KUSEG, KSEG0
return (address >> 29) <= 4;
}
ALWAYS_INLINE u32 GetICacheLine(VirtualMemoryAddress address)
{
return ((address >> 4) & 0xFFu);
}
ALWAYS_INLINE u32 GetICacheLineOffset(VirtualMemoryAddress address)
{
return (address & (ICACHE_LINE_SIZE - 1));
}
ALWAYS_INLINE u32 GetICacheTagForAddress(VirtualMemoryAddress address)
{
return (address & ICACHE_TAG_ADDRESS_MASK);
}
ALWAYS_INLINE bool CompareICacheTag(VirtualMemoryAddress address)
{
const u32 line = GetICacheLine(address);
return (g_state.icache_tags[line] == GetICacheTagForAddress(address));
}
TickCount GetInstructionReadTicks(VirtualMemoryAddress address);
TickCount GetICacheFillTicks(VirtualMemoryAddress address);
u32 FillICache(VirtualMemoryAddress address);
void CheckAndUpdateICacheTags(u32 line_count, TickCount uncached_ticks);
// defined in cpu_memory.cpp - memory access functions which return false if an exception was thrown.
bool FetchInstruction();
bool SafeReadInstruction(VirtualMemoryAddress addr, u32* value);
bool ReadMemoryByte(VirtualMemoryAddress addr, u8* value);
bool ReadMemoryHalfWord(VirtualMemoryAddress addr, u16* value);
bool ReadMemoryWord(VirtualMemoryAddress addr, u32* value);

View file

@ -34,7 +34,7 @@ bool CodeGenerator::CompileBlock(const CodeBlock* block, CodeBlock::HostCodePoin
const CodeBlockInstruction* cbi = m_block_start;
while (cbi != m_block_end)
{
#ifndef Y_BUILD_CONFIG_RELEASE
#ifdef _DEBUG
SmallString disasm;
DisassembleInstruction(&disasm, cbi->pc, cbi->instruction.bits, nullptr);
Log_DebugPrintf("Compiling instruction '%s'", disasm.GetCharArray());
@ -840,6 +840,9 @@ void CodeGenerator::BlockPrologue()
{
EmitStoreCPUStructField(offsetof(State, exception_raised), Value::FromConstantU8(0));
if (m_block->uncached_fetch_ticks > 0)
EmitICacheCheckAndUpdate();
// we don't know the state of the last block, so assume load delays might be in progress
// TODO: Pull load delay into register cache
m_current_instruction_in_branch_delay_slot_dirty = true;

View file

@ -61,6 +61,7 @@ public:
void EmitFlushInterpreterLoadDelay();
void EmitMoveNextInterpreterLoadDelay();
void EmitCancelInterpreterLoadDelayForReg(Reg reg);
void EmitICacheCheckAndUpdate();
void EmitLoadCPUStructField(HostReg host_reg, RegSize size, u32 offset);
void EmitStoreCPUStructField(u32 offset, const Value& value);
void EmitAddCPUStructField(u32 offset, const Value& value);

View file

@ -18,6 +18,7 @@ constexpr HostReg RARG1 = 0;
constexpr HostReg RARG2 = 1;
constexpr HostReg RARG3 = 2;
constexpr HostReg RARG4 = 3;
constexpr HostReg RSCRATCH = 8;
constexpr u64 FUNCTION_CALL_STACK_ALIGNMENT = 16;
constexpr u64 FUNCTION_CALL_SHADOW_SPACE = 32;
constexpr u64 FUNCTION_CALLEE_SAVED_SPACE_RESERVE = 80; // 8 registers
@ -125,7 +126,7 @@ void CodeGenerator::InitHostRegs()
// TODO: function calls mess up the parameter registers if we use them.. fix it
// allocate nonvolatile before volatile
m_register_cache.SetHostRegAllocationOrder(
{19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17});
{19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17});
m_register_cache.SetCallerSavedHostRegs({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17});
m_register_cache.SetCalleeSavedHostRegs({19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30});
m_register_cache.SetCPUPtrHostReg(RCPUPTR);
@ -977,8 +978,8 @@ void CodeGenerator::EmitFunctionCallPtr(Value* return_value, const void* ptr)
const bool use_blr = !vixl::IsInt26(displacement);
if (use_blr)
{
m_emit->Mov(GetHostReg64(RRETURN), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RRETURN));
m_emit->Mov(GetHostReg64(RSCRATCH), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RSCRATCH));
}
else
{
@ -1012,8 +1013,8 @@ void CodeGenerator::EmitFunctionCallPtr(Value* return_value, const void* ptr, co
const bool use_blr = !vixl::IsInt26(displacement);
if (use_blr)
{
m_emit->Mov(GetHostReg64(RRETURN), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RRETURN));
m_emit->Mov(GetHostReg64(RSCRATCH), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RSCRATCH));
}
else
{
@ -1048,8 +1049,8 @@ void CodeGenerator::EmitFunctionCallPtr(Value* return_value, const void* ptr, co
const bool use_blr = !vixl::IsInt26(displacement);
if (use_blr)
{
m_emit->Mov(GetHostReg64(RRETURN), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RRETURN));
m_emit->Mov(GetHostReg64(RSCRATCH), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RSCRATCH));
}
else
{
@ -1086,8 +1087,8 @@ void CodeGenerator::EmitFunctionCallPtr(Value* return_value, const void* ptr, co
const bool use_blr = !vixl::IsInt26(displacement);
if (use_blr)
{
m_emit->Mov(GetHostReg64(RRETURN), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RRETURN));
m_emit->Mov(GetHostReg64(RSCRATCH), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RSCRATCH));
}
else
{
@ -1125,8 +1126,8 @@ void CodeGenerator::EmitFunctionCallPtr(Value* return_value, const void* ptr, co
const bool use_blr = !vixl::IsInt26(displacement);
if (use_blr)
{
m_emit->Mov(GetHostReg64(RRETURN), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RRETURN));
m_emit->Mov(GetHostReg64(RSCRATCH), reinterpret_cast<uintptr_t>(ptr));
m_emit->Blr(GetHostReg64(RSCRATCH));
}
else
{

View file

@ -1,4 +1,5 @@
#include "cpu_core.h"
#include "cpu_core_private.h"
#include "cpu_recompiler_code_generator.h"
namespace CPU::Recompiler {
@ -22,4 +23,48 @@ void CodeGenerator::EmitStoreInterpreterLoadDelay(Reg reg, const Value& value)
m_load_delay_dirty = true;
}
#ifndef CPU_X64
void CodeGenerator::EmitICacheCheckAndUpdate()
{
Value pc = CalculatePC();
Value temp = m_register_cache.AllocateScratch(RegSize_32);
m_register_cache.InhibitAllocation();
EmitShr(temp.GetHostRegister(), pc.GetHostRegister(), RegSize_32, Value::FromConstantU32(29));
LabelType is_cached;
LabelType ready_to_execute;
EmitConditionalBranch(Condition::LessEqual, false, temp.GetHostRegister(), Value::FromConstantU32(4), &is_cached);
EmitAddCPUStructField(offsetof(State, pending_ticks),
Value::FromConstantU32(static_cast<u32>(m_block->uncached_fetch_ticks)));
EmitBranch(&ready_to_execute);
EmitBindLabel(&is_cached);
// cached path
EmitAnd(pc.GetHostRegister(), pc.GetHostRegister(), Value::FromConstantU32(ICACHE_TAG_ADDRESS_MASK));
VirtualMemoryAddress current_address = (m_block->instructions[0].pc & ICACHE_TAG_ADDRESS_MASK);
for (u32 i = 0; i < m_block->icache_line_count; i++, current_address += ICACHE_LINE_SIZE)
{
const TickCount fill_ticks = GetICacheFillTicks(current_address);
if (fill_ticks <= 0)
continue;
const u32 line = GetICacheLine(current_address);
const u32 offset = offsetof(State, icache_tags) + (line * sizeof(u32));
LabelType cache_hit;
EmitLoadCPUStructField(temp.GetHostRegister(), RegSize_32, offset);
EmitConditionalBranch(Condition::Equal, false, temp.GetHostRegister(), pc, &cache_hit);
EmitAddCPUStructField(offsetof(State, pending_ticks), Value::FromConstantU32(static_cast<u32>(fill_ticks)));
EmitStoreCPUStructField(offset, pc);
EmitBindLabel(&cache_hit);
EmitAdd(pc.GetHostRegister(), pc.GetHostRegister(), Value::FromConstantU32(ICACHE_LINE_SIZE), false);
}
EmitBindLabel(&ready_to_execute);
m_register_cache.UnunhibitAllocation();
}
#endif
} // namespace CPU::Recompiler

View file

@ -2187,6 +2187,52 @@ void CodeGenerator::EmitCancelInterpreterLoadDelayForReg(Reg reg)
m_emit->L(skip_cancel);
}
void CodeGenerator::EmitICacheCheckAndUpdate()
{
Value pc = CalculatePC();
Value seg = m_register_cache.AllocateScratch(RegSize_32);
m_register_cache.InhibitAllocation();
m_emit->mov(GetHostReg32(seg), GetHostReg32(pc));
m_emit->shr(GetHostReg32(seg), 29);
Xbyak::Label is_cached;
m_emit->cmp(GetHostReg32(seg), 4);
m_emit->jle(is_cached);
// uncached
Xbyak::Label done;
m_emit->add(m_emit->dword[GetCPUPtrReg() + offsetof(State, pending_ticks)],
static_cast<u32>(m_block->uncached_fetch_ticks));
m_emit->jmp(done, Xbyak::CodeGenerator::T_NEAR);
// cached
m_emit->L(is_cached);
m_emit->and_(GetHostReg32(pc), ICACHE_TAG_ADDRESS_MASK);
VirtualMemoryAddress current_address = (m_block->instructions[0].pc & ICACHE_TAG_ADDRESS_MASK);
for (u32 i = 0; i < m_block->icache_line_count; i++, current_address += ICACHE_LINE_SIZE)
{
const TickCount fill_ticks = GetICacheFillTicks(current_address);
if (fill_ticks <= 0)
continue;
const u32 line = GetICacheLine(current_address);
const u32 offset = offsetof(State, icache_tags) + (line * sizeof(u32));
Xbyak::Label cache_hit;
m_emit->cmp(GetHostReg32(pc), m_emit->dword[GetCPUPtrReg() + offset]);
m_emit->je(cache_hit);
m_emit->mov(m_emit->dword[GetCPUPtrReg() + offset], GetHostReg32(pc));
m_emit->add(m_emit->dword[GetCPUPtrReg() + offsetof(State, pending_ticks)], static_cast<u32>(fill_ticks));
m_emit->L(cache_hit);
m_emit->add(GetHostReg32(pc), ICACHE_LINE_SIZE);
}
m_emit->L(done);
m_register_cache.UnunhibitAllocation();
}
void CodeGenerator::EmitBranch(const void* address, bool allow_scratch)
{
const s64 jump_distance =

View file

@ -14,6 +14,7 @@ namespace Recompiler::Thunks {
//////////////////////////////////////////////////////////////////////////
bool InterpretInstruction();
bool InterpretInstructionPGXP();
void CheckAndUpdateICache(u32 pc, u32 line_count);
// Memory access functions for the JIT - MSB is set on exception.
u64 ReadMemoryByte(u32 address);

View file

@ -1,6 +1,7 @@
#include "digital_controller.h"
#include "common/assert.h"
#include "common/state_wrapper.h"
#include "host_interface.h"
DigitalController::DigitalController() = default;
@ -155,13 +156,20 @@ Controller::AxisList DigitalController::StaticGetAxisNames()
Controller::ButtonList DigitalController::StaticGetButtonNames()
{
#define B(n) \
{ \
#n, static_cast < s32>(Button::n) \
}
return {B(Up), B(Down), B(Left), B(Right), B(Select), B(Start), B(Triangle),
B(Cross), B(Circle), B(Square), B(L1), B(L2), B(R1), B(R2)};
#undef B
return {{TRANSLATABLE("DigitalController", "Up"), static_cast<s32>(Button::Up)},
{TRANSLATABLE("DigitalController", "Down"), static_cast<s32>(Button::Down)},
{TRANSLATABLE("DigitalController", "Left"), static_cast<s32>(Button::Left)},
{TRANSLATABLE("DigitalController", "Right"), static_cast<s32>(Button::Right)},
{TRANSLATABLE("DigitalController", "Select"), static_cast<s32>(Button::Select)},
{TRANSLATABLE("DigitalController", "Start"), static_cast<s32>(Button::Start)},
{TRANSLATABLE("DigitalController", "Triangle"), static_cast<s32>(Button::Triangle)},
{TRANSLATABLE("DigitalController", "Cross"), static_cast<s32>(Button::Cross)},
{TRANSLATABLE("DigitalController", "Circle"), static_cast<s32>(Button::Circle)},
{TRANSLATABLE("DigitalController", "Square"), static_cast<s32>(Button::Square)},
{TRANSLATABLE("DigitalController", "L1"), static_cast<s32>(Button::L1)},
{TRANSLATABLE("DigitalController", "L2"), static_cast<s32>(Button::L2)},
{TRANSLATABLE("DigitalController", "R1"), static_cast<s32>(Button::R1)},
{TRANSLATABLE("DigitalController", "R2"), static_cast<s32>(Button::R2)}};
}
u32 DigitalController::StaticGetVibrationMotorCount()

View file

@ -10,7 +10,9 @@
#include "system.h"
#include "timers.h"
#include <cmath>
#include <imgui.h>
#ifdef WITH_IMGUI
#include "imgui.h"
#endif
Log_SetChannel(GPU);
std::unique_ptr<GPU> g_gpu;
@ -1341,6 +1343,7 @@ bool GPU::DumpVRAMToFile(const char* filename, u32 width, u32 height, u32 stride
void GPU::DrawDebugStateWindow()
{
#ifdef WITH_IMGUI
const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x;
ImGui::SetNextWindowSize(ImVec2(450.0f * framebuffer_scale, 550.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
@ -1451,6 +1454,7 @@ void GPU::DrawDebugStateWindow()
}
ImGui::End();
#endif
}
void GPU::DrawRendererStats(bool is_idle_frame) {}

View file

@ -3,13 +3,15 @@
#include "common/log.h"
#include "common/state_wrapper.h"
#include "cpu_core.h"
#include "imgui.h"
#include "pgxp.h"
#include "settings.h"
#include "system.h"
#include <cmath>
#include <sstream>
#include <tuple>
#ifdef WITH_IMGUI
#include "imgui.h"
#endif
Log_SetChannel(GPU_HW);
template<typename T>
@ -1000,6 +1002,7 @@ void GPU_HW::DrawRendererStats(bool is_idle_frame)
m_renderer_stats = {};
}
#ifdef WITH_IMGUI
if (ImGui::CollapsingHeader("Renderer Statistics", ImGuiTreeNodeFlags_DefaultOpen))
{
static const ImVec4 active_color{1.0f, 1.0f, 1.0f, 1.0f};
@ -1068,4 +1071,5 @@ void GPU_HW::DrawRendererStats(bool is_idle_frame)
ImGui::Columns(1);
}
#endif
}

View file

@ -594,7 +594,7 @@ std::string GPU_HW_ShaderGen::GenerateBatchFragmentShader(GPU_HW::BatchRenderMod
WriteHeader(ss);
DefineMacro(ss, "TRANSPARENCY", transparency != GPU_HW::BatchRenderMode::TransparencyDisabled);
DefineMacro(ss, "TRANSPARENCY_ONLY_OPAQUE", transparency == GPU_HW::BatchRenderMode::OnlyOpaque);
DefineMacro(ss, "TRANSPARENCY_ONLY_TRANSPARENCY", transparency == GPU_HW::BatchRenderMode::OnlyTransparent);
DefineMacro(ss, "TRANSPARENCY_ONLY_TRANSPARENT", transparency == GPU_HW::BatchRenderMode::OnlyTransparent);
DefineMacro(ss, "TEXTURED", textured);
DefineMacro(ss, "PALETTE",
actual_texture_mode == GPU::TextureMode::Palette4Bit ||
@ -889,19 +889,24 @@ void BilinearSampleFromVRAM(uint4 texpage, float2 coords, float4 uv_limits,
}
else
{
#if TRANSPARENCY_ONLY_TRANSPARENCY
#if TRANSPARENCY_ONLY_TRANSPARENT
discard;
#endif
#if TRANSPARENCY_ONLY_OPAQUE
// We don't output the second color here because it's not used.
// We don't output the second color here because it's not used (except for filtering).
o_col0 = float4(color, oalpha);
#elif USE_DUAL_SOURCE
#if USE_DUAL_SOURCE
o_col1 = float4(0.0, 0.0, 0.0, 1.0 - ialpha);
#endif
#else
#if USE_DUAL_SOURCE
o_col0 = float4(color, oalpha);
o_col1 = float4(0.0, 0.0, 0.0, 1.0 - ialpha);
#else
o_col0 = float4(color, 1.0 - ialpha);
#endif
#endif
o_depth = oalpha * v_pos.z;
}

View file

@ -99,13 +99,6 @@ void GPU_HW_Vulkan::ResetGraphicsAPIState()
GPU_HW::ResetGraphicsAPIState();
EndRenderPass();
// vram texture is probably going to be displayed now
if (!IsDisplayDisabled())
{
m_vram_texture.TransitionToLayout(g_vulkan_context->GetCurrentCommandBuffer(),
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
}
}
void GPU_HW_Vulkan::RestoreGraphicsAPIState()
@ -394,7 +387,7 @@ bool GPU_HW_Vulkan::CreateFramebuffer()
!m_vram_readback_texture.Create(VRAM_WIDTH, VRAM_HEIGHT, 1, 1, texture_format, samples, VK_IMAGE_VIEW_TYPE_2D,
VK_IMAGE_TILING_OPTIMAL,
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT) ||
!m_vram_readback_staging_texture.Create(Vulkan::StagingBuffer::Type::Readback, texture_format, VRAM_WIDTH,
!m_vram_readback_staging_texture.Create(Vulkan::StagingBuffer::Type::Readback, texture_format, VRAM_WIDTH / 2,
VRAM_HEIGHT))
{
return false;
@ -683,7 +676,9 @@ bool GPU_HW_Vulkan::CompilePipelines()
gpbuilder.SetBlendAttachment(
0, true, VK_BLEND_FACTOR_ONE,
m_supports_dual_source_blend ? VK_BLEND_FACTOR_SRC1_ALPHA : VK_BLEND_FACTOR_SRC_ALPHA,
(static_cast<TransparencyMode>(transparency_mode) == TransparencyMode::BackgroundMinusForeground) ?
(static_cast<TransparencyMode>(transparency_mode) == TransparencyMode::BackgroundMinusForeground &&
static_cast<BatchRenderMode>(render_mode) != BatchRenderMode::TransparencyDisabled &&
static_cast<BatchRenderMode>(render_mode) != BatchRenderMode::OnlyOpaque) ?
VK_BLEND_OP_REVERSE_SUBTRACT :
VK_BLEND_OP_ADD,
VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_ZERO, VK_BLEND_OP_ADD);
@ -926,9 +921,12 @@ void GPU_HW_Vulkan::ClearDisplay()
void GPU_HW_Vulkan::UpdateDisplay()
{
GPU_HW::UpdateDisplay();
EndRenderPass();
if (g_settings.debugging.show_vram)
{
m_vram_texture.TransitionToLayout(g_vulkan_context->GetCurrentCommandBuffer(),
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
m_host_display->SetDisplayTexture(&m_vram_texture, m_vram_texture.GetWidth(), m_vram_texture.GetHeight(), 0, 0,
m_vram_texture.GetWidth(), m_vram_texture.GetHeight());
m_host_display->SetDisplayParameters(VRAM_WIDTH, VRAM_HEIGHT, 0, 0, VRAM_WIDTH, VRAM_HEIGHT,
@ -954,6 +952,8 @@ void GPU_HW_Vulkan::UpdateDisplay()
(scaled_vram_offset_x + scaled_display_width) <= m_vram_texture.GetWidth() &&
(scaled_vram_offset_y + scaled_display_height) <= m_vram_texture.GetHeight())
{
m_vram_texture.TransitionToLayout(g_vulkan_context->GetCurrentCommandBuffer(),
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
m_host_display->SetDisplayTexture(&m_vram_texture, m_vram_texture.GetWidth(), m_vram_texture.GetHeight(),
scaled_vram_offset_x, scaled_vram_offset_y, scaled_display_width,
scaled_display_height);
@ -1017,7 +1017,8 @@ void GPU_HW_Vulkan::ReadVRAM(u32 x, u32 y, u32 width, u32 height)
// Work around Mali driver bug: set full framebuffer size for render area. The GPU crashes with a page fault if we use
// the actual size we're rendering to...
BeginRenderPass(m_vram_readback_render_pass, m_vram_readback_framebuffer, 0, 0, VRAM_WIDTH, VRAM_HEIGHT);
BeginRenderPass(m_vram_readback_render_pass, m_vram_readback_framebuffer, 0, 0, m_vram_readback_texture.GetWidth(),
m_vram_readback_texture.GetHeight());
// Encode the 24-bit texture as 16-bit.
const u32 uniforms[4] = {copy_rect.left, copy_rect.top, copy_rect.GetWidth(), copy_rect.GetHeight()};

View file

@ -20,7 +20,6 @@
#include <cmath>
#include <cstring>
#include <cwchar>
#include <imgui.h>
#include <stdlib.h>
Log_SetChannel(HostInterface);
@ -362,6 +361,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
si.SetStringValue("CPU", "ExecutionMode", Settings::GetCPUExecutionModeName(Settings::DEFAULT_CPU_EXECUTION_MODE));
si.SetBoolValue("CPU", "RecompilerMemoryExceptions", false);
si.SetBoolValue("CPU", "ICache", false);
si.SetStringValue("GPU", "Renderer", Settings::GetRendererName(Settings::DEFAULT_GPU_RENDERER));
si.SetIntValue("GPU", "ResolutionScale", 1);
@ -452,7 +452,8 @@ void HostInterface::FixIncompatibleSettings(bool display_osd_messages)
{
if (display_osd_messages)
{
AddOSDMessage(TranslateStdString("OSDMessage", "PGXP is incompatible with the software renderer, disabling PGXP."), 10.0f);
AddOSDMessage(
TranslateStdString("OSDMessage", "PGXP is incompatible with the software renderer, disabling PGXP."), 10.0f);
}
g_settings.gpu_pgxp_enable = false;
}
@ -510,6 +511,8 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
AddFormattedOSDMessage(5.0f, "Switching to %s CPU execution mode.",
Settings::GetCPUExecutionModeName(g_settings.cpu_execution_mode));
CPU::CodeCache::SetUseRecompiler(g_settings.cpu_execution_mode == CPUExecutionMode::Recompiler);
CPU::CodeCache::Flush();
CPU::ClearICache();
}
if (g_settings.cpu_execution_mode == CPUExecutionMode::Recompiler &&
@ -520,6 +523,15 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
CPU::CodeCache::Flush();
}
if (g_settings.cpu_execution_mode != CPUExecutionMode::Interpreter &&
g_settings.cpu_recompiler_icache != old_settings.cpu_recompiler_icache)
{
AddFormattedOSDMessage(5.0f, "CPU ICache %s, flushing all blocks.",
g_settings.cpu_recompiler_icache ? "enabled" : "disabled");
CPU::CodeCache::Flush();
CPU::ClearICache();
}
m_audio_stream->SetOutputVolume(g_settings.audio_output_muted ? 0 : g_settings.audio_output_volume);
if (g_settings.gpu_resolution_scale != old_settings.gpu_resolution_scale ||
@ -549,6 +561,9 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
CPU::CodeCache::Flush();
}
if (old_settings.gpu_pgxp_enable)
PGXP::Shutdown();
if (g_settings.gpu_pgxp_enable)
PGXP::Initialize();
}

View file

@ -5,7 +5,9 @@
#include "dma.h"
#include "interrupt_controller.h"
#include "system.h"
#include <imgui.h>
#ifdef WITH_IMGUI
#include "imgui.h"
#endif
Log_SetChannel(MDEC);
MDEC g_mdec;
@ -701,6 +703,7 @@ void MDEC::HandleSetScaleCommand()
void MDEC::DrawDebugStateWindow()
{
#ifdef WITH_IMGUI
const float framebuffer_scale = ImGui::GetIO().DisplayFramebufferScale.x;
ImGui::SetNextWindowSize(ImVec2(300.0f * framebuffer_scale, 350.0f * framebuffer_scale), ImGuiCond_FirstUseEver);
@ -738,4 +741,5 @@ void MDEC::DrawDebugStateWindow()
}
ImGui::End();
#endif
}

View file

@ -209,12 +209,9 @@ Controller::AxisList NamcoGunCon::StaticGetAxisNames()
Controller::ButtonList NamcoGunCon::StaticGetButtonNames()
{
#define B(n) \
{ \
#n, static_cast < s32>(Button::n) \
}
return {B(Trigger), B(A), B(B)};
#undef B
return {{TRANSLATABLE("NamcoGunCon", "Trigger"), static_cast<s32>(Button::Trigger)},
{TRANSLATABLE("NamcoGunCon", "A"), static_cast<s32>(Button::A)},
{TRANSLATABLE("NamcoGunCon", "B"), static_cast<s32>(Button::B)}};
}
u32 NamcoGunCon::StaticGetVibrationMotorCount()

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