Commit graph

1704 commits

Author SHA1 Message Date
merry
3fe2c2d40d dynarmic: Inline exclusive memory accesses
Inlines implementation of exclusive instructions into JITted code,
improving performance of applications relying heavily on these
instructions.

We also fastmem these instructions for additional speed, with
support for appropriate recompilation on fastmem failure.

An unsafe optimization to disable the intercore global_monitor is also
provided, should one wish to rely solely on cmpxchg semantics for
safety.

See also: merryhime/dynarmic#664
2022-02-27 19:40:05 +00:00
bunnei
5dc4c92dc2 settings: Add a new "use_extended_memory_layout" setting.
- This will be used to enable emulation of a larger memory arrangement.
2022-02-21 13:07:19 -08:00
bunnei
e1af26d5b3 fixup! core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory. 2022-02-19 00:14:27 -08:00
bunnei
6075031e99 core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.
- Improves the implementations of MapPhysicalMemory and UnmapPhysicalMemory to more closely reflect latest HOS.
2022-02-18 23:42:27 -08:00
Wunkolo
fe8b240a39 common: Add NullVisitor default constructor
Addresses https://github.com/yuzu-emu/yuzu/issues/7881 to fix linux
builds.

`YUZU_NON_COPYABLE` deletes the `T(const T&)` constructor which will
cause the implicitly defined default ctor/dtor to no-longer generate.
2022-02-17 06:28:19 -08:00
bunnei
3f85da2231 Merge pull request #7878 from german77/mnpp
service/mnpp: Stub mnpp_app
2022-02-16 18:42:49 -07:00
Morph
0d71098873 common: fs_util: Add buffer to string view utility functions
These functions allow to construct a string view from an input buffer, avoiding the copy done by the non string view counterparts. However, callers must be cognizant of the viewed buffer's lifetime to avoid a use-after-free.
2022-02-13 18:53:21 -05:00
Narr the Reg
4eef3a0cde service/mnpp: Stub mnpp_app
Used in Super Nintendo Entertainment System™ - Nintendo Switch Online
2022-02-10 21:55:28 -06:00
Morph
9429bb6222 common: uuid: Use sizeof(u64) instead of 8 in Hash() 2022-02-10 15:03:49 -05:00
Morph
2d8d60bf9b common: uuid: Return an invalid UUID if conversion from string fails
The string constructor of UUID states:
Should the input string not meet the above requirements, an assert will be triggered and an invalid UUID is set instead.
2022-02-05 13:56:21 -05:00
Morph
e47b5e6a26 general: Rename NewUUID to UUID, and remove the previous UUID impl
This completes the removal of the old UUID implementation.
2022-02-05 13:56:21 -05:00
Morph
ad33e58c2d common: uuid: Add AsU128()
This copies the internal bytes of the UUID into a u128 for backwards compatibility. This should not be used.
2022-02-05 13:56:21 -05:00
Morph
51c445f7e8 input/hid: Migrate to the new UUID implementation 2022-02-05 13:18:41 -05:00
Morph
77bc383079 common: Implement NewUUID
This is a fixed and revised implementation of UUID that uses an array of bytes as its internal representation of a UUID instead of a u128 (which was an array of 2 u64s).
In addition to this, the generation of RFC 4122 Version 4 compliant UUIDs is also implemented.
2022-02-05 13:18:31 -05:00
Lioncash
45fd47ef0a common_types: Remove NonCopyable struct
Now that we're moved over to the YUZU_ defines, we can get rid of this
struct.
2022-02-02 13:19:01 -05:00
Lioncash
8a509e5a2c general: Replace NonCopyable struct with equivalents 2022-02-02 13:17:12 -05:00
bunnei
32f861dd49 Merge pull request #7807 from german77/moar-buttons
input_common: Add home and hard touch press buttons to UDP controllers
2022-02-01 22:37:13 -07:00
bunnei
049cb89563 Merge pull request #7809 from Morph1984/clock-constants
common: wall_clock: Utilize constants for ms, us, and ns ratios
2022-02-01 18:34:31 -07:00
Lioncash
765762c3a7 common/file: Remove [[nodiscard]] from Open()
Since this has a void return value, there's nothing that can actually be
used.
2022-02-01 02:19:21 -05:00
Morph
3605b6f579 common: wall_clock: Check precision against the emulated CPU and CNTFRQ
In addition to requiring nanosecond precision, using the native clock requires that the hardware TSC has a precision greater than the emulated CPU and its clock counter.
2022-01-30 12:57:23 -05:00
Morph
fe2ff6b8a1 common: wall_clock: Utilize constants for ms, us, and ns ratios 2022-01-30 12:36:56 -05:00
german77
a2fe5dffa9 input_common: Add home and hard touch press buttons to UDP controllers 2022-01-30 09:17:22 -06:00
Morph
b7d23543b4 Merge pull request #7791 from german77/wall_clock
wall_clock: Use standard wall clock if rtsc frequency is too low
2022-01-28 20:04:24 -05:00
german77
c092488c53 wall_clock: use standard wall clock if rtsc frequency is too low 2022-01-27 17:07:52 -06:00
Lioncash
1d5b635601 common/xbyak_api: Make BuildRegSet() constexpr
This allows us to eliminate any static constructors that would have been
emitted due to the function not being constexpr.
2022-01-26 16:29:15 -05:00
german77
47ca44ad1d yuzu: Add setting to disable controller navigation 2022-01-23 21:08:49 -06:00
bunnei
c6038643e0 Merge pull request #7695 from Morph1984/is-pow2
common: bit_util: Add IsPow2 helper function
2022-01-20 18:06:11 -08:00
bunnei
94d7a0de6f Merge pull request #7725 from german77/mouse_in_motion
input_common: Reintroduce motion from mouse and use button names
2022-01-18 18:16:27 -08:00
german77
991460cd98 input_common: Reintroduce motion from mouse and use button names 2022-01-16 20:37:34 -06:00
bunnei
b533a775d2 common: fiber: YieldTo: Avoid hard crash on nullptr previous_fiber.
- When the emulator crashes to desktop below, we don't even get this captured in a log, making such issues harder to debug.
2022-01-14 16:17:19 -08:00
Morph
9ec57a502c common: bit_util: Add IsPow2 helper function
Makes use of std::has_single_bit() to check whether the value is a power of 2.
2022-01-11 16:01:12 -05:00
liushuyu
479d57987c logging/log.h: move enum class formatter to a separate file ...
... to common/logging/formatter.h
2022-01-09 17:35:33 -07:00
liushuyu
52e9cd7743 logging/log: use underlying_type instead of hardcoding types 2022-01-08 16:02:49 -07:00
liushuyu
682ea0f431 logging: adapt to changes in fmt 8.1 2022-01-08 01:49:26 -07:00
Fernando Sahmkow
65387dd0a0 ShaderDecompiler: Add a debug option to dump the game's shaders. 2022-01-04 02:39:00 +01:00
Andrew Udvare
31c8b5013c Allow overriding SCM version info
If the build is from a non-repository, these functions will return empty. This
patch allows using defines to CMake to set version info such as
-DGIT_BRANCH=master.
2021-12-20 19:13:07 -05:00
Mai M
14a84586fb Merge pull request #7558 from Morph1984/unused-cpu-family-model
common/cpu_detect: Remove CPU family and model
2021-12-14 23:43:16 -05:00
Lioncash
726de453bb common/input: Avoid numerous large copies of CallbackStatus
CallbackStatus instances aren't the cheapest things to copy around
(relative to everything else), given that they're currently 520 bytes in
size and are currently copied numerous times when callbacks are invoked.

