two main issues: shader_environment.cpp Support Mesa nv50_ir-compiled homebrew fragment shaders Mesa nv50_ir (used by NZP-Switch via libdrm_nouveau) emits Maxwell SASS that differs from NVN in two ways our shader pipeline didn't account for, causing "infinite" loops during shader scanning. How? TryFindSize() previously detected end-of-shader only via NVN's "BRA $-1" self-branch trailer (SELF_BRANCH_A/B). Mesa-compiled shaders end with an unconditional @PT EXIT and emit no trailer, so scanning ran past the shader and looped to MAXIMUM_SIZE. Fix: Added a secondary match against @PT EXIT T (opcode 0xE30, predicate PT, flow T) as a fallback terminator. The mask is estrictive enough to reject predicated EXITs, conditional-flow EXITs, and sched control words, so well-formed NVN shaders see no ehavior change (their single @PT EXIT immediately precedes BRA $-1, and both detections return the same size). load_store_attribute.cpp + attribute.h IPA's is_perspective check only applied the ×position_w correction for IR::IsGeneric() attributes, and used a per-component SPH lookup. Two failure modes followed: 1. Mesa fragment shaders read varyings via legacy attribute slots (ColorFrontDiffuse, FixedFncTexture, FogCoordinate) which are remapped to generic varyings later by ConvertLegacyToGeneric. At IPA-translation time they're still legacy, so IsGeneric() was false and the inject was skipped — but the resulting GLSL/SPIR-V varying was Smooth (perspective-correct), and the SASS still issued its manual perspective dance via MUFU.RCP(ATTR_W)+FMUL, compounding an extra ×clip_w factor. NZP fog (eye_z distance varying) ended up as eye_z⁴×density² instead of eye_z²×density², saturating fog to white everywhere. 2. Even for legacy attrs that should inject, Mesa stores them in two formats selected by the IPA's interpolation_mode field: Pass/Multiply/Constant → attr/w (perspective); inject ×position_w Sc (ScreenLinear) → raw attr; do NOT inject Unconditionally injecting for Sc dims vertex colors by 1/clip_w because there's no SASS multiplier to round-trip it back. Fix: extend the IPA correction path to also fire on IsLegacyAttribute(), gated on interpolation_mode != Sc. While here, the generic-path check is widened from per-component to vector-level (first non-Unused PixelImap, with all-Unused fallthrough treated as Perspective) so it matches the GLSL interpolation qualifier picked by CollectInterpolationInfo — this fixes the same all-zeroed-imap case Mesa exposes for explicit generics. IsLegacyAttribute moved from translate_program.cpp's anonymous namespace into attribute.h next to IsGeneric so IPA can reach it. Tested on NaziZombies:Portable (Switch homebrew): fog now matches real hardware, vertex-colored geometry (hand, gun, decals) renders correctly. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4012 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> |
||
|---|---|---|
| .ci | ||
| .forgejo | ||
| .patch | ||
| .reuse | ||
| .tx | ||
| CMakeModules | ||
| dist | ||
| docs | ||
| externals | ||
| hooks | ||
| LICENSES | ||
| src | ||
| tools | ||
| .codespellrc | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .shellcheckrc | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| cpmfile.json | ||
| Doxyfile | ||
| LICENSE.txt | ||
| README.md | ||
| shell.nix | ||
Eden
Eden is a free and opensource (FOSS) Switch 1 emulator, derived from Yuzu and Sudachi - started by developer Camille LaVey. It's written in C++ with portability in mind, with builds for Windows, Linux, macOS, Android, FreeBSD and more.
Compatibility | Development | Building | Download | Support | License
Compatibility
The emulator is capable of running most commercial games at full speed, provided you meet the necessary hardware requirements.
A list of supported games will be available in future. Please be patient.
Check out our website for the latest news on exciting features, monthly progress reports, and more!
Development
Most of the development happens on our Git server. It is also where our central repository is hosted. For development discussions, please join us on Discord or Stoat. You can also follow us on X (Twitter) for updates and announcements.
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord or Stoat to learn more about the current state of the emulator.
See the sign-up instructions for information on registration.
Alternatively, if you wish to add translations, go to the Eden project on Transifex and review the translations README.
Documentation
We have a user manual! See our User Handbook.
Building
See the General Build Guide
For information on provided development tooling, see the Tools directory
Download
You can download the latest releases from here.
Save us some bandwidth! We have mirrors available as well.
Support
If you enjoy the project and would like to support us financially, please check out our developers' donation pages!
Any donations received will go towards things such as:
- Switch consoles to explore and reverse-engineer the hardware
- Switch games for testing, reverse-engineering, and implementing new features
- Web hosting and infrastructure setup
- Additional hardware (e.g. GPUs as needed to improve rendering support, other peripherals to add support for, etc.)
- CI Infrastructure
If you would prefer to support us in a different way, please join our Discord and talk to Camille or any of our other developers.
License
Eden is licensed under the GPLv3 (or any later version). Refer to the LICENSE.txt file.