Skip to content

Instantly share code, notes, and snippets.

@samdoidge
Last active April 2, 2026 16:46
Show Gist options
  • Select an option

  • Save samdoidge/c0cf8148b3df572240054bc3de6f8d21 to your computer and use it in GitHub Desktop.

Select an option

Save samdoidge/c0cf8148b3df572240054bc3de6f8d21 to your computer and use it in GitHub Desktop.
Railroad Tycoon 3 on Mac (Apple Silicon) via Sikarugir/Wine

Railroad Tycoon 3 on Mac (Apple Silicon) via Sikarugir

Run Railroad Tycoon 3 (GOG version) natively on Apple Silicon Macs (M1–M5) using Wine and Sikarugir, without a full VM.

Prerequisites

Rosetta 2:

softwareupdate --install-rosetta

Homebrew packages:

brew install --cask wine-stable
brew install --cask --no-quarantine Sikarugir-App/sikarugir/sikarugir

Wrapper Creation

  1. Launch Sikarugir Creator from Applications
  2. Select engine: WS12WineSikarugir10.0_3 (or latest available)
  3. Click Create — name the wrapper Railroad Tycoon 3
  4. It will appear at ~/Applications/Sikarugir/Railroad Tycoon 3.app

Game Installation

  1. Buy the GOG version (DRM-free, recommended over Steam for Wine compatibility)
  2. Double-click the wrapper — config window opens
  3. Click Install SoftwareChoose Setup Executable
  4. Select the GOG offline installer .exe
  5. Follow the installer — install to default C:\GOG Games\Railroad Tycoon 3
  6. You will see runtime errors during install ("Variant is null", "Invalid Opcode", "Out of Global Vars range") — these are harmless, they're from the GOG installer's post-install scripts (shortcuts, Galaxy hooks). Click OK on each.
  7. When prompted for the launch executable, select: C:\GOG Games\Railroad Tycoon 3\RT3.exe

Critical: Fix engine.cfg (required — game won't launch without this)

RT3 has two bugs related to engine.cfg:

  1. Hardware T&L must be disabled — the game crashes on modern systems with it enabled, and you can't disable it from the menu since the game won't start.
  2. The game corrupts its own config on every launch — it changes byte 12 from 0x20 to 0x10, which causes the "No hardware accelerated DirectX 8.1 devices/drivers were found" error on all subsequent launches. This is why the game works right after install but breaks afterwards.

The fix: restore the default config and make it read-only so the game can't corrupt it:

RT3APP="$HOME/Applications/Sikarugir/Railroad Tycoon 3.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Railroad Tycoon 3"
cp "$RT3APP/Data/Configuration/default_engine.cfg" "$RT3APP/Data/Configuration/engine.cfg"
chmod 444 "$RT3APP/Data/Configuration/engine.cfg"

This is the most important step. Without it, the game will only work once per install.

The config file lives inside the wrapper at:

Railroad Tycoon 3.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Railroad Tycoon 3/Data/Configuration/engine.cfg

To access it manually: right-click Railroad Tycoon 3.appShow Package Contents, then navigate to that path.

Changing resolution

Because engine.cfg is read-only, in-game graphics settings won't persist. To change resolution, temporarily make it writable, patch it, then lock it again:

RT3APP="$HOME/Applications/Sikarugir/Railroad Tycoon 3.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Railroad Tycoon 3"
chmod 644 "$RT3APP/Data/Configuration/engine.cfg"

python3 -c "
import struct
cfg = '$RT3APP/Data/Configuration/engine.cfg'
with open(cfg, 'rb') as f:
    data = bytearray(f.read())
struct.pack_into('<I', data, 4, 1920)   # width
struct.pack_into('<I', data, 8, 1200)   # height
data[12] = 0x20                          # prevent corruption byte
data[196] = 0x01                         # disable Hardware T&L
with open(cfg, 'wb') as f:
    f.write(data)
"

chmod 444 "$RT3APP/Data/Configuration/engine.cfg"

Change 1920 / 1200 to your preferred resolution. The game is from 2003, so don't use your native Retina resolution — 1920x1200 or 1600x1000 work well. Fullscreen works.

Alternative: rt3conf tool

A Rust-based tool exists at github.com/MichaelMcDonnell/rt3conf but only ships a Windows binary. If you have Cargo: cargo install rt3conf && rt3conf -x 1920 -y 1200

engine.cfg binary format reference

Based on rt3conf source:

Offset Type Field
0 u32 Header (always 0x041B)
4 u32 Width
8 u32 Height
12 u8[4] Field0 (must be 0x20 00 00 00 — game corrupts this to 0x10, causing DX8.1 detection failure)
16 bool Fullscreen
17 bool Font shadows
34 bool Anisotropic filter
40 bool Anti-alias
50 bool Distance fogging
81 bool Invert camera
93 bool Draw clouds
99 bool Ocean waves
101 bool Water reflections
116 f32 Sound volume
120 f32 Music volume
124 f32 Voice volume
176 u8 Texture detail
184 bool Disable accelerated mouse
196 bool Disable Hardware T&L (set to 0x01)

Total file size: 980 bytes.

Wrapper Settings

Setting Value Why
Windows version Default Leave as-is
D3DMetal OFF RT3 is DX8.1/9 — D3DMetal targets DX11/12
DXVK OFF Not needed for DX9
.NET runtimes Not needed No .NET dependency
Winetricks Usually none needed If missing DLL errors: install d3dx9 and/or vcrun6 via brew install cabextract first

Troubleshooting

Problem Fix
"No hardware accelerated DirectX 8.1" error Restore default_engine.cfg and make read-only — see above. The game corrupts byte 12 of engine.cfg on every launch.
Crash on launch (Hardware T&L) Ensure byte 196 of engine.cfg is 0x01 (disabled)
Black screen Enable virtual desktop in Winecfg (double-click wrapper → Advanced → Winecfg → Graphics tab)
No audio macOS Audio MIDI Setup → change sample rate to 96KHz
Alt-tab crash Known issue — GOG version disables alt-tab by design
Visual glitches Lower Visual Details to Average or below in-game
Want different resolution Unlock, patch, and re-lock engine.cfg per instructions above
Installer errors ("Variant is null", "Invalid Opcode") Harmless — click OK and continue

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment