github akirahayabusa/ngb-pc-native-port-release v2.2.36.1
Ninja Gaiden Black Hurricane PC 2.2.36.1

38 minutes ago

《忍者龙剑传 黑之章》(含飓风版中文汉化 vb-zh-x2.1)与《忍者龙剑传》(2004)的非官方 Windows 原生移植。2.2.36.1。

2.2.36.1:“屏幕白光”开关在 16:9 和 4:3 下也生效;日志不再被反复失败的文件撑爆

这是 2.2.36 的修正版,只改了下面几处。

先看这里:这次更新对你有什么影响

你的情况 更新后
关掉了“屏幕白光”,画面比例是 16:9 或 4:3 以前开关没有作用,白光照旧;现在跳墙斩、技能、捡道具的整屏白光和事件盖白都会去掉
关掉了“屏幕白光”,画面比例是 21:9 / 16:10 和 2.2.36 一样,本来就生效
没动过“屏幕白光”(默认开启) 没有变化
所有人 游戏反复请求一个打不开的文件时,日志不会再长到几百 MB

修了什么

  1. “屏幕白光”在 16:9 和 4:3 下不生效:开关只在“这一帧已经画过 3D”之后才去掉白光(这样菜单不受影响),可它读的是带鱼屏 HUD 功能的 3D 计数,而那个计数只在画面比例不是 16:9 时才更新——16:9 和 4:3 下它一直是 0,于是什么都没去掉。2.2.36 的所有测试都在 21:9 下做,漏掉了。现在开关有自己的计数,任何画面比例都生效。作者 16:9 实测:招式泛光(编号 0x78、0x7C、0x7E、0x86、0x79、0x6E)和事件盖白(0x6E)都去掉了,修正前一个都没有。开关打开时每次绘制只多一次判断。
  2. 同一个文件反复打不开时日志无限增长:作者在 2004 大师锦标赛的村正商店卡在黑屏,游戏反复请求一个不存在的文件 d:\NG,日志记了 93 万多次、长到 191 MB。黑屏本身判断为游戏自己的问题,没有改动。现在:
    • 每个文件名单独计数,连续失败只记前 20 次、之后每 1 万次记一次(第 100 次时额外记下请求来源和文件名内容,供日后排查);
    • 计数在文件系统的锁里进行,游戏多个线程同时开文件也安全;两个文件交替失败也各自限流;
    • “找不到路径映射”那种失败同样限流。
      (2.2.36 当天的第二次替换已有这项的第一版,只记最后一个文件名、没有加锁;这一版补全。)
  3. 日志里“屏幕白光”那一行的 HUD 状态在 16:9 下也写对了(以前一律写“HUD 显示中”)。
  4. 版本号支持第四位:程序文件属性里显示 2.2.36.1。

测试

  • 发布包:Windows Defender 扫描三个程序,无威胁;文件清单与 2.2.36 相同(11 个);程序文件属性显示 2.2.36.1。
  • 新代码在默认设置下:“屏幕白光”开启时每次绘制只多一次判断;打开文件多一次加锁计数;没有测试用代码。
  • 冒烟测试(核显后台):黑之章与 2004 更新补丁版 1.06.04,绘制状态全部回放、0 条遗漏,0 次卡顿。
  • 性能(核显,待机演示 160 秒,与 2.2.36 各跑 1 次,测试期间无其他负载):游戏速度都是 93.7%;平均帧时间 4.67 对 4.64 ms,99% 帧 17.16 对 16.89 ms,卡顿各 2 次。(第一次对比时我在同时编译,数据作废重跑。)
  • 实机:作者 16:9 黑之章关闭“屏幕白光”,招式泛光与事件盖白都去掉了。

源码

本版提交:8427a96(屏幕白光自己的 3D 计数)、ab931c4(日志限流按文件名、加锁、两处失败都限流)、2b817f6(版本号第四位、日志 HUD 状态)、ab76247(源码 README “2.2.36.1” 一节)。

