early-access version 1276

This commit is contained in:
pineappleEA 2021-01-01 17:39:08 +01:00
parent cb7b6ecaea
commit 950150dc52
7 changed files with 3 additions and 89 deletions

View file

@ -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

4
dist/yuzu.desktop vendored
View file

@ -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;

View file

@ -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

View file

@ -8,7 +8,6 @@
#include <tuple>
#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.

View file

@ -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);
}

View file

@ -8,7 +8,6 @@
#include <memory>
#include <string>
#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.

View file

@ -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