Repository navigation
Add native SM and CSRNG IPC transport - #171
Open
b4f8abbb24dbf56a7d0280f296e16eeb wants to merge 1 commit into
Open
b4f8abbb24dbf56a7d0280f296e16eeb wants to merge 1 commit into
b4f8abbb24dbf56a7d0280f296e16eeb wants to merge 1 commit into
Conversation
Implement checked HIPC/CMIF parsing, owned generation-tagged sessions and native synchronous SVC dispatch for the bounded service-manager and random-number service path. Route existing HIPC compatibility adapters through the same backend while preserving olsc responses and retaining the entropy takeover pending original-SDK validation. Validate guest memory and hold backing stable through writes. Add independent wire, malformed-packet, handle-lifetime and production-dispatch fixtures, including 4 KiB and 16 KiB backing.
ltrdpper
pushed a commit
to ltrdpper/BananaNative
that referenced
this pull request
Nov 12, 2026
…rmanent loss, so the sound comes back on the return' (seedds#171) from FrenklinFish/BananaNative:android-audio-focus into android Reviewed-on: https://git.eden-emu.dev/moceure/BananaNative/pulls/171
ltrdpper
pushed a commit
to ltrdpper/BananaNative
that referenced
this pull request
Nov 12, 2026
…e-43only seedds#163's Speedhack setting takes field 21 of the profile row (skipLayersOf, Profile.skipLayers); the 4:3 variants move to field 22. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ltrdpper
pushed a commit
to ltrdpper/BananaNative
that referenced
this pull request
Nov 12, 2026
…settings, Ocarina of Time on Qualcomm - Game language: Polish (pl) and Thai (th), from SDK 21's own settings table (sdk+0xc62b5c in Ocarina of Time lists pt-BR, pl, th); the launcher list, the host's DM_LANG mapping and GetAvailableLanguageCodes. Ocarina of Time (`0400486024DEC000`) carries EUpl messages, Donkey Kong Bananza (`040074A01BF12000`) 1.1 EUpl and THth. - Launcher: one full page per game with tabs Performance (Picture, Speed, Advanced), Game (options, Game language, Controls), Saves and Storage; rows wrap and say what they do; profile options keep their description and say when they need Prepare again. - Recommended settings per game and phone (game.tsv recommend rows, Recommend.java): a card with Recommended / Custom and tags on the rows; facts from GLES at launcher start before the first readiness check. Ocarina of Time on Qualcomm: system driver, Performance preset, Full vegetation off. - Resolution presets (res_preset, scene_output rows) and Scene resolution overlays from a game's own dynamic resolution palette (scene_res.py, DM_ROMFS_OVERLAY). - Qualcomm's own driver: mesh draws through compute by default (full Ocarina of Time foliage; DM_VK_MESH=1 keeps native mesh shading). - Mesh draws through compute: a draw takes its own record's entry, and prewarm drops mesh / pixel pairings that do not feed each other (see-through on Adreno 830, black-line flicker on Turnip, issue seedds#180). - Texture serial map: probes past tombstones, live and tombstone counts apart (the table no longer grows with every serial ever registered). - pack_android.py: a profile with a selected shader set builds that set on the Mac and Windows (issue seedds#178). - PRs seedds#150, seedds#151, seedds#171 (FrenklinFish) and seedds#156, seedds#163 (Omnicrash) were merged on Forgejo before this update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a shared, checked HIPC/CMIF backend for the service manager (
sm:) and random-number service (csrng).ConnectToNamedPort, synchronous requests through the current IPC buffer or an explicit user buffer, and service-owned handle closure.olsc:ubehavior.Why this helps
Today, missing service transport is worked around by intercepting individual C++ SDK exports using hardcoded mangled names. For example,
hle_os.ccontains anHLE_FORCEentry for:That is
nn::crypto::GenerateCryptographicallyRandomBytes(void *, size_t). Its original SDK implementation openscsrngthroughsm:; placeholder kernel-service responses currently prevent that path from working, so the host replaces the whole SDK function.This PR implements the lower-level path: connect to
sm:, register the client, acquire a CSRNG session, send command 0 with an output buffer, and return a valid CMIF response. Once the original SDK call is validated through that path, the long-nameHLE_FORCEentry and its replacement wrapper can be removed, leaving the SDK's own implementation in place.The same approach provides a route to retire the nine named HIPC adapter hooks. Concrete examples include:
_ZN2nn2sf4hipc20ConnectToHipcServiceEPNS_3svc6HandleEPKc_ZN2nn2sf4hipc6client22QueryPointerBufferSizeEPtNS_3svc6HandleE_ZN2nn2sf4hipc6client16DuplicateSessionEPNS_3svc6HandleES4__ZN2nn2sf4hipc15SendSyncRequestENS_3svc6HandleEPvmInstead of recognizing each SDK function by its mangled name, the host handles the service protocol those functions use. This makes the implementation reusable across compatible SDK callers and gives new services one common transport and handle lifecycle.
The existing hooks remain installed in this PR. Retirement is a follow-up after verifying the original SDK request, control, domain and duplicate-session paths; the shared backend and cross-route tests make that migration possible.
Validation
CI passes:
Original SDK/game execution through this transport remains the next validation step.
Protocol references
The implementation is original code checked against libnx HIPC/CMIF layouts, SM requests, CSRNG requests, and Atmosphère's SM compatibility handling.