<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/core/core_timing.cpp, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2026-10-30T06:31:58+00:00</updated>
<entry>
<title>nx2: run the guest counter at 31.25 MHz for Switch 2 titles</title>
<updated>2026-10-30T06:31:58+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T05:55:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=0218eacfd560d0ce48b3ffe64d279ee85bbf1347'/>
<id>urn:sha1:0218eacfd560d0ce48b3ffe64d279ee85bbf1347</id>
<content type='text'>
The Switch 2 counter runs at 31.25 MHz and its SDK converts ticks with
that constant: Mario Kart World's sdk builds 31,250,000 in
nn::os::GetSystemTickFrequency, TickManager::ConvertToTimeSpan and
TickManager::ConvertToTick (19.2 MHz appears nowhere). Eglantine counted
at the Switch 1 rate for every title, so every tick-based time in a
Switch 2 game was off by 1.63x: elapsed times read short, and a deadline
of one 60 Hz frame converted to ticks waited ~27 ms.

The wall clock now has a guest counter frequency, set at boot: 31.25 MHz
for Switch 2 programs, 19.2 MHz otherwise, EDEN_NX2_CNTFRQ=&lt;Hz&gt; to force
one. CNTPCT reads, CNTFRQ_EL0, svcGetSystemTick, thread tick counts and
the time services' tick conversions follow it, and the CNTPCT spin
detection keeps its ~1.7 us threshold.

