From b866bff3f26da03f3595b1bfbd7f18b31d0b4aa7 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 16 Jul 2022 23:30:32 +0200 Subject: [PATCH] early-access version 2839 --- README.md | 2 +- src/core/arm/dynarmic/arm_dynarmic_32.cpp | 6 +++--- src/core/arm/dynarmic/arm_dynarmic_64.cpp | 6 +++--- src/core/hle/service/nvflinger/nvflinger.cpp | 5 ++++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c2e0299ce..7a67689ea 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2838. +This is the source code for early-access 2839. ## Legal Notice diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index a3d84a142..99fab6384 100755 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -52,7 +52,7 @@ public: if (!memory.IsValidVirtualAddressRange(vaddr, sizeof(u32))) { return std::nullopt; } - return MemoryRead32(vaddr); + return memory.Read32(vaddr); } void MemoryWrite8(u32 vaddr, u8 value) override { @@ -97,7 +97,7 @@ public: parent.LogBacktrace(); LOG_ERROR(Core_ARM, "Unimplemented instruction @ 0x{:X} for {} instructions (instr = {:08X})", pc, - num_instructions, MemoryRead32(pc)); + num_instructions, memory.Read32(pc)); } void ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) override { @@ -115,7 +115,7 @@ public: parent.LogBacktrace(); LOG_CRITICAL(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X}, thumb = {})", - exception, pc, MemoryRead32(pc), parent.IsInThumbMode()); + exception, pc, memory.Read32(pc), parent.IsInThumbMode()); } } diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index 0cb78a30d..a91b587ce 100755 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp @@ -56,7 +56,7 @@ public: if (!memory.IsValidVirtualAddressRange(vaddr, sizeof(u32))) { return std::nullopt; } - return MemoryRead32(vaddr); + return memory.Read32(vaddr); } void MemoryWrite8(u64 vaddr, u8 value) override { @@ -111,7 +111,7 @@ public: parent.LogBacktrace(); LOG_ERROR(Core_ARM, "Unimplemented instruction @ 0x{:X} for {} instructions (instr = {:08X})", pc, - num_instructions, MemoryRead32(pc)); + num_instructions, memory.Read32(pc)); } void InstructionCacheOperationRaised(Dynarmic::A64::InstructionCacheOperation op, @@ -156,7 +156,7 @@ public: parent.LogBacktrace(); LOG_CRITICAL(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})", - static_cast(exception), pc, MemoryRead32(pc)); + static_cast(exception), pc, memory.Read32(pc)); } } diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index d4f9a2d2b..883ee0e95 100755 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -299,7 +299,10 @@ s64 NVFlinger::GetNextTicks() const { speed_scale = 0.01f; } } - return static_cast(((1000000000 * (1LL << swap_interval)) / max_hertz) * speed_scale); + + const auto next_ticks = ((1000000000 * (1LL << swap_interval)) / max_hertz); + + return static_cast(speed_scale * static_cast(next_ticks)); } } // namespace Service::NVFlinger