- Welcome to Touhou Wiki!
- Registering is temporarily disabled. Check in our Discord server to request an account and for assistance of any kind.
Running in Linux and macOS: Difference between revisions
Tags: Mobile edit Mobile web edit |
|||
(33 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
[[File:Linux Th07 01.png|thumb|250px|right|''[[Perfect Cherry Blossom]]'' running in Wine]] | [[File:Linux Th07 01.png|thumb|250px|right|''[[Perfect Cherry Blossom]]'' running in Wine]] | ||
For those of us who run [[Wikipedia:Linux|Linux]] or [[Wikipedia:Mac OS X|Mac OS X]] as our only operating system, finding functional alternatives to [[Windows]] programs can be | For those of us who run [[Wikipedia:Linux|Linux]] or [[Wikipedia:Mac OS X|Mac OS X]] as our only operating system, finding functional alternatives to [[Windows]] programs can be an issue. When we need to run Windows programs, [http://www.winehq.org/ the Wine project] has long been a great compatibility layer that lets us do just that. Basically, it translates Windows system calls into their Unix equivalents and runs programs in a Windows directory structure, so you can still play your Windows games, work in Photoshop, etc. under Linux and, to a certain extent, Mac OS X. | ||
Although Wine is not perfect, running official ''[[Touhou Project]]'' games on Wine will usually be fine, with some minor issues. This article will explain how Wine works and how to play Touhou games under Wine. | |||
Before we start, this does require a little familiarity with the shell (or command-line interface). [http://tldp.org/LDP/intro-linux/html/ This Linux guide] has a nice [http://tldp.org/LDP/intro-linux/html/sect_02_02.html introduction to using the shell]. | Before we start, this does require a little familiarity with the shell (or command-line interface). [http://tldp.org/LDP/intro-linux/html/ This Linux guide] has a nice [http://tldp.org/LDP/intro-linux/html/sect_02_02.html introduction to using the shell]. | ||
==Installing Wine | ==Installing Wine== | ||
'' | ===Linux=== | ||
Wine will pretty much always be in your distribution's main repository and can be installed by simply running your package manager's install command, such as <code>sudo apt-get install wine</code> for Ubuntu and Debian-based distributions, or by installing it from a GUI such as the Ubuntu Software Center. Arch users need to enable multilib repository in '''/etc/pacman.conf''' and then updating the repository with <tt>pacman -Sy</tt> in order to install Wine. | |||
== | For Gentoo users, unmasking the git-fetching ebuild is recommended. Adding '''=app-emulation/wine-9999 **''' to '''/etc/portage/package.keywords''' should do the trick. Run <tt>emerge -pv wine</tt> and check which version it wants to build (it should be '''app-emulation/wine-9999'''). Just be aware that building from Wine's git repository might not actually work; the code is in constant flux. | ||
If you already have MacPorts installed with all dependencies, simply run <code> | |||
===Mac OS X=== | |||
'''Using MacPorts''' | |||
If you already have MacPorts installed with all dependencies, simply run <code>sudo port install wine</code> to install with all dependencies. | |||
If you have yet to install MacPorts, refer to this [http://www.macports.org/install.php installation instructions]. | If you have yet to install MacPorts, refer to this [http://www.macports.org/install.php installation instructions]. | ||
'''Using Homebrew''' | |||
Go [http://brew.sh/ here] and install if needed, then run <code>brew install wine</code> in your terminal. | |||
==Using Wine== | ==Using Wine== | ||
Wine | On its first run, Wine creates a hidden directory in your home folder, called <tt>.wine</tt>, which contains a full representation of a Windows folder hierarchy and miscellaneous library and system files. One such representation is called a '''prefix''' (see the Wine prefixes section for more information). The <tt>.wine</tt> folder is in your home directory (~/.wine). Inside is another folder called <tt>drive_c</tt>, which is your Wine install's C: drive folder. If you browse inside this folder (<tt>~/.wine/drive_c</tt>), you will probably recognize its contents from a standard Windows install. | ||
Generally, your Linux distribution will have assigned Windows | Generally, with Wine installed, your Linux distribution will have assigned Windows executables to automatically invoke Wine, so double-clicking a Windows executable should work. If not, you will have to run Wine from your terminal. To do this, navigate to the folder that contains the executable and run it with Wine, like so: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
~ $ cd .wine/drive_c/Program\ Files/RandomProgram | ~ $ cd .wine/drive_c/Program\ Files/RandomProgram | ||
~/.wine/drive_c/Program Files/RandomProgram $ wine program.exe | ~/.wine/drive_c/Program Files/RandomProgram $ wine program.exe | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Running Touhou games=== | ===Running Touhou games=== | ||
Running a Touhou game is done the same way, | Running a Touhou game is done the same way, except you might want to specify your locale when running Wine, so your game will be run in Japanese to prevent some serious [[Wikipedia:Mojibake|mojibake]]. This can be done by adding <code>LANG="ja_JP.UTF-8"</code>, or <code>LC_ALL="ja_JP.UTF-8"</code>, in front of your command to run Wine. The following example will navigate to a folder containing ''[[Double Spoiler]]'' and then launch it: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
~ $ cd .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー | ~ $ cd .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー | ||
~/.wine/drive_c/Program Files/上海アリス幻樂団/ダブルスポイラー $ LANG="ja_JP.UTF-8" wine th125.exe | ~/.wine/drive_c/Program Files/上海アリス幻樂団/ダブルスポイラー $ LANG="ja_JP.UTF-8" wine th125.exe | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<tt>Vpatch.exe</tt> works on Wine as of version 1.6, although some users will experience the issue of the Ctrl key not skimming through replays as it should in ''EoSD'' through ''IN''. | |||
'''Note:''' If you are using [https://www.thpatch.net/wiki/Touhou_Patch_Center:Download THCRAP] to play the game in English or another language using the Latin alphabet, you won't need to specify this; if your system locale is not <tt>en_US.UTF-8</tt> and you want to play in English, however, you might want to specify <code>LANG="en_US.UTF-8"</code> in front of the command. The same applies to other language patches. | |||
== | ===Wine prefixes=== | ||
'' | A prefix, or colloquially 'bottle', is a folder containing the Windows directory structure, to which specific Wine settings can be assigned. This way, it is possible to run certain games with Wine set to Windows 7, but others Windows 98, for example. A new prefix can be created by running <code>WINEPREFIX=<path> winecfg</code>, which will launch Wine's configuration menu as well. Note that the path must be absolute, e.g. <tt>~/.prefix_name</tt> to place it in your home directory. To create a 32-bit prefix, add <code>WINEARCH=win32</code> in front of the aforementioned example. | ||
For the official Touhou games, multiple prefixes are not needed and you can use any single prefix, such as the default <tt>.wine</tt> in your home directory. It can however be useful for other games, if they need Wine to run with different settings, such as a different Windows operating system, 32-bit instead of 64-bit, or different Windows libraries or components. If you need to run a game using a different prefix, specify it using <code>WINEPREFIX=<path> <game></code>; not specifying any prefix will make Wine use the default one. | |||
===Installing missing native Windows components=== | |||
Although most Touhou games should run out of the box with the recent development of Wine, some games might experience instant crashes when trying to run them through Wine. This is mostly because Wine does not include all Windows libraries by default and missing libraries can lead to a crash. Make sure that all necessary components to launch the game are installed. There are some ways to achieve this: | |||
'''Using Winetricks''' | |||
[https://wiki.winehq.org/Winetricks Winetricks] is a program that is the primary method for installing Windows libraries (DLL) and other components. With <tt>winetricks</tt>, all of these installations can be done with merely a command, such as: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
~ $ winetricks d3dx9_36 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Start by installing <tt>winetricks</tt> and following the installation instruction provided [https://github.com/Winetricks/winetricks here]. <tt>Winetricks</tt> also has a GUI, which can be opened by executing <tt>winetricks</tt> in a terminal window. To run it on a specific prefix, specify the prefix like so: <code>WINEPREFIX=<path> winetricks</code>. | |||
'''Note:''' Some libraries such as <tt>dotnet40</tt> have limited 64-bit support and may or may not be fully functional. | |||
'''Copy the .dll file from the Windows installation folder''' | |||
Another way to temporarily fix a partially-functioning DLL is to replace it with the original file from a Windows install. Here is the way to do it. | |||
This | '''Note:''' This was done on a 32-bit Vista installation mounted at <tt>/mnt/vista32</tt>. | ||
First off, to copy the file. Wine's Windows folder is in <tt>.wine/drive_c/windows</tt>. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
~ $ cp /mnt/vista32/Windows/System32/d3dx9_36.dll .wine/drive_c/windows/system32/ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== | This might be all you need for the new DLL to work. To make sure programs see it, we'll configure it within Wine. Wine has a configuration utility called <tt>winecfg</tt>; run it from your terminal, then click the "Libraries" tab and under "New override for library", type d3dx9_36, click "Add" followed by "Apply", and now you can click "OK" to exit the utility or peruse around the other tabs and settings. One issue with loading native Windows DLLs is that they may require original low-level Windows DLLs (e.g. <tt>ntdll.dll</tt>) that Wine is emulating and might not work. These are the core DLLs that Wine is emulating and cannot be replaced with native Windows DLLs; you will break your Wine prefix by doing so. | ||
===Wine on Mac=== | |||
Wine on Mac is very similar to Linux. One issue that Mac users may encounter is incredibly slow 3D graphics performance; this is due to Apple's X11 implementation not supporting hardware OpenGL in older versions of Mac OS X (Tiger and below). If you encounter this, you may want to bite the bullet and upgrade. | |||
==PC-98 Games== | |||
The multi-system emulator [https://www.retroarch.com/ RetroArch] provides Neko Project II, which can be used to play the PC-98 games, and runs on both Mac and Linux. Do note that ''the clock multiplier is set too low by default''; it should be set to 16 in the emulator settings (accessed by pressing F1 while in-game). | |||
Various emulators such as the Windows version of Neko Project II, T98-Next, and Anex86 all work pretty well under Wine in order to play the [[PC-98]] Touhou games. For playing with a gamepad, [https://joytokey.net/en/ JoyToKey] also works under Wine. There is also a native port of Neko Project II for Linux and Mac called [http://www.nonakap.org/np2/ Xnp2]; however, there are currently some sound problems that need to be investigated{{cn}}. RetroArch is generally the best option. | |||
==Fangames== | |||
{{stub|section}} | |||
Touhou fangames are hit-or-miss. | |||
''[[Age of Ethanols]]'' is a .NET game, so it should run natively in Mono. However, it's coded in part C#, part C++, so it won't work without installing .NET and whatnot from within Wine. | |||
[[Moedan]] works fine in Wine (Wine 1.7.20, Mac OS X) | |||
[[Touhou Danmakufu]] 0.12m may or may not work - it worked better in older versions of wine, but crashes on start due to DirectX issues in later versions. ph3 works fine, with the exception of .mp3 files not running due to copyright issues on .mp3 files and the consequent inability of Wine to run them as they would normally be run. (Wine 1.7.27, Mac OS X) | |||
[[ | [[Labyrinth of Touhou]] works fine in Wine. (Wine 1.6 RC-1, Mac OS X) | ||
==Troubleshooting== | |||
{{Main|/Misc fixes|l1=Misc fixes}} | |||
* There are issues 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. | |||
[[ | * For ''[[Scarlet Weather Rhapsody]]'' and ''[[Touhou Hisoutensoku]]'', [[hisouten:Linux_support|see here]] (SWR/HSTS Wiki). | ||
The Wine developers are constantly adding and fixing functionality, so while things are still iffy with certain Touhou games, they are definitely improving. See below for a list of current Touhou bugs in Wine. | |||
=== | ===Bugs and Glitches=== | ||
{{stub|section}} | |||
'''<p>Official Games</p>''' | '''<p>Official Games</p>''' | ||
* Most of the Touhou games, especially the 2nd gen [[Windows]] games, might experience minor to unacceptable slowdown on Intel Integrated Graphics{{cn}}. | |||
* For some users, EoSD to IN will not speed up replays when CTRL is pressed when running using vpatch. | |||
* In EoSD, the player character sprite is rendered on top of enemy sprites instead of under them, obscuring certain safespots. | |||
* If the controls are going wonky, this can be resolved by opening the game's <tt>custom.exe</tt> and checking the box with the word "DirectInput". | |||
'''<p>Fangames</p>''' | '''<p>Fangames</p>''' | ||
===Using | * Touhou Danmakufu 0.12m crashes on start (DMUSIC_CreateMidiOutPortImpl is a stub). [http://bugs.winehq.org/show_bug.cgi?id=34314 Entry on bugs.winehq.]<br /> | ||
==Using Virtual Machines== | |||
'''Note:''' it is '''not recommended''' to play Touhou games this way on Mac or Linux, as it is very slow and memory-consuming to start an entire operating system just to play Touhou; only do this as a ''last resort''! | |||
Parallels Desktop | It is possible to use virtualization software such as Oracle VirtualBox and VMWare Player (both Mac and Linux) and Parallels Desktop (Mac) to run a virtual Windows operating system to play the Touhou games with. You will be able to install and run them just as you would on Windows, as you are running Windows within your native operating system. You need Windows installation media (such as an ISO file) in order to install a Windows virtual machine; for Windows 7 through Windows 10, see [https://support.microsoft.com/en-us/help/15088/windows-10-create-installation-media this Microsoft help page] for information on creating installation media. | ||
On Mac, Parallels Desktop version 5.0 runs the main series games very well: All of the Windows danmaku games except for ''[[Perfect Cherry Blossom]]'' run without slowdown on a MacBook Pro. ''PCB'' appears to suffer from slowdown for unknown reasons. | |||
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 640×480 natively (the games will run at 30fps). You can run them in 720×480 just fine, though. | 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 640×480 natively (the games will run at 30fps). You can run them in 720×480 just fine, though. | ||
Line 161: | Line 136: | ||
If your ''SWR''/''Soku'' display looks strange when run in full screen (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 full screen in the menu. | If your ''SWR''/''Soku'' display looks strange when run in full screen (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 full screen in the menu. | ||
The [[PC-98]] games can be run | The [[PC-98]] games can be run on emulators without difficulty (so yes, emulation within <s>emulation</s> virtualization). There's a PC-98 emulator for Mac, 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: | The following fan games have been confirmed to run fine under Parallels Desktop 5 using Windows XP on a MacBook Pro: | ||
Line 177: | Line 152: | ||
*''[[Touhou Soccer Moushuuden]]'' (no display) | *''[[Touhou Soccer Moushuuden]]'' (no display) | ||
==Playing Steam Games on Linux== | |||
With the release of some titles such as [https://en.touhouwiki.net/wiki/Hidden_Star_in_Four_Seasons Hidden Star in Four Seasons] or [https://en.touhouwiki.net/wiki/Antinomy_of_Common_Flowers Antinomy of Common Flowers] on Steam and the support of [https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561 Proton], playing Touhou games on Steam has become easier for Linux users, since you can now use the built-in compatibility layers that Steam provides. Proton used to be quite buggy when it was new, but nowadays, if any game runs on Wine, you can typically expect it to run on Proton as well. | |||
===Installation=== | |||
*[https://www.archlinux.org/ Arch Linux]: [https://wiki.archlinux.org/index.php/steam See here] | |||
*[http://www.ubuntu.com/ Ubuntu]: [https://wiki.ubuntu.com/Valve See Here] | |||
*[https://www.debian.org/ Debian]: [https://wiki.debian.org/Steam See here] | |||
To enable Proton for all games, go to '''Steam -> Settings''', where a section called '''Steam Play''' will appear in the bottom of the sections list; navigate to the section and check '''Enable Steam Play for all titles''', after which Steam will have to be restarted. Following that, all of your games that don't run on Linux natively will automatically use Proton. | |||
The current game compatibility can be found on [https://www.protondb.com/ the ProtonDB website]. | |||
===Troubleshooting=== | |||
* Some user might experience game crashing with Proton right when starting up without it prompting to install any drivers (e..g Proton needing to install DirectX if you are running HSiFS for the first time). If that is the case, consider using the flatpak version of Steam. | |||
* There is also some problem regarding launching games that reside on NTFS partitions. This is a confirmed bug; a workaround for this is to mount the partition using [https://wiki.archlinux.org/index.php/NTFS-3G ntfs-3g] rather than <tt>ntfs</tt>. | |||
== | ==Using Winebottler on Mac== | ||
There is an easier way | There is an easier way to run Touhou games on a Mac: Winebottler. To use this, you need Mac OS X version 10.6.8 or later as well as X11. 11 is available at the iTunes Store, at a cheap price, or free if you get older versions. | ||
You can download Winebottler [http://darwine-winebottler.en.softonic.com/mac here. | You can download Winebottler [http://darwine-winebottler.en.softonic.com/mac here]. Press the free download button, and a Disk Image should appear on your desktop after download. Drag the applications Wine and Winebottler into your applications folder. | ||
Now, double click the Touhou game <tt>.exe</tt>. A dialogue box should pop up that says "What would you like to do with the file?" Below that should be two options: | Now, double-click the Touhou game <tt>.exe</tt>. A dialogue box should pop up that says "What would you like to do with the file?" Below that should be two options: | ||
#Run directly in /Users/((Homefoldername))/Wine | #Run directly in <tt>/Users/((Homefoldername))/Wine</tt> | ||
#Convert to simple OS X application bundle. | #Convert to simple Mac OS X application bundle. | ||
Click on the first option. '''DO NOT CLICK THE SECOND ONE. The game will not run and your Wine will crash.''' | Click on the first option. '''DO NOT CLICK THE SECOND ONE. The game will not run and your Wine will crash.''' | ||
It should automatically open up X11 and run the game. No coding is required. | It should automatically open up X11 and run the game. No coding is required. | ||
==External links== | ==External links== |
Revision as of 10:57, 16 January 2021
For those of us who run Linux or Mac OS X as our only operating system, finding functional alternatives to Windows programs can be an issue. When we need to run Windows programs, the Wine project has long been a great compatibility layer that lets us do just that. Basically, it translates Windows system calls into their Unix equivalents and runs programs in a Windows directory structure, so you can still play your Windows games, work in Photoshop, etc. under Linux and, to a certain extent, Mac OS X.
Although Wine is not perfect, running official Touhou Project games on Wine will usually be fine, with some minor issues. This article will explain how Wine works and how to play Touhou games under Wine.
Before we start, this does require a little familiarity with the shell (or command-line interface). This Linux guide has a nice introduction to using the shell.
Installing Wine
Linux
Wine will pretty much always be in your distribution's main repository and can be installed by simply running your package manager's install command, such as sudo apt-get install wine
for Ubuntu and Debian-based distributions, or by installing it from a GUI such as the Ubuntu Software Center. Arch users need to enable multilib repository in /etc/pacman.conf and then updating the repository with pacman -Sy in order to install Wine.
For Gentoo users, unmasking the git-fetching ebuild is recommended. Adding =app-emulation/wine-9999 ** to /etc/portage/package.keywords should do the trick. Run emerge -pv wine and check which version it wants to build (it should be app-emulation/wine-9999). Just be aware that building from Wine's git repository might not actually work; the code is in constant flux.
Mac OS X
Using MacPorts
If you already have MacPorts installed with all dependencies, simply run sudo port install wine
to install with all dependencies.
If you have yet to install MacPorts, refer to this installation instructions.
Using Homebrew
Go here and install if needed, then run brew install wine
in your terminal.
Using Wine
On its first run, Wine creates a hidden directory in your home folder, called .wine, which contains a full representation of a Windows folder hierarchy and miscellaneous library and system files. One such representation is called a prefix (see the Wine prefixes section for more information). The .wine folder is in your home directory (~/.wine). Inside is another folder called drive_c, which is your Wine install's C: drive folder. If you browse inside this folder (~/.wine/drive_c), you will probably recognize its contents from a standard Windows install.
Generally, with Wine installed, your Linux distribution will have assigned Windows executables to automatically invoke Wine, so double-clicking a Windows executable should work. If not, you will have to run Wine from your terminal. To do this, navigate to the folder that contains the executable and run it with Wine, like so:
~ $ cd .wine/drive_c/Program\ Files/RandomProgram
~/.wine/drive_c/Program Files/RandomProgram $ wine program.exe
Running Touhou games
Running a Touhou game is done the same way, except you might want to specify your locale when running Wine, so your game will be run in Japanese to prevent some serious mojibake. This can be done by adding LANG="ja_JP.UTF-8"
, or LC_ALL="ja_JP.UTF-8"
, in front of your command to run Wine. The following example will navigate to a folder containing Double Spoiler and then launch it:
~ $ cd .wine/drive_c/Program\ Files/上海アリス幻樂団/ダブルスポイラー
~/.wine/drive_c/Program Files/上海アリス幻樂団/ダブルスポイラー $ LANG="ja_JP.UTF-8" wine th125.exe
Vpatch.exe works on Wine as of version 1.6, although some users will experience the issue of the Ctrl key not skimming through replays as it should in EoSD through IN.
Note: If you are using THCRAP to play the game in English or another language using the Latin alphabet, you won't need to specify this; if your system locale is not en_US.UTF-8 and you want to play in English, however, you might want to specify LANG="en_US.UTF-8"
in front of the command. The same applies to other language patches.
Wine prefixes
A prefix, or colloquially 'bottle', is a folder containing the Windows directory structure, to which specific Wine settings can be assigned. This way, it is possible to run certain games with Wine set to Windows 7, but others Windows 98, for example. A new prefix can be created by running WINEPREFIX=<path> winecfg
, which will launch Wine's configuration menu as well. Note that the path must be absolute, e.g. ~/.prefix_name to place it in your home directory. To create a 32-bit prefix, add WINEARCH=win32
in front of the aforementioned example.
For the official Touhou games, multiple prefixes are not needed and you can use any single prefix, such as the default .wine in your home directory. It can however be useful for other games, if they need Wine to run with different settings, such as a different Windows operating system, 32-bit instead of 64-bit, or different Windows libraries or components. If you need to run a game using a different prefix, specify it using WINEPREFIX=<path> <game>
; not specifying any prefix will make Wine use the default one.
Installing missing native Windows components
Although most Touhou games should run out of the box with the recent development of Wine, some games might experience instant crashes when trying to run them through Wine. This is mostly because Wine does not include all Windows libraries by default and missing libraries can lead to a crash. Make sure that all necessary components to launch the game are installed. There are some ways to achieve this:
Using Winetricks
Winetricks is a program that is the primary method for installing Windows libraries (DLL) and other components. With winetricks, all of these installations can be done with merely a command, such as:
~ $ winetricks d3dx9_36
Start by installing winetricks and following the installation instruction provided here. Winetricks also has a GUI, which can be opened by executing winetricks in a terminal window. To run it on a specific prefix, specify the prefix like so: WINEPREFIX=<path> winetricks
.
Note: Some libraries such as dotnet40 have limited 64-bit support and may or may not be fully functional.
Copy the .dll file from the Windows installation folder
Another way to temporarily fix a partially-functioning DLL is to replace it with the original file from a Windows install. Here is the way to do it.
Note: This was done on a 32-bit Vista installation mounted at /mnt/vista32.
First off, to copy the file. Wine's Windows folder is in .wine/drive_c/windows.
~ $ cp /mnt/vista32/Windows/System32/d3dx9_36.dll .wine/drive_c/windows/system32/
This might be all you need for the new DLL to work. To make sure programs see it, we'll configure it within Wine. Wine has a configuration utility called winecfg; run it from your terminal, then click the "Libraries" tab and under "New override for library", type d3dx9_36, click "Add" followed by "Apply", and now you can click "OK" to exit the utility or peruse around the other tabs and settings. One issue with loading native Windows DLLs is that they may require original low-level Windows DLLs (e.g. ntdll.dll) that Wine is emulating and might not work. These are the core DLLs that Wine is emulating and cannot be replaced with native Windows DLLs; you will break your Wine prefix by doing so.
Wine on Mac
Wine on Mac is very similar to Linux. One issue that Mac users may encounter is incredibly slow 3D graphics performance; this is due to Apple's X11 implementation not supporting hardware OpenGL in older versions of Mac OS X (Tiger and below). If you encounter this, you may want to bite the bullet and upgrade.
PC-98 Games
The multi-system emulator RetroArch provides Neko Project II, which can be used to play the PC-98 games, and runs on both Mac and Linux. Do note that the clock multiplier is set too low by default; it should be set to 16 in the emulator settings (accessed by pressing F1 while in-game).
Various emulators such as the Windows version of Neko Project II, T98-Next, and Anex86 all work pretty well under Wine in order to play the PC-98 Touhou games. For playing with a gamepad, JoyToKey also works under Wine. There is also a native port of Neko Project II for Linux and Mac called Xnp2; however, there are currently some sound problems that need to be investigated[citation needed]. RetroArch is generally the best option.
Fangames
Attention: This section is a stub and it needs expanding with more information related to the section's topic. If you can add to it in any way, please do so. |
Touhou fangames are hit-or-miss.
Age of Ethanols is a .NET game, so it should run natively in Mono. However, it's coded in part C#, part C++, so it won't work without installing .NET and whatnot from within Wine.
Moedan works fine in Wine (Wine 1.7.20, Mac OS X)
Touhou Danmakufu 0.12m may or may not work - it worked better in older versions of wine, but crashes on start due to DirectX issues in later versions. ph3 works fine, with the exception of .mp3 files not running due to copyright issues on .mp3 files and the consequent inability of Wine to run them as they would normally be run. (Wine 1.7.27, Mac OS X)
Labyrinth of Touhou works fine in Wine. (Wine 1.6 RC-1, Mac OS X)
Troubleshooting
- There are issues 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.
- For Scarlet Weather Rhapsody and Touhou Hisoutensoku, see here (SWR/HSTS Wiki).
The Wine developers are constantly adding and fixing functionality, so while things are still iffy with certain Touhou games, they are definitely improving. See below for a list of current Touhou bugs in Wine.
Bugs and Glitches
Attention: This section is a stub and it needs expanding with more information related to the section's topic. If you can add to it in any way, please do so. |
Official Games
- Most of the Touhou games, especially the 2nd gen Windows games, might experience minor to unacceptable slowdown on Intel Integrated Graphics[citation needed].
- For some users, EoSD to IN will not speed up replays when CTRL is pressed when running using vpatch.
- In EoSD, the player character sprite is rendered on top of enemy sprites instead of under them, obscuring certain safespots.
- If the controls are going wonky, this can be resolved by opening the game's custom.exe and checking the box with the word "DirectInput".
Fangames
- Touhou Danmakufu 0.12m crashes on start (DMUSIC_CreateMidiOutPortImpl is a stub). Entry on bugs.winehq.
Using Virtual Machines
Note: it is not recommended to play Touhou games this way on Mac or Linux, as it is very slow and memory-consuming to start an entire operating system just to play Touhou; only do this as a last resort!
It is possible to use virtualization software such as Oracle VirtualBox and VMWare Player (both Mac and Linux) and Parallels Desktop (Mac) to run a virtual Windows operating system to play the Touhou games with. You will be able to install and run them just as you would on Windows, as you are running Windows within your native operating system. You need Windows installation media (such as an ISO file) in order to install a Windows virtual machine; for Windows 7 through Windows 10, see this Microsoft help page for information on creating installation media.
On Mac, Parallels Desktop version 5.0 runs the main series games very well: All of the Windows danmaku games except for Perfect Cherry Blossom run without slowdown on a MacBook Pro. PCB appears to suffer from slowdown for unknown reasons.
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 640×480 natively (the games will run at 30fps). You can run them in 720×480 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's 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 Phantasmagoria of Flower View.
If your SWR/Soku display looks strange when run in full screen (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 full screen in the menu.
The PC-98 games can be run on emulators without difficulty (so yes, emulation within emulation virtualization). There's a PC-98 emulator for Mac, 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 (with or without English patch)
- Koumajou Densetsu: Scarlet Symphony (both games)
- Gensou Tansaku Nitroid!
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 fangames 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%)
- Labyrinth of Touhou (either will not display, or overwhelming glitches)
- Touhou Soccer Moushuuden (no display)
Playing Steam Games on Linux
With the release of some titles such as Hidden Star in Four Seasons or Antinomy of Common Flowers on Steam and the support of Proton, playing Touhou games on Steam has become easier for Linux users, since you can now use the built-in compatibility layers that Steam provides. Proton used to be quite buggy when it was new, but nowadays, if any game runs on Wine, you can typically expect it to run on Proton as well.
Installation
To enable Proton for all games, go to Steam -> Settings, where a section called Steam Play will appear in the bottom of the sections list; navigate to the section and check Enable Steam Play for all titles, after which Steam will have to be restarted. Following that, all of your games that don't run on Linux natively will automatically use Proton.
The current game compatibility can be found on the ProtonDB website.
Troubleshooting
- Some user might experience game crashing with Proton right when starting up without it prompting to install any drivers (e..g Proton needing to install DirectX if you are running HSiFS for the first time). If that is the case, consider using the flatpak version of Steam.
- There is also some problem regarding launching games that reside on NTFS partitions. This is a confirmed bug; a workaround for this is to mount the partition using ntfs-3g rather than ntfs.
Using Winebottler on Mac
There is an easier way to run Touhou games on a Mac: Winebottler. To use this, you need Mac OS X version 10.6.8 or later as well as X11. 11 is available at the iTunes Store, at a cheap price, or free if you get older versions.
You can download Winebottler here. Press the free download button, and a Disk Image should appear on your desktop after download. Drag the applications Wine and Winebottler into your applications folder.
Now, double-click the Touhou game .exe. A dialogue box should pop up that says "What would you like to do with the file?" Below that should be two options:
- Run directly in /Users/((Homefoldername))/Wine
- Convert to simple Mac OS X application bundle.
Click on the first option. DO NOT CLICK THE SECOND ONE. The game will not run and your Wine will crash.
It should automatically open up X11 and run the game. No coding is required.