Skip to content

Releases

RR3 native re-host v0.24.0: Switch Ultra 超高画质, 个人资料自定义用户名 & Switch 图标

Choose a tag to compare

@ArakiW ArakiW released this 02 Dec 05:45

Real Racing 3 -- Switch native re-host, v0.24.0

更新内容 / What's New

1. 「Switch Ultra」独一份超高画质预设(默认启用,支持菜单热切)

  • 融合三端画质要素,兼顾 2D 菜单不破版:
    • 以桌面端 SimRigTV.plist 为高模/远景基底,导入 AAA-SimRigTV-MaxEffects.feats 全部 190 项着色器特性(包含金属漆颗粒 SPEC_FLAKES、车身泥污 DIRT 等)。
    • 启用 iOS Pro 级光影与材质管线:USE_HDR_POST_PROCESS / TONEMAP / GAMMA_CORRECTION / USE_HDR_AUTOMATIC_EXPOSURE、动态环境模糊 ENV_MAP_DYNAMIC_BLUR、平面车身反射 CAR_PLANAR_REFLECTION、车身环境光遮蔽 CAR_AMBIENT_OCCLUSION、车内及实时车身阴影(CAR_INTERIOR_SHADOW_MAPS / USE_REALTIME_CAR_SHADOW_MAPS / CAR_SHADOW_MAPS / CAR_DASH_SHADOWS)、景深 DEPTH_OF_FIELD_ALLOWED、各向异性过滤 USE_ANISOTROPIC_FILTERING、MIPMAP_BIAS=-2.0、USE_PBR_WATER、USE_PAUSE_BLUR。
    • 材质与采样拉满:CUSTOMISATION_LIVERY_TEXTURE_SIZE=2048、CUSTOMISATION_DECAL_TEXTURE_SIZE=1024、CUBE_MAP_DIMENSIONS=1024、AA_LEVEL=4;同时显式保留 AndroidHigh 的 UI 安全布局字段与尺寸约束(6808 B .plist / 10409 B .feats),避免字体缩放与弹窗错位。
  • 底座原生 1920x1080 视图解锁 & 着色器缓存扩容:放宽 rr3-screen.txt 对 Res1080p 的锁定,底座默认以 1920x1080 输出(掌机可选 1080p 硬件超采样);着色器/程序缓存上限翻倍至 2048 项 / 32 MiB。
  • 游戏内画质档位热切:主菜单按 L + R + - 切到 [2:SWITCH] 第 5 行 GRAPHICS,可在 SWITCH ULTRA / IOS PRO / STOCK / CFG 间切换并写入 rr3-switch.conf(graphics=ultra|ios|default)。

2. 自定义个人资料车手用户名补丁(player_name)

  • 在二进制层(player_name_patch)拦截个人资料名称读取,从 /switch/rr3-native-rehost/rr3-switch.conf 的 player_name= 注入自定义 UTF-8 中英文车手名称,不改动原始存档二进制结构;留空时自动回退至原始档案名(Guest)。
  • 在主菜单 L + R + - -> [2:SWITCH] 新增第 6 行 PLAYER NAME,按 A 即可呼出 Switch 原生系统软键盘(swkbd)实时改名并保存。

3. 新版 Switch 桌面图标与 NSP WSL 自动打包

  • 更新自定义 Real Racing 3 Nintendo Switch 桌面与 NRO 图标(native-switch/icon.jpg / icon.bmp)。
  • tools/Pack-NativeSwitchNsp.ps1 新增 -WslDistro 参数与可用发行版自动探测逻辑,自动回退至可运行的 WSL 环境完成 Stage 2 NSP 封装。

4. 基础功能(继承自 v0.23.1)

  • FMODEx + minimp3 流式 MP3 48 kHz Horizon audout 音频混音与休眠自动静音恢复;
  • 简体中文菜单、原版 r3_symbols.ttf 图标字库与 Horizon 共享字体;
  • 1 秒内显示 ArakiW 启动封面 + 预合并快速启动缓存;
  • 物理遥测 HD 震动、SixAxis 零漂移体感、底座 1080p/掌机 720p 自适应与 [1:CURRENCY] 实时改钱面板(L + R + -)。

手柄与操作速查 / Quick Controls

按键 / 组合键 说明
左摇杆(或开启体感后倾斜机身/手柄) 转向(默认玩家手动操控 autopilot = 0)
ZR / ZL 油门加速 / 刹车倒车
Y 或 -(Minus) 比赛内切换视角
+(Plus) 暂停比赛
A / B / ZR(或掌机触屏) 关闭赛前「车手辅助」弹窗
L + R + -(在主菜单) 呼出/关闭 改钱工具 & Switch 设置面板(含 GRAPHICS 与 PLAYER NAME)
HOME 键 正常退出软件(紧急强制退出:L + R + ZL + ZR + + + -)

包内文件 / What is in the package

  • rr3-native-rehost.nsp -- 50,891,480 bytes, SHA256 35EAAC5FEFB5A79A49DF0C04853A84A09C955F0B35FCAB18C35AE7EFEAE839FD
    • 含 Program / Control / Meta 三个 NCA;Program NCA Section 1 内嵌 RomFS(实测 36 个文件 / 45,115,260 字节,包含客机运行时、界面字体、splash_arakiw.png 与 .depot 文本)。
  • rr3-switch-app-20261202-v0.24.0.zip -- 99,075,577 bytes, SHA256 4CDA8BD5951D53A4C1148DFF91F57745700E0EFE00E94697B95A84282E048F89
    • 应用包(含 NSP、NRO、rr3.romfs 兜底镜像、控制脚本与示例配置 rr3-money.txt.example / rr3-switch.conf.example、安装脚本与硬件测试说明)。

游戏数据卷(7 个 < 2 GiB .romfs 外部数据卷,兼容 FAT32 / exFAT)不在本 Release 中,请使用自己的原版数据包按 主机安装指南 制备并放到 TF 卡 /switch/rr3-native-rehost/data/。


安装方法 / How to Install

  1. 安装 NSP(推荐):若曾安装旧版「RR3 Native Rehost」,建议先从系统删除旧图标,再用 DBI / Awoo / Tinfoil 安装 rr3-native-rehost.nsp。
  2. 拷贝卡片配置与数据卷:将外部 7 个数据卷放到 sdmc:/switch/rr3-native-rehost/data/,解压应用包内的 switch\ 目录到 TF 卡根目录覆盖;从旧版升级建议先删除旧版 /switch/rr3-native-rehost/cache/eds-* 缓存,若有残留 sdmc:/switch/rr3-census.conf 请一并删除。
  3. 或使用 Homebrew 启动:不装 NSP 也可直接在覆盖 switch\ 目录后,通过 Homebrew Launcher 运行 rr3-native-rehost.nro。

自检与文档 / Verification & Documentation

  • tools/verify-nsp-romfs.py:36 files / 45,115,260 bytes 与 native-switch/romfs/ 完全一致
  • native-switch/tests/test_*.py:73 run, 0 failed(含 C++ guest_settings / switch_platform / audout / fmod_pcm / mp3_decoder / guest_currency 自测)
  • tools/check-cc-symbols.py:38 resolved, 16 known-absent, 0 unexpected
  • Eden Switch Ultra 1080p 冒烟实测:底座 1920x1080 成功注入 SwitchUltra(6808/6808 B)与 AAA-SimRigTV-MaxEffects.feats(10409/10409 B)及 player_name 补丁,推进 2399 帧 / 22941 次绘制、0 着色器错误与 0 异常访存
  • README.md · README_EN.md · 主机安装指南 · docs/OPEN-ISSUES.md · NOTICE.md

This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.

RR3 native re-host v0.23.1: FMOD audout, 简体中文与图标修复, 开机封面, 体感震动与内置改钱

Choose a tag to compare

@ArakiW ArakiW released this 30 Nov 19:32

Real Racing 3 -- Switch native re-host, v0.23.1

更新内容 / What's New

1. FMODEx 音频混音与流式 MP3 接入 Horizon audout

  • 新增 minimp3 流式解码与 WAV 混音管线,通过 48000 Hz 立体声 Int16 audout 输出(0x1000 对齐双缓冲队列)。
  • 接入 Switch 系统 AppletHook 生命周期:切回 HOME 菜单或主机休眠时自动暂停音频与客机线程,返回游戏后自动恢复。

2. 简体中文菜单、图标字库与性能栏修复

  • 修复 JNI 假对象引用计数与 GlyphVector 状态池复用冲突,补充 UTF-16 GetStringLength / GetStringChars 实现。
  • 引入 Horizon 系统共享简体中文字库(plInitialize)与原版 125,764 字节 r3_symbols.ttf 图标字库,修复主菜单图标及维修站车辆性能栏乱码/错字。
  • 解开 0x12af100 处的菜单 usleep 限帧逻辑,提升菜单响应流畅度。

