Nintendo Switch emulator
Find a file
Lioncash c51f8563a6
ring_buffer: Use std::hardware_destructive_interference_size to determine alignment size for avoiding false sharing
MSVC 19.11 (A.K.A. VS 15.3)'s C++ standard library implements P0154R1
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html)
which defines two new constants within the <new> header, std::hardware_destructive_interference_size
and std::hardware_constructive_interference_size.

std::hardware_destructive_interference_size defines the minimum
recommended offset between two concurrently-accessed objects to avoid
performance degradation due to contention introduced by the
implementation (with the lower-bound being at least alignof(max_align_t)).
In other words, the minimum offset between objects necessary to avoid
false-sharing.

std::hardware_constructive_interference_size on the other hand defines
the maximum recommended size of contiguous memory occupied by two
objects accessed wth temporal locality by concurrent threads (also
defined to be at least alignof(max_align_t)). In other words the maximum
size to promote true-sharing.

So we can simply use this facility to determine the ideal alignment
size. Unfortunately, only MSVC supports this right now, so we need to
enclose it within an ifdef for the time being.
2018-09-18 23:35:57 -04:00
.appveyor Implement Citra pull 3043 2018-02-24 13:08:46 +01:00
.github Minor cleanup 2018-01-13 23:56:18 +00:00
.travis travis: use Citras ccache 2018-08-31 20:13:26 +02:00
CMakeModules Fix missing qjpeg DLL 2018-08-06 23:06:33 -04:00
dist Show game compatibility within yuzu 2018-08-29 15:42:53 +02:00
externals Merge pull request #1163 from FearlessTobi/add-audio-stretching 2018-09-12 18:23:54 -04:00
hooks pre-commit: Change comment from citra to yuzu 2018-03-26 21:34:19 +02:00
src ring_buffer: Use std::hardware_destructive_interference_size to determine alignment size for avoiding false sharing 2018-09-18 23:35:57 -04:00
.gitignore Port #3702 from Citra 2018-07-26 15:35:24 +02:00
.gitmodules Add audio stretching support 2018-09-08 18:26:23 +01:00
.travis.yml travis: use Citras ccache 2018-08-31 20:13:26 +02:00
appveyor.yml Build - Upload fewer artifacts 2018-09-01 10:42:16 -06:00
CMakeLists.txt Update CMakeLists.txt 2018-09-12 17:36:10 +02:00
CONTRIBUTING.md Port #3466 from Citra 2018-07-07 14:00:20 +02:00
Doxyfile Minor cleanup 2018-01-13 23:56:18 +00:00
license.txt added license txt file 2014-04-08 19:03:00 -04:00
README.md Technically, yuzu can boot commercial games 2018-04-18 09:18:41 -04:00

yuzu emulator

Travis CI Build Status AppVeyor CI Build Status

yuzu is an experimental open-source emulator for the Nintendo Switch from the creators of Citra.

It is written in C++ with portability in mind, with builds actively maintained for Windows, Linux and macOS. The emulator is currently only useful for homebrew development and research purposes.

yuzu only emulates a subset of Switch hardware and therefore is generally only useful for running/debugging homebrew applications. At this time, yuzu cannot play any commercial games without major problems. yuzu can boot some games, to varying degrees of success, but does not implement any of the necessary GPU features to render 3D graphics.

yuzu is licensed under the GPLv2 (or any later version). Refer to the license.txt file included.

Check out our website!

For development discussion, please join us on Discord.

Development

Most of the development happens on GitHub. It's also where our central repository is hosted.

If you want to contribute please take a look at the Contributor's Guide and Developer Information. You should as well contact any of the developers on Discord in order to know about the current state of the emulator.

Building

Support

We happily accept monetary donations or donated games and hardware. Please see our donations page for more information on how you can contribute to yuzu. Any donations received will go towards things like:

  • Switch consoles to explore and reverse-engineer the hardware
  • Switch games for testing, reverse-engineering, and implementing new features
  • Web hosting and infrastructure setup
  • Software licenses (e.g. Visual Studio, IDA Pro, etc.)
  • Additional hardware (e.g. GPUs as-needed to improve rendering support, other peripherals to add support for, etc.)

We also more than gladly accept used Switch consoles, preferably ones with firmware 3.0.0 or lower! If you would like to give yours away, don't hesitate to join our Discord and talk to bunnei. You may also contact: donations@yuzu-emu.org.