aboutsummaryrefslogtreecommitdiff
path: root/NX2_NOTES.md
diff options
context:
space:
mode:
authortheofficialhackclean <85363951+theofficialhackclean@users.noreply.github.com>2026-10-29 14:20:02 -0400
committertheofficialhackclean <85363951+theofficialhackclean@users.noreply.github.com>2026-10-29 14:20:02 -0400
commita8657997e1eb594ffde9e28d44672ef5b697ad59 (patch)
tree759edef2561e23b2d3a74372a35cb1f2e20f79c2 /NX2_NOTES.md
parentee743563ed54a761b5daeaf36f7c35b217ba433f (diff)
push for fix for mkw
Diffstat (limited to 'NX2_NOTES.md')
-rw-r--r--NX2_NOTES.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/NX2_NOTES.md b/NX2_NOTES.md
index ad8a2f66dd..28f58aed43 100644
--- a/NX2_NOTES.md
+++ b/NX2_NOTES.md
@@ -178,6 +178,12 @@ With the patched decoder, games 1/3/4 only leave ~60-110 rare SIMD encodings in
| 120 | GPU thread asleep ~8% on the texture/buffer cache mutexes | holders: the fencing thread (it took both caches for every fence, one per compute dispatch, and holds the buffer cache while it copies GPU-written buffers back) and CPU write traps; std::recursive_mutex slept at once | spinning recursive mutex, per-cache fence flush flags, separate locks (f10767f): asleep 3.7%. Buffer downloads at every fence stay: the native MME DMA reads of indirect arguments depend on them (no synchronous flush logged with them on) |
| 121 | first-run freezes from shader translation (one 28,102-instruction compute shader: 3.4 s on the GPU thread) | BreadthFirstSearch's visited list was a linear scan (quadratic), and GlobalMemoryToStorageBufferPass searched again for every access | hash set past 64, per-start memo (ba173b6): 0.85 s; runtime builds now ~2-4 ms each. Translating on workers was not done: environments read live GPU state (texture types, constant buffer values) while translating |
| 122 | final clean run (attract loop): 21-25 ms per frame in most 3D stretches, 26-38 ms in compute-heavy courses (industrial, highway), host GPU ~38% busy | the GPU thread is still the limit: draw setup ~25%, command parsing and register writes ~15%, compute dispatches/inline uploads (heavy courses) | open: per-draw binding cache, uniform buffer copies (staging slices are recycled by tick, so reuse needs care), buffer download interval sets |
+| 123 | (title 1, 1.8.0 update ExeFS `updates/917504`) loading screen forever, ~116 s in: `Waiting for service chat:u` | the newer SDK runs `nn::chat::Initialize` (GameChat) at boot; nothing registers `chat:u`, so sm defers the request for good | `chat:u` registered from the friends process (friend.cpp): cmd 0 returns a session, whose cmd 1 (u32 2) returns an event (left empty: 2010-0212, then 2001-0114 InvalidHandle) |
+| 124 | 2162-0001 (GameChat's own module) from `nn::chat::gsv::Initialize` | it sends gsv 1201 then 1202, the same pair as 901/902 and 1001/1002: 1202 must return a session. On it, TIPC 1() returns a u32 id (abort if > 0x3ff, sdk+0x6c1b40) and TIPC 11(u32 id) an event (copy handle word 3, result word 4; sdk+0x5d8710) | 1201 stub, 1202 returns `INx2ChatGsvSession` (nx2_gsv.h) |
+| 125 | `nvnNativeImageInitialize` returns false, abort at main+0xd32438 | right after GameChat init the game builds its local camera video storage (`nn::chat::InitializeLocalCameraVideoStorage`, three 384x216 images, format 0x38). `CalculateRequiredBufferMemory` sends gsv 1291 (1510's request plus a u32 count; reply u64 size, u64 alignment), auto-stubbed to 0x1000 bytes; `CreateImagePool` sends gsv 1211 (429's request); image i of a pool has handle pool id + i (`nn::gs::sdk::CalculateNativeImageHandle`), so a 429 pool of 3 left handles +1/+2 unknown | 1291 = layout size * count; 1211 = 429; 429/1211 reserve `count` ids |
+| 126 | same abort (row 125), then inside `ExecuteVirtualMachineMapBufferEx` | NVN describes and maps images another server made with gsv 428 `nn::gpu::sdk::QueryNativeImage` and 426 `MapNativeImage`(handle, u32, address space, u8 permission). Reply: words 3-4 GPU address (426), 5-6 offset in the memory, 7-38 a `GpuOunceUserImageDescriptor`, 39 flags. The SDK requires descriptor byte 0x00 == 1, byte 0x20 == 1, u32 size at 0x2c != 0 (offset at 0x28); NVN reads (w-1)|(h-1)<<16 at 0x08 and the layout kind at 0x24 (1: formats 0x25/0x37/0x38, 2: 0x99-0x9c; sdk+0x6bb960) | both answered from the pool's preference and memory; block height/pitch at 0x10/0x14 are a guess (only blank camera frames use them) |
+| 127 | abort 2034-0000 at main+0xcded94 (~125 s, after the normal graphics boot) | `nn::camera::sdk::CreateCameraContext` sends gsv 601() then 602(u64 1), which must return the camera context session (handle word 3, result word 4); without it the SDK sends 603 (destroy) and fails | 601 stub, 602 returns a `nx2:camera` stub session. Title 1 (1.8.0) then plays |
+| 128 | (title 1, 1.8.0, Ryzen 5 2600 + RTX 3050 6 GB) 8 fps | Eden defaults: gpu_accuracy High, uncompressed ASTC, reactive flushing on | gpu_accuracy Low, astc_recompression Bc3, use_reactive_flushing off, async shaders on: ~20 fps, uneven. Bushes/cacti flicker (row 97). Boot also froze once at "Failed to allocate 20480 MiB of backing memory": the 12 GB layout needs 20 GB of free commit up front |
Run settings used (in `build/bin/user/config/sdl2-config.ini`): `memory_layout_mode=4`
(12 GB). Debug knobs: `EDEN_NX2_TC_EXPECTED_MIB` / `EDEN_NX2_TC_CRITICAL_MIB` (collector thresholds),
@@ -207,6 +213,10 @@ Scripted input: `EDEN_NX2_KEY_SCRIPT="50:4,50.5:-4,55:79,55.4:-79,57:4,57.5:-4"`
**Title 3**: last checked before the graphics work; should now track title 4.
+**Title 1, 1.8.0 update** (`updates/917504/exefs`, same program id): needs the GameChat and
+camera stubs of rows 123-127, then plays (Qt frontend `eden.exe`, ~20 fps on row 128's hardware) with
+the same open problems as below.
+
**Title 1** (`first switch game\exefs`, 0400C3F00006E000, `Drive.nss`): boots, shows the world-map
loading screen and reaches its title screen ("Press L + R to start") with sky, buildings, props,
kart and logo drawn. Wrong: magenta/cyan colour cast, black ground (unbacked virtual texture, row