Commit graph

25323 commits

Author SHA1 Message Date
lizzie
03be2cd194 mark codeblocks as noexcept 2026-06-16 01:18:53 +00:00
lizzie
28866bd73f make a bit more mergeable 2026-06-16 01:18:53 +00:00
lizzie
49073b7bc7 revert input system to main 2026-06-16 01:18:53 +00:00
lizzie
28731cb4fd stub add proper iostream init 2026-06-16 01:18:53 +00:00
lizzie
009a2480c0 update loicense 2026-06-16 01:18:53 +00:00
lizzie
cfdfe1e280 restore stupid lock, make ps4sup library 2026-06-16 01:18:53 +00:00
lizzie
99ad476f35 bs fix 2026-06-16 01:18:53 +00:00
lizzie
8277772f3e temp fix for dpad 2026-06-16 01:18:53 +00:00
lizzie
b5a7c6eb82 add emutls.c 2026-06-16 01:18:53 +00:00
lizzie
717ee45123 reduce arm codeisze, force 16x4 pages again 2026-06-16 01:18:53 +00:00
lizzie
4c11cee393 extra buffer precautions to not exhaust DMem, format better + perf history nerf 2026-06-16 01:18:53 +00:00
lizzie
8536864728 more inline pt2 2026-06-16 01:18:53 +00:00
lizzie
08b0b0d43e fix atexit impl 2026-06-16 01:18:53 +00:00
lizzie
a67b3dde45 fibers that don't immediately crash?!!?!?!!? 2026-06-16 01:18:53 +00:00
lizzie
a60cb0bd55 force running services on host 2026-06-16 01:18:40 +00:00
lizzie
8cc383baa2 fix alloc failures 2026-06-16 01:18:40 +00:00
lizzie
0cd160529d fix for crashes on TLS due to openorbis being W E I R D 2026-06-16 01:18:40 +00:00
lizzie
52f66fc6fe opengl bullshit 2026-06-16 01:18:40 +00:00
lizzie
476e147e8e proper memswap mechanism 2026-06-16 01:18:40 +00:00
lizzie
2436f61906 more stupid stuff 2026-06-16 01:18:38 +00:00
lizzie
371610bd9f fixes 4 stuff 2026-06-16 01:18:38 +00:00
lizzie
1fa935017b swap handling 2026-06-16 01:18:36 +00:00
lizzie
4e48f86764 license 2026-06-16 01:18:27 +00:00
lizzie
8ed9abdef0 evil haxx 2026-06-16 01:18:27 +00:00
lizzie
5e39fcd808 extra ps4 defs 2026-06-16 01:18:27 +00:00
lizzie
277585c128 force NO fastmem 2026-06-16 01:18:25 +00:00
lizzie
1fa25f8f39 more memory shit 2026-06-16 01:17:55 +00:00
lizzie
0c0dca0404 MAP_SYSTEM 2026-06-16 01:17:55 +00:00
lizzie
a0dda12845 (likely) fixes for virtual dmem? 2026-06-16 01:17:55 +00:00
lizzie
53af7d2caf disable fastmem 2026-06-16 01:17:55 +00:00
lizzie
071910cea5 try to fix the paths 2026-06-16 01:17:55 +00:00
lizzie
2a0bd012f8 sysconf stub cuz crash(?) + some stderrp stuff 2026-06-16 01:17:54 +00:00
lizzie
9f9df4610d the orb 2026-06-16 01:17:31 +00:00
lizzie
f94f8fcd94 fself + pkg stuffs 2026-06-16 01:17:31 +00:00
lizzie
b169ff9aa3 make .pkg and .self 2026-06-16 01:17:31 +00:00
lizzie
fba819fd77 exclude more stuff from vulkan 2026-06-16 01:17:31 +00:00
lizzie
e7904b16b5 exclude from vulkan surface selection 2026-06-16 01:17:31 +00:00
lizzie
d4b9bbbce7 merge 2026-06-16 01:17:31 +00:00
lizzie
3787254d0d merge 2026-06-16 01:17:31 +00:00
lizzie
c8c61a12c3
[dynarmic, MacroHLE] Fix crashes on W^X systems (#4090)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
should fix crashes on:
- NetBSD
- SELinux
- OpenBSD
- other W^X systems
- some person trying to be funny with W^X on their system even if they dont have to

perf impact should be minimal

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4090
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 22:06:14 +02:00
lizzie
b05463ee19
[fs] use XDG_CACHE_HOME for shader caches (#4093)
makes it so the shader cache goes properly in `XDG_CACHE_HOME`.

SOME people have it set to point to `/tmp` AND as a ramdisk, if they can do that they probably would want their shader caches to be there as well and wouldnt mind the extra hit from invalidations on reboot.

afterall, its a cache, not some holy data that needs to be kept at all costs.

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4093
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 22:05:53 +02:00
lizzie
561adac0af
[common] fallback to VirtualBuffer if we can't use file mappings (#4005)
fixes:
- windows 8.1
- windows 7
- managarm
- openorbis

Signed-off-by: lizzie lizzie@eden-emu.dev

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4005
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 22:05:42 +02:00
lizzie
62ef8b15fd
[video_core] correct not-quite-correct PTE_kind enumeration (#4077)
should now be more align with actual values/enums :)
trivial change

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4077
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 22:05:18 +02:00
lizzie
8e9513cb5f
[service/ro] Fix too many plugin.nro not being loaded for SSBU (#3982)
Good fix or absolute trash?

For me it seems like an OK balance, better would be fully dynamic; but I believe 256 is a reasonable limit?

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3982
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 21:59:53 +02:00
lizzie
950e0f82fb
[hle/sm] implement sm:AtmosphereHasService (#3771)
should make a few more homebrew boot :)

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3771
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 21:56:22 +02:00
lizzie
74a6607f8e
[fs] do not early abort on IterateDirEntries{Recursively} (#4100)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
should fix some issues with some NAS setups
where people have their games on a NAS and they
try to access it but for some reason some file
just doesnt load, instead of aborting early we continue
for the rest of the files in the directory

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4100
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-06-15 21:31:20 +02:00
BoiledElectricity
5ebb5b8772
[opengl] query GL_MAX_CLIP_DISTANCES instead of hardcoding 8 (#4095)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
The GL shader profile hardcoded max_user_clip_distances to 8. Query the
device limit like the Vulkan path already does (it reads
maxClipDistances), so we use what the host actually reports.

Clamp to Maxwell's NumClipDistances (8) since the guest never produces
more than that and the SPIR-V output array is sized for at most 8. So a
host reporting fewer than 8 is respected, and one reporting more can't
overrun anything.

Fixes #3910
https://git.eden-emu.dev/eden-emu/eden/issues/3910

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4095
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
2026-06-15 04:30:40 +02:00
xbzk
73918d23d5
[video_core, maxwell] fixes for homebrew games that use MESA compiler (#4012)
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>
2026-06-15 03:05:11 +02:00
BoiledElectricity
ef4113aeaa
[video_core] fix TOCTOU in Vulkan instance extension enumeration (#4072)
So CreateInstance was enumerating instance extensions twice, and that could race if the driver returned a different list the second time. On some AMD iGPU drivers, we could enable an extension from the first list, then fail the second check with VK_ERROR_EXTENSION_NOT_PRESENT.

Fix this by enumerating once and passing that same snapshot into RequiredExtensions.

Fixes: https://github.com/eden-emulator/Issue-Reports/issues/414
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4072
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-06-15 03:02:53 +02:00
xbzk
78a1cd0533
[hle] support passing arguments to homebrew applications (#4013)
Homebrew (.NRO) program args support

Adds a 'program_args' setting and delivers it to NRO homebrews via libnx's homebrew ABI. NROs previously had no way to receive CLI flags (e.g. NZ:P's -noglsl).

Setting: program_args, Category::System, startup-only.
Surfaced in Qt + Android Debug sections.

NRO loader: builds a 4-entry 'ConfigEntry' table + argv at the data segment tail; prepends 'homebrew ' so user args land at argv[1]; scans for 'svc #7' to use as LR. Drops the stale NSO-style argdata append.

KProcess: stores loader-provided guest addresses; 'Run' switches to the homebrew entry (x0=config_ptr, x1=-1, lr=svc7) and patches the real MainThreadHandle into the ConfigEntry slot. Legacy NSO path unchanged.

Tested on NZP — args reach 'argv' correctly.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4013
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-06-15 03:02:33 +02:00