From 0533b3028e220060150a41705481d47c3e6c454f Mon Sep 17 00:00:00 2001 From: chrg6 Date: Thu, 12 Nov 2026 12:17:55 -0500 Subject: [PATCH] Keep the asynchronous replay, the hot-pool rule and the -O2 game code off unless a player turns them on. The three change what every card does: the asynchronous replay can show a dark or flickering frame now and then, the hot-pool rule moves pools into system memory on every discrete card, and -O2 makes each rebuild of the game several times longer. Their rows stay in the settings tab. The USB joystick mapping is described by the device's own name, and the tab's introduction says what its settings are for. Co-Authored-By: Claude Fable 5.2 --- nx2navi.ini.example | 2 +- runtime/cfg.c | 6 +++--- runtime/input.c | 4 ++-- runtime/ui_text.c | 2 +- runtime/vk_memory.c | 4 ++-- tools/make_game.py | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nx2navi.ini.example b/nx2navi.ini.example index a9ef9ed1..006d119c 100644 --- a/nx2navi.ini.example +++ b/nx2navi.ini.example @@ -435,7 +435,7 @@ # and task shaders (grass and other foliage) as compute shaders and draws what they make; 0 skips those draws. The # arena for their vertices and triangles is mesh_emu_mb MiB of video memory, with mesh_emu_tasks task records (3 KiB # each) per submission; with trace = perf the log says how much a submission used. Read at start. -# mesh_emulation = 0 +# mesh_emulation = 1 # mesh_emu_mb = 256 # mesh_emu_tasks = 16384 # Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening diff --git a/runtime/cfg.c b/runtime/cfg.c index 420c8945..a7cf4456 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -258,7 +258,7 @@ static const CfgMeta metas[] = { // offer's number, which this setting or the menu accepts), always (every room, the save still copied first), or a number. {"COOP_ACCEPT", "ask", NULL, LIVE}, // Advanced: scheduling - {"ASYNC_PREEMPT", "1", "0|1|2", RESTART}, {"REPLAY_ASYNC", "1", "0|1", RESTART}, + {"ASYNC_PREEMPT", "1", "0|1|2", RESTART}, {"REPLAY_ASYNC", "0", "0|1", RESTART}, {"REPLAY_WORKERS", "3", "0..16", RESTART}, {"REPLAY_PIPE", "0", "0..4", RESTART}, {"FREE_CORES", "0", "0|1", RESTART}, {"TIMER_1MS", "1", "0|1", RESTART}, // dynamic resolution (dynres.c): the scene follows the GPU time toward DYN_RES_TARGET milliseconds @@ -313,7 +313,7 @@ static const CfgMeta metas[] = { {"SHADER_CARRY", "1", "0|1", RESTART}, // gfx_shader.c "Carry": a previous translator's translations until translated again // the menu's Lama patches tab (ui/menu.cpp tab_lama): the settings of the RX 580 patches {"TEX_RELEASED_MAX", "", NULL, RESTART}, // vk_texture.c released_max: "" by the video memory budget, else 1..16384 - {"MIRROR_HOT", "25", "0..1000", RESTART}, {"FREEZE_IDLE", "1800", "0..100000", RESTART}, + {"MIRROR_HOT", "0", "0..1000", RESTART}, {"FREEZE_IDLE", "1800", "0..100000", RESTART}, {"SUBMIT_FINISH_KINDS", "31", "0..31", RESTART}, // vk_sync.c res_mask {"FOLIAGE", "full", "full|reduced|off", RESTART}, // vk_exec_draw.c foliage_skip {"VRAM_HEAP_LIMIT", "auto", NULL, RESTART}, // vk_device.c vram_heap_limits: auto, 0 or MiB @@ -321,7 +321,7 @@ static const CfgMeta metas[] = { {"UPLOAD_BATCH_MB", "256", NULL, RESTART}, // vk_memory.c: MiB of staging before a batch goes early, 0 no limit {"MESH_EMULATION", "1", "0|1", RESTART}, {"MESH_EMU_MB", "256", "32..2048", RESTART}, {"MESH_EMU_TASKS", "16384", "256..262144", RESTART}, {"MESH_EMU_BATCH", "1", "0|1", RESTART}, {"VEC_INDEX_FIX", "0", "0|auto|1", RESTART}, - {"GUEST_OPT", "2", "1|2", RESTART}, // tools/make_game.py: the next Rebuild the Game + {"GUEST_OPT", "1", "1|2", RESTART}, // tools/make_game.py: the next Rebuild the Game {"PASS_TIMES", "0", "0|1", RESTART}, {"DUMP_KEY", "", NULL, RESTART}, // vk_crumbs.c, vk_dump.c // textures and memory {"ASTC", "auto", "auto|gpu|native|cpu", RESTART}, {"MEMORY", "auto", "auto|import|mirror|verify", RESTART}, diff --git a/runtime/input.c b/runtime/input.c index 01d5b28e..452183b9 100644 --- a/runtime/input.c +++ b/runtime/input.c @@ -536,12 +536,12 @@ static void pad_primary(SDL_Gamepad *p, const char *why) { // Joysticks SDL has no gamepad mapping for are not gamepads to it, and this file opens gamepads only. Known ones get a // mapping built from their own GUID (so it matches whatever bus, version and name checksum SDL put in it); any other is // logged once with its name, ids and GUID. -// - hekate's USB HID Joy-Con mode (Nyx "USB Tools" > "Joy-Con mode", bdk/usb/usb_descriptors.c, usb_gadget_hid.c): +// - A Switch that presents its Joy-Con over USB from its boot menu's tools: // "Nyx Joy-Con", VID 0x11EC, PID 0xA7E1, a plain HID joystick: X, Y (left stick), Z, Rz (right stick) from 0 to 255 // with up at 0, a hat for the D-pad, and buttons 1-12 B, A, Y, X (south, east, west, north), L, R, ZL, ZR, Minus, // Plus, left and right stick clicks. Capture and Home are not sent. static const struct { uint16_t vid, pid; const char *name, *map; } known_joysticks[] = { - {0x11EC, 0xA7E1, "hekate Joy-Con (USB HID)", + {0x11EC, 0xA7E1, "Nyx Joy-Con (USB HID)", "a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,lefttrigger:b6,righttrigger:b7,back:b8,start:b9,leftstick:b10," "rightstick:b11,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,leftx:a0,lefty:a1,rightx:a2,righty:a3"}, }; diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 30f95186..d2c3ee97 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -90,7 +90,7 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_TEX_DETAIL_AUTO] = "Automatic: %s", [UI_MENU_TEX_DETAIL_FULL] = "Full", [UI_MENU_TEX_DETAIL_REDUCED] = "Reduced", [UI_MENU_TEX_DETAIL_LOW] = "Low", [UI_MENU_TAB_LAMA] = "Lama patches", - [UI_MENU_LAMA_INTRO] = "Settings of the RX 580 patches (apply_rx580_fix). Most take effect after a restart.", + [UI_MENU_LAMA_INTRO] = "Settings for older graphics cards and ones short of video memory. Most take effect after a restart.", [UI_MENU_LAMA_MEMORY] = "Video memory and textures", [UI_MENU_LAMA_RENDER] = "Rendering", [UI_MENU_LAMA_BUILD] = "Build", diff --git a/runtime/vk_memory.c b/runtime/vk_memory.c index d9d2466c..7cf68fe8 100644 --- a/runtime/vk_memory.c +++ b/runtime/vk_memory.c @@ -3533,8 +3533,8 @@ static uint64_t hot_frame0, n_demoted; static void hot_check(void) { if (mirror_hot < 0) { - const char *v = cfg_value("NX2NAVI_MIRROR_HOT"); // the settings row's default (25) when unset - int p = v && *v ? atoi(v) : 25; + const char *v = cfg_value("NX2NAVI_MIRROR_HOT"); // the settings row's default (0, off) when unset + int p = v && *v ? atoi(v) : 0; mirror_hot = p < 0 ? 0 : p > 1000 ? 1000 : p; if (mirror_hot) rt_log("mem: pools copied %d%% of their size a frame stay in system memory (NX2NAVI_MIRROR_HOT)", mirror_hot); } diff --git a/tools/make_game.py b/tools/make_game.py index 36fa9556..143bb8f2 100644 --- a/tools/make_game.py +++ b/tools/make_game.py @@ -1446,9 +1446,9 @@ def runtime_cmd(clang, clangxx, inc, level=0, fast=None, msys=None, first=()): """fast: fast_clang's compiler for the lifted code, with msys as its sysroot. first: include flags that go ahead of inc for the runtime's sources only (vulkan_headers); the lifted code includes none of those headers, and its command, which is part of its objects' keys, stays as it was. NX2NAVI_GUEST_OPT (an environment variable, - or guest_opt in nx2navi.ini) 1 builds the lifted code at -O1; by default -O2: the game's own threads run it and + or guest_opt in nx2navi.ini) 2 builds the lifted code at -O2; by default -O1: the game's own threads run it and bound the frame on a slower CPU; the build takes several times longer.""" - guest_opt = '-O1' if os.environ.get('NX2NAVI_GUEST_OPT', '').strip() == '1' else '-O2' # -O2 unless guest_opt = 1 + guest_opt = '-O2' if os.environ.get('NX2NAVI_GUEST_OPT', '').strip() == '2' else '-O1' # -O1 unless guest_opt = 2 def cmd_for(src, dst): cpp = src.suffix in ('.cpp', '.cxx') # the lifted code at -O1 (its size makes -O2 slow to build), the runtime at -O2; neither may assume strict