Commit graph

127 commits

Author SHA1 Message Date
Hamish Milne
92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne
04aa351c40 Code review - general gardening 2020-03-29 16:14:36 +01:00
James Rowe
55c75b5e3e Add ClearAll to rasterizer cache for fully wiping the cache on save/load 2020-02-13 17:42:11 +08:00
Hamish Milne
996aba39fe Correct exports; add some file serialization; fix service base object serialization 2020-02-13 17:42:07 +08:00
Hamish Milne
f2de70c3fb Fix crash bugs 2020-02-13 17:42:06 +08:00
Hamish Milne
96432589bd Use shared_ptr for PageTable 2020-02-13 17:42:04 +08:00
Hamish Milne
e4afa8e512 Make the tests pass 2020-02-13 17:42:04 +08:00
Hamish Milne
65d96bf6c1 Changed u8* to MemoryRef 2020-02-13 17:42:00 +08:00
Hamish Milne
cf985631e0 Minor tidying up 2020-02-13 17:41:27 +08:00
Hamish Milne
26e90a99cd Added basic UI; misc memory fixes 2020-02-13 17:41:27 +08:00
Hamish Milne
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne
ac0337d8df Started IPC services serialization 2020-02-13 17:38:19 +08:00
Hamish Milne
f79c9668a3 Added shader state; WIP kernel objects 2020-02-13 17:38:10 +08:00
Hamish Milne
ee2cae2093 Added core serialization 2020-02-13 17:34:13 +08:00
Hamish Milne
dc04774ece Added POD serialization 2020-02-13 17:27:51 +08:00
Hamish Milne
6940c99ed6 Added boost serialization 2020-02-13 17:27:50 +08:00
bamsbamx
ac9755306c cpu_core: Separate cpu_core and memory
This makes cpu_core and memory being completely independent components inside the system, having a simpler and more understandable initialization process
The thread which casues page table changes in memory will be responsible to notify the cpu_core too
2019-06-22 18:21:50 +02:00
MerryMage
065d3ce063 memory: Reorder parameters of CopyBlock to a more sensible order
* Also implement CopyBlock variants in terms of each other
2019-04-19 19:46:09 +01:00
Weiyi Wang
ea496507d5 DSP_DSP: use member system instead of global instance 2019-03-13 10:23:58 -04:00
Weiyi Wang
206413ba7b
Merge pull request #4630 from wwylele/memory-no-lock
Memory: don't lock hle mutex in memory read/write
2019-02-25 10:23:23 -05:00
Weiyi Wang
9573ee46bd Memory: replace Core::CPU 2019-02-14 14:04:46 -05:00
Weiyi Wang
7074dab2da Memory: don't lock hle mutex in memory read/write
The comment already invalidates itself: neither MMIO nor rasterizer cache belongsHLE kernel state. This mutex has a too large scope if MMIO or cache is included, which is prone to dead lock when multiple thread acquires these resource at the same time. If necessary, each MMIO component or rasterizer should have their own lock.
2019-02-08 10:43:06 -05:00
Lioncash
432e847c24 core/memory: Remove unnecessary memory zeroing in MemorySystem::Impl
std::make_unique for arrays is equivalent to doing:

std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]())

(note the ending () after the array size specifier). This means that the
default value within memory for the constructed types will be whatever
the default constructor for that type does. Given the built-in
type for std::uint8_t doesn't have a constructor, this is equivalent to
forcing zero-initialization, so the memory will already be zeroed out on
construction. Because of that, there's no need to zero it out again.
2018-12-27 00:35:53 -05:00
Weiyi Wang
bf2056f12e Memory: apply rasterizer cache mark to all page tables and the global marker 2018-12-10 22:21:03 -05:00
Weiyi Wang
88161b8ac6 Memory: register page tables into a list for rasterizer cache marking 2018-12-10 22:13:10 -05:00
Weiyi Wang
9d616e5951 Memory: mark pages on mapping if it is already rasterizer-cached 2018-12-10 22:05:28 -05:00
Weiyi Wang
643b7d4dcb Memory: move memory setup into MemorySystem 2018-12-10 22:01:09 -05:00
Weiyi Wang
e7a3c296c3 Memory: create rasterizer cache marker 2018-12-10 21:43:39 -05:00
Weiyi Wang
23bad5d398 fix clang-format 2018-12-06 13:30:58 -05:00
Weiyi Wang
7e8ba6ed8e Memory: move memory chunk into pImpl and make them dynamically allocated
Otherwise MSVC would give out-of-memory error on compile time
2018-12-06 13:30:47 -05:00
Weiyi Wang
c6b3186475 Memory: IsValidVirtualAddress can be global 2018-12-05 20:21:14 -05:00
Weiyi Wang
42edab01d9 Memory: move states into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
d18cda5a5d Memory: move MarkRegionCached into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
2582d64fb3 Memory: move block operations into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
323990d402 Memory: move Read/Write8/16/32/64 and ReadCString into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
76e0a4ece7 Memory: move GetPointer into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
405218c3a7 Memory: move IsValidVirtualAddress into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
296c458e0e Memory: move GetPhysicalPointer and IsValidPhysicalAddress into class 2018-12-05 20:21:14 -05:00
Weiyi Wang
8c618c3fc3 Memory: move PageTable functions into class 2018-12-05 20:16:42 -05:00
Weiyi Wang
b199b7ada9 Memory: move GetFCRAMOffset into MemorySystem 2018-12-05 20:16:42 -05:00
Weiyi Wang
679dfd7cdf Memory: remove CopyBlock with current process 2018-11-19 11:16:55 -05:00
Weiyi Wang
185a83f06d Memory: remove ZeroBlock with current process 2018-11-19 11:16:55 -05:00
Weiyi Wang
4e99641a3b Memory: remove WriteBlock with current process 2018-11-19 11:16:55 -05:00
Weiyi Wang
8871f5a4ac Memory: remove ReadBlock with current process 2018-11-19 11:16:55 -05:00
Weiyi Wang
d4ba87d90a Memory: remove GetMMIOHandler with current process 2018-11-19 11:16:55 -05:00
Weiyi Wang
7308b8d294 Memory: remove IsValidVirtualAddress with current process 2018-11-19 11:16:55 -05:00
Weiyi Wang
36cf104a02 Memory: replace GetPointerFromVMA with GetPointerForRasterizerCache
All usage of GetPointerFromVMA is to recover the pointer that is nulled by changing page type to RasterizerCachedMemory. Our rasterizer cache only works on linear heap and vram, so we can recover the pointer directly by address computation, instead of going through VMA table. Also removed a sanity check pointer!=nullptr in RasterizerMarkRegionCached(RasterizerCachedMemory=>Memory), as now the pointer is never null. The sanity check was added in f2a5a77 (#2797), which was originally necessary during VMA unmapping process, because the function is invloked by VMA after unmapping the page, which in turn invokes back to query the memory, forming a circular dependency. Now the dependency is resolved so the check is not necessary
2018-11-19 11:16:55 -05:00
Weiyi Wang
2b768da531
Merge pull request #4433 from wwylele/vmmanager-simple
VMManager: remove shared_ptr<vector> backing type
2018-11-19 11:13:22 -05:00
Weiyi Wang
471b4cf44f
Merge pull request #4436 from wwylele/p2ptr-boundary
Memory: GetPhysicalPointer should accept right open bound address
2018-11-19 11:05:42 -05:00
Weiyi Wang
365eeb889f Memory: GetPhysicalPointer should accept right open bound address
Also removed IO region check in GetPhysicalPointer as it doesn't make sense to get a pointer to MMIO
2018-11-16 10:27:30 -05:00