suyu is a Nintendo Switch emulator in c++ aiming to help developers understand the console better and advocate legal emulation
Find a file
Lioncash 7fe27de26e svc: Use the current process' handle table for retrieving the process instance to act upon
The kernel uses the handle table of the current process to retrieve the
process that should be used to retrieve certain information. To someone
not familiar with the kernel, this might raise the question of "Ok,
sounds nice, but doesn't this make it impossible to retrieve information
about the current process?".

No, it doesn't, because HandleTable instances in the kernel have the
notion of a "pseudo-handle", where certain values allow the kernel to
lookup objects outside of a given handle table. Currently, there's only
a pseudo-handle for the current process (0xFFFF8001) and a pseudo-handle
for the current thread (0xFFFF8000), so to retrieve the current process,
one would just pass 0xFFFF8001 into svcGetInfo.

The lookup itself in the handle table would be something like:

template <typename T>
T* Lookup(Handle handle) {
    if (handle == PSEUDO_HANDLE_CURRENT_PROCESS) {
        return CurrentProcess();
    }

    if (handle == PSUEDO_HANDLE_CURRENT_THREAD) {
        return CurrentThread();
    }

    return static_cast<T*>(&objects[handle]);
}

which, as is shown, allows accessing the current process or current
thread, even if those two objects aren't actually within the HandleTable
instance.
2018-12-02 03:41:49 -05: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 Merge pull request #1555 from ccawley2011/clang-format-docker 2018-11-18 19:54:38 -08:00
CMakeModules Update MinGWCross.cmake to lowercase 2018-09-19 14:22:14 -04:00
dist Show game compatibility within yuzu 2018-08-29 15:42:53 +02:00
externals Merge pull request #1725 from FernandoS27/gl43 2018-11-23 23:56:57 -05:00
hooks pre-commit: Change comment from citra to yuzu 2018-03-26 21:34:19 +02:00
src svc: Use the current process' handle table for retrieving the process instance to act upon 2018-12-02 03:41:49 -05:00
.gitattributes Meta: Add gitattributes file 2018-09-22 23:31:44 +02:00
.gitignore Port #3702 from Citra 2018-07-26 15:35:24 +02:00
.gitmodules common: Remove dependency on xbyak 2018-11-21 03:43:41 -05:00
.travis.yml travis: Make macOS builds utilize Xcode 10 2018-09-25 14:46:46 -04:00
appveyor.yml Remove whitespace 2018-11-15 22:44:18 -08:00
CMakeLists.txt GDBStub improvements: 2018-11-13 15:44:20 +00:00
CONTRIBUTING.md CONTRIBUTING.md - remove note about casting numeric types 2018-10-06 15:47:38 +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.