于Linux运行
基本上,由于东方系列游戏被设计为运行 Windows 为主,所以在 Linux 上运行可能会非常艰难。不过 Linux 是有办法运行东方的:通常是透过一种称之为 Wine 的程序:它可以模拟 Windows 游戏,应用程式等。
于 Linux 运行东方是要看机会的,不过还是有可能。以下将展示如何运用 Wine 运行东方。
开始以前,可能需要会一些 Shell 的语法,这个网站算是不错的说明。
安装
原则上Wine 的官网已经提供主流的 Linux 作业系统下载了。
使用 Wine
Wine 主要是放在一个隐藏目录在你的主文件夹:.wine。 which contains a full representation of a Windows folder hierarchy and miscellaneous library and system files。.wine 主要是放在你的主文件夹 (~/.wine). 里面是另一个文件夹称为 drive_c,就是你的 C: 槽。如果你浏览这个文件夹里面(〜/.wine/ drive_c),你很可能会快地识别它的内容从一个标准的Windows安装。
一般来说,你的 Linux 发行版本会自行把 Windows 分配到 Wine 的可执行文件内,所以一般来说,双击 Windows可执行文件应该就行了。但如果没有,你就必须使用终端机来启动 Wine。这会让东方正常运行,只是速度比较慢。无论如何,下面我们将示范这个程序,请把资料夹路径代换成你安装 Wine 的路径:
~ $ ls .wine/drive_c/Program\ Files/RandomProgram config.ini libjpeg.dll program.exe readme.txt ~ $ cd .wine/drive_c/Program\ Files/RandomProgram ~/.wine/drive_c/Program Files/RandomProgram $ wine program.exe
而这应该会开启你的程序。
运行东方
运行东方作法同样,你可能需要指定你的语言环境,才能以日文来援引 Wine 并开始你的游戏。以下是英文版作者如何安装并运行双重剧透:
~ $ ls .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー custom.exe readme.txt th125.exe unins000.dat omake.txt th125.dat thbgm.dat unins000.exe ~ $ cd .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー ~/.wine/drive_c/Program Files/上海アリス幻樂団/ダブルスポイラー $ LANG="ja_JP.UTF-8" wine th125.exe
LANG="ja_JP.UTF-8" 会让 Wine 运行于日本语、或是其他想运行的语言(例如en_US.UTF-8, en_GB.UTF-8...)。然后,有可能出现严重的乱码,虽然只可能在标题列看到。此外,你应该运行英日文语言环境下的补丁:此时有英语补丁的可执行文件才可以运行在默认的语言环境。
DLL
This is pretty much no longer necessary for Touhou games, but it's a way to fix certain missing functionality in Wine you may find with other programs. Basically, Windows has a lot of available system interface DLLs, and it's a huge order to 100% duplicate all that functionality in Wine. While the Wine developers are constantly at work improving the coverage of the Windows' API, there's still lots of missing gaps here and there. One way to temporarily fix a partially-functioning DLL is to replace it with the original file from a Windows install. Here's the steps to do so; we'll use "d3dx9_36.dll" as an example. Also note, I have a 32-bit Vista installation mounted at /mnt/vista32.
首先,要复制你的档案到 Wine 的资料夹。Wine 的资料夹位于 .wine/drive_c/windows 。
~ $ cp /mnt/vista32/Windows/System32/d3dx9_36.dll .wine/drive_c/windows/system32/
这可能需要新的 DLL 档案去运作。为了确保档案可以被运行,我们需要去设定 Wine.
Wine 的设定档被称之为 winecfg ,运行你的终端机就会看到以下画面:
点选函式库:
在“新增函式库顶替”之下,输入 d3dx9_36,点选加入以及套用:
现在点选确定以离开,或是作其他设定。其中一个 DLL 的小问题是,Wine 正在模拟时他们可能需要低阶的 DLL (例如 ntdll.dll) ,之后无法运行。Wine 正在模拟时,核心的 DLL 不能被原生的 DLL 取代,否则你会令 Wine 的资料夹受到破坏。
PC-98
T98Next 与 Anex86 都可以在 Wine 之下正常运行。另外,如果你有2P的 PoDD 以及一个手柄,这个设定 也可以在 Wine 之下正常运行。
Gotchas, Troubleshooting
One issue I've seen is with joysticks. If you plug in your joystick while your Touhou game is running, it probably won't notice it. Make sure it's plugged in and working before running your Touhou game.
Installing English patches has been known to cause otherwise troublesome games to start working better.
For SWR and HSTS, see here (SWR/HSTS Wiki).
The Wine developers are constantly adding and fixing functionality, so while things are still iffy with Touhou games they're definitely improving. See below for a list of the current Touhou bugs on the Wine Bugzilla.
Outside the official games...
Touhou doujin games are also hit-or-miss. Danmakufu doesn't work at all. Age of Ethanols is a .NET game, so it should run natively in Mono, but in my trials in getting it to run I've discovered it's coded in part C#, part C++, so it won't work without installing .NET and whatnot from within Wine.
Touhou Games in the Wine AppDB (appdb.winehq.org)
[ EoSD] [ PCB] [ IaMP] [ IN] [ PoFV] [ StB] [ MoF] [ SWR] [ SA] [ UFO] [ HSTS] [ DS] [ FW]
Wine 错误报告 (bugs.winehq.org)
13297 (EoSD - FW) Missing D3DXCreateTextureFromFileA in d3dx9_36.dll: Now Implemented
13490 (SWR, Patchcon) Nvidia video driver FPU bug, improper rounding causing game crash: Rough Patches Available
15146 (MoF, SA) Bad Text Part 1, Mishandled rgb444 Depth Conversion: Rough Patches Available
13554 (IaMP) Broken config.exe, DLL dependencies not properly imported
18232 (SA, UFO) Huge framerate drop when OffscreenRenderingMode=fbo (Intel i945 graphics chips)
18394 (PoFV) Patching to 1.50a breaks game, problems with dpnet.dll
18440 (SWR) Menu/Game select crashes, problems with GetGlyphOutline in d3dx9_33.dll
19106 (MoF) Improperly rendered backgrounds
24206 (HSTS) Ending network game causes hangup
421 (EoSD - FW) Bad Text Part 2, DIB Engine Implementation: Long-term Problem, Highly Experimental Patch Available
使用 VMWare 运行
Another alternative that works very well is to use Parallels Desktop to run the games.
Parallels Desktop version 5.0 runs the main series games very well: All of the Windows danmaku games except for PCB and the demo for Ten Desires run without slowdown on a MacBook Pro. PCB appears to suffer from slowdown for unknown reasons. Ten Desires has significant lag (10% or more) at the present time.
It is important to run the games in full screen, and it is better to use the zoom function to bring the game screen to full screen, at least on a MacBook Pro. Running the games in windowed mode often results in slowdown, and the computer appears to have real difficulties in displaying 640x480 natively (the games will run at 30fps). You can run them in 720x480 just fine, though.
Activate the zoom function through the "Trackpad" pane in System Preferences, and zoom in by putting the mouse in the middle of the screen and holding control and scrolling up with two fingers.
The fighting games (SWR and Soku) have no slowdown during matches, but DO have a serious delay while loading for the match (close to a minute). It has been suggested, but not yet confirmed, that placing the games on the virtual C: drive, rather than on the OSX desktop or other location in OSX, may clear this out; Parallels treats the Mac's hard drive as a network drive, which may slow access. Netplay has yet to be tested for either the fighters or for PoFV.
If your SWR/Soku display looks strange when run in fullscreen (usually, a bar at the bottom and right of the screen that displays the desktop), set the game to run in Windowed mode, exit out, and restart the game. Then change it back to fullscreen in the menu.
The PC-98 games can be run through anex86 without difficulty (so yes, emulation within emulation). There is a PC-98 emulator for OSX, but it has not been updated for several years and does not appear to accept the Touhou games.
The following fan games have been confirmed to run fine under Parallels Desktop 5 using Windows XP on a MacBook Pro:
- Megamari
- Patchcon
- Genius of Sappheiros
- Koumajou Densetsu Scarlet Symphony (both games)
The following do NOT run under Parallels 5, have severe slowdown, or suffer from fatal glitches, although in some cases this may be due to the graphics card (apparently, some of the fan games don't communicate properly with NVIDIA cards.):
- Super Marisa World (runs at 30FPS)
- Mountain of Faith Phantasm (runs at 30FPS)
- Sengou Gensokyo (cannot input commands during battle, otherwise 100%)
- Touhou Labyrinth (either will not display, or overwhelming glitches)
- Touhou Soccer 2 (no display)
For unknown reasons, VMWare Fusion will not run the Touhou games properly
The games have not yet been tested with Parallels Desktop 6. Stay tuned for information.