Commit graph

10920 commits

Author SHA1 Message Date
lizzie
c2b5909a0d remove thread remnants 2026-06-16 01:19:10 +00:00
lizzie
8f7f858ab8 fucking rng 2026-06-16 01:19:10 +00:00
lizzie
88d3f75234 random stray devices ugh 2026-06-16 01:19:10 +00:00
lizzie
d0369f0ca2 native ps4 audio sink 2026-06-16 01:19:10 +00:00
lizzie
400663c48b reduce fiber sizes 2026-06-16 01:18:53 +00:00
lizzie
7cf31723f8 use dmem for swap buffers, restore full jit sizes 2026-06-16 01:18:53 +00:00
lizzie
d995d2cb0e force ankerl + fixup for OO with prelude commits 2026-06-16 01:18:53 +00:00
lizzie
159e3a2ac8 fixup shit 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
8277772f3e temp fix for dpad 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
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
371610bd9f fixes 4 stuff 2026-06-16 01:18:38 +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
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
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
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
BoiledElectricity
d698c3b601
[hle/fs] fix handle Temporary/ProperSystem/SafeMode save spaces instead of ASSERT(false) (#4069)
OpenSaveDataFileSystem was missing a few SaveDataSpaceId mappings, so it would hit ASSERT(false). This broke games that open cache storage, with TOTK being the obvious one, because save enumeration could assert before the game even finished loading.

Fixed this by mapping Temporary to user nand, and ProperSystem/SafeMode to system nand. These only get used for the free-space check here, so they just need to point somewhere sane.

Fixes: https://github.com/eden-emulator/Issue-Reports/issues/368
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4069
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-06-15 03:00:21 +02:00
lizzie
3875093c70
[hle] Fixes for nxident, nxmp and nxplay, remove hbl.nsp workarounds (#3996)
adds `gpio` and `i2c` services
implements `IApplicationFunctions::SetMediaPlaybackStateForApplicatio`
stubs `IBtmSystemCore::GetDiscoveredAudioDevice`
implements `nvhost_ctrl_gpu::PmuGetGpuLoad` IOCTL (0x20)
implements `PSM::GetBatteryAgePercentage`, `PSM::GetBatteryVoltageState` and `PSM::GetBatteryChargeInfoFields`
implements `ISystemSettingsServer::GetConsoleInformationUploadFlag`, `ISystemSettingsServer::SetConsoleInformationUploadFlag`, `ISystemSettingsServer::GetAutomaticApplicationDownloadFlag`, `ISystemSettingsServer::SetAutomaticApplicationDownloadFlag`, `&ISystemSettingsServer::GetUsb30EnableFlag`, `ISystemSettingsServer::SetUsb30EnableFlag`
removes `hbl.nsp` specific workarounds

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3996
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-06-12 23:48:24 +02:00
lizzie
5ba3ae32dc
[hle/sockets] fix crash when socket() isn't initialized but send()/recv() are called (#3729)
Some checks failed
tx-src / sources (push) Has been cancelled
Check Strings / check-strings (push) Has been cancelled
the correct behaviour would be for the hle service NOT to crash

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3729
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-06-06 03:54:55 +02:00
bdm110
fb6330645a
[file_sys] Avoid crash on empty NACP language entries (#4062)
This fixes an Android game library scan crash when reading XCI title metadata with empty or incomplete NACP language entries.

Previously, NACP::GetLanguageEntry() could fall back to:

language_entries.at(static_cast<u8>(Language::AmericanEnglish))

When language_entries was empty, this threw std::out_of_range and aborted the Android scan thread.

The new fallback preserves the existing lookup order:
1. preferred language entry with non-empty application name
2. any entry with non-empty application name
3. first available entry
4. static empty LanguageEntry if no entries exist

Tested locally with a Mainline RelWithDebInfo APK on Odin3 Android 15 using a large external TF-card ROM directory. The previous build crashed during fresh ROM scan; the patched build completes scanning normally.

Related my issue:
https://github.com/eden-emulator/Issue-Reports/issues/500

Co-authored-by: bdm110 <bdm110@prontmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4062
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-06-05 17:20:24 +02:00
lizzie
ce9c7c196d
[cmake] fix OpenSSL not using <openssl/cert.h> when applicable because it tries to use the system one instead of being explicitly linked (#4053)
should fix hiccups with self-built OpenSSL

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4053
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-06-04 19:39:09 +02:00
Duncan Ogilvie
aadcc24aac
[core/debugger] Protocol-compliant vCont support (#3896)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
(gdb) set scheduler-locking on
(gdb) continue

As discussed in #3848, follow-up to implement vCont support according to spec.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3896
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-06-04 05:49:23 +02:00
lizzie
89199f4d27
[*] basic in-house cpp linting (#4039)
- add `#pragma once` to remainder files
- "correcter" defines (ANDROID), see https://groups.google.com/g/android-ndk/c/cf9_f1SLXls
- extra miscelly fixups

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4039
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-06-04 05:49:07 +02:00
crueter
eaece15dbd
[svc] Stub BreakDebugProcess (#4044)
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4044
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
2026-06-02 03:33:38 +02:00
crueter
706a3d0764
[cmake] Disable no-cast-function-type-mismatch on Clang 19 (#4038)
Suppresses this annoying warning during Android builds

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4038
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-06-02 01:28:16 +02:00
MaranBr
0473747f94
[am] Fix application state notification (#4027)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
This fixed issues in Mario Kart 8 multiplayer where the native controller applet would pop up, then once A was pressed and it exited, it would freeze the game but music would continue playing.

The issue was that UpdateRequestedFocusState() updates the focus state but never sets m_has_focus_state_changed for applications. Since ShouldSignalSystemEvent() checks that flag for applications, they never receive FocusStateChanged messages when LLE library applets exit. The game keeps running (hence the music) but is stuck waiting for a focus notification that never arrives. HLE applets aren't affected because their dummy process has is_process_running=false, so the game is never considered obscured in the first place.

Credits: [davidcollini](https://github.com/davidcollini)

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4027
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-31 03:55:12 +02:00
lizzie
7c32cf03a1
[core/core_timing] better MWAITX and WAITPKG delays (#3984)
This implements MWAITX and WAITPKG extensions (umonitor, mwait) for CPUs that support them.

Reduces wait times and bypasses the timing stuff from the OS that is slow (windows notably). generally it should answer within 0.2 to 0.5 microsecs (since most requests wait for that long).

Also does a general rework of static ctors and stuff

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3984
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-30 21:59:10 +02:00
Yang Liu
ff7bbaea7d
[dynarmic] bootstrap loongarch64 host build (#4015)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
Minimal additions to make Eden compile.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4015
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-30 01:42:23 +02:00
lizzie
9d55875377
[*] fix missing '#pragma once' on header files (#4014)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
`find src -type f -name '*.h' -not -exec grep -q "#pragma once" {} \; -print`

- ignore qt with header guards already
- smaa too

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4014
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-26 06:37:59 +02:00
crueter
4a11d5db2f
[file_sys] Increase max file limit to 8192 (#4011)
Now hopefully the Redditors can get off my ass for five seconds

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4011
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-25 18:53:47 +02:00
maufeat
c6afeb2bf8
[nvnflinger] Add case for DefaultDataSpace (#3956)
Amaterasu from Discord asked about why nvnWindowGetNumActiveTextures returns 0 - after researching the console output it was asking for `DefaultDataSpace` (enum val 12) after some tests with the mod and debugging the console, this is my one-liner solution.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3956
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-05-24 01:05:29 +02:00
lizzie
2aa2ac7d9a
[hle/service{nvdrv,apm}] fixes for TetrisSwitch (#3983)
- testriswitch submits buffers with a fence id of -1, just skip them instead of trying to process them?
- apm:u, which is removed, but hey, backwards compat never hurted
- another instance of shared_memory crashing NPad

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3983
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-05-24 01:04:32 +02:00
lizzie
37b5cf6003
[audio_core, hle, video_core] force inline of functions that only contain thread loops (#3970)
traditionally, when doing jthread:

```
jthread() calls function parameter operator()() with args
function operator()() calls the code within
code within is, say { ThreadMain(); }
3 calls because why not
```

now this just makes it be 2 calls, mainly benefits non-LTO builds

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3970
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-23 21:16:28 +02:00
lost-chaos
d761ecba8c
[core/arm/nce] suppress unused variable warnings (#4002)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
Add `[[maybe_unused]]` to unused constants in the ARM NCE backend to suppress compiler warnings.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4002
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-23 15:31:23 +02:00
xbzk
83683440b2
[net] ban api.epicgames.dev domain (#3999)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
Adding 'api.epicgames.dev' to the banlist, as instructed by lizzie.

MCI insists on connection and randomly crashes at Network::Poll(...).
Airplane mode would do, but then the DLC gets unavailable.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3999
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
2026-05-22 22:48:15 +02:00
lizzie
46cfd9b6f3
[net] support SCTP protocols (+all base FBSD protos), ban more NS domains (#3955)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
bans more NS domains making hb dns check pass

also fixes bogus "SCTP is not implemented" assertion for translate protocol

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3955
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-21 21:24:18 +02:00
crueter
feb8c5f88e
[desktop] More qt_common reorganization (#3916)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
Ported from QML branch.

Main "big" change is that EmuThread is now a shared state in QtCommon,
not individually managed/passed around by GRenderWindow and MainWindow.

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3916
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-20 04:49:16 +02:00
lizzie
300a646a34
[hle] make HBLoader work, add -hlaunch option (#3981)
hbloader is required to launch a bunch of shit (particularly hbmenu)

however due to some restrictive metadata validation, it doesn't get recognized as an NSP file

programs like hbmenu require hbloader (since it feeds them data like ConfigEntries and whatnot), launching hbmenu as-is standalone will result in a launchInit() error

adds an option to launch hbmenu via command line

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3981
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-19 23:35:53 +02:00
lizzie
e875a3196b
[core/hle/services/sockets] allow 'valid' range from [16,255] for IPv4 (#3491)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3491
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-05-18 23:54:47 +02:00
lizzie
7455854528
[core/memory] remove duplicates from template when unsafe=T/F, remove increment, remove sad path for exception code on cache op (#3972)
Ideally this should increase perf when doing write/read operations
not by a lot, just enough for it not to suck so much as it does right now

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3972
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-05-18 23:28:01 +02:00
lizzie
413c7543ba
[hle] inline HLE cmif request to not allocate on heap stuff (#3605)
so basically each construction of HLEContext and whatever would result in a heap allocation (atleast 1)

so what if instead of that we did a memset() at ctor time and we avoided heap allocations altogether?

reminder that std::vector<> CAN do small object optimisation but it's not guaranteed

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3605
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-15 22:07:03 +02:00