Instead, we can pass the status by const reference to avoid all the
copying.
2021-12-13 21:22:02 -05:00
Morph
2e4b0fa68c common/cpu_detect: Remove CPU family and model
We currently do not make use of these fields, remove them for now.
2021-12-13 20:45:18 -05:00
Lioncash
319b0ed324 common/input: Remove unnecessary returns
Given these return void, these can be omitted.
2021-12-13 20:43:12 -05:00
Lioncash
cd45635f56 input_engine: Pass LedStatus by const reference
Avoids copies where reasonably applicable
2021-12-13 09:20:58 -05:00
Lioncash
f41c22d30f input_engine: Pass VibrationStatus by const reference in SetRumble()
Avoids creating copies of the struct where not necessary.
2021-12-13 09:16:10 -05:00
bunnei
abecd3905d Merge pull request #7525 from german77/notifa
service/notif: Add notif:a and stub ListAlarmSettings, Initialize
2021-12-07 23:31:44 -08:00
german77
57ceda21b7 service/notif: Add notif:a and stub ListAlarmSettings,Initialize
Used by ring fit adventure 1.2.0
2021-12-06 10:36:37 -06:00
ameerj
8969273d2d general: Add missing copyright notices 2021-12-05 16:18:53 -05:00
Morph
875db1012b native_clock: Wait for less time in EstimateRDTSCFrequency
In my testing, waiting for 200ms provided the same level of precision as the previous implementation when estimating the RDTSC frequency.
This significantly improves the yuzu executable launch times since we reduced the wait time from 3 seconds to 200 milliseconds.
2021-12-03 19:55:59 -05:00
Morph
2b9afa4d56 general: Replace high_resolution_clock with steady_clock
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-12-02 14:20:43 -05:00
german77
b7357d95a7 settings: Add debug setting to enable all controllers 2021-11-27 20:24:37 -06:00
german77
8df8dd6c5c config: Remove vibration configuration 2021-11-26 19:31:04 -06:00
Narr the Reg
7b56b2cab6 input_common: Fully implement UDP controllers 2021-11-26 15:46:36 -06:00