《忍者龙剑传 黑之章》(含飓风版中文汉化 vb-zh-x2.1)与《忍者龙剑传》(2004)的非官方 Windows 原生移植。2.2.19。
2.2.19:音效按原机还原(用真机校准)
玩家反馈:远处的效果音在原机上更小,像是少了一道低通滤波。逐项对照原机的 DirectSound 库代码之后,找到并修正了三处差别,最后用采集卡接真机录音校准。
3D 音效按原机的 HRTF(人头滤波)处理
- 游戏启动时就开启了 Xbox 的"完整 HRTF":每个 3D 音效按相对你的方向,分别给左右耳套一组模拟人头的滤波器,远侧耳稍有延迟。身后的声音高频明显变暗,侧面的声音远侧耳被"挡住",空间感和远近感更真实。
- 以前移植版完全没做这一步,3D 音效只有音量衰减和左右声像,所以远处的声音听起来"太清楚、太近"。
- 现在直接使用游戏自带库里的滤波器表(1111 组滤波器),方位计算和滤波器选择规则都照搬原机。黑之章和 2004 都适用。
black.ini里的hrtf = 0可以关掉,恢复以前的处理方式。
声音的"余量"
- 原机上普通 2D 声音(音乐、环境音、界面音)默认会被压低 6 dB,3D 音效不压,移植版以前没有这条规则。
- 现在按原机处理,并在最终输出整体补回 6 dB:音乐和环境音和以前一样响,3D 音效与它们的比例和原机一致。
混响送出量
- 单声道声音以前被重复送进混响一次,已修正。
- 3D 音效送进混响的量现在会随距离减小,和原机一样。以前远处的声音混响和近处一样大。
- 关闭 HRTF 时,旧的 3D 处理也有同样的单声道重复计算问题,一并修正。
真机校准
用户用采集卡接真机,在第一章地窖关掉音乐、单发砍墙,真机和移植版各录十几刀对比:
| 真机 | 2.2.19 | |
|---|---|---|
| 刀声高出地窖背景 | 22.9 dB | 22.5 dB |
| 刀后 0.35–0.55 秒的余音(相对刀声) | -19.3 dB | -19.0 dB |
余音曲线的每一段都和真机相差在 1 dB 以内。
已知还有一处小差别:第一章瀑布处,鸟叫相对瀑布背景仍比真机弱约 2.6 dB,原因还在查。
测试
- 第一章跑分(集显 Iris Xe,3×):渲染线程每帧中位数 5.23 毫秒,与之前相同。混音线程 CPU 占用从 1.0% 升到 1.3%(单个核心的百分比),且不在游戏所用的核心上,不影响游戏性能。输出峰值 0.755,没有削波。
- 黑之章与 2004 均能启动并正常出画面、出声音,无崩溃。
- 三个程序已用 Windows Defender 扫描:无威胁。
发布包
ngb-hurricane-pc-2.2.19-win32.zip- 大小:3,032,451 字节
- SHA-256:
e3cfd96d830cf5a7b5b618c709595c404eb16dbe077b6e323e267c60b4ce8d6b - 符号包
ngb-hurricane-pc-2.2.19-win32-symbols.zip:23,977,758 字节 - SHA-256:
0eaa2dabf40b772d02b80d190eb988988619e25f417c1ca5c1f6e5b90d02736d
作者: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.19.
2.2.19: sound effects as on the console (calibrated on a real Xbox)
A player reported: distant sound effects are quieter on the console, as if a low-pass filter were missing. Comparing item by item with the console's DirectSound library code, three differences were found and fixed, and finally calibrated against a real Xbox recorded through a capture card.
3D sound through the console's HRTF (head-related filtering)
- The game turns on the Xbox's "full HRTF" at start: each 3D sound gets a pair of filters simulating a human head for the left and right ear according to its direction from you, with the far ear slightly delayed. Sounds behind you are clearly duller in the highs, and for sounds at the side the far ear is "shadowed", giving a truer sense of space and distance.
- The port did none of this before: 3D sounds only had volume falloff and left-right panning, so distant sounds were "too clear, too close".
- Now the filter tables in the game's own library (1111 filters) are used directly, and the direction calculation and filter choice follow the console exactly. Both Ninja Gaiden Black and 2004.
hrtf = 0inblack.initurns it off and restores the earlier handling.
Sound "headroom"
- On the console, ordinary 2D sounds (music, ambience, interface sounds) are lowered by 6 dB by default and 3D sounds are not; the port did not have this rule.
- Now it is handled as on the console, and the final output gets the 6 dB back overall: music and ambience are as loud as before, and 3D sounds relate to them as on the console.
Reverb send
- Mono sounds were sent into the reverb twice; fixed.
- The amount of a 3D sound sent into the reverb now decreases with distance, as on the console. Before, distant sounds had as much reverb as near ones.
- With HRTF off, the old 3D handling had the same double counting for mono; fixed too.
Calibrated on a real Xbox
With a real Xbox connected through a capture card, the user recorded a dozen-odd single sword strikes against the wall in the chapter 1 cellar with the music off, on the console and in the port, for comparison:
| Real Xbox | 2.2.19 | |
|---|---|---|
| Sword above the cellar background | 22.9 dB | 22.5 dB |
| Tail 0.35–0.55 s after the strike (relative to the strike) | -19.3 dB | -19.0 dB |
Every part of the tail curve is within 1 dB of the real Xbox.
One small known difference remains: at the chapter 1 waterfall, birdsong is still about 2.6 dB weaker against the waterfall than on the real Xbox; the cause is still being looked into.
Tests
- Chapter 1 benchmark (Iris Xe integrated graphics, 3×): render thread median 5.23 ms per frame, as before. The mixer thread's CPU use rises from 1.0% to 1.3% (of one core), not on the game's core, so game performance is unaffected. Output peak 0.755, no clipping.
- Ninja Gaiden Black and 2004 both start with picture and sound normally, no crash.
- The three programs scanned with Windows Defender: no threats.
Package
ngb-hurricane-pc-2.2.19-win32.zip- Size: 3,032,451 bytes
- SHA-256:
e3cfd96d830cf5a7b5b618c709595c404eb16dbe077b6e323e267c60b4ce8d6b - Symbols
ngb-hurricane-pc-2.2.19-win32-symbols.zip: 23,977,758 bytes - SHA-256:
0eaa2dabf40b772d02b80d190eb988988619e25f417c1ca5c1f6e5b90d02736d
Author: 哈雅布撒 on Bilibili (QQ: 2682557218)