《忍者龙剑传 黑之章》(含飓风版中文汉化 vb-zh-x2.1)与《忍者龙剑传》(2004)的非官方 Windows 原生移植。2.2.10。
2.2.10
这一版是对 2.2.6–2.2.9 每一次提交的复查修正:保留这几版的全部新功能(着色器缓存全部预热与 epoch、注册 DNS 分流、性能面板新指标、启动器「清理着色器缓存」),只修掉复查中查实的问题。每一项都有日志或代码证据。
1. 着色器缓存:命中时不再读写文件(减少卡顿)
- 问题:2.2.6 起,每次查找着色器都会打开一次
.gen文件(必要时还会写),连已经预热在内存里的着色器也不例外,而且发生在渲染线程上。打开一个文件约 0.3–1 ms,偶尔会卡到十几毫秒。 - 证据(集显 Iris Xe,第 1 章,3×):渲染线程上 50 次查找在这一步共花 18 ms,单次最多 1.3 ms;另一轮共 35 ms,其中一次 18 ms。卡顿帧里「从缓存取着色器」的时间:修前 15–17 ms,修后 0.0 ms。
- 改法:预热过的着色器命中时不碰任何文件;只有不在内存、从磁盘读到的旧项才补写一次
.gen。
2. 联网(主机设置 DNS 模式):恢复按主机设置的 DNS 查询
- 问题:2.2.6 改 DNS 分流时,「主机设置」模式下所有查询都被发到中继的 DNS,主机网络设置里手动填的 DNS 服务器不再被使用(2.2.5 及以前会用)。
- 改法:主机问 10.0.2.3 时照旧走中继的 DNS;问别的服务器时就问那台服务器,与 2.2.5 一致。另外「本机 DNS 没有回应」不再被误报成「Insignia 公网 DNS 没有回应」。
- 默认模式(Insignia 公网 DNS)与 InsigniaDNS 模式不变:Xbox Live 域名走 Insignia,注册用的域名走本机 DNS。
3. 启动器:存档页「导出」按钮误开文件夹
- 问题:2.2.8 新增「清理着色器缓存」按钮时,按钮编号顺延,使 xRevive「导出」与「打开文件夹」撞成同一个编号,点「导出」会打开存档文件夹而不是导出。
- 改法:恢复编号顺序,并加了编译期检查,以后编号再重叠就无法编译。
4. 性能面板:Frame max 覆盖整秒
- 问题:面板每秒更新一次,但
max只看最近 0.5 秒,前半秒的卡顿永远显示不出来。 - 改法:
max统计上次更新以来(整 1 秒)的所有帧。
复查过、无需修改的部分
- 着色器缓存全部预热、旧 epoch 保留不删、
.bin比.gen新则不用:合理。 - 性能面板:渲染线程每帧只画一个小 quad(实测 0.016 ms/帧),统计线程每秒一次、最低优先级(实测约 3.6 ms/次)。
- 输入延迟统计:每次读手柄只做一次比较,开销可忽略。
- 启动器「清理着色器缓存」:删除前会确认;删除后下次启动重新编译,不影响存档。
测试
- 集显 Iris Xe,黑之章第 1 章 3×:中位数 5.66 ms,游戏速度 98.4%,无崩溃。
- 打开性能面板同场景:面板各项显示正常,渲染线程开销 0.016 ms/帧。
- 《忍者龙剑传》(2004)启动到标题画面正常。
- 三个程序已用 Windows Defender 扫描:无威胁。
2.1 线说明
2.1.7 也有第 1 项(着色器缓存命中读文件)的问题;第 2、3 项不存在于 2.1 线。
发布包
ngb-hurricane-pc-2.2.10-win32.zip- 大小:3,014,981 字节
- SHA-256:
2ae2eea51471ca518342483702e0a94e3ca9f1372c5b9241a0f6899c3116ef55 - 符号包
ngb-hurricane-pc-2.2.10-win32-symbols.zip:25,798,176 字节 - SHA-256:
e5fac1ce238e666f2c923108fa19933623b29e57b9c2faac0f6a01c664e222f0
作者:b站 哈雅布撒(QQ:2682557218)
English
An unofficial native Windows port of Ninja Gaiden Black (including the Hurricane Chinese translation vb-zh-x2.1) and Ninja Gaiden (2004). 2.2.10.
2.2.10
This version corrects what a review of every commit in 2.2.6–2.2.9 found: all of those versions' new features are kept (full shader cache prewarm with epochs, the registration DNS split, the overlay's new figures, the launcher's "Clear shader cache"), and only the problems the review confirmed are fixed. Each has log or code evidence.
1. Shader cache: no file reads or writes on a hit (fewer stutters)
- Problem: since 2.2.6, every shader lookup opened a
.genfile (and wrote it when needed), even for shaders already prewarmed in memory, and on the render thread. Opening a file takes about 0.3–1 ms and occasionally stalls for over ten milliseconds. - Evidence (Iris Xe integrated graphics, chapter 1, 3×): 50 lookups on the render thread spent 18 ms in total in this step, at most 1.3 ms at once; another round 35 ms in total, once 18 ms. "Getting shaders from the cache" in stutter frames: 15–17 ms before the fix, 0.0 ms after.
- Fix: a hit on a prewarmed shader touches no file; only old entries not in memory and read from disk get their
.genwritten once.
2. Online (console-settings DNS mode): DNS queries follow the console settings again
- Problem: when 2.2.6 changed to the DNS split, the "console settings" mode sent every query to the relay's DNS, and DNS servers entered by hand in the console's network settings were no longer used (2.2.5 and earlier used them).
- Fix: when the console asks 10.0.2.3 it still goes to the relay's DNS; when it asks another server, that server is asked, as in 2.2.5. Also "this PC's DNS does not answer" is no longer misreported as "Insignia's public DNS does not answer".
- The default mode (Insignia's public DNS) and the InsigniaDNS mode are unchanged: Xbox Live domains go to Insignia, the registration domains to this PC's DNS.
3. Launcher: the Saves page's "Export" button opened a folder by mistake
- Problem: when 2.2.8 added the "Clear shader cache" button, the button IDs shifted so that xRevive "Export" and "Open folder" got the same ID, and pressing "Export" opened the save folder instead of exporting.
- Fix: the ID order is restored, with a compile-time check, so overlapping IDs will not compile in future.
4. Performance overlay: Frame max covers the whole second
- Problem: the overlay updates once a second, but
maxonly looked at the last 0.5 seconds, so a stall in the first half second never showed. - Fix:
maxcounts every frame since the last update (the whole second).
Reviewed, no change needed
- Full shader cache prewarm, old epochs kept and not deleted, a
.binnewer than its.gennot used: sound. - Performance overlay: the render thread draws one small quad per frame (measured 0.016 ms per frame); the statistics thread runs once a second at the lowest priority (measured about 3.6 ms each time).
- Input latency figures: one comparison per controller read, negligible cost.
- The launcher's "Clear shader cache": confirms before deleting; after deleting, shaders compile again at the next start; saves are unaffected.
Tests
- Iris Xe integrated graphics, Ninja Gaiden Black chapter 1 at 3×: median 5.66 ms, game speed 98.4%, no crash.
- The same scene with the overlay open: every figure shows correctly; render thread cost 0.016 ms per frame.
- Ninja Gaiden (2004) starts to the title screen normally.
- The three programs scanned with Windows Defender: no threats.
The 2.1 line
2.1.7 also has item 1 (file reads on a shader cache hit); items 2 and 3 do not exist on the 2.1 line.
Package
ngb-hurricane-pc-2.2.10-win32.zip- Size: 3,014,981 bytes
- SHA-256:
2ae2eea51471ca518342483702e0a94e3ca9f1372c5b9241a0f6899c3116ef55 - Symbols
ngb-hurricane-pc-2.2.10-win32-symbols.zip: 25,798,176 bytes - SHA-256:
e5fac1ce238e666f2c923108fa19933623b29e57b9c2faac0f6a01c664e222f0
Author: 哈雅布撒 on Bilibili (QQ: 2682557218)