early-access version 2896
This commit is contained in:
parent
3a1b8212aa
commit
d347b68f4a
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2895.
|
This is the source code for early-access 2896.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -195,14 +195,16 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
|||||||
if (page_table) {
|
if (page_table) {
|
||||||
config.page_table = reinterpret_cast<std::array<std::uint8_t*, NUM_PAGE_TABLE_ENTRIES>*>(
|
config.page_table = reinterpret_cast<std::array<std::uint8_t*, NUM_PAGE_TABLE_ENTRIES>*>(
|
||||||
page_table->pointers.data());
|
page_table->pointers.data());
|
||||||
|
config.absolute_offset_page_table = true;
|
||||||
|
config.page_table_pointer_mask_bits = Common::PageTable::ATTRIBUTE_BITS;
|
||||||
|
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||||
|
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
||||||
|
|
||||||
config.fastmem_pointer = page_table->fastmem_arena;
|
config.fastmem_pointer = page_table->fastmem_arena;
|
||||||
|
|
||||||
|
config.fastmem_exclusive_access = config.fastmem_pointer != nullptr;
|
||||||
|
config.recompile_on_exclusive_fastmem_failure = true;
|
||||||
}
|
}
|
||||||
config.absolute_offset_page_table = true;
|
|
||||||
config.page_table_pointer_mask_bits = Common::PageTable::ATTRIBUTE_BITS;
|
|
||||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
|
||||||
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
|
||||||
config.fastmem_exclusive_access = true;
|
|
||||||
config.recompile_on_exclusive_fastmem_failure = true;
|
|
||||||
|
|
||||||
// Multi-process state
|
// Multi-process state
|
||||||
config.processor_id = core_index;
|
config.processor_id = core_index;
|
||||||
@ -254,6 +256,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
|||||||
}
|
}
|
||||||
if (!Settings::values.cpuopt_fastmem) {
|
if (!Settings::values.cpuopt_fastmem) {
|
||||||
config.fastmem_pointer = nullptr;
|
config.fastmem_pointer = nullptr;
|
||||||
|
config.fastmem_exclusive_access = false;
|
||||||
}
|
}
|
||||||
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
||||||
config.fastmem_exclusive_access = false;
|
config.fastmem_exclusive_access = false;
|
||||||
|
@ -250,7 +250,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
|||||||
config.fastmem_address_space_bits = address_space_bits;
|
config.fastmem_address_space_bits = address_space_bits;
|
||||||
config.silently_mirror_fastmem = false;
|
config.silently_mirror_fastmem = false;
|
||||||
|
|
||||||
config.fastmem_exclusive_access = true;
|
config.fastmem_exclusive_access = config.fastmem_pointer != nullptr;
|
||||||
config.recompile_on_exclusive_fastmem_failure = true;
|
config.recompile_on_exclusive_fastmem_failure = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,6 +314,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
|||||||
}
|
}
|
||||||
if (!Settings::values.cpuopt_fastmem) {
|
if (!Settings::values.cpuopt_fastmem) {
|
||||||
config.fastmem_pointer = nullptr;
|
config.fastmem_pointer = nullptr;
|
||||||
|
config.fastmem_exclusive_access = false;
|
||||||
}
|
}
|
||||||
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
||||||
config.fastmem_exclusive_access = false;
|
config.fastmem_exclusive_access = false;
|
||||||
|
@ -86,54 +86,16 @@ void EmulatedController::ReloadFromSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
controller.colors_state.fullkey = {
|
controller.colors_state.fullkey = {
|
||||||
.body =
|
.body = GetNpadColor(player.body_color_left),
|
||||||
{
|
.button = GetNpadColor(player.button_color_left),
|
||||||
.b = static_cast<u8>((player.body_color_left >> 16) & 0xFF),
|
|
||||||
.g = static_cast<u8>((player.body_color_left >> 8) & 0xFF),
|
|
||||||
.r = static_cast<u8>(player.body_color_left & 0xFF),
|
|
||||||
.a = 0xff,
|
|
||||||
},
|
|
||||||
.button =
|
|
||||||
{
|
|
||||||
.b = static_cast<u8>((player.button_color_left >> 16) & 0xFF),
|
|
||||||
.g = static_cast<u8>((player.button_color_left >> 8) & 0xFF),
|
|
||||||
.r = static_cast<u8>(player.button_color_left & 0xFF),
|
|
||||||
.a = 0xff,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
controller.colors_state.left = {
|
controller.colors_state.left = {
|
||||||
.body =
|
.body = GetNpadColor(player.body_color_left),
|
||||||
{
|
.button = GetNpadColor(player.button_color_left),
|
||||||
.b = static_cast<u8>((player.body_color_left >> 16) & 0xFF),
|
|
||||||
.g = static_cast<u8>((player.body_color_left >> 8) & 0xFF),
|
|
||||||
.r = static_cast<u8>(player.body_color_left & 0xFF),
|
|
||||||
.a = 0xff,
|
|
||||||
},
|
|
||||||
.button =
|
|
||||||
{
|
|
||||||
.b = static_cast<u8>((player.button_color_left >> 16) & 0xFF),
|
|
||||||
.g = static_cast<u8>((player.button_color_left >> 8) & 0xFF),
|
|
||||||
.r = static_cast<u8>(player.button_color_left & 0xFF),
|
|
||||||
.a = 0xff,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
controller.colors_state.left = {
|
||||||
controller.colors_state.right = {
|
.body = GetNpadColor(player.body_color_right),
|
||||||
.body =
|
.button = GetNpadColor(player.button_color_right),
|
||||||
{
|
|
||||||
.b = static_cast<u8>((player.body_color_right >> 16) & 0xFF),
|
|
||||||
.g = static_cast<u8>((player.body_color_right >> 8) & 0xFF),
|
|
||||||
.r = static_cast<u8>(player.body_color_right & 0xFF),
|
|
||||||
.a = 0xff,
|
|
||||||
},
|
|
||||||
.button =
|
|
||||||
{
|
|
||||||
.b = static_cast<u8>((player.button_color_right >> 16) & 0xFF),
|
|
||||||
.g = static_cast<u8>((player.button_color_right >> 8) & 0xFF),
|
|
||||||
.r = static_cast<u8>(player.button_color_right & 0xFF),
|
|
||||||
.a = 0xff,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Other or debug controller should always be a pro controller
|
// Other or debug controller should always be a pro controller
|
||||||
@ -1386,6 +1348,15 @@ const CameraState& EmulatedController::GetCamera() const {
|
|||||||
return controller.camera_state;
|
return controller.camera_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NpadColor EmulatedController::GetNpadColor(u32 color) {
|
||||||
|
return {
|
||||||
|
.r = static_cast<u8>((color >> 16) & 0xFF),
|
||||||
|
.g = static_cast<u8>((color >> 8) & 0xFF),
|
||||||
|
.b = static_cast<u8>(color & 0xFF),
|
||||||
|
.a = 0xff,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void EmulatedController::TriggerOnChange(ControllerTriggerType type, bool is_npad_service_update) {
|
void EmulatedController::TriggerOnChange(ControllerTriggerType type, bool is_npad_service_update) {
|
||||||
std::scoped_lock lock{callback_mutex};
|
std::scoped_lock lock{callback_mutex};
|
||||||
for (const auto& poller_pair : callback_list) {
|
for (const auto& poller_pair : callback_list) {
|
||||||
|
@ -424,6 +424,13 @@ private:
|
|||||||
*/
|
*/
|
||||||
void SetCamera(const Common::Input::CallbackStatus& callback);
|
void SetCamera(const Common::Input::CallbackStatus& callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a color format from bgra to rgba
|
||||||
|
* @param color in bgra format
|
||||||
|
* @return NpadColor in rgba format
|
||||||
|
*/
|
||||||
|
NpadColor GetNpadColor(u32 color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggers a callback that something has changed on the controller status
|
* Triggers a callback that something has changed on the controller status
|
||||||
* @param type Input type of the event to trigger
|
* @param type Input type of the event to trigger
|
||||||
|
@ -328,9 +328,9 @@ struct TouchState {
|
|||||||
static_assert(sizeof(TouchState) == 0x28, "Touchstate is an invalid size");
|
static_assert(sizeof(TouchState) == 0x28, "Touchstate is an invalid size");
|
||||||
|
|
||||||
struct NpadColor {
|
struct NpadColor {
|
||||||
u8 b{};
|
|
||||||
u8 g{};
|
|
||||||
u8 r{};
|
u8 r{};
|
||||||
|
u8 g{};
|
||||||
|
u8 b{};
|
||||||
u8 a{};
|
u8 a{};
|
||||||
};
|
};
|
||||||
static_assert(sizeof(NpadColor) == 4, "NpadColor is an invalid size");
|
static_assert(sizeof(NpadColor) == 4, "NpadColor is an invalid size");
|
||||||
|
@ -33,10 +33,11 @@ VkSurfaceFormatKHR ChooseSwapSurfaceFormat(vk::Span<VkSurfaceFormatKHR> formats)
|
|||||||
}
|
}
|
||||||
|
|
||||||
VkPresentModeKHR ChooseSwapPresentMode(vk::Span<VkPresentModeKHR> modes) {
|
VkPresentModeKHR ChooseSwapPresentMode(vk::Span<VkPresentModeKHR> modes) {
|
||||||
// Mailbox doesn't lock the application like fifo (vsync), prefer it
|
// Mailbox (triple buffering) doesn't lock the application like fifo (vsync),
|
||||||
|
// prefer it if vsync option is not selected
|
||||||
const auto found_mailbox = std::find(modes.begin(), modes.end(), VK_PRESENT_MODE_MAILBOX_KHR);
|
const auto found_mailbox = std::find(modes.begin(), modes.end(), VK_PRESENT_MODE_MAILBOX_KHR);
|
||||||
if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Borderless &&
|
if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Borderless &&
|
||||||
found_mailbox != modes.end()) {
|
found_mailbox != modes.end() && !Settings::values.use_vsync.GetValue()) {
|
||||||
return VK_PRESENT_MODE_MAILBOX_KHR;
|
return VK_PRESENT_MODE_MAILBOX_KHR;
|
||||||
}
|
}
|
||||||
if (!Settings::values.use_speed_limit.GetValue()) {
|
if (!Settings::values.use_speed_limit.GetValue()) {
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
<string>VSync prevents the screen from tearing, but some graphics cards have lower performance with VSync enabled. Keep it enabled if you don't notice a performance difference.</string>
|
<string>VSync prevents the screen from tearing, but some graphics cards have lower performance with VSync enabled. Keep it enabled if you don't notice a performance difference.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use VSync (OpenGL only)</string>
|
<string>Use VSync</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user