Family of src/nx/nn/prepo.hook. The hooks_off setting turns a family off by its name.
The native nn::prepo (prepo.c), for tools/hookgen, in the language of nn/hooks.hook. nn::prepo: the play reports, with no prepo:u session. The report is built in the game's buffer by the SDK's own code. Save, Send, AddSessionId, RequestImmediateTransmission and GetTransmissionStatus are what a game has reach the service. The report's layout and Save's limit are those of the SDKs read: no limit in 3.5.0 to 8.2.1, the limit from 9.3.1, the buffer at 0x20 through 14.3.0 and at 0x28 from 15.3.2. Read in 3.5, 4.4, 6.5, 7.7, 8.2, 9.3, 10.4, 12.3, 13.3, 14.3, 15.3, 16.2, 18.3, 19.3 and 20.5: Save is the same code from 9.3 on, 14.3's as 12.3's and 15.3's as 16.2's
struct nn::prepo::PlayReport SDK < 15.0.0 source| Field | Type | Offset |
|---|---|---|
| buffer | addr | 0x20 |
| capacity | u64 | 0x28 |
| used | u64 | 0x30 |
Size 0x38.
struct nn::prepo::PlayReport SDK >= 15.0.0 source| Field | Type | Offset |
|---|---|---|
| buffer | addr | 0x28 |
| capacity | u64 | 0x30 |
| used | u64 | 0x38 |
Size 0x40.
nn::prepo::PlayReport::Save() SDK < 9.0.0 source_ZN2nn5prepo10PlayReport4SaveEv
As C: u32 (addr report)
Handler: nnprepo_save_unlimited (prepo.c)
Uses: nn::prepo::PlayReport
nn::prepo::PlayReport::Save() SDK >= 9.0.0 source_ZN2nn5prepo10PlayReport4SaveEv
As C: u32 (addr report)
Handler: nnprepo_save (prepo.c)
Uses: nn::prepo::PlayReport
nn::prepo::PlayReport::Save(nn::account::Uid const&) SDK < 9.0.0 source_ZN2nn5prepo10PlayReport4SaveERKNS_7account3UidE
As C: u32 (addr report, addr uid)
Handler: nnprepo_save_user_unlimited (prepo.c)
Uses: nn::prepo::PlayReport
nn::prepo::PlayReport::Save(nn::account::Uid const&) SDK >= 9.0.0 source_ZN2nn5prepo10PlayReport4SaveERKNS_7account3UidE
As C: u32 (addr report, addr uid)
Handler: nnprepo_save_user (prepo.c)
Uses: nn::prepo::PlayReport
Send, the report sent at once: its AsyncContext, which the caller passes in x8, is the SDK's own finished one. Read in SDK 16.2, 18.3, 19.3 and 20.5; no SDK 15 of the dumps here exports it, but the session's SendReportWithUser is there from system version 15.0.0 (switchbrew), and with the session never opened (ipc::Initialize below) an SDK 15 Send left to its own code would ask a session that isn't there: taken as 16's, as 15's Save is 16's code
struct nn::prepo::AsyncContext SDK >= 15.0.0 source| Field | Type | Offset |
|---|---|---|
| object | addr | 0x0 |
| result | u32 | 0x8 |
Size 0x10.
nn::prepo::PlayReport::Send(nn::account::Uid const&) SDK >= 15.0.0 source_ZN2nn5prepo10PlayReport4SendERKNS_7account3UidE
As C: void (addr report, addr uid)
Handler: nnprepo_send (prepo.c)
Uses: nn::prepo::PlayReport, nn::prepo::AsyncContext
AddSessionId, which asks the session for the system's session id and adds the report's own id under the key. Read in SDK 10.4, 12.3, 13.3, 14.3, 16.2, 18.3, 19.3 and 20.5, each alike; no SDK 9 of the dumps here exports it, but the session's GetSystemSessionId is there from system version 9.0.0 (switchbrew): from 9, for the reason Send is from 15
nn::prepo::AddSessionId(nn::prepo::PlayReport*, char const*) SDK >= 9.0.0 SDK >= 9.0.0, < 11.0.0 32-bit source_ZN2nn5prepo12AddSessionIdEPNS0_10PlayReportEPKc
As C: u32 (addr report, addr key)
Handler: nnprepo_add_session_id (prepo.c)
nn::prepo::RequestImmediateTransmission() SDK < 11.0.0 32-bit source_ZN2nn5prepo28RequestImmediateTransmissionEv
As C: u32 ()
Handler: nnprepo_request_immediate_transmission (prepo.c)
nn::prepo::GetTransmissionStatus(nn::prepo::TransmissionStatus*) SDK < 11.0.0 32-bit source_ZN2nn5prepo21GetTransmissionStatusEPNS0_18TransmissionStatusE
As C: u32 (addr status)
Handler: nnprepo_get_transmission_status (prepo.c)
what nn::prepo::Initialize and the library's first use end in: the session's start, and its end
nn::prepo::detail::ipc::Initialize() SDK < 11.0.0 32-bit source_ZN2nn5prepo6detail3ipc10InitializeEv
As C: void ()
Handler: nnprepo_ipc_initialize (prepo.c)
nn::prepo::detail::ipc::Finalize() SDK < 11.0.0 32-bit source_ZN2nn5prepo6detail3ipc8FinalizeEv
As C: void ()
Handler: nnprepo_ipc_finalize (prepo.c)
A 32-bit game: its SDK's report has the same fields, 4 bytes each. Read in SDK 0.12.16, 4.4.0 and 10.6.0, the 32-bit SDKs of the dumps here, whose Save reads the fields at the same offsets; Save has no limit in the first two, and 10.6.0's has the ring of 900 of the 64-bit SDK's from 9, and AddSessionId, which takes the id by reference to PlayReport::Add as there. So Save holds below 9.0.0 without the limit and from 9.0.0 below 11.0.0 with it, where the 64-bit SDKs read put the limit's start and prepo:u's GetSystemSessionId begins (switchbrew), AddSessionId from 9.0.0 too and the rest below 11.0.0, the commands they send unchanged from 1.0.0 to 10.x; past 10.6.0, the newest 32-bit SDK read, a game has no hook, and stops in sm with prepo:u's name
struct nn::prepo::PlayReport32 SDK < 11.0.0 source| Field | Type | Offset |
|---|---|---|
| buffer | u32 | 0x20 |
| capacity | u32 | 0x24 |
| used | u32 | 0x28 |
Size 0x2c.
nn::prepo::PlayReport::Save() SDK < 9.0.0 32-bit source_ZN2nn5prepo10PlayReport4SaveEv
As C: u32 (addr report)
Handler: nnprepo_save32 (prepo.c)
Uses: nn::prepo::PlayReport32
nn::prepo::PlayReport::Save(nn::account::Uid const&) SDK < 9.0.0 32-bit source_ZN2nn5prepo10PlayReport4SaveERKNS_7account3UidE
As C: u32 (addr report, addr uid)
Handler: nnprepo_save_user32 (prepo.c)
Uses: nn::prepo::PlayReport32
nn::prepo::PlayReport::Save() SDK >= 9.0.0, < 11.0.0 32-bit source_ZN2nn5prepo10PlayReport4SaveEv
As C: u32 (addr report)
Handler: nnprepo_save_limited32 (prepo.c)
Uses: nn::prepo::PlayReport32
nn::prepo::PlayReport::Save(nn::account::Uid const&) SDK >= 9.0.0, < 11.0.0 32-bit source_ZN2nn5prepo10PlayReport4SaveERKNS_7account3UidE
As C: u32 (addr report, addr uid)
Handler: nnprepo_save_user_limited32 (prepo.c)
Uses: nn::prepo::PlayReport32
Made from ScarletNX's Sail at 166ad3910f80. The hooks' and the SVCs' declarations and their handlers are ScarletNX's (GPL-3.0-or-later); the SVCs' declarations are Eden's, as hos.svc says.