Mario Kart World, title screen and attract demo, 180 s, same build:
frame times unchanged (17-19 ms once warm), process CPU time 848 s
instead of 930 s.
</content>
</entry>
<entry>
<title>core_timing: request the timer thread's stop before waking it</title>
<updated>2026-10-30T04:54:36+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T04:53:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=b937805eb573cbad52fc698fd149752eae0ddc81'/>
<id>urn:sha1:b937805eb573cbad52fc698fd149752eae0ddc81</id>
<content type='text'>
CoreTiming::Reset set pause_event and event, and only then requested the
stop. The woken timer thread could take the wake-up, still see no stop
request, and go back to waiting on pause_event for good; the join that
follows then hung the frontend while booting a game ("Not Responding",
main thread in CoreTiming::Reset -&gt; std::thread::join). Request the stop
first, so the thread sees it whenever it wakes.
</content>
</entry>
<entry>
<title>[core, gpu, threads] Multithreading refactor (#4254)</title>
<updated>2026-08-08T02:39:47+00:00</updated>
<author>
<name>CamilleLaVey</name>
<email>camillelavey99@gmail.com</email>
</author>
<published>2026-08-08T02:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=3f52bf4b4b34922f9991e4696d27a8f432fe6ea2'/>
<id>urn:sha1:3f52bf4b4b34922f9991e4696d27a8f432fe6ea2</id>
<content type='text'>
This insufferable work tries to cover some holes on previous threading implementation from yuzu's team, starting with Windows and Linux reordering of priorities (NICE), reworks previous Android's threading and cpu affinity with adpf, adjust emulated clocks/gpu for better "accuracy" with their work, bumps android minSDK for all flavors, legacy will now work with AP 29 to cover A10 - A12, standard will reach A13 as base and finally the optimized build will come with API 35, mostly targeted on devices with A15 support and newer, NDK and AGP wasn't upgraded yet. The performance cost efficiency have been improved based on device power configuration; preventing overheating if certain devices tended to fall into NICE0 (not allocated threads priority, all task ran with higher priority, 11 tasks running within the limited 2 - 7 threads available on the most common configuration 1x3x4 or 1x4x3).

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4254
</content>
</entry>
<entry>
<title>[core/core_timing] better MWAITX and WAITPKG delays (#3984)</title>
<updated>2026-05-30T19:59:10+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-05-30T19:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=7c32cf03a1ce2a88b5bda041a5aebc8405fe634d'/>
<id>urn:sha1:7c32cf03a1ce2a88b5bda041a5aebc8405fe634d</id>
<content type='text'>
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 &lt;lizzie@eden-emu.dev&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3984
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
Reviewed-by: crueter &lt;crueter@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[common] remove ptr indirection on WallClock (#3864)</title>
<updated>2026-05-15T20:06:38+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-05-15T20:06:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=975aa4e2f2128b865ec5738c2704c8d37af6a7b9'/>
<id>urn:sha1:975aa4e2f2128b865ec5738c2704c8d37af6a7b9</id>
<content type='text'>
also devirtualizes manually since compiler doesn't do it with LTO

Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3864
Reviewed-by: crueter &lt;crueter@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[windows] Return x86 microsleep for Windows (#3563)</title>
<updated>2026-02-17T05:15:45+00:00</updated>
<author>
<name>John</name>
<email>john@eden-emu.dev</email>
</author>
<published>2026-02-17T05:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=5fb3ae487cbf80d2a0c16ba2993f35eeebe9d115'/>
<id>urn:sha1:5fb3ae487cbf80d2a0c16ba2993f35eeebe9d115</id>
<content type='text'>
Microsleep removal may have regressed AOC in msvc

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3563
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-by: Lizzie &lt;lizzie@eden-emu.dev&gt;
Co-authored-by: John &lt;john@eden-emu.dev&gt;
Co-committed-by: John &lt;john@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[windows] return x86 microsleep for mingw only (#3544)</title>
<updated>2026-02-15T02:41:25+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-02-15T02:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=bcd22d9f8b53efb0051ca2a12fb4fa1ff626b344'/>
<id>urn:sha1:bcd22d9f8b53efb0051ca2a12fb4fa1ff626b344</id>
<content type='text'>
Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3544
Reviewed-by: Maufeat &lt;sahyno1996@gmail.com&gt;
Reviewed-by: DraVee &lt;dravee@eden-emu.dev&gt;
Co-authored-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Co-committed-by: lizzie &lt;lizzie@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[frontend] Slow and Turbo modes (#3525)</title>
<updated>2026-02-12T00:31:55+00:00</updated>
<author>
<name>crueter</name>
<email>crueter@eden-emu.dev</email>
</author>
<published>2026-02-12T00:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=2b979024cb901099fee264866c135acc59256189'/>
<id>urn:sha1:2b979024cb901099fee264866c135acc59256189</id>
<content type='text'>
Closes #3344

Adds slow and turbo modes with configurable speeds that can then be
toggled by the user. Behavior is:
- Standard/slow limit, toggle turbo = turbo
- Turbo limit, toggle turbo = standard
- Standard/turbo limit, toggle slow = slow
- Slow limit, toggle slow = standard

Enabling the turbo/slow mode enables the frame limiter unconditionally.

This has some conflicts with VSync. For example when I set my refresh
rate to 60hz and enable vsync, turbo mode does nothing. Not sure how to
go about fixing this, @MaranBr probably knows better the proper
solution.

Signed-off-by: crueter &lt;crueter@eden-emu.dev&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3525
Reviewed-by: DraVee &lt;dravee@eden-emu.dev&gt;
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
</content>
</entry>
<entry>
<title>[core, windows] remove microSleep() and simply wait on events like on linux (#3498)</title>
<updated>2026-02-09T00:14:32+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-02-09T00:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=a56b8d3de8af670fb1d8c70211ca5275c1aa4c52'/>
<id>urn:sha1:a56b8d3de8af670fb1d8c70211ca5275c1aa4c52</id>
<content type='text'>
we shall see if the original code was put there for a reason

or if the microsleeps actually are horrid

Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3498
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Co-authored-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Co-committed-by: lizzie &lt;lizzie@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[common, core] remove uneeded memory indirection overhead at startup (#3306)</title>
<updated>2026-01-16T22:39:16+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-01-16T22:39:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=83a28dc251c287888d99e045a2682a89c8cd4efe'/>
<id>urn:sha1:83a28dc251c287888d99e045a2682a89c8cd4efe</id>
<content type='text'>
for core stuff:
just remove unique ptrs that dont need any pointer stability at all (afterall its an allocation within an allocation so yeah)

for fibers:
Main reasoning behind this is because virtualBuffer&lt;&gt; is stupidly fucking expensive and it also clutters my fstat view
ALSO mmap is a syscall, syscalls are bad for performance or whatever
ALSO std::vector&lt;&gt; is better suited for handling this kind of "fixed size thing where its like big but not THAT big" (512 KiB isn't going to kill your memory usage for each fiber...)

for core.cpp stuff
- inlines stuff into std::optional&lt;&gt; as opposed to std::unique_ptr&lt;&gt; (because yknow, we are making the Impl from an unique_ptr, allocating within an allocation is unnecessary)
- reorganizes the structures a bit so padding doesnt screw us up (it's not perfect but eh saves a measly 44 bytes)
- removes unused/dead code
- uses std::vector&lt;&gt; instead of std::deque&lt;&gt;

no perf impact expected, maybe some initialisation boost but very minimal impact nonethless
lto gets rid of most calls anyways - the heavy issue is with shared_ptr and the cache coherency from the atomics... but i clumped them together because well, they kinda do not suffer from cache coherency - hopefully not a mistake

this balloons the size of Impl to about 1.67 MB - which is fine because we throw it in the stack anyways

REST OF INTERFACES: most of them ballooned in size as well, but overhead is ok since its an allocation within an alloc, no stack is used (when it comes to storing these i mean)

Signed-off-by: lizzie lizzie@eden-emu.dev
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3306
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
Co-authored-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Co-committed-by: lizzie &lt;lizzie@eden-emu.dev&gt;
</content>
</entry>
</feed>
