From 950150dc52c6501f4f0575376faeb96239dd3fbc Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Fri, 1 Jan 2021 17:39:08 +0100 Subject: [PATCH] early-access version 1276 --- README.md | 2 +- dist/yuzu.desktop | 4 ++-- src/common/CMakeLists.txt | 2 -- src/common/page_table.h | 18 ------------------ src/core/memory.cpp | 30 ------------------------------ src/core/memory.h | 34 ---------------------------------- src/tests/CMakeLists.txt | 2 -- 7 files changed, 3 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index 376a2cf35..a349b6aee 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1275. +This is the source code for early-access 1276. ## Legal Notice diff --git a/dist/yuzu.desktop b/dist/yuzu.desktop index 1f26ef1a4..105080c73 100755 --- a/dist/yuzu.desktop +++ b/dist/yuzu.desktop @@ -6,7 +6,7 @@ GenericName=Switch Emulator Comment=Nintendo Switch video game console emulator Icon=yuzu TryExec=yuzu -Exec=env QT_QPA_PLATFORMTHEME=gtk3 yuzu %f +Exec=yuzu %f Categories=Game;Emulator;Qt; MimeType=application/x-nx-nro;application/x-nx-nso; -Keywords=Switch;Nintendo; +Keywords=Switch;Nintendo; \ No newline at end of file diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 64b8cf883..5d781cd77 100755 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -136,8 +136,6 @@ add_library(common STATIC math_util.h memory_detect.cpp memory_detect.h - memory_hook.cpp - memory_hook.h microprofile.cpp microprofile.h microprofileui.h diff --git a/src/common/page_table.h b/src/common/page_table.h index 8d4ee9249..0c14e6433 100755 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -8,7 +8,6 @@ #include #include "common/common_types.h" -#include "common/memory_hook.h" #include "common/virtual_buffer.h" namespace Common { @@ -23,23 +22,6 @@ enum class PageType : u8 { RasterizerCachedMemory, }; -struct SpecialRegion { - enum class Type { - DebugHook, - IODevice, - } type; - - MemoryHookPointer handler; - - [[nodiscard]] bool operator<(const SpecialRegion& other) const { - return std::tie(type, handler) < std::tie(other.type, other.handler); - } - - [[nodiscard]] bool operator==(const SpecialRegion& other) const { - return std::tie(type, handler) == std::tie(other.type, other.handler); - } -}; - /** * A (reasonably) fast way of allowing switchable and remappable process address spaces. It loosely * mimics the way a real CPU page table works. diff --git a/src/core/memory.cpp b/src/core/memory.cpp index f209c4949..11609682a 100755 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -44,27 +44,12 @@ struct Memory::Impl { MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, target, Common::PageType::Memory); } - void MapIoRegion(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer mmio_handler) { - UNIMPLEMENTED(); - } - void UnmapRegion(Common::PageTable& page_table, VAddr base, u64 size) { ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:016X}", size); ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:016X}", base); MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, 0, Common::PageType::Unmapped); } - void AddDebugHook(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer hook) { - UNIMPLEMENTED(); - } - - void RemoveDebugHook(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer hook) { - UNIMPLEMENTED(); - } - bool IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr) const { const auto& page_table = process.PageTable().PageTableImpl(); const auto [pointer, type] = page_table.pointers[vaddr >> PAGE_BITS].PointerType(); @@ -740,25 +725,10 @@ void Memory::MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size impl->MapMemoryRegion(page_table, base, size, target); } -void Memory::MapIoRegion(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer mmio_handler) { - impl->MapIoRegion(page_table, base, size, std::move(mmio_handler)); -} - void Memory::UnmapRegion(Common::PageTable& page_table, VAddr base, u64 size) { impl->UnmapRegion(page_table, base, size); } -void Memory::AddDebugHook(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer hook) { - impl->AddDebugHook(page_table, base, size, std::move(hook)); -} - -void Memory::RemoveDebugHook(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer hook) { - impl->RemoveDebugHook(page_table, base, size, std::move(hook)); -} - bool Memory::IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr) const { return impl->IsValidVirtualAddress(process, vaddr); } diff --git a/src/core/memory.h b/src/core/memory.h index 4a1cc63f4..705ebb23d 100755 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -8,7 +8,6 @@ #include #include #include "common/common_types.h" -#include "common/memory_hook.h" namespace Common { struct PageTable; @@ -77,17 +76,6 @@ public: */ void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target); - /** - * Maps a region of the emulated process address space as a IO region. - * - * @param page_table The page table of the emulated process. - * @param base The address to start mapping at. Must be page-aligned. - * @param size The amount of bytes to map. Must be page-aligned. - * @param mmio_handler The handler that backs the mapping. - */ - void MapIoRegion(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer mmio_handler); - /** * Unmaps a region of the emulated process address space. * @@ -97,28 +85,6 @@ public: */ void UnmapRegion(Common::PageTable& page_table, VAddr base, u64 size); - /** - * Adds a memory hook to intercept reads and writes to given region of memory. - * - * @param page_table The page table of the emulated process - * @param base The starting address to apply the hook to. - * @param size The size of the memory region to apply the hook to, in bytes. - * @param hook The hook to apply to the region of memory. - */ - void AddDebugHook(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer hook); - - /** - * Removes a memory hook from a given range of memory. - * - * @param page_table The page table of the emulated process. - * @param base The starting address to remove the hook from. - * @param size The size of the memory region to remove the hook from, in bytes. - * @param hook The hook to remove from the specified region of memory. - */ - void RemoveDebugHook(Common::PageTable& page_table, VAddr base, u64 size, - Common::MemoryHookPointer hook); - /** * Checks whether or not the supplied address is a valid virtual * address for the given process. diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 4b88b4e0d..5b637f3c5 100755 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -4,8 +4,6 @@ add_executable(tests common/fibers.cpp common/param_package.cpp common/ring_buffer.cpp - core/arm/arm_test_common.cpp - core/arm/arm_test_common.h core/core_timing.cpp tests.cpp video_core/buffer_base.cpp