Commit graph

28674 commits

Author SHA1 Message Date
lizzie
0bb2a632e3 add emutls.c 2026-05-17 09:23:37 +00:00
lizzie
1c8d2b7dae reduce arm codeisze, force 16x4 pages again 2026-05-17 09:23:37 +00:00
lizzie
654d0d7b93 extra buffer precautions to not exhaust DMem, format better + perf history nerf 2026-05-17 09:23:37 +00:00
lizzie
6ac3cb9e63 more inline pt2 2026-05-17 09:23:36 +00:00
lizzie
a3ab2d7beb fix atexit impl 2026-05-17 09:23:36 +00:00
lizzie
5d76e543eb fibers that don't immediately crash?!!?!?!!? 2026-05-17 09:23:36 +00:00
lizzie
27d044d71d add fallback buffer back 2026-05-17 09:23:36 +00:00
lizzie
0e3183c183 force running services on host 2026-05-17 09:23:36 +00:00
lizzie
f8494b9b5e fix alloc failures 2026-05-17 09:23:36 +00:00
lizzie
67cb64b114 fix sdl2 2026-05-17 09:23:36 +00:00
lizzie
85ce834abe fix for crashes on TLS due to openorbis being W E I R D 2026-05-17 09:23:36 +00:00
lizzie
ec8dce27ce opengl bullshit 2026-05-17 09:23:36 +00:00
lizzie
885612a4e3 proper memswap mechanism 2026-05-17 09:23:36 +00:00
lizzie
0080ef9935 more stupid stuff 2026-05-17 09:23:36 +00:00
lizzie
8fad5a1141 fixes 4 stuff 2026-05-17 09:23:36 +00:00
lizzie
b97c65d593 swap handling 2026-05-17 09:23:36 +00:00
lizzie
0062746e81 license 2026-05-17 09:23:36 +00:00
lizzie
1884df6a4c add sce_module so it loads on real hw 2026-05-17 09:23:36 +00:00
lizzie
aec92305e5 fixes for mbedtls 2026-05-17 09:23:36 +00:00
lizzie
42c4d063a7 adapt to new master 2026-05-17 09:23:36 +00:00
lizzie
a6b6980261 evil haxx 2026-05-17 09:23:36 +00:00
lizzie
3f03058ebc extra ps4 defs 2026-05-17 09:23:36 +00:00
lizzie
734f1e3273 make virtual buffer become an optional 2026-05-17 09:23:36 +00:00
lizzie
17952ded2b force NO fastmem 2026-05-17 09:23:36 +00:00
lizzie
7943df57e2 more memory shit 2026-05-17 09:23:36 +00:00
lizzie
8d475b4a9b MAP_SYSTEM 2026-05-17 09:23:36 +00:00
lizzie
2b26258be7 (likely) fixes for virtual dmem? 2026-05-17 09:23:36 +00:00
lizzie
d18219006b disable fastmem 2026-05-17 09:23:36 +00:00
lizzie
d4a79b199c try to fix the paths 2026-05-17 09:23:36 +00:00
lizzie
69248e7411 sysconf stub cuz crash(?) + some stderrp stuff 2026-05-17 09:23:36 +00:00
lizzie
d2092a37b1 the orb 2026-05-17 09:23:36 +00:00
lizzie
3584e14bab fself + pkg stuffs 2026-05-17 09:23:36 +00:00
lizzie
6a3ae7d0f6 make .pkg and .self 2026-05-17 09:23:36 +00:00
lizzie
c4e3fb5cd6 exclude more stuff from vulkan 2026-05-17 09:23:36 +00:00
lizzie
a3205b453b exclude from vulkan surface selection 2026-05-17 09:23:35 +00:00
lizzie
bfe72a790b buildable toolchain script + fixes for ffmpeg 2026-05-17 09:23:35 +00:00
lizzie
6c870fd933 merge 2026-05-17 09:23:35 +00:00
lizzie
161d37be7b merge 2026-05-17 09:23:35 +00:00
lizzie
9be4a1b890 fix 2026-05-17 09:23:35 +00:00
lizzie
a824e7ad78 toolchain-fix 2026-05-17 09:23:35 +00:00
lizzie
5aba461cb3
[common/wall_clock] fix invariant RDTSC divide by 0 (#3961)
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/3961
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-05-17 02:17:11 +02:00
lizzie
8330940eca
[docs] add CodingStyle + Coding guidelines, HOS kernel basics, 'Settings' and add external resources, add better docs for dtrace-tool.pl (#3964)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3964
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-05-17 02:16:48 +02:00
lizzie
4d49341918
[vk, opengl] recognize and use ETC2 (if available) textures natively (#3237)
Some checks failed
tx-src / sources (push) Has been cancelled
Check Strings / check-strings (push) Has been cancelled
this makes it so VK and OGL backends map the NVIDIA's ETC2 into VK_FORMAT_ETC-whatever and GL_ETC-whatever remaps, instead of using the default fallback for AR8G8B8. in short, just make the ETC2 textures be submitted as ETC2 instead of being submit as A8R8G8B8.

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3237
Reviewed-by: Ghost <>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-15 22:08:09 +02:00
lizzie
2f0f8a979c
[dynarmic, macroHLE] Use faster ankerl for xbyak maps (#3716)
the nominal std::unordered_map<> isn't enough to warrant it's continued usage in xbyak internal structures, thus using ankerl should greatly remove a lot of indirection/stdc++ specific overhead from the usually poorly performant std::unordered_map

Both dynarmic and macroHLE should benefit greatly from a less-stupid unordered_dense

This should speedup both CPU and shader compilation latency (NOT BY A GREAT MARGIN) just enough to make loading zones in ToTK less horrific

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3716
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-15 22:07:45 +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
lizzie
975aa4e2f2
[common] remove ptr indirection on WallClock (#3864)
also devirtualizes manually since compiler doesn't do it with LTO

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3864
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-15 22:06:38 +02:00
lizzie
a1f9e68f46
[hid_core] remove contentious mutex from EmulatedController and just rely on atomic semantics for fields (#3866)
inputs shouldnt be that critical to require a full mutex of them

this relies on CPU guaranteeing u32/u16/u8 atomic load/stores for EmulatedController fields, which works on x86_64 but may not have the same behaviour on other architectures - thats why i wrap them in `std::atomic<>`

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3866
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-15 22:06:23 +02:00
lizzie
02dee4a20b
[file_sys/system_archive] remove uneeded ctor/dtor initializations for std::map<> when creating system archives for nx_tzdb generated files (#3919)
sounds like word salad but let me say:

- std::map<> created a static ctor for EVERY SINGLE ZONEINFO
- fuck that, instead lets just use a raw array and construct things statically
- works the same except with less baggage carried around (+ less heap allocations!!!)

this should help reduce codesize due to the aforementioned global ctor/dtor

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3919
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-15 22:05:32 +02:00
lizzie
bc9b9480fb
[dynarmic] fix 12th-gen Intel CPUs crashing due to UMONITOR (#3954)
see https://github.com/herumi/xbyak/issues/255

> Proof: https://godbolt.org/z/9vseq4Ynj
> Xbyak currently implements it as:
> ```c++
> void umonitor(const Reg& r) {
> int idx = r.getIdx();
> if (idx > 7) XBYAK_THROW(ERR_BAD_PARAMETER) //umonitor DOES accept r8,r9,r10,etc this is NOT correct
> int bit = r.getBit();
> if (BIT != bit) {
>   if ((BIT == 32 && bit == 16) || (BIT == 64 && bit == 32)) {
>     db(0x67);
>   } else {
>     XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER)
>   }
> }
> db(0xF3); db(0x0F); db(0xAE); setModRM(3, 6, idx);
> }
> ```
> My program was throwing Xbyak::Exception and I tracked it down to this particular umonitor

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3954
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-15 22:01:42 +02:00
lizzie
d1ceeeca22
[cmake] use -mtls-dialect=gnu2 (#3948)
Some checks failed
tx-src / sources (push) Has been cancelled
Check Strings / check-strings (push) Has been cancelled
see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120933

we use TLS very sparingly (which is a good thing), some of our dependencies, in turn, may not
we should be aware of that fact

allegedly, there are minor glibc issues and such, but most distros should be fine
additionally, this is only enabled for FreeBSD and Linux, if it works on FreeBSD, naturally every Linux distro should support it as well

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3948
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-05-14 00:17:13 +02:00