<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/core/hle/service/nifm/nifm.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-11-02T23:46:55+00:00</updated>
<entry>
<title>network: keep bsd sockets alive across concurrent close and fix room gaps</title>
<updated>2026-11-02T23:46:55+00:00</updated>
<author>
<name>cirakg</name>
<email>cirakg@cirakg.xyz</email>
</author>
<published>2026-11-02T23:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=36d3d002e5bd75596b8cf00c1115632a5ae8976a'/>
<id>urn:sha1:36d3d002e5bd75596b8cf00c1115632a5ae8976a</id>
<content type='text'>
bsd runs on three host threads, but its calls kept a raw reference into
the shared descriptor table while they used a socket. A close() on
another thread could then destroy the socket mid-call. Waking a blocked
room recv() on close made this happen every time. Every call now works
on a copy of the descriptor taken under the table lock, poll() keeps its
sockets alive while it waits, and close() resets the slot only if it
still holds the same socket.

accept() picked a free fd before blocking and only locked the write, so
another thread could publish a socket in the same slot. It now picks
and writes the fd in one critical section after Accept() returns. dup()
now re-checks the source fd under the lock.

A duplicated fd shares its socket, so the room packet loop queued each
packet once per fd. Deliver it once per socket.

NIFM: when the selected host adapter is missing, the room still works
and IsNetworkAvailable reports it, but GetCurrentNetworkProfile returned
an empty profile. Report a wired room profile in that case, and put the
room address on the first adapter in EnumerateNetworkInterfaces.

Assisted-by: Claude Opus 5.5 (investigation and implementation)
</content>
</entry>
<entry>
<title>network: fix room socket races and share the room network check</title>
<updated>2026-11-02T23:17:34+00:00</updated>
<author>
<name>cirakg</name>
<email>cirakg@cirakg.xyz</email>
</author>
<published>2026-11-02T23:17:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=78e0a12180a71adf8dffc2c2f6697a0a0735d5ea'/>
<id>urn:sha1:78e0a12180a71adf8dffc2c2f6697a0a0735d5ea</id>
<content type='text'>
bsd:s, bsd:u and bsd:a share one file descriptor table, but each
service bound its own proxy packet callback, so every room packet was
queued three times on each socket. Bind the callback once.

The room thread walked the descriptor table without a lock while bsd
created and closed sockets, so it could reach a destroyed or not yet
created socket. Guard the table with a mutex, and publish a socket only
after it is created and initialized. Check airplane mode before an fd
is taken, so a refused socket no longer leaks its slot.

ProxySocket now initializes protocol, decompresses packets outside the
packet lock without copying the compressed data first, and keeps a read
offset for partial TCP reads instead of erasing from the front.

Add Network::GetRoomIPv4Address(), set only in the Joined and Moderator
states. NIFM uses it for network availability and for every reported
address, including EnumerateNetworkInterfaces and GetCurrentIpAddress,
so no call reports the room address while another rejects the network.

Assisted-by: Claude Opus 5.5 (investigation and implementation)
</content>
</entry>
<entry>
<title>network: fix room host LAN Play and room socket review issues</title>
<updated>2026-11-02T22:40:30+00:00</updated>
<author>
<name>cirakg</name>
<email>cirakg@cirakg.xyz</email>
</author>
<published>2026-11-02T22:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=694bc8df5c8d5b614bdbdbfa43c57a08316f88c2'/>
<id>urn:sha1:694bc8df5c8d5b614bdbdbfa43c57a08316f88c2</id>
<content type='text'>
The room host and room moderators are in the Moderator state, not
Joined, so the airplane mode override for joined rooms did not apply to
them and LAN Play still returned them to the menu. Accept both states.
Share the room address override between the NIFM profile and IP config
calls so they cannot drift apart.

recv() on a room TCP socket now waited for the receive timeout, because
Recv goes through RecvFrom. Room TCP sockets have no peer, so keep the
previous immediate end-of-stream result when nothing is queued.

Close() now drops queued packets and wakes a blocked recv, which then
fails with EBADF. The socket state that the room thread reads when it
queues a packet is now guarded by the packet mutex.

Assisted-by: Claude Opus 5.5 (investigation and implementation)
</content>
</entry>
<entry>
<title>nifm: treat a joined room as the LAN for local network games</title>
<updated>2026-11-02T21:52:39+00:00</updated>
<author>
<name>cirakg</name>
<email>cirakg@cirakg.xyz</email>
</author>
<published>2026-11-02T21:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=fcd6a3d8950e7de8e99afa5b04386eb8ab710f18'/>
<id>urn:sha1:fcd6a3d8950e7de8e99afa5b04386eb8ab710f18</id>
<content type='text'>
LAN Play through public lobby rooms failed in two ways.

With airplane mode on (the default), IRequest::GetResult rejected the
game's network request. Mario Kart World then opened the net-connect
applet and returned to the main menu instead of the LAN browser. A
joined room is the emulated network: its sockets only reach room
members. Count it as an available network for GetResult and
IsAnyInternetRequestAccepted.