发布包

  • ngb-hurricane-pc-2.2.36.1-win32.zip
  • 大小:3,418,768 字节
  • SHA-256:1c069a94f4311360eecb935e5e6219999850b66e0d6d4094e5bc17f561ae6700
  • 符号包 ngb-hurricane-pc-2.2.36.1-win32-symbols.zip:29,825,105 字节
  • SHA-256:57be4d660859cd52607ba86fdfc6c95aab9ed7e45ff37c6b765919bb1f1b9bb4

作者: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.36.1.

2.2.36.1: "Screen flashes" off works at 16:9 and 4:3 too; a file failing over and over no longer fills the log

A fix release of 2.2.36; only the following changed.

Start here: what this update means for you

Your setup After the update
Screen flashes turned off, picture shape 16:9 or 4:3 The switch did nothing before and the flash stayed; now the full-screen white of the wall-run slash, techniques and pickups and the event white covers are left out
Screen flashes turned off, 21:9 / 16:10 As in 2.2.36, it already worked
Screen flashes left on (the default) No change
Everyone When the game asks over and over for a file it cannot open, the log no longer grows to hundreds of MB

What was fixed

  1. Screen flashes did nothing at 16:9 and 4:3: the switch only leaves the flash out after the frame's 3D (so menus stay as they are), but it read the ultrawide HUD feature's 3D count, which is kept only when the picture is not 16:9 - at 16:9 and 4:3 it stayed 0 and nothing was left out. Every 2.2.36 test was at 21:9. The switch now keeps its own count and works at every shape. The author at 16:9: move glows (numbers 0x78, 0x7C, 0x7E, 0x86, 0x79, 0x6E) and an event white cover (0x6E) left out, none before the fix. With the switch on each draw costs one more check.
  2. A file failing to open over and over grew the log without end: the author's NG2004 Master Ninja Tournament shop went black with the game asking for a file that does not exist, d:\NG, over 932,000 times, and the log reached 191 MB. The black screen itself is taken as the game's own and is not changed. Now:
    • each file name has its own count; its 1st..20th failure in a row is logged, then every 10000th (at the 100th the request's origin and the name's bytes once, for later);
    • the count is kept under the file system's lock, safe when the game opens files from several threads; two names failing in turn are each limited;
    • the "no path mapping" kind of failure is limited too.
      (The second replacement of 2.2.36 had a first version of this that remembered only the last name, without a lock; this one completes it.)
  3. The Screen flashes log line gives the HUD's state right at 16:9 too (it said "HUD shown" for everything).
  4. A fourth version part: the programs' file properties say 2.2.36.1.

Tests

  • The package: Windows Defender scan of the three programs, no threats; the same 11 files as 2.2.36; the programs' properties say 2.2.36.1.
  • New code with the default settings: with Screen flashes on each draw costs one more check; each file open one more counted lock; no test code.
  • Smoke tests (Iris Xe, background): Black and the NG2004 title update 1.06.04, all draw states replayed, none left out, no hitch.
  • Performance (Iris Xe, attract demo 160 s, one run each against 2.2.36, nothing else running): game speed 93.7% in both; average frame 4.67 vs 4.64 ms, 99th percentile 17.16 vs 16.89 ms, 2 hitches each. (The first pair ran while I was compiling and was discarded.)
  • In play: the author, Black at 16:9 with Screen flashes off: move glows and an event white cover left out.

Source

This release's commits: 8427a96 (the switch's own 3D count), ab931c4 (log limit per name, under the lock, both failure paths), 2b817f6 (fourth version part, the log's HUD state), ab76247 (the source README's 2.2.36.1 section).

Package

  • ngb-hurricane-pc-2.2.36.1-win32.zip
  • Size: 3,418,768 bytes
  • SHA-256: 1c069a94f4311360eecb935e5e6219999850b66e0d6d4094e5bc17f561ae6700
  • Symbols ngb-hurricane-pc-2.2.36.1-win32-symbols.zip: 29,825,105 bytes
  • SHA-256: 57be4d660859cd52607ba86fdfc6c95aab9ed7e45ff37c6b765919bb1f1b9bb4

Author: 哈雅布撒 on Bilibili (QQ: 2682557218)

Don't miss a new ngb-pc-native-port-release release

NewReleases is sending notifications on new releases.