《忍者龙剑传 黑之章》(含飓风版中文汉化 vb-zh-x2.1)与《忍者龙剑传》(2004)的非官方 Windows 原生移植。2.2.37.1。
2.2.37.1:修复 2.2.35 起开 VRR(G-SYNC / FreeSync)时帧率被锁低
这是 2.2.37 的修正版,只改了这一处。感谢反馈这个问题的玩家。
先看这里:这次更新对你有什么影响
| 你的情况 | 更新后 |
|---|---|
| 开了 VRR(G-SYNC / FreeSync),2.2.35 起帧率被锁在 24、40 帧左右,过场只有一半 | 开机或切换显示模式后约 3~4 秒内自动纠正,之后稳定 60 帧(过场 30 帧),和 2.2.34 一样 |
| 没开 VRR | 没有变化(120 / 240 Hz 屏幕仍按 2.2.35 的方式让每帧停留相同次数的刷新) |
修了什么
- 问题:一位玩家反馈,开 VRR 后 240 Hz 屏幕只有 24 帧(过场 12 帧),120 Hz 只有 40~43 帧;2.2.34 时是稳定 60 帧。
- 原因:2.2.35 起,屏幕刷新率是 60 的 n 倍(120、180、240 Hz)时,游戏每 n 次屏幕刷新走一帧,让每帧在屏幕上停留的时间一样长。可是 VRR 下屏幕只在有新画面时才刷新:游戏等屏幕刷新 n 次,屏幕又在等游戏出新画面,两边互相等,帧率就掉了。2.2.35 已经有一个 VRR 检查,但只在独占全屏下工作,而且要先慢跑 600 帧才下结论。
- 修复:游戏每秒检查一次自己的节拍。在任何显示模式下(窗口、无边框、独占全屏),只要连续 2 秒低于 59.94 Hz 的 90%,就不再跟随屏幕刷新,改用 59.94 Hz 计时器,也就是 2.2.34 的做法。VRR 下屏幕本来就跟着游戏刷新,游戏自己计时正是正确的方式。显示模式或刷新率改变后会重新判断。
- 什么时候会遇到:在作者的机器上,窗口和普通无边框模式下画面由 Windows 桌面按固定频率合成,G-SYNC 不接管,不受影响;会出问题的是 G-SYNC 真正接管的情况:无边框 + 低延迟呈现,以及独占全屏且关掉了“锁 60 Hz”。
测试(作者的笔记本,RTX 3060 直连屏幕,120 Hz + G-SYNC)
| 情况 | 2.2.37 | 2.2.37.1 |
|---|---|---|
| 无边框 + 低延迟呈现 | 节拍 48.6 Hz,约 45 帧(复现了玩家的问题) | 第 4 秒检测到(43.1 Hz)并切换,之后 50 秒 2,997 拍,稳定 60 Hz |
| 独占全屏,不锁 60 Hz | 前 12 秒约 53 Hz,之后由原有检查纠正 | 第 4 秒检测到并切换,之后稳定 60 Hz |
| 窗口 / 普通无边框 | 60 Hz | 60 Hz |
| 固定 120 Hz(不开 VRR),渲染倍数 4,后台有其他负载 | — | 不误判:3,600 拍全部来自屏幕,60.01 Hz,保持 2.2.35 的均匀度 |
- 性能(待机演示 160 秒,与 2.2.37 各跑 1 次;测试时独显直连屏幕、核显不可用,所以跑在 RTX 3060 上):游戏速度 93.6% 对 93.7%;平均帧时间 3.80 对 3.83 ms,99% 帧 17.11 对 17.08 ms,超过 16.7 ms 的帧 607 对 606 个。新代码只是每秒多一次计数。
- 冒烟测试(发布包本身):
Ninja Gaiden Black.exe跑黑之章 150 秒、Ninja Gaiden.exe跑 2004 更新补丁版 20 秒,绘制状态全部回放、0 条遗漏,0 次卡顿,没有误触发 VRR 检测。 - 发布包:Windows Defender 扫描四个程序,无威胁;文件清单与 2.2.37 相同(12 个),附带的种子等数据文件逐字节相同;程序文件属性显示 2.2.37.1。没有测试用代码。
源码
本版提交:3fecf2a(任何显示模式下的 VRR 检测)、b4f2c95(版本号与 README)。
发布包
ngb-hurricane-pc-2.2.37.1-win32.zip- 大小:3,501,645 字节
- SHA-256:
a7b917cf6d5f648fbbd8fcce2a9ed5af0dcae6d852bf9112fdb4e5e30bd83326 - 符号包
ngb-hurricane-pc-2.2.37.1-win32-symbols.zip:39,687,383 字节 - SHA-256:
c45764fc4fb24c4922835abe1bf4c282d0fd26e69ba570d19f0db73212c2eb9e
作者: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.37.1.
2.2.37.1: fixed the frame rate held low with VRR (G-SYNC / FreeSync) since 2.2.35
A fix release of 2.2.37; only this changed. Thanks to the player who reported it.
Start here: what this update means for you
| Your setup | After the update |
|---|---|
| VRR (G-SYNC / FreeSync) on, and since 2.2.35 the game held at about 24 or 40 fps, cutscenes at half that | Corrected by itself within about 3-4 s of the start or a display mode change; then a steady 60 fps (cutscenes 30), as in 2.2.34 |
| VRR off | No change (on 120 / 240 Hz each frame still stays the same number of refreshes, as since 2.2.35) |
What was fixed
- The problem: a player with VRR on got 24 fps on a 240 Hz monitor (12 in cutscenes) and 40-43 at 120 Hz; 2.2.34 held a steady 60.
- The cause: since 2.2.35, when the display's refresh is a multiple of 60 (120, 180, 240 Hz), the game steps once every n refreshes, so each frame stays on screen equally long. Under VRR, though, the display refreshes only when a new frame comes: the game waited for n refreshes and the display waited for a new frame. 2.2.35 already had a VRR check, but for exclusive fullscreen only, and only after 600 slow frames.
- The fix: the game checks its own tick rate every second. In any display mode (window, borderless, exclusive), two seconds in a row under 90% of 59.94 Hz and it stops following the display's refreshes and uses a 59.94 Hz timer - what 2.2.34 did. Under VRR the display follows the game, so the game keeping its own time is the right way. A display mode or refresh change is judged afresh.
- When it shows: on the author's machine, windowed and plain borderless frames are composed by the Windows desktop at a fixed rate and G-SYNC does not take over, so they were not affected; it shows where G-SYNC does take over: borderless with low-latency present, and exclusive fullscreen with "lock to 60 Hz" off.
Tests (the author's laptop, RTX 3060 driving the panel, 120 Hz + G-SYNC)
| Case | 2.2.37 | 2.2.37.1 |
|---|---|---|
| Borderless + low-latency present | 48.6 Hz ticks, about 45 fps (the player's problem) | detected at 4 s (43.1 Hz) and switched; then 2,997 ticks in 50 s, a steady 60 Hz |
| Exclusive fullscreen, 60 Hz lock off | about 53 Hz for the first 12 s, then corrected by the old check | detected at 4 s and switched; then a steady 60 Hz |
| Window / plain borderless | 60 Hz | 60 Hz |
| A fixed 120 Hz (no VRR), render scale 4, other load in the background | - | no false alarm: 3,600 of 3,600 ticks from the display at 60.01 Hz, 2.2.35's evenness kept |
- Performance (attract demo 160 s, one run each against 2.2.37; the dedicated GPU was driving the panel and the integrated one was unavailable, so on the RTX 3060): game speed 93.6% vs 93.7%; average frame 3.80 vs 3.83 ms, 99th percentile 17.11 vs 17.08 ms, frames over 16.7 ms 607 vs 606. The new code is one more count a second.
- Smoke tests (the package itself):
Ninja Gaiden Black.exeran Black 150 s andNinja Gaiden.exethe NG2004 title update 20 s, all draw states replayed, none left out, no hitch, no false VRR detection. - The package: Windows Defender scan of the four programs, no threats; the same 12 files as 2.2.37, its seed data files byte for byte; the programs' properties say 2.2.37.1. No test code.
Source
This release's commits: 3fecf2a (VRR detection in any display mode), b4f2c95 (version and README).
Package
ngb-hurricane-pc-2.2.37.1-win32.zip- Size: 3,501,645 bytes
- SHA-256:
a7b917cf6d5f648fbbd8fcce2a9ed5af0dcae6d852bf9112fdb4e5e30bd83326 - Symbols
ngb-hurricane-pc-2.2.37.1-win32-symbols.zip: 39,687,383 bytes - SHA-256:
c45764fc4fb24c4922835abe1bf4c282d0fd26e69ba570d19f0db73212c2eb9e
Author: 哈雅布撒 on Bilibili (QQ: 2682557218)