With airplane mode off, players could open the browser but never saw
each other. Room fake IPs are spread over 192.168.0.0/16, and some room
servers give members different /24s. NIFM reported the host adapter's
/24 mask with the fake IP, so the games treated each other as off-subnet.
Report 255.255.0.0 in a room instead.

Assisted-by: Claude Opus 5.5 (investigation and implementation)
</content>
</entry>
<entry>
<title>Revert "[hle] constexpr handler dispatch maps, introduce version gating (#4480)" (#4532)</title>
<updated>2026-10-15T06:45:15+00:00</updated>
<author>
<name>PavelBARABANOV</name>
<email>pavelbarabanov94@gmail.com</email>
</author>
<published>2026-10-15T06:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=e255c20db4111485d228c10478bda63aabcfdde5'/>
<id>urn:sha1:e255c20db4111485d228c10478bda63aabcfdde5</id>
<content type='text'>
This reverts commit 218c6705d950635bc18f8458d738a1996fb592b6.

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4532
Reviewed-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-by: Maufeat &lt;sahyno1996@gmail.com&gt;
</content>
</entry>
<entry>
<title>[hle] constexpr handler dispatch maps, introduce version gating (#4480)</title>
<updated>2026-10-13T02:38:36+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-10-13T02:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=218c6705d950635bc18f8458d738a1996fb592b6'/>
<id>urn:sha1:218c6705d950635bc18f8458d738a1996fb592b6</id>
<content type='text'>
This PR primarily focuses on upbringing constexpr maps for handlers.

Each time an HLE object of a service is construed, it registers it's own handlers, over and over.
Regardless of whetever it needs them at the moment or not.
Additionally we don't require to keep track of different function pointers amongst each object.
This can be done by overriding the given function instead, as opposed to having a separate
hash map for every given object.

In other words: Remove handlers (and handlers_tipc) map for every instance
then read from a static defined per-class.

- [x] Migrate all HLE functions to new `frozen::map` constexpr time finder
- [ ] Measure if this approach actually makes better codegen

Optional:
- [x] Properly gate all functions (that have versions commented next to them)
- [x] Maybe store `HandlerFnP&lt;&gt;` and `const char*` separately, version gating can go in a different map as well

Information such as name can be used on debug builds, but doesn't particularly help on release as one can consult an external reference (or have an annotated IPC map)

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

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Co-authored-by: Maufeat &lt;sahyno1996@gmail.com&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4480
Reviewed-by: Maufeat &lt;sahyno1996@gmail.com&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[hle] Enforce max_sessions, add bpc:ams service (#4394)</title>
<updated>2026-09-11T19:38:52+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-09-11T19:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=8a22f1845b8b7ec19fbb518b696513e36d42b317'/>
<id>urn:sha1:8a22f1845b8b7ec19fbb518b696513e36d42b317</id>
<content type='text'>
As per switchbrew, as per atmosphere, and some poking around.

bpc:ams stubbed for now.

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

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4394
Reviewed-by: Maufeat &lt;sahyno1996@gmail.com&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[common] Switch to boost::unordered_flat containers (#4326)</title>
<updated>2026-08-31T00:58:09+00:00</updated>
<author>
<name>crueter</name>
<email>crueter@eden-emu.dev</email>
</author>
<published>2026-08-31T00:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=7fda6dde73ab9fa1eab40d43c90720a1d9ba054f'/>
<id>urn:sha1:7fda6dde73ab9fa1eab40d43c90720a1d9ba054f</id>
<content type='text'>
Replaces all instances of ankerl's unordered map/set with boost's
`unordered_flat_*` classes. This uses std::hash since boost::hash is
actually a lot slower.

Also adds an abstraction layer in `Common` so future changes are quicker
and easier.

Other implementation details:
- ankerl provided hash specializations for tuple and pair, so those were
  ported here
- std::erase_if doesn't work on boost, so just used the ADL'd erase_if

This should be about equal or superior performance as unordered_dense for everything except iteration.

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

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4326
Reviewed-by: Lizzie and Samuel &lt;lizzie@eden-emu.dev&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>Revert #3970 #4177 (#4187)</title>
<updated>2026-07-09T17:02:26+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-07-09T17:02:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=3fd6eeaf9fb42c942ffbc2a60a50dd8ebfd8dfee'/>
<id>urn:sha1:3fd6eeaf9fb42c942ffbc2a60a50dd8ebfd8dfee</id>
<content type='text'>
3970 revert fixes crash caused by scheduler
4177 fix mario galaxy and metroid prime 4 not booting

Co-authored-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4187
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[hle] remove parent object reference data on Request/Response builders, pass by argument (#3774)</title>
<updated>2026-06-29T06:11:12+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-06-29T06:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=1b482fa99b3f9438ac287d99f963effed036ba56'/>
<id>urn:sha1:1b482fa99b3f9438ac287d99f963effed036ba56</id>
<content type='text'>
anyways this should remove a bunch of redundant code/stack usage for response builders (ahem, msvc)

SHOULD help games that use IPC heavily like PKZA and whatnot

biblical levels of performance greed

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

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3774
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-by: Maufeat &lt;sahyno1996@gmail.com&gt;
</content>
</entry>
</feed>
