在 M 系列 Mac 上运行 GOG DOS 游戏
Windows GOG DOS Games on M-Series Macs

原始链接: https://f055.net/technology/windows-gog-dos-games-on-m-series-macs/

GOG 是重温童年经典的绝佳平台,但其许多游戏仅支持 Windows,这对于使用 Apple Silicon 芯片的 Mac 用户来说是一项挑战,因为传统的 x64 虚拟化效率较低。 作者分享了一种在 M2 Mac 上运行 Windows 版 GOG 游戏(如《魔法门之英雄无敌 II》)的巧妙替代方案。先在 Windows 电脑上安装游戏,将文件传输到 Mac 后,通过原生的 DOSBox 即可运行。该过程涉及创建一个自定义的 DOSBox 配置文件,用于挂载游戏目录和 CD 镜像,随后通过简单的 ZSH 命令文件,即可实现双击启动游戏。 这种方法避免了资源占用较大的 Windows 虚拟化需求。虽然作者提到 macOS 未来可能会淘汰当前的 DOSBox 版本,但他们建议使用 DOSBox-X 等持续更新的替代方案作为可行的后续途径。通过对配置文件进行一些调整(例如缩放和窗口设置),你可以在现代苹果硬件上顺畅地享受心爱的复古游戏。

这段 Hacker News 讨论探讨了在 Apple Silicon (M 系列) Mac 上运行 GOG DOS 游戏的最佳方式。参与者强调,虽然原版 DOSBox 可以使用,但目前活跃开发的现代分支版本能提供更好的体验。 社区推荐了三个主要的替代方案: * **DOSBox-X:** 以其丰富的功能和配置选项而闻名。 * **DOSBox Staging:** 专注于现代增强功能和性能改进。 * **DOSBox Pure:** 针对易用性进行了优化,包括手柄支持、压缩包直接加载和即时存档等功能。 用户指出,这些分支版本提供了许多现代化的便利改进(如图形化配置界面、即时存档和高级网络驱动程序),远超基础模拟的范畴。讨论还涉及了对老游戏多人联机功能的需求,并提到了曾用于创建独立游戏包的经典项目“Boxer”,但对其目前的维护状态表示质疑。总的来说,大家的共识是,用户应当跳过原版 DOSBox,以便在现代 macOS 硬件上获得更流畅、功能更丰富的游戏体验。
相关文章

原文

GOG is great. I bought a few old games from them: SimCity 2000, Theme Hospital, Syndicate Plus. And by old games, I mean games from my childhood that still play like a good game, and not like digital drugs the likes of which are available for free from the mobile app stores.

My GOG catalog, short but sweet.

Anyway, the thing with GOG is that for DOS games, they basically ship the installers with DOSBox inside. Some of the games are prepared for both Windows and macOS (like the ones I mentioned earlier). But some are prepared only for Windows, like Settlers II or Heroes of Might & Magic II (HoMM2). And these are my two favorites!

In the old days of Intel Macs, it was fast & easy to spin up VirtualBox or install Windows on the side with BootCamp. But my latest machine is an M2 MacBook running macOS, so virtualized x64 Windows is painfully slow.

I know I can try running an arm64 Windows 11 with Apple native virtualization, but for one I don’t have the key, and for two there is another option I just discovered, namely using DOSBox for Mac.

The steps are simple, but you need a Windows machine for a moment (like an old Intel MacBook with Windows :)).

First, install DOSBox for Mac.

Second, let’s say you want to run HoMM2. Download HoMM2 installer .exe from GOG, and install it on your Windows machine.

Third, copy these installed game files to your M-series Mac, to something like /Users/<USER>/GOG/HoMM2 where <USER> is your Mac’s user folder.

Fourth, create a DOSBox configuration file in /Users/<USER>/GOG/macoshomm2.conf.

[autoexec]
@echo off
mount C "/Users/<USER>/GOG/HoMM2"
imgmount D "/Users/<USER>/GOG/HoMM2/homm2_macos.cue" -t iso -fs iso
C:
cls
heroes2.exe
exit

This defines a DOSBox script that firstly mounts the HoMM2 folder so DOSBox can read it, then also mounts the required gameplay CD, and finally starts the game.

Fifth, create a Mac command file to easily run all this with a double-click, and place it in /Users/<USER>/GOG/RunHoMM2.command.

#!/bin/zsh
set -euo pipefail

ROOT="/Users/<USER>/GOG"
DOSBOX="/Applications/DOSBox.app/Contents/MacOS/DOSBox"

cd "$ROOT/HoMM2"
exec "$DOSBOX" -conf "$ROOT/HoMM2/dosboxhomm2.conf" -conf "$ROOT/macoshomm2.conf"

Here, we just point our local DOSBox for Mac to run HoMM2 instead of using the DOSBox for Windows that ships with the game. Double-click the command file and just like that, the game works on a Mac with Apple Silicon!

Screenshot from an M2 MacBook running HoMM2.

Note that macOS is complaining that in the future versions DOSBox for Mac won’t work anymore, but for now it does, and there are actively developed alternatives like DOSBox-X.

If you want to play in a window instead of fullscreen, or adjust display settings, you can use the many parameters that DOSBox offers and explains in their docs, like the scaler which is fun. Just put them at the top of the .conf file, for example I like to use this:

[sdl]
fullscreen=false
fulldouble=false
fullresolution=desktop
windowresolution=desktop
output=openglnb
autolock=true
waitonerror=true

[render]
aspect=true
scaler=normal2x forced

Happy Children’s Day!

联系我们 contact @ memedata.com