3. 1 秒内显示开机封面与加载/流畅度优化

  • 启动初期即建立早期 Mesa EGL 上下文并渲染 ArakiW 启动封面(romfs:/ui/splash_arakiw.png),消除开机初期长时间黑屏等待。
  • 新增 kRomfsStatCacheSlots = 16384 与 kSdStatCacheSlots = 8192 缓存、本地已安装升级条目的合并复用(rr3-boot-updates.stamp / rr3-boot-repair.stamp)、64 KiB 文件写入缓冲及 ApmCpuBoostMode_FastLoad 加载提速。
  • 通过 svcSetThreadCoreMask 将客机工作线程分配到多核执行;清理主循环周期性 USB HID 重扫与无条件 UI 树遍历,并默认关闭高开销逐帧刷盘日志。

4. Switch 原生特性、快捷键与内置改钱菜单(L + R + -)

  • 显示分辨率自适应:底座模式 1920x1080 / 掌机模式 1280x720 自动切换(默认 auto),可在内置菜单中切换 720p / 1080p 模式。
  • HD 震动与 SixAxis 陀螺仪体感:物理遥测驱动的碰撞/压路肩/刹车/路面震动反馈,以及与左摇杆共存的零漂移体感转向。
  • 系统软键盘(swkbd):桥接 Switch 原生输入法。
  • 比赛快捷键:Y 或 - 切换视角、+ 暂停比赛;A / B / ZR 可直接关闭赛前「车手辅助」弹窗。
  • 游戏内悬浮菜单(主菜单按 L + R + - 呼出):
    • [1:CURRENCY]:实时修改 R$、金币(Gold)、M$,支持重置 M$ 每日上限、X 一键预设、A 立即写入存档(重启保留)。
    • [2:SWITCH]:实时调节 HD 震动强度、陀螺仪体感开关/灵敏度/反转、分辨率模式与测试震动脉冲(自动保存至 rr3-switch.conf)。
  • CFW NSP 权限修正:使用 npdmtool 从 rr3-cfw-npdm.json 构建 main.npdm(开启 0x4b/0x4c CodeMemory SVC 与 0x200000 SD 卡访问权限),并显式关闭 NACP VideoCapture 以避免 am 2128-0007 报错。

手柄与操作速查 / Quick Controls

按键 / 组合键 说明
左摇杆(或开启体感后倾斜机身/手柄) 转向(默认玩家手动操控 autopilot = 0)
ZR / ZL 油门加速 / 刹车倒车
Y 或 -(Minus) 比赛内切换视角
+(Plus) 暂停比赛
A / B / ZR(或掌机触屏) 关闭赛前「车手辅助」弹窗
L + R + -(在主菜单) 呼出/关闭 改钱工具 & Switch 设置面板
HOME 键 正常退出软件(紧急强制退出:L + R + ZL + ZR + + + -)

包内文件 / What is in the package

  • rr3-native-rehost.nsp -- 50,864,344 bytes, SHA256 C17481EA52135817F51723251F2CB7514AED70BFE3C92B973CEF1EB0ACC32951
    • 含 Program / Control / Meta 三个 NCA;Program NCA Section 1 内嵌 RomFS(实测 36 个文件 / 45,115,260 字节,包含客机运行时、界面字体、splash_arakiw.png 与 .depot 文本)。
  • rr3-switch-app-20261130-v0.23.1.zip -- 99,024,949 bytes, SHA256 86B69521E1F4941E08C99DEE900B967C692ACBE2999701B85FC8A1809D17BA85
    • 应用包(含 NSP、NRO、rr3.romfs 兜底镜像、控制脚本与示例配置 rr3-money.txt.example / rr3-switch.conf.example、安装脚本与硬件测试说明)。

游戏数据卷(7 个 < 2 GiB .romfs 外部数据卷,兼容 FAT32 / exFAT)不在本 Release 中,请使用自己的原版数据包按 主机安装指南 制备并放到 TF 卡 /switch/rr3-native-rehost/data/。


安装方法 / How to Install

  1. 安装 NSP(推荐):若曾安装旧版「RR3 Native Rehost」,建议先从系统删除旧图标,再用 DBI / Awoo / Tinfoil 安装 rr3-native-rehost.nsp。
  2. 拷贝卡片配置与数据卷:将外部 7 个数据卷放到 sdmc:/switch/rr3-native-rehost/data/,并解压应用包内的 switch\ 目录到 TF 卡根目录覆盖;若此前留下过调试文件 sdmc:/switch/rr3-census.conf 请先删除。
  3. 或使用 Homebrew 启动:不装 NSP 也可直接在覆盖 switch\ 目录后,通过 Homebrew Launcher 运行 rr3-native-rehost.nro。

自检与文档 / Verification & Documentation

  • tools/verify-nsp-romfs.py:36 files / 45,115,260 bytes 与 native-switch/romfs/ 完全一致
  • native-switch/tests/test_*.py:73 run, 0 failed(含 C++ audout / fmod_pcm / mp3_decoder / switch_platform / guest_currency 自测)
  • tools/check-cc-symbols.py:38 resolved, 16 known-absent, 0 unexpected
  • README.md · README_EN.md · 主机安装指南 · docs/OPEN-ISSUES.md · NOTICE.md

This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.

RR3 native re-host v0.22.14: the race markers are counted by the port, and the review of that fix is in

Choose a tag to compare

@ArakiW ArakiW released this 16 Nov 03:09

Real Racing 3 -- Switch native re-host, v0.22.14

WHAT THIS FIXES

The "27 -> 2 start lights" collapse was never a game regression. The round
census counted the STRINGS "StartLightsScreen" and "InGameScreen" anywhere
in the guest-view log, and the only occurrences of those strings left in
that log are the port's OWN path-trace lines. How many of them there are is
decided by the port's logging policy, not by the game:

  • the path trace is thinned to gui/processed/ and de-duplicated by a
    2048-slot table with no eviction, so a path is written AT MOST ONCE for
    the whole run -- StartLightsScreen.gui can produce at most one trace
    line no matter how many times the guest asks for that screen;
  • the guest's own log stream is quota-limited (4000 lines,
    guest_view_trace.cpp:37), and the archived round mapgate1 ends with
    the ordinal at EXACTLY 4000.

Measured in that archive (67 MB guest log): "StartLightsScreen" 2
occurrences, "InGameScreen" 2 occurrences, and BOTH of each are the port's
own trace lines.

THE FIX. The port keeps the two markers as counters, counted in
resolvePath() -- THE ONE PLACE EVERY PATH TAKES -- as RESOLUTION EVENTS.
The census line carries them at its HEAD, the round census reads them out
of the COMPLETE census lines, says whether each number came from the port
or from the old text fallback, and prints the frame the sample was taken
at.

AND AN ADVERSARIAL REVIEW OF THAT FIRST FIX FOUND THREE REAL DEFECTS IN
IT, AND THEY ARE IN HERE TOO.

  • the first version counted the markers in the trace function, which ONE
    resolver branch calls; six other branches resolved the same files
    without counting, so it measured "requests that arrived in one spelling"
    and not "requests";
  • the first contract test caught ONE of the five ways of breaking the
    property. It is mutation-tested now: seven ways, all seven caught;
  • the log file is written by two threads into one file, so a line can be
    SPLIT -- MEASURED: one spliced census line per round, in every archive
    -- and the two numbers sat at the END of the census line, which is
    exactly where a split can take them away from their line. They are at
    the HEAD now.

