Commit graph

6190 commits

Author SHA1 Message Date
fearlessTobi
5a625fe945 yuzu/game_list_worker: Move std::string construction after the termintion check in callbacks
Avoids potentially allocating a std::string instance when it isn't
needed.
2018-12-09 15:51:19 +01:00
Lioncash
5840943110 yuzu/configuration: Make slots private where applicable
These slots are only ever attached to event handling mechanisms within
the class itself, they're never used externally. Because of this, we can
make the functions private.

This also removes redundant usages of the private access specifier.
2018-12-09 15:51:19 +01:00
Lioncash
d87961bad3 yuzu/configuration: Add missing override specifiers to configuration-related classes
Resolves trivial compiler warnings.
2018-12-09 15:51:19 +01:00
Lioncash
9c0c817e6f yuzu/configuration/configure_input: Default destructor in the cpp file
The previous code could potentially be a compilation issue waiting to
occur, given we forward declare the type for a std::unique_ptr. If the
complete definition of the forward declared type isn't visible in a
translation unit that the class is used in, then it would fail to
compile.

Defaulting the destructor in a cpp file ensures the std::unique_ptr's
destructor is only invoked where its complete type is known.
2018-12-09 15:51:08 +01:00
Lioncash
dd2cbca3f4 hle/service: Remove unnecessary using declarations
Only one usage of the specified objects made use of the lack of
namespacing. Given the low usage, we can just remove these.
2018-12-08 14:52:30 +01:00
Lioncash
a32725540c hle/service, hle/sm: Use structured bindings where applicable
Gets rid of the need to keep the variables separate from their actual
initialization spots.
2018-12-08 14:49:53 +01:00
Lioncash
0cb7654d60 hle/service, hle/sm: Use structured bindings where applicable
Gets rid of the need to keep the variables separate from their actual
initialization spots.
2018-12-08 14:48:01 +01:00
Bartosz Kaszubowski
7aeb4e29c2 remove border from GameList 2018-12-07 16:33:05 +01:00
bunnei
edbdbf0ba1
Merge pull request #4480 from wwylele/memory-global-2
Memory: eliminate global state
2018-12-06 19:17:28 -05:00
Weiyi Wang
556ac5c075
Merge pull request #4469 from shutterbug2000/httpAddSet
Add HTTP_C::AddPostDataAscii
2018-12-06 14:28:56 -05:00
Weiyi Wang
b9f7c9142a
Merge pull request #4476 from FearlessTobi/fix-testcase-sending
web_service: move telemetry condition from TelemetrySession constructor to destructor
2018-12-06 14:28:21 -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
ac1cda21c3 Address code style comments 2018-12-05 20:24:37 -05:00
Weiyi Wang
e87dc17da2 Pass system into arm interpreter; fix tests 2018-12-05 20:21:14 -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
1ec9ed6827 LDR_RO: pass memory in CROHelper 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
cfee59c6db hw/gpu: pass in memory reference 2018-12-05 20:16:42 -05:00
Weiyi Wang
ec01975549 audio_core: pass in memory reference
Because HLE::Source is initialized as an array in the member initializer, it is hard to let it accept the reference on ctor, so it has a second init stage performed by DspHle::Impl::Impl
2018-12-05 20:16:42 -05:00
Weiyi Wang
8bb404c82a VideoCore: pass in memory system
currently set as global. Will change when videocore itself is wrapped as a class
2018-12-05 20:16:42 -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
8118be6615 Kernel: pass in MemorySystem 2018-12-05 20:16:42 -05:00
Weiyi Wang
6992f76acf Memory: create MemorySystem class 2018-12-05 20:16:42 -05:00
Francois Berder
c598fd7228 renderer_opengl: Fix string comparison
Signed-off-by: Francois Berder <fberder@outlook.fr>
2018-12-04 22:12:35 +00:00
Pengfei Zhu
cd80a0df8c
Merge pull request #4418 from FearlessTobi/port-1441
Port yuzu-emu/yuzu#1441: "logging: Add DebuggerBackend for logging to Visual Studio"
2018-12-04 22:20:41 +08:00
RoadrunnerWMC
008ef1fd71 DSP: Add a comment about physical address masking
See @wwylele's comment on PR 4483 for more details on what causes this behavior.
2018-12-03 12:22:11 -07:00
RoadrunnerWMC
3aff585f32 DSP: Add address mask for physical pointers to audio data buffers
Hardware testing indicated that FFFFFFFC is the correct mask for all audio formats (mono and stereo PCM8, mono and stereo PCM16, and ADPCM). This fixes broken audio in Luigi's Mansion: Dark Moon and a few other games.
2018-12-03 01:07:55 -07:00
Weiyi Wang
76944ec0e0
Merge pull request #4279 from FearlessTobi/better-mii-stub
applets: stub mii selector to always return a standard mii
2018-12-01 19:41:21 -05:00
Carl Kenner
3d083859c1 logging: Add DebuggerBackend for logging to Visual Studio 2018-12-01 12:54:17 +01:00
fearlessTobi
630e3d6dea web_service: move telemetry condition from TelemetrySession constructor to destructor
Fixes an issue where Testcases couldn't be sent when Telemetry was disabled, because both things are tied closely together in the backend.
2018-11-30 19:01:05 +01:00
zhupengfei
1970178cc0
citra_qt: rename the menu to Tools
Also made Movie a sub-menu of Tools.
2018-11-30 14:14:41 +08:00
zhupengfei
071b41cb61
citra_qt, video_core: Screenshot functionality
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-11-30 14:14:41 +08:00
Weiyi Wang
7e90abec78
Merge pull request #4442 from wwylele/memory-no-kernel
Memory: decouple from Kernel
2018-11-28 11:24:41 -05:00
Weiyi Wang
b37d3be34e
Merge pull request #4458 from FearlessTobi/port-1773
Port yuzu-emu/yuzu#1773: "common/thread: Minor cleanup"
2018-11-28 11:07:48 -05:00
fearlessTobi
48239be22c mii_selector: Use BitField where possible 2018-11-27 14:57:51 +01:00
Weiyi Wang
2678c1a945
Merge pull request #4462 from FearlessTobi/fix-my-shit
ir_user: Remove ArrayToString() calls
2018-11-26 14:43:07 -05:00
fearlessTobi
5121fadb4f ir:/movie: Replace for-loops with fmt::join 2018-11-26 20:04:18 +01:00
shutterbug2000
a7bbe60c18 Put AddPostDataAscii in the function list 2018-11-25 15:47:37 -06:00
shutterbug2000
4c198591d5 Add HTTP_C::AddPostDataAscii 2018-11-25 15:29:04 -06:00
Lioncash
067f09b41d
kernel/shared_memory: std::move the string parameter in SetName()
This avoids a potential reallocation.
2018-11-24 10:07:11 -05:00
fearlessTobi
fe99e5a51e mii_selector: map raw data to the MiiResult struct 2018-11-24 14:35:06 +01:00
Weiyi Wang
210e558bea
Merge pull request #4456 from FearlessTobi/port-1767
Port yuzu-emu/yuzu#1734 and yuzu-emu/yuzu#1767: Minor changes to "kernel"
2018-11-24 00:04:42 -05:00
bunnei
9bd7379cc6
Merge pull request #4454 from FearlessTobi/port-1758
Port yuzu-emu/yuzu#1758: "common/math_util: Minor cleanup"
2018-11-23 23:15:40 -05:00
bunnei
dc16ba009e
Merge pull request #4444 from FearlessTobi/port-1684
Port yuzu-emu/yuzu#1684: "common/string_util: Minor cleanup"
2018-11-23 23:13:39 -05:00
Lioncash
00564bdb6f common/thread: Drop Hungarian notation on SetCurrentThreadName's parameter
This is inconsistent with our coding style.
2018-11-23 18:23:06 +01:00
Lioncash
255d46e6ee common/thread: Make Barrier's 'count' member non-const
While admirable as a means to ensure immutability, this has the
unfortunate downside of making the class non-movable. std::move cannot
actually perform a move operation if the provided operand has const data
members (std::move acts as an operation to "slide" resources out of an
object instance). Given Barrier contains move-only types such as
std::mutex, this can lead to confusing error messages if an object ever
contained a Barrier instance and said object was attempted to be moved.
2018-11-23 18:22:30 +01:00
Lioncash
4f0ec03c97 common/thread: Initialize class member variables where applicable
Simplifies the constructor interfaces for Barrier and Event classes.
2018-11-23 18:22:14 +01:00
Lioncash
9cbcc70c9b common/thread: Group non-member functions together
Keeps the non-member interface in one spot instead of split into two
places, making it nicer to locate functions.
2018-11-23 18:22:05 +01:00
Lioncash
a7a319cfd1 common/thread: Remove SleepCurrentThread()
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
2018-11-23 18:21:59 +01:00
Lioncash
61eafcee98 common/thread: Remove unused CurrentThreadId()
This is an old function that's no longer necessary. C++11 introduced
proper threading support to the language and a thread ID can be
retrieved via std::this_thread::get_id() if it's ever needed.
2018-11-23 18:21:45 +01:00
Lioncash
86c36cb176 kernel/shared_memory: Make Map() and Unmap() take the target process by reference rather than as a pointer
Both member functions assume the passed in target process will not be
null. Instead of making this assumption implicit, we can change the
functions to be references and enforce this at the type-system level.
2018-11-23 17:00:12 +01:00
Lioncash
0f544af89a kernel/shared_memory: Add a const qualified member function overload for GetPointer()
Given this doesn't mutate instance state, we can provide a
const-qualified variant as well.
2018-11-23 16:38:18 +01:00
Lioncash
1cb9bea504 kernel/shared_memory: Make data members private
Rather than allow unfettered access to the class internals, we hide all
members by default and create and API that other code can operate
against.
2018-11-23 16:20:18 +01:00
Lioncash
662c3ff684 kernel/handle_table: Move private static functions into the cpp file
These don't depend on class state, and are effectively implementation
details, so they can go into the cpp file .
2018-11-23 15:58:12 +01:00
Lioncash
83f6e9ea72 kernel/handle_table: Default destructor in the cpp file
We don't need to potentially inline the teardown logic of all of the
handle instances.
2018-11-23 15:58:07 +01:00
Lioncash
d37c826097 common/math_util: Simplify std::make_signed usages to std::make_signed_t
Gets rid of the need to use typename to access the ::type alias.
2018-11-23 15:01:05 +01:00
Lioncash
8d169a4bfa common/math_util: Make Rectangle's constructors constexpr
Allows objects that contain rectangle instances to be constexpr
constructible as well.
2018-11-23 15:00:59 +01:00
Lioncash
bf8f7f0ab6 common/math_util: Remove unnecessary static from PI
const/constexpr variables have internal linkage by default.
2018-11-23 15:00:52 +01:00
Lioncash
2787d1230b common/math_util: Remove unused IntervalsIntersect() function
This hasn't been used since the project started, so we may as well get
rid of it to keep it from bit rotting.
2018-11-23 15:00:47 +01:00
BreadFish64
f4472a10e6 core: undef PAGE_SIZE and PAGE_MASK
these are defined a system header which causes complications when building for android
2018-11-20 14:24:19 -05:00
BreadFish64
6609ff83a7 android: set up cmake 2018-11-20 14:24:19 -05:00
fearlessTobi
fc51a6fd08 Fix functions which used Common::ArrayToString 2018-11-20 15:05:54 +01:00
Weiyi Wang
a854b23d9b RPC: add missing include 2018-11-19 11:16:55 -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
524364d95a ldr_ro: pass process reference to memory operation
Note that not all memory operation is fixed. Specifically, u8/u16/u32 Read/Write is still using the current page tabel
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
a7d6bc4e84
Merge pull request #4441 from FearlessTobi/port-1688
Port yuzu-emu/yuzu#1688: "service: Mark MakeFunctionString with the [[maybe_unused]] attribute."
2018-11-19 11:10:51 -05:00
Weiyi Wang
803f783f07
Merge pull request #4427 from wwylele/query-memory-merge
SVC: QueryMemory merges similar VMA
2018-11-19 11:10:15 -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
0d96c0b44e
Merge pull request #4439 from FearlessTobi/actually-port-1649
Port yuzu-emu/yuzu#1649 and yuzu-emu/yuzu#1653: Changes to gl_resource_manager and gl_rasterizer
2018-11-19 11:05:10 -05:00
Weiyi Wang
1bc253f1be
Merge pull request #4353 from zaksabeast/ips-patches
Add IPS patching
2018-11-18 13:39:41 -05:00
Sebastian Valle
b1fa9c0a7c
Merge pull request #4434 from wwylele/shared-memory-state
Kernel/SharedMemory: set and reset source memory state
2018-11-18 12:23:21 -05:00
B3N30
2f3142e192 Fix 16bit comparison operations 2018-11-18 14:37:11 +01:00
Lioncash
39fcc3a589 service: Mark MakeFunctionString with the [[maybe_unused]] attribute.
When yuzu is compiled in release mode this function is unused, however,
when compiled in debug mode, it's used within a LOG_TRACE statement.
This prevents erroneous compilation warnings about an unused function
(that isn't actually totally unused).
2018-11-17 16:41:10 +01:00
Markus Wick
62036bdea8 gl_rasterizer_cache: Add profiles for Copy and Blit
They were missed, and Copy is very high in profile here. It doesn't block the GPU,
but it stalls the driver thread. So with our bad GL instructions, this might block quite a while.
2018-11-17 15:11:56 +01:00
Markus Wick
2b793797e0 gl_resource_manager: Profile creation and deletion 2018-11-17 15:07:30 +01:00
Markus Wick
79696a1a43 gl_stream_buffer: Profile orphaning of stream buffer.
This serialize to the driver thread and so it may block for a while.
So if it is in the benchmark, we get noticed if it happens too often.
2018-11-17 15:03:20 +01:00
Markus Wick
392547a97c gl_resource_manager: Split implementations in .cpp file
Those implementations are quite costly, so there is no need to inline them to the caller.
Ressource deletion is often a performance bug, so in this way, we support to add breakpoints to them.
2018-11-17 15:01:40 +01:00
bunnei
d3b1b5f22c
Merge pull request #4398 from zhaowenlan1779/config-fix
citra_qt/configuration: fix language configuration issues
2018-11-16 23:33:50 -08:00
bunnei
11baf7ac13
Merge pull request #4419 from FearlessTobi/port-1639
Port yuzu-emu/yuzu#1639: "qt: Add help option to open yuzu folder"
2018-11-16 23:29:59 -08:00
Tobias
46e8237e7e Port yuzu-emu/yuzu#1137: "renderer_opengl: Namespace OpenGL code" (#4423)
* renderer_opengl: Namespace OpenGL code

Namespaces all OpenGL code under the OpenGL namespace.

Prevents polluting the global namespace and allows clear distinction
between other renderers' code in the future.

* Also namespace TextureCubeConfig
2018-11-16 23:29:10 -08:00
bunnei
7f727177bf
Merge pull request #4431 from wwylele/no-v2p
Memory: remove VirtualToPhysicalAddress
2018-11-16 23:28:33 -08:00
Weiyi Wang
4d1c4f898b
Merge pull request #4324 from BreadFish64/android1
android: add initial android app
2018-11-16 21:40:57 -05:00
Ben
b90ff739a0 Add CheatEngine and support for Gateway cheats (#4406)
* Add CheatEngine; Add support for Gateway cheats; Add Cheat UI

* fix a potential crash on some systems

* fix substr with negative length

* Add Joker to the NonOp comp handling

* Fixup JokerOp

* minor fixup in patchop; add todo for nested loops

* Add comment for PadState member variable in HID

* fix: stol to stoul in parsing cheat file

* fix misplaced parsing of values; fix patchop code

* add missing break

* Make read_func and write_func a template parameter
2018-11-16 18:01:10 -07:00
Weiyi Wang
95bbe2302b Kernel/IPC: fix mapped buffer target address 2018-11-16 19:47:16 -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