MEASURED (round rr3-racecount3, 408 s, the same host and the same starting save
as the round before it, which changed only the counter's placement):

start lights          6      (the guest asked for that layout)
race screen           9
the old text count    2 start lights / 2 race screen
frames                12240
census sample frame   12298
pixels lit            9 of 2
md5 mismatch          0      TrackDesc::load failures  0
race HUD string       22

READ IT AS "THE GUEST ASKED FOR THAT LAYOUT N TIMES", NOT "N RACES RAN".
The counters count RESOLUTION EVENTS, the guest's event progression is not
deterministic, and the number moves from round to round. What does NOT
move is the old text count: 2, in every round -- that is the instrument's
signature, and the whole reason this release exists.

ALSO IN THIS RELEASE

  • The 2026-11-10 console crash fix (v0.22.13) is in here unchanged: the
    load bias is no longer published before the image is mapped,
    guestImageContains() and resolveMainImageLoadBias() fail closed
    until the mapping exists, and the crash dump decodes its own ESR and
    prints fault_class=, far_attribution= and main_image_mapped=.
  • The resolution counter and the two front-end layout counters moved to the
    resolver as well, for the same reason the race markers did: they were
    counted in the same one-branch function.
  • The gate now PARSES the PowerShell harness before running it. A change to
    the round census's print block put an apostrophe inside a single-quoted
    string, and the parse error surfaced twelve minutes later, in the middle
    of an Eden round. The gate reads the harness now.
  • docs/OPEN-ISSUES.md section 9.47 records the whole chain, including the
    wrong readings that preceded it and what the review of the fix found.

HOW TO TEST

  1. Delete the old "RR3 Native Rehost" icon from the home menu first, then
    install this NSP.
  2. Launch it from the home menu.
  3. If it crashes, send rr3-native-rehost.crash-early.txt and
    rr3-native-rehost.guest-view.log back -- the three new lines in the
    crash file (fault_class, far_attribution, main_image_mapped)
    are the point of that fix.
  4. The census line in the guest-view log now reads
    phase=guest-frame-census ... frame=N lights=N race=N ..., so the race
    markers can be read straight out of it.

WHAT IS IN THE PACKAGE

  • rr3-native-rehost.nsp -- 50,535,128 bytes, sha256 D5655008F6A6B9FB32F974351A6EA0C98E1703568A9DD2CA4693552022F64C83
  • rr3-switch-app-20261116-v0.22.14.zip -- 98,241,226 bytes, sha256 3A5B25B8B54768640CC348D9C8D475B65498BEDD28FF4687855968536A1BE799
    (the app-only package: the NRO, the romfs tree, the card control files,
    the install scripts and the README)

SUPERSEDES

v0.22.14 replaces v0.22.13 and every earlier release. v0.22.13 carried the
console crash fix with the three defects the review found closed; v0.22.14
adds the measurement fix, and the three defects an adversarial review found
in THAT fix are closed here too.

RR3 native re-host v0.22.13: the load bias is no longer published before the image is mapped, and the review of that fix is in

Choose a tag to compare

@ArakiW ArakiW released this 15 Nov 19:16

Real Racing 3 -- Switch native re-host, v0.22.13

WHAT THIS FIXES

The console crash from 2026-11-10 is closed, and the cause was found by
reproducing the exact build the console ran and running addr2line against it.

commit a5ba9487 rebuilt;  nm(__libnx_exception_handler) = 0x8fb60
runtime base = 0x1abfbc5b60 - 0x8fb60 = 0x1abfb36000
pc  static 0x836f4 -> rr3::reapDetachedThreadWorker(void*)
                    native-switch/source/pthread_bridge.cpp:5881
lr  static 0x836f0 -> native-switch/source/pthread_bridge.cpp:5872

836ec:  bl   guestImageContains      <- the guard
836f0:  tbz  w0, #0, 83754           <- the guard's branch
836f4:  ldr  x26, [x25, x26]         <- the faulting instruction

x25 is the guest's load bias (0x59a29c1000), x26 is 0x1f6d5d0 -- the
port's own kAssetSingletonElfVa, a guest virtual address -- and the
effective address is 0x59a492e5d0, which is exactly the FAR in the dump.
So the port read a guest address that had no memory behind it. The same
site faulted on both console runs of that day.

WHY. The loader publishes the guest's load bias as soon as the image is
LOADED, but at that point the image is only RESERVED: reserveSegmentedTargets()
has claimed a CodeMemory address range and mapProcessCodeImages() has not
mapped it yet. The guard in front of the read, guestImageContains(), asked
the ELF's PT_LOAD table whether the address was in range and never asked
whether the image was mapped -- so it said yes, and the read faulted. The
2026-11-03 crash was the other half of the same bug (there the bias was still
zero and the slot was the raw ELF VA); only that half had been fixed.

guestImageContains() and resolveMainImageLoadBias() are the two doors
every guest-memory reader in the port goes through (guest_rtti,
race_state_probe, guest_action, guest_view_probe's flRead, and the
reaper), so gating both of them on the mapping being live closes the whole
class, not one site of it.

ALSO: the exception class in the dump was being read out of the wrong
field. esr=0x92000005 is EC 0x24 = "Data Abort from a lower Exception
level", with DFSC 0b000101 = "Translation fault, level 1" and WnR = 0, i.e.
an ordinary unmapped read. It is not a pointer-authentication failure:
SPAL is EC 0x0C, whose ESR is 0x3000_00xx. The "SPAL" reading had been
written into the source comment, a commit message and the docs, and it sent
one investigation after TPIDR_EL0 and PAC keys instead of after the unmapped
address. The crash dump now decodes its own ESR, so this cannot be misread
again.

AND THE REVIEW OF THE FIX FOUND THREE MORE DEFECTS IN IT (this release
includes them). The Antigravity CLI reviewed the change adversarially:

  • the new loaderMainImageMapped() would have heap-allocated inside the
    crash handler
    on the kernel exception stack, where nothing may allocate;
  • the reaper's chain of guest pointers after the guarded rung was still
    dereferenced raw -- the same crash, one rung later;
  • the segmented mapping path reported itself mapped after its first range.

All three are fixed. The review also had the instruction-abort and
data-abort exception classes swapped; the decode now names both families
explicitly.

WHAT THE NEXT CRASH FILE WILL TELL YOU

rr3-native-rehost.crash-early.txt now carries three new lines:

field what it answers
fault_class the exception in words: data-abort-translation-fault-l1 / data-abort / spal / instruction-abort / unknown
far_attribution whose MEMORY faulted (a guest DSO, port-nro+0x..., or unmapped) -- the pc already says whose CODE ran
main_image_mapped 1 or 0: was the guest image mapped when it faulted? A 0 here is the bug in one field.

HOW TO TEST

  1. Delete the old "RR3 Native Rehost" icon from the home menu first, then
    install this NSP. (Installing over the old one leaves the old icon and
    the old launch entry behind, and the two will fight.)
  2. Launch it from the home menu -- no hbmenu, no separate NRO.
  3. If it crashes, send rr3-native-rehost.crash-early.txt and
    rr3-native-rehost.guest-view.log back. The three new lines are the
    point of this release.

ALSO IN THIS RELEASE

  • The version is 0.22.13 in all three places it lives (rr3/version.hpp,
    the Makefile, the .nmeta), derived and checked by the contract tests.
  • docs/OPEN-ISSUES.md sections 9.41 and 9.44.2 are corrected and a new
    section 9.46 records the whole finding, including the two wrong readings
    that preceded it, why each was wrong, and what the review of the fix
    found.
  • The image-sized JIT probe was NOT the crash: it succeeded on that console
    (create=00000000 exec=00000000 close=00000000). It is left alone.
  • The 27-to-2 start-lights regression and the 211 compiler warnings are still
    open and are not touched by this release.

SUPERSEDES

v0.22.13 replaces v0.22.12 and every earlier release. v0.22.12 carried the
crash fix but had the three defects listed above; v0.22.13 has the fix and
those three closed.


SUPERSEDED BY v0.22.14. v0.22.13 carried the console crash fix, and that fix is still in v0.22.14. v0.22.14 adds the measurement fix: the "27 -> 2 start lights" collapse was the census counting the port's OWN log lines, not a game regression -- and an adversarial review of that first fix found three real defects in it (the counters sat in a function only ONE resolver branch calls, the contract test caught one of the five ways to break the property, and the document had the bound backwards). All three are fixed in v0.22.14, and the gate now parses the PowerShell harness before it runs it. Install v0.22.14.

RR3 native re-host v0.22.12: the load bias is no longer published before the image is mapped

Choose a tag to compare

@ArakiW ArakiW released this 15 Nov 18:57

Real Racing 3 -- Switch native re-host, v0.22.12

WHAT THIS FIXES

The console crash from 2026-11-10 is closed, and the cause was found by
reproducing the exact build the console ran and running addr2line against it.

commit a5ba9487 rebuilt;  nm(__libnx_exception_handler) = 0x8fb60
runtime base = 0x1abfbc5b60 - 0x8fb60 = 0x1abfb36000
pc  static 0x836f4 -> rr3::reapDetachedThreadWorker(void*)
                    native-switch/source/pthread_bridge.cpp:5881
lr  static 0x836f0 -> native-switch/source/pthread_bridge.cpp:5872

836ec:  bl   guestImageContains      <- the guard
836f0:  tbz  w0, #0, 83754           <- the guard's branch
836f4:  ldr  x26, [x25, x26]         <- the faulting instruction

x25 is the guest's load bias (0x59a29c1000), x26 is 0x1f6d5d0 --
the port's own kAssetSingletonElfVa, a guest virtual address -- and the
effective address is 0x59a492e5d0, which is exactly the FAR in the dump.
So the port read a guest address that had no memory behind it.

WHY. The loader publishes the guest's load bias as soon as the image is
LOADED, but at that point the image is only RESERVED: reserveSegmentedTargets()
has claimed a CodeMemory address range and mapProcessCodeImages() has not
mapped it yet. The guard in front of the read, guestImageContains(), asked
the ELF's PT_LOAD table whether the address was in range and never asked
whether the image was mapped -- so it said yes, and the read faulted. The
2026-11-03 crash was the other half of the same bug (there the bias was still
zero and the slot was the raw ELF VA); only that half had been fixed.

guestImageContains() and resolveMainImageLoadBias() are the two doors
every guest-memory reader in the port goes through (guest_rtti,
race_state_probe, guest_action, guest_view_probe's flRead, and the
reaper), so gating both of them on the mapping being live closes the whole
class, not one site of it.

ALSO: the exception class in the dump was being read out of the wrong
field. esr=0x92000005 is EC 0x24 = "Data Abort from a lower Exception
level", with DFSC 0b000101 = "Translation fault, level 1" and WnR = 0, i.e.
an ordinary unmapped read. It is not a pointer-authentication failure:
SPAL is EC 0x0C, whose ESR is 0x3000_00xx. The "SPAL" reading had been
written into the source comment, a commit message and the docs, and it sent
one investigation after TPIDR_EL0 and PAC keys instead of after the unmapped
address. The crash dump now decodes its own ESR, so this cannot be misread
again.

WHAT THE NEXT CRASH FILE WILL TELL YOU

rr3-native-rehost.crash-early.txt now carries three new lines:

field what it answers
fault_class the exception in words: data-abort-translation-fault-l1 / data-abort / spal / instruction-abort / unknown
far_attribution whose MEMORY faulted (a guest DSO, port-nro+0x..., or unmapped) -- the pc already says whose CODE ran
main_image_mapped 1 or 0: was the guest image mapped when it faulted? A 0 here is the bug in one field.

HOW TO TEST

  1. Delete the old "RR3 Native Rehost" icon from the home menu first, then
    install this NSP. (Installing over the old one leaves the old icon and
    the old launch entry behind, and the two will fight.)
  2. Launch it from the home menu -- no hbmenu, no separate NRO.
  3. If it crashes, send rr3-native-rehost.crash-early.txt and
    rr3-native-rehost.guest-view.log back. The three new lines are the
    point of this release.

ALSO IN THIS RELEASE

  • The version is 0.22.12 in all three places it lives (rr3/version.hpp,
    the Makefile, the .nmeta), derived and checked by the contract tests.
  • docs/OPEN-ISSUES.md sections 9.41 and 9.44.2 are corrected and a new
    section 9.46 records the whole finding, including the two wrong readings
    that preceded it and why each was wrong.
  • The image-sized JIT probe was NOT the crash: it succeeded on that console
    (create=00000000 exec=00000000 close=00000000). It is left alone.
  • The 27-to-2 start-lights regression and the 211 compiler warnings are still
    open and are not touched by this release.

SUPERSEDES

v0.22.12 replaces v0.22.11 and every earlier release. v0.22.11 carried the
title-id change and the whole RomFS tree, and both of those are still in
here; this release adds the crash fix on top.


SUPERSEDED BY v0.22.13. v0.22.12 carried the crash fix, but an
adversarial review of that fix found three real defects in it: the crash
handler would have heap-allocated on the kernel exception stack, the
reaper's chain of guest pointers after the guarded one was still
dereferenced raw (the same crash, one rung later), and the segmented
mapping path reported itself mapped after its first range. All three are
fixed in v0.22.13. Install v0.22.13.

2026-11-14:NSP 补齐了整棵 romfs,而且换了一个「像应用」的 title id

Choose a tag to compare

@ArakiW ArakiW released this 15 Nov 18:21

RR3 Switch Native Port — 2026-11-14:NSP 补齐了整棵 romfs,而且换了一个「像应用」的 title id

这一版解决两件事:上一版的 NSP 少了一半(它装得上,但启动不了),以及你的主机告诉了我们它为什么启动不了(Atmosphère 的崩溃报告说得很清楚)。

⭐ 1. 上一版的 NSP 确实少了 48 MB —— 少的就是整棵 romfs

上一版 (v0.22.9) 这一版 (v0.22.11) NRO(能跑的那个)
大小 5,411,032 B(5.2 MiB) 50,532,568 B(48.2 MiB) 53,756,401 B(51.3 MiB)

⇒ ⇒ ⇒ 少的不是打包开销,是一整个 section 没被打进去。 上一版打包时给打包器传了
--noromfs,Program NCA 里只有 ExeFS。少掉的 44,948,780 B / 35 个文件里包括:

  • libRealRacing3.so 33,110,472 B —— 客机自己的主程序
  • libc++_shared.so 1,014,704 B —— 客机的 C++ 运行时
  • libfmodex.so / libNimble.so / 18 个字体 / original/.depot 的中英文案与动画清单

⇒ ⇒ ⇒ ⇒ 而且这个包本来也起不来客机:端口打开的是 "romfs:/libc++_shared.so",
没有卡上兜底;装载器拿到的路径是什么就 fopen 什么。

⇒ ⇒ ⇒ ⇒ ⇒ 修法只是一个参数:--romfsdir 会把那棵树放进 Program NCA 的
第二个 section(IVFC 包装 + 加密),和 section 0 的 ExeFS 并排。

⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 而且这次不是「看着变大了」,是逐个文件核对过的。
新增 tools/verify-nsp-romfs.py:它把要发布的那个包真的解开
(XTS 解头 → ECB 解 key area → CTR 解 section → 从 IVFC 里取出 romfs 镜像),
再和 native-switch/romfs/ 目录、以及 NRO 里嵌的那份镜像逐文件比对:

in the NSP             35 files       44,948,780 bytes
             identical to the reference
OK: the NSP carries the whole RomFS tree

hactool(你自己那份先例就是用它验的)也认:section 1 是合法的 IVFC RomFS,35 个文件全在。

⭐ 2. 你的崩溃报告把原因说出来了

你发来的 Atmosphère 致命报告(文本版):

Result:       0xE80 (2128-0007)
Program ID:   0100000000000023
Process Name: am
PC:           0000007177e39804     Start Address: 0000007177e00000

⇒ ⇒ ⇒ am 是 Account Manager(内核自带模块),它在处理「你这个 title」的时候死了,
死在内核里,端口还没跑起来。
而且它的 TLS 里放着我们的 title id
(0100ac50f00d0001)—— 它确实是在处理我们。

⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 而包里其它每一块,都和一个「装得上」的包逐字节相同:
main.npdm 与先例只差 一个 4 字节字(title id),control.nacp 只差名字、版本和 title id。
⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 剩下的唯一差异就是 title id。

⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 而我们那个 title id 的形状是「内核自带标题」而不是「应用」:
0x0100AC50F00D0001 的低 16 位是 0x0001 —— 和内核自己的 ldr
(0x0100000000000001)同一个低半;而所有家用 NSP、所有零售游戏,低半都是 0x8000
(应用位)
。你那份装上的先例用的就是 0x0100AC5003488000。

⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 这一版把 title id 换成 0x0100AC50F00D8001:
低半 0x8001,应用位和先例一致,其余部分一个字节没动。
⇒ 这是一次只动一个变量的实验:如果还是崩在 am,那 title id 就不是原因。

⭐ 3. 端口这边也不赌 loader 的心情

libnx 的 romfsMountSelf() 写得很清楚:NRO 挂的是自己内嵌的 romfs;NSO(即 NSP 启动的样子)
走 romfsMountFromCurrentProcess,那是进程的「数据存储」
。loader 会不会把 Program NCA 的
RomFS section 露成数据存储,端口打包票,NPDM 里也没有任何描述符能说明。

⇒ 所以端口先试 romfsInit(),失败就改挂卡上同一棵树的镜像
(romfsMountFromFsdev),NRO 路径一个字节没变,并且它会告诉你它拿到的是哪一棵:

phase=romfs-src ordinal=315 target=0000000000000001 source=embedded
phase=romfs-src ordinal=315 target=0000000000000002 source=card
phase=romfs-src ordinal=315 target=0000000000000000 source=none

⇒ 装上以后如果不启动,先看这一行。 它把「装上了但客机没起来」从玄学变成了一个可读的字段。

📊 4. Eden 实测:卡上那棵镜像 = 内嵌那棵

romfscard1 轮(同一个二进制、同一个存档、同一组参数,只换 romfs 来源):

romfs source     card (forced)   phase=romfs-src target=2 source=card forced=1
frames           2040
pixels lit       921549 of 921600
start lights     2      (内嵌那轮 ctl1:2)
race screen      2      (内嵌那轮 ctl1:2)
md5 mismatch     0

客机的库、字体、中文文案,全部是从卡上那份镜像里读出来的。

📦 文件 / Files

文件 大小 说明
rr3-native-rehost.nsp 48.2 MiB 装这个。title id 变了,所以主菜单里是一个新图标
rr3-switch-app-20261114.zip ~100 MiB 应用包(NSP + NRO + rr3.romfs + 9 份控制脚本 + 配置 + 安装脚本 + 中文指南)

⇒ ⚠️ 装之前请把旧的 RR3 Native Rehost(0.22.10 那个)删掉:它是另一个 title id,
留着只会让你点错,而且它照样会崩。

游戏数据卷(七个卷 + .depot,约 11.8 GiB)不在本发布内,
仍需按安装指南准备。

📥 回传日志 / Send logs back

  • sdmc:/switch/rr3-native-rehost.guest-view.log —— 先看 phase=romfs-src 那一行;
    后面还有 phase=loader-diag(含 pac-census)。
  • sdmc:/switch/rr3-native-rehost.crash-early.txt —— 如果还崩,现在多了 ec= 和
    pc_attribution= / lr_attribution=。
  • 如果还是 Atmosphère 的蓝屏:把新的 report_*.log(在卡的 /atmosphere/fatal_errors/)发我,
    上次就是它把「am 在处理我们的 title」这件事直接说出来的。

📚 文档 / Documentation


This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.


SUPERSEDED BY v0.22.12. This release carried the title-id change and the
whole RomFS tree, and it still crashes on real hardware -- the crash was
found, reproduced against this exact build and fixed in v0.22.12. The cause
was NOT the title id and NOT a pointer-authentication failure: the loader
published the guest's load bias before the guest image was mapped, and the
guard in front of the guest-memory reads asked the ELF's address table
instead of asking whether the memory was there. Install v0.22.12.

2026-11-13:NSP 补齐了整棵 romfs(5.2 → 48.2 MiB),逐个文件核对过

Choose a tag to compare

@ArakiW ArakiW released this 13 Nov 16:14

⚠️ 这一版在主机会崩,已被 v0.22.11 取代 / CRASHES ON THE CONSOLE, SUPERSEDED BY v0.22.11.

这一版带上了整棵 romfs(5.2 MiB → 48.2 MiB,内容是对的),
但它的 title id 的低 16 位是 0x0001 —— 那是内核自带标题的形状
(和内核自己的 ldr 同款低半),而所有家用 NSP / 零售游戏都是 0x8000。
你装上后点它,Atmosphère 会在**内核里的 Account Manager(am)**崩掉,
我们的程序根本没跑起来。

v0.22.11 只改了这一处(title id → 0x0100ac50f00d8001),其余一个字节没动。
请用 v0.22.11,并先把这个旧图标删掉(它是另一个 title id,留着会点错)。

崩溃报告与分析见 docs/OPEN-ISSUES.md §9.45 / §9.45.1。

RR3 Switch Native Port — 2026-11-13:NSP 补齐了整棵 romfs,而且这次是逐个文件核对过的

原生 Horizon OS 移植。这一版只修一件事,但它是你看到的那件事:上一版的 NSP 少了一半。

⭐ 1. 你说的对:包确实少东西,而且少的正是整棵 romfs

上一版 NSP 这一版 NSP NRO(能跑的那个)
大小 5,411,032 B(5.2 MiB) 50,532,568 B(48.2 MiB) 53,756,401 B(51.3 MiB)

⇒ ⇒ ⇒ 少的 48,345,369 字节不是打包开销,是一整个 section 没被打进去。
上一版打包时给打包器传了 --noromfs,于是 Program NCA 里只有 ExeFS。

⇒ ⇒ ⇒ ⇒ 少掉的那棵树是 44,948,780 字节 / 35 个文件,不是装饰品:

文件 大小 是什么
romfs/libRealRacing3.so 33,110,472 客机自己的主程序
romfs/original/.depot/text_cn-Hans.txt 2,831,352 中文文案
romfs/original/.depot/text_en.txt 2,939,719 英文文案
romfs/ui/NotoSansCJKsc-RR3Bootstrap.otf 1,802,168 中文字体
romfs/libfmodex.so 1,274,928 客机的 FMOD
romfs/libc++_shared.so 1,014,704 客机的 C++ 运行时
…另外 29 个 字体、original/.depot 动画清单等

⇒ ⇒ ⇒ ⇒ ⇒ 而且这个包根本起不来客机: 端口的 main.cpp 打开的是
"romfs:/libc++_shared.so",没有卡上兜底;装载器也是拿到的什么路径就 fopen 什么。
⇒ 没有 romfs ⇒ 客机加载不了。

⭐ 2. 修好了:Program NCA 现在有两个 section

打包器本来就会干这事,只是上一版没让它干:--romfsdir 会把那棵树放进
Program NCA 的第二个 section(IVFC 包装 + 加密),和 section 0 的 ExeFS 并排:

NSP                 50,532,568 bytes
  4597f9d1….nca   50,377,728   Program
    section 0        5,253,120   ExeFS   (hash_type=2 PFS0,  crypt=3 CTR)
    section 1       45,121,536   RomFS   (hash_type=3 ROMFS, crypt=3 CTR)
  9d5377d3….nca      150,528   Control
  a978960c….cnmt.nca   4,096   Meta
romfs image        44,951,852   IVFC levels=7

⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 而且这次不是「看着变大了」,是逐个文件核对过的。
新增 tools/verify-nsp-romfs.py:它把包真的解开(AES-256-XTS 解头 → AES-128-ECB
解 key area → AES-128-CTR 解 section → 从 IVFC 里取出 romfs 镜像),
然后拿同一套解析器分别读 native-switch/romfs/(目录树)和
native-switch/rr3.romfs(NRO 里嵌的那份),三个必须逐文件、逐字节一致:

in the NSP             35 files       44,948,780 bytes
             identical to the reference
romfs image            35 files       44,948,780 bytes
             identical to the reference
OK: the NSP carries the whole RomFS tree

⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ 体积对但文件不对,它一样会报错 —— 这比「包变大了」可靠得多。

⭐ 3. 端口侧也兜底了:不赌 loader 的行为

⇒ ⇒ ⇒ libnx 的 romfsMountSelf() 写得很清楚: NRO 挂的是自己内嵌的 romfs;
NSO(即 NSP 启动的样子)走的是 romfsMountFromCurrentProcess,也就是进程的「数据存储」。
而 loader 会不会把 Program NCA 的 romfs section 露成数据存储,端口打包票,
NPDM 里也没有任何描述符能说明(实测:SDK 生成的 main.npdm 只有 1,604 字节、一个 META 魔数)。

⇒ ⇒ ⇒ ⇒ 所以端口现在先试 romfsInit(),失败就改挂卡上同一棵树的镜像
(romfsMountFromFsdev("sdmc:/switch/rr3-native-rehost/rr3.romfs", 0, "romfs"),
见 mountPortRomfs())。NRO 路径一个字节都没变(romfsInit() 成功就直接返回)。

⇒ ⇒ ⇒ ⇒ ⇒ 而且端口会告诉你它拿到的是哪一棵,日志里多一行:

phase=romfs-src ordinal=315 target=0000000000000002 source=card forced=1

source=embedded(NRO 内嵌)/ source=card(卡上镜像)/ source=none(都没有)。
⇒ 装上以后如果不启动,先看这一行。 启动行也会写:RomFS=00000000 (card)。

MEASURED 2026-11-13(Eden,romfscard1 轮,强制走卡上这条路):
romfs-src target=2 source=card forced=1,客机随即开始正常请求资源、进入事件流程 ——
⇒ 端口不依赖 loader 的善意,也能拿到整棵 romfs。

📦 文件 / Files

文件 大小 说明
rr3-native-rehost.nsp 48.2 MiB 装这个。NSP 标题,主菜单直接点开
rr3-switch-app-20261113.zip 93.7 MiB 应用包(NSP + NRO + rr3.romfs + 9 份控制脚本 + 配置 + 安装脚本 + 中文指南)

sha256 见下方 release 资产。

NSP sha256:6fbfa699cdf8fa5c4aa5f8ba9288e64e7d604db91fb8e6cc9df6f0e499efaaa6

游戏数据卷(七个卷 + .depot,约 11.8 GiB)不在本发布内,仍需按
安装指南准备。

🚀 部署 / Deployment

  1. 装 NSP:用 NSP 安装器(Tinfoil / Awoo / NSz),或 hbloader + sigpatches。装完主菜单出现 RR3 Native Rehost。
  2. 拷数据:七个数据卷和 .depot 拷到卡的 sdmc:/switch/rr3-native-rehost/。
  3. 拷控制脚本:9 份 rr3-*.txt 放同一目录,rr3-gfx.conf 放 sdmc:/switch/。
  4. 拷 rr3.romfs(44.8 MB)到 sdmc:/switch/rr3-native-rehost/ —— 这是 NSP 启动时的兜底(见第 3 节)。

📥 回传日志 / Send logs back

  • sdmc:/switch/rr3-native-rehost.guest-view.log —— 先看 phase=romfs-src 那一行;
    后面还有 phase=loader-diag(含 pac-census)。
  • sdmc:/switch/rr3-native-rehost.crash-early.txt —— 如果还崩,现在多了 ec= 和
    pc_attribution= / lr_attribution=。

📚 文档 / Documentation


This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.

v0.22.9 — 2026-11-11 出包改成 NSP + 真机 SPAL 根因定位

Choose a tag to compare

@ArakiW ArakiW released this 10 Nov 16:39

⚠️ 已被 v0.22.10 取代 / SUPERSEDED BY v0.22.10.

这一版的 NSP 少了整棵 romfs(5.2 MiB vs 48.2 MiB),装上以后客机起不来。
缺的是 Program NCA 的第二个 section,里面是客机自己的 libRealRacing3.so、
libc++_shared.so 和字体 —— 端口打开 romfs:/libc++_shared.so 没有兜底。
请下载 v0.22.10 的资产。 原因与测量见 docs/OPEN-ISSUES.md §9.45。

RR3 Switch Native Port — 2026-11-11:出包改成 NSP,真机崩溃的根因已经在 dump 里了

原生 Horizon OS 移植。这一版只有两件事,但都是你之前卡住的地方:装包方式换成 NSP(装上就是主菜单里的一个游戏,不用再开 Homebrew Launcher),以及真机那次 SPAL 崩溃的根因找到了,而且答案就在你传回来的那份 dump 里。

⭐ 1. 出包改成 NSP

rr3-native-rehost.nsp(5.2 MiB):装上以后主菜单里直接出现一个叫 RR3 Native Rehost 的标题,点开就进游戏。

NSP 里的东西(就这些,已逐条核对过容器结构):

容器内条目 大小 是什么
a04cc32b….nca(Program) 5,256,192 B 端口可执行体 + main.npdm
9d5377d3….nca(Control) 150,528 B 控制数据:名字 + 图标
ba129cfa….cnmt.nca(Meta) 4,096 B 内容元数据(CNMT)—— 缺它就报「未找到内容元数据」

**⇒ ⇒ 第一版给的是只有两个文件的 PFS0,那不是 NSP,安装器直接拒绝(未找到内容元数据)。这一版经过官方 SDK 18.3.1 + 你自己的 hacBrewPack(cnmt_digest fork),带齐了 Program / Control / Meta 三个 NCA。

⇒ NSP 里没有 RomFS。 这不是漏了,是工具链的边界:npdmtool 没有 icon / nacp / romfs 这三个键(每个都试过,出来的 848 字节元数据一模一样),而且它描述不了 RomFS 段。

⇒ 但没有 RomFS 不影响游戏跑。 端口读自己的资源走 resolvePortAssetPath():先试 romfs:/X,找不到就退到 sdmc:/switch/rr3-native-rehost/X —— 而客机自己的三个 .so 和 UI 字体本来就在卡的那儿。客机主库也一样:selectGameLibrary() 最后会落到 sdmc:/switch/rr3-native-rehost/libRealRacing3.so。

⇒ ⇒ 打包时踩到的两个坑(都记在 §9.44 里了):

  1. libnx 自带的 %.nsp 规则做出来的是 exefs 镜像,不是 NSP。 它 build_pfs0 exefs,而 build_pfs0 只打包输入目录的第一层(遇到子目录打印 Directories aren't supported, skipping... 就跳过)⇒ 容器里的条目叫 main / main.npdm。NSP 的条目必须叫 exefs/main / exefs/main.npdm,目录结构得在容器里面。所以容器是 tools/make-pfs0.py 自己写的,格式是从 build_pfs0 自己的输出里读回来的。
  2. 打包完会把容器读回来核对,exefs/main 和 exefs/main.npdm 少一个就直接报错 —— 不会出现「构建说成功、包却是坏的」。

⭐ 2. 真机那次 SPAL 崩溃:根因就在你传的 dump 里

MEASURED 2026-11-11,你传回来的 crash-early.txt:

esr=0000000092000005        ← 异常类别 0x24 = SPAL(指针认证失败)
pc=0000001abfbb96f4
lr=0000001abfbb96f0
fault_tpidr_el0=000000018eff3e60
sp=000000018eff39b0

⇒ ⇒ ⇒ 关键就在 fault_tpidr_el0 这个字段:它比栈指针高 1200 字节,落在栈帧里。

TPIDR_EL0 是「线程本地区」的指针,PAC 密钥就是从它派生的。而端口自己的 GuestTlsScope(tls_probe.cpp)在栈上伪造了一块 256 字节的假 TCB,把 TPIDR_EL0 指过去,而且这段作用域覆盖整个客机构造器窗口(装载器在 multi_dso_linker.cpp 的三处调用都在里面)。

⇒ ⇒ ⇒ ⇒ 而客机的 libc++_shared.so 是带指针认证编译的(1328 条 paciasp + 1372 条 autiasp)⇒ 客机每次函数进出都在签名/验签 ⇒ 端口伪造 TPIDR_EL0 ⇒ 客机算出来的 PAC 对不上 ⇒ SPAL。

⇒ 这是一个端口侧的 bug,而且修法很小:端口不能再乱改 TPIDR_EL0(把宿主机的值存下来、客机构造器窗口结束后恢复,或者给客机分配一块真正的线程本地区)。

顺带把两件之前读错的事纠正了:

  • esr=0x92000005 是 SPAL,不是「数据访问异常 / 地址翻译失败」(那是 0x4E000005)—— 之前的文档读错了,方向整个反了。
  • 端口的 NRO 全库只有 2 条 PAC/AUT 指令(都在 libunwind 里),而崩溃 pc 反推出的 NRO 基址不是页对齐 ⇒ pc 不在端口镜像里,在客机镜像里。所以「崩溃在端口代码里」这个说法也不成立(§9.41 已按证据改写)。

⇒ 下一版会把 TPIDR_EL0 的修掉,并附上新仪表:loader-diag 行(每个客机 DSO 映射前的名字/段/偏移/权限,外加每个 DSO 的 PAC 指令条数)、以及崩溃 dump 里的 ec=(解出来的异常类别) 和 pc_attribution= / lr_attribution=(出错的 pc 属于哪个 DSO、偏移多少)。装载器的诊断行现在逐行立即落盘(日志平时 64 行批量落盘,崩溃时会把装载器自己的证据一起带走 —— 这正是上一次什么都没留下的原因)。

📊 3. 60 帧:端口侧已经没水分了,真机才是判据

MEASURED 2026-11-10,10 轮归档的帧预算(渲染段,按阶段分开):

字段 含义 中位数
tt 整帧 40~66 ms(Eden)
tr 客机自己的渲染 37~40 ms
ts 交换/呈现 0 ms
tp 端口自己在帧循环里干的活 0 ms(每一轮、每一阶段都是 0)
jni 端口经 JNI 伺候客机 7~11 ms

⇒ 端口自己的开销是 0 ms,帧成本全在客机的栅格化上。 所以 60 帧这件事端口侧已经做完了,剩下的是客机的画质档 —— 而那只能在真机上走:Eden 上实测过三个客机侧杠杆(关 AA、关 12 个高开销画质项、分辨率减半),三个全落在轮间噪声里(关 AA 反而更慢 72→83 ms),说明 Eden 的帧时间被模拟器本身主导。

⇒ 真机上的判据还是同一个:census 行的 tt。 中位数降到 16~17 ms 就是 60 fps。旋钮清单见安装指南 10.10。

🎮 4. 游戏其实已经在比赛里了(画面实测)

这一轮的画面帧证明的事情比计数器多得多:

  • 事件选择页:三张每日比赛卡(保时捷 911 GT3 / 奥迪 R8 / 日产 GT-R)贴图全对、零洋红,中文标签正常。
  • 3D 选车展厅:F1 赛车完整渲染(涂装、尾翼、Real Racing 标识都对),右侧 R / MR / PR 级别、车手等级 110.3、四条性能条、中文提示框全对。
  • 赛前发车格:玩家的 NISMO GT-R(白红涂装、灯组正确),旁边二十辆 AI 赛车——维斯塔潘 1、佩雷兹 11、塞恩斯 55、勒克莱尔 16、科拉平托 43、周冠宇 24、奥孔 31、马格努森 20、斯特罗尔 18、皮亚斯特里 21、诺里斯 4、许尔肯贝格 27、角田毅 22、拉塞尔 63、阿尔本 23、加斯利 10、汉密尔顿 44、阿隆索 14 —— 涂装、号码、名字全对,右侧排行榜也在画。

⇒ 端口把客机开到「发车格前」这一整条路是通的。

文件 / Files

文件 大小 说明
rr3-native-rehost.nsp 5.0 MiB 装这个。NSP 标题,主菜单直接点开
rr3-switch-app-20261111.zip 49.3 MiB 应用包(NSP + NRO + RomFS + 9 份控制脚本 + 配置 + 安装脚本 + 中文指南)

zip sha256:见下方 release 资产
NSP sha256:F4B549EEF05B474C90014D6D0E0EA6F28100603A908FD0B42B72EBFAF75F1BA1

游戏数据卷(七个卷 + .depot,约 11.8 GiB)不在本发布内,仍需按安装指南准备。

部署 / Deployment

  1. 装 NSP:用 NSP 安装器(Tinfoil / Awoo / NSz),或 hbloader + sigpatches。装完主菜单出现 RR3 Native Rehost。
  2. 拷数据:七个数据卷和 .depot 拷到卡的 sdmc:/switch/rr3-native-rehost/。
  3. 拷控制脚本:9 份 rr3-*.txt 放同一目录,rr3-gfx.conf 放 sdmc:/switch/。
  4. 客机的 .so 和字体:如果之前没拷过,从你自己的应用副本取出放到 sdmc:/switch/rr3-native-rehost/(NSP 里没有这些,端口会自己去那儿找)。

回传日志 / Send logs back

跑完请回传:

  • sdmc:/switch/rr3-native-rehost.guest-view.log —— 现在会多出 phase=loader-diag 行(含 pac-census),它直接说出是哪个客机 DSO 带了多少条指针认证指令。
  • sdmc:/switch/rr3-native-rehost.crash-early.txt —— 如果还崩,现在多了 ec= 和 pc_attribution= / lr_attribution=,一行就能说清崩的是端口还是客机。

文档 / Documentation


This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.

v0.22.8 — 2026-11-09 (build 3) 开发中版本 / Development Build

Choose a tag to compare

@ArakiW ArakiW released this 08 Nov 21:20

RR3 Switch Native Port — 2026-11-09 (build 3)

原生 Horizon OS 移植。这一版有三件事:主机冻死已定位并修复、发布包第一次可以不含任何 EA 材料、以及车终于归玩家开了。

⭐ 这一版最大的变化:发布包是干净的

rr3-switch-app-20261109.zip 只有 6.5 MiB,里面没有任何 EA 的东西。

不是"少了一点",是一个字节的 EA 内容都没有:NRO 内嵌的 RomFS 只有三个文件——本项目自己的 libc++、OFL 授权的中文引导字体、和那份字体的许可说明。
(程序里仍然写着 romfs:/libRealRacing3.so 这样的路径字符串,那是代码:它正是让程序去卡上找这些文件的线索,不是文件本身。)

你需要自己提供游戏的内容:从你自己的应用副本里取出客机运行时、界面字体和 .depot 文本,放到卡的 sdmc:/switch/rr3-native-rehost/ 旁边。程序会自己去那里找。

放在 Releases 里的完整包(10.7 GiB,含数据卷)依然提供给需要一次装好的人;这个 6.5 MiB 的包是给"我自己有游戏文件"的人的。

1. 主机冻死:等条件变量时信号丢了 ⭐

真机开机后 33.5 分钟整机冻死。现场日志证明:客机启动成功(181 个构造器跑完、进了 VIEW CHANGED)、7 个帧缓冲全部 GL_FRAMEBUFFER_COMPLETE、一帧都没渲染——冻在客机 onViewChangedJNI 里面。

根因是等条件变量时信号丢了:宿主机条件变量没有记忆,没人等的时候来的 signal 会直接消失。
修复三件事:

  • 等待者自己记账(哪个对象、等了几次、被 signal 几次、亏空多少、谁调用的),不依赖可被关掉的 census;
  • 等待有上限,放弃时返回 0(不是 ETIMEDOUT——POSIX 规定 pthread_cond_wait 只返回 0,libc++ 收到非 0 会抛异常,那会把慢客机变成崩溃的客机);
  • 端口自己数 signal 的代数,等待前后对比 ⇒ 信号不再丢,而早已送达的旧 signal 也不会被误当成新的。

模拟器实测(同一台机器、同一张卡、同样关掉 census):渲染帧 532 → 3762,截图 5 → 84,诊断日志 186 MB → 24 MB。

2. 新增:能看见「客机工作线程无 EGL 上下文调 GL」的仪表 ⭐

端口只在主线程上把 EGL 上下文设为 current,而 EGL 规定一个上下文同一时间只能属于一个线程 ⇒ 客机工作线程没有上下文。
在模拟器的软件 Mesa 上,无上下文的 GL 调用是无害的空操作;在真机的 NVN 驱动上,它可能把 NVN 通道搞挂,连带整个主机的合成器一起挂掉——而模拟器根本看不到这个现象。

现在每次客机 GL 调用都会检查一次上下文,没有上下文就记一行(在真正的 GL 调用之前写,这样即使那次调用把 GPU 搞挂,证据也已经在卡上了)。覆盖 23 个 tracer,包括工作线程最可能调的那些:glCompressedTexImage2D(纹理解压上传)、glDrawArrays、glDrawElements、glCompileShader、glTexImage2D 等。

计数会跟着每一行进度检查点一起写,所以真机再冻死时,进度文件的最后一行就带着这个计数。

3. 玩家能真的接手操控 ⭐

以前每一轮测试都是端口自己的自动驾驶在开车,所有「圈数 −1」的测量量的都是自动驾驶。查下来比"没让人接手"更糟,有三个缺陷叠在一起:

# 缺陷 实测证据
1 autopilot = 0 只管物理手柄那条路,脚本那条路被闭环无条件覆写 对照轮:卡上设成 0、旧代码 ⇒ 自动驾驶照样开车 201/208 个采样
2 出货包带着实验用手柄脚本,脚本一旦激活物理手柄整条路完全不会被走到 主机上玩家的摇杆是死的,而且脚本一直按着油门
3 脚本那条路一个仪表都没有 「输入到底到没到车」从日志里根本答不出来

三条全修:模式统一管两条路、脚本检测到真人动手柄就自动让位、脚本路补上了自己的仪表(scripted-state)。
实测(24 个连续采样全部一致):lx_script == lx_guest、loop_steered=0,车速 1750→6464 ⇒ 你的输入端到端到达了车。

4. 追踪方向不再每帧重判 / 车被护栏压死时能脱困

方向以前按瞬时车头逐帧重算,车被磕一下就把前瞻点甩到车另一侧,控制器满舵反向、车倒着走、车头再翻,形成正反馈回路。现在方向按场次锁定,只判一次。
实测:目标跑到车背后的采样 45 % → 13 %,圈进度 5.08 % → 8.65 %。

停转检测的「在线上就不脱困」豁免把真正卡死的车也放过了。改用车的世界坐标判「钉死」。
实测:比赛帧数 4770 → 5760,圈进度 8.65 % → 10.35 %。

现在的状态

能力 状态
libnx NRO 引导 + 4-DSO 动态加载 ✅
JNI 桥(233 槽)+ 181 个构造器 ✅
Guest View 生命周期 + eGL 呈现 ✅
文件系统路径重映射(7 个数据卷) ✅
进前端 → 选车 → 进比赛 ✅
人工驾驶 ✅
音频(FMOD) ✅
跑完一整圈 / 圈数计数器 ⚠️ 人工驾驶下正常;端口自己的自动驾驶(attract mode)还跑不完
主机冻死 🔎 已定位并修复,待真机复测
不含 EA 材料的发布包 ✅ 6.5 MiB,实测 NRO 里没有 EA 文件的字节

自动驾驶为什么还跑不完:它跟的是赛道中心线,而赛道自带的赛车线(ai_spline)比中心线短 67 m/圈 ⇒ 车在弯道外侧跑,每场撞护栏约 10 次。
这是自动驾驶的质量问题,不是移植缺陷——你自己开,圈数就正常计。

文件 / Files

文件 大小 说明
rr3-switch-app-20261109.zip 6.5 MiB 应用包,不含任何 EA 材料。解包后覆盖到卡根目录
rr3-native-rehost-20261109.nro 11.0 MiB 同一个 NRO,单独提供

游戏数据卷不在本发布内,需按安装指南自行准备。

部署 / Deployment

  1. 解包 rr3-switch-app-20261109.zip,把 switch\ 里的东西覆盖到卡根目录;
  2. 从你自己的应用副本里取出客机运行时、界面字体和 .depot 文本,放到卡的
    sdmc:/switch/rr3-native-rehost/(详见安装指南);
  3. 游戏自身的数据卷按安装指南准备;
  4. 如果你之前在卡上装过旧版本:把 sdmc:/switch/rr3-census.conf 删掉。它是模拟器调试留下的残留,会关掉唯一的诊断仪表(真机那次冻死就是因为它);
  5. 通过 Homebrew Launcher 启动;
  6. 进比赛后,比赛内的教程框要自己按一下 A(脚本不再替你按);
  7. 右扳机 / A 是油门,左摇杆是转向。

默认是 autopilot = 0,车是你的。想看端口自己开(attract mode)就把 rr3-gamepad.txt 里那一行改成 1。

回传日志 / Send logs back

跑完请回传 sdmc:/switch/rr3-native-rehost.guest-view.log 和
sdmc:/switch/rr3-native-rehost.guest-boot.progress。

新的诊断行长这样:

phase=cond-wait-ledger ... obj=... waited_ms=... waits=... signals=... outcome=...
phase=gl-no-context ... fn=... caller_pc=... thread=0x... is_owner=0 calls=...

第一条告诉你卡在哪个条件变量、等了多久、有没有被 signal 过;
第二条告诉你客机是不是在没有 EGL 上下文的情况下调了 GL(is_owner=0 就是)。

文档 / Documentation


This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.

v0.22.7 — 2026-11-09 (build 2) 开发中版本 / Development Build

Choose a tag to compare

@ArakiW ArakiW released this 08 Nov 20:49

RR3 Switch Native Port — 2026-11-09 (build 2)

原生 Horizon OS 移植的最新状态。这一版最大的变化:车终于归玩家开了,而且主机冻死已经有了一个能解释它的仪表。

这一版改掉的东西(都有实测数字)

1. 玩家能真的接手操控 ⭐

以前每一轮测试都是端口自己的自动驾驶在开车,所以所有「圈数 −1」的测量量的都是自动驾驶,跟移植能不能玩是两回事。查下来比"没让人接手"更糟,有三个缺陷叠在一起:

# 缺陷 实测证据
1 autopilot = 0 只管物理手柄那条路,脚本那条路被闭环无条件覆写 对照轮:卡上设成 0、旧代码 ⇒ 自动驾驶照样开车 201/208 个采样
2 出货包带着实验用手柄脚本,脚本一旦激活物理手柄整条路完全不会被走到 主机上玩家的摇杆是死的,而且脚本一直按着油门
3 脚本那条路一个仪表都没有 「输入到底到没到车」从日志里根本答不出来

三条全修:模式统一管两条路、脚本检测到真人动手柄就自动让位、脚本路补上了自己的仪表(scripted-state)。
实测(24 个连续采样全部一致):lx_script == lx_guest、loop_steered=0,车速 1750→6464,步长在 1.5 m / 30 m 之间交替 ⇒ 你的输入端到端到达了车。

2. 追踪方向不再每帧重判

方向以前是按瞬时车头逐帧重算的:车被磕一下就把前瞻点甩到车另一侧,控制器满舵反向、车倒着走、车头再翻,形成正反馈回路。
现在方向按场次锁定,只判一次,用的是车在 48 采样环上的位移窗口。
实测:目标跑到车背后的采样 45 % → 13 %,圈进度 5.08 % → 8.65 %。

3. 车被护栏压死时能脱困

停转检测的「在线上就不脱困」豁免把真正卡死的车也放过了(被压死的车横向残差 2.07 m,落在 3 m 豁免线内,横向残差判据根本分不出「在爬」和「压死」)。改用车的世界坐标判「钉死」。
实测:比赛帧数 4770 → 5760,圈进度 8.65 % → 10.35 %。

4. 主机冻死:等条件变量时信号丢了 ⭐

真机开机后 33.5 分钟整机冻死。现场日志证明:客机启动成功(181 个构造器跑完、进了 VIEW CHANGED)、7 个帧缓冲全部 GL_FRAMEBUFFER_COMPLETE、一帧都没渲染——冻在客机 onViewChangedJNI 里面。

根因是等条件变量时信号丢了:宿主机条件变量没有记忆,没人等的时候来的 signal 会直接消失。
修复三件事:

  • 等待者自己记账(哪个对象、等了几次、被 signal 几次、亏空多少、谁调用的),不依赖可被关掉的 census;
  • 等待有上限,放弃时返回 0(不是 ETIMEDOUT——POSIX 规定 pthread_cond_wait 只返回 0,libc++ 收到非 0 会抛异常,那会把慢客机变成崩溃的客机);
  • 端口自己数 signal 的代数,等待前后对比 ⇒ 信号不再丢,而早已送达的旧 signal 也不会被误当成新的。

模拟器实测(同一台机器、同一张卡、同样关掉 census):渲染帧 532 → 3762,截图 5 → 84,诊断日志 186 MB → 24 MB。

5. 新增:能看见「客机工作线程无 EGL 上下文调 GL」的仪表 ⭐

端口只在主线程上把 EGL 上下文设为 current,而 EGL 规定一个上下文同一时间只能属于一个线程 ⇒ 客机工作线程没有上下文。
在模拟器的软件 Mesa 上,无上下文的 GL 调用是无害的空操作;在真机的 NVN 驱动上,它可能把 NVN 通道搞挂,连带整个主机的合成器一起挂掉——而模拟器根本看不到这个现象。

现在每次客机 GL 调用都会检查一次上下文,没有上下文就记一行(在真正的 GL 调用之前写,这样即使那次调用把 GPU 搞挂,证据也已经在卡上了)。
覆盖 23 个 tracer,包括工作线程最可能调的那些:glCompressedTexImage2D(纹理解压上传)、glDrawArrays、glDrawElements、glCompileShader、glTexImage2D 等。

计数会跟着每一行进度检查点一起写,所以真机再冻死时,进度文件的最后一行就带着这个计数——不用再等一个"跑完才写"的汇总行(上次冻死时那个汇总行根本没机会写)。

现在的状态

能力 状态
libnx NRO 引导 + 4-DSO 动态加载 ✅
JNI 桥(233 槽)+ 181 个构造器 ✅
Guest View 生命周期 + eGL 呈现 ✅
文件系统路径重映射(7 个数据卷) ✅
进前端 → 选车 → 进比赛 ✅
人工驾驶 ✅
音频(FMOD) ✅
跑完一整圈 / 圈数计数器 ⚠️ 人工驾驶下正常;端口自己的自动驾驶(attract mode)还跑不完
主机冻死 🔎 已定位到"信号丢失"并修复;是否还有第二个原因(工作线程无上下文调 GL)待真机复测

自动驾驶为什么还跑不完:它跟的是赛道中心线,而赛道自带的赛车线(ai_spline)比中心线短 67 m/圈、相差 2.92~8.25 m ⇒ 车在弯道外侧跑,每场撞护栏约 10 次,最好只跑到一圈的 10.35 %。
这是自动驾驶的质量问题,不是移植缺陷——你自己开,圈数就正常计。

文件 / Files

文件 说明
rr3-switch-app-20261109.zip 约 45 MiB:应用(NRO + 内嵌 RomFS)与 9 份控制脚本。解包后覆盖到卡根目录

zip sha256:8D6DD00453DE0BEA9E97320B8D407F5CDEC1CF23DBBF0F77FFE8EA570A4D884D
内嵌 NRO sha256:D8D8E76A40E382CE8DF2B617465B943605E1154AFDBC873DC8E4B6B2D2C73AA6

游戏数据卷不在本发布内,需按安装指南自行准备。

部署 / Deployment

  1. 解包 rr3-switch-app-20261109.zip,把 switch\ 里的东西覆盖到卡根目录;
  2. 游戏自身的数据卷按 tools/README-hardware-test.md 准备;
  3. 如果你之前在卡上装过旧版本:把 sdmc:/switch/rr3-census.conf 删掉。它是模拟器调试留下的残留,会关掉唯一的诊断仪表(真机那次冻死就是因为它);
  4. 通过 Homebrew Launcher 启动;
  5. 进比赛后,比赛内的教程框要自己按一下 A(脚本不再替你按);
  6. 右扳机 / A 是油门,左摇杆是转向。

默认是 autopilot = 0,车是你的。想看端口自己开(attract mode)就把 rr3-gamepad.txt 里那一行改成 1。

回传日志 / Send logs back

跑完请回传 sdmc:/switch/rr3-native-rehost.guest-view.log 和
sdmc:/switch/rr3-native-rehost.guest-boot.progress。

新的诊断行长这样:

phase=cond-wait-ledger ... obj=... waited_ms=... waits=... signals=... outcome=...
phase=gl-no-context ... fn=... caller_pc=... thread=0x... is_owner=0 calls=...

第一条告诉你卡在哪个条件变量、等了多久、有没有被 signal 过;
第二条告诉你客机是不是在没有 EGL 上下文的情况下调了 GL(is_owner=0 就是)。

文档 / Documentation


This project is for learning and research. It does not bypass DRM or forge accounts. The game binary and data in this build come from your own copy of the application — see NOTICE.md.