Playing GTA Vice City with a Nintendo Switch Pro controller on Linux in ultrawide.
Grand Theft Auto - Vice City came out in October of 2002: This is so long ago that when I went back to proof read this post I realized that I had instead written "ten years ago", and then I had a minor aneurysm.
Either way …
Back in the olden days of October 2002, the game was released on both Xbox & PlayStation 2, and while it also had a release on both Windows & MacOS, both of these releases left a lot to be desired as quite a few graphical features and some game mechanics were inexplicably cut from the game. It is also worth noting that neither of the PC releases had any controller support.
While the game is now almost old enough to both legally drink and drive (hopefully not at the same time), it has not yet been thrown out by the passionate modding community!
But before we get into the details of how to get this old nugget to run on your machine, I just want to point out ridiculousness of all of this— just as a recap if you haven't stopped to ponder what we are about to do.
We are going to play a game on unsupported hardware, using an unsupported operating system, with an unsupported controller from an unsupported console, in a resolution and aspect ratio that was ridiculous at the time …
… and it will be absolutely glorious!
Rest assured: The game is going to run on your hardware, just as God intended. There will be no emulators or other cheap tricks involved: it just works!
You can probably get this game running on any (somewhat modern) distro and potato, but for sake of comparison, here are my specs:
Kernel: 5.13.13-arch1-1
CPU: AMD Ryzen 7 1800X
Memory: 64235MiB
Resolution: 3440x1440
GPU: AMD Radeon RX Vega 64
Driver: amdgpu
I am also using the Steam version so I can leverage its great Proton support.
Getting the game to run
Once you have installed the from Steam, you should download a recent version of Proton GE (Glorious Eggroll). If you have yet to be blessed by the grace of the Eggroll, then most of what you need to know is that it is a tweaked version of Proton with some additional components that often just magically solves your problems.
Note: While it is possible that the game could run without Glorious Eggroll, I wouldn't waste my time with even trying.
I'm using 6.16-GE-1
, which is the latest version at the time of writing, but any recent version should do the trick.
All you have to do to get it working with Steam is to download and unpack it to the Steam compatibility tools directory, like this:
cd "~/.steam/root/compatibilitytools.d"
wget "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/6.16-GE-1/Proton-6.16-GE-1.tar.gz"
tar xf "Proton-6.16-GE-1.tar.gz"
rm "Proton-6.16-GE-1.tar.gz"
Once these files are on disk, restart Steam and force this version of proton under "Compatabilty" in the game preferences. The game might start now, but we're far from done here.
Getting some mods
In order to get widescreen and controller support up and running, you need to get some mods from the aforementioned GTA modding community.
You can get these mods individually, but since they are part of the fantastic Vice City Definitive Edition mod pack, I highly suggest getting this instead as it will increase the game's overall graphical fidelity by including the previously mentioned "cut graphical features" on the PC platform, and by replacing many of the game's textures with ones that have been AI upscaled (this is 2021 after all). It also includes unofficial patches that fixes many of the still remaining issues with the game.
You probably want all of these mods if you are going to run this is in a higher resolution than the game was designed for, but if you just want the widescreen and controller support, you can just get the "GInput" and "widescreen fix" mod.
To install this (and most other mods), simply extract the files to the Vice City game data directory— it's that simple!
At this point you should try to start the game; heck, it might even run— great work! But the main point is to get Steam to set up the Wine prefix for the game. If the game starts: Just kill it, you probably also need to install some additional Windows components, to get it to run smoothly.
Installing additional Windows components
There is this guide on the Steam forums that suggests installing The Microsoft Visual C++ Redistributable Full Package and the DirectX End-User Runtimes, and installing these have indeed fixed most of my issues.
The easiest way to install them is via Protontricks (but you can do so via vanilla Winetricks as well; you just have to specify the right prefix).
I often just run protontricks --gui
, as that way I don't have to remember (or look up) the Steam AppId for the game.
Just select "Grand Theft Auto - Vice City" from the dialog that pops up: I mean why make life hard?
Winetricks is far from the most user-friendly application, so unless you just graduated Wine school, this is how you install additional components in a Wine prefix.
- Run Protontricks (or Winetricks) and wait for something to happen
- Acknowledge that this is indeed a 64-bit prefix and wait for something to happen again
- Select "Select the default wineprefix" and hit "OK"
- Select "Run uninstaller" (yes, uninstaller) and hit "OK" again
- Hit the "Install..." button in the top right
- Browse to the folder which contains the installer and select "Programs (.exe)" next to "Files of type" at the bottom
- Hit "Open" and go through the installation wizard
Note: For the DirectX End-user Runtimes, the first installer will just extract some CAB-files and an installer. I just extracted them to the desktop of this Wine prefix and then I ran the DXSETUP installer from there.
Once you are done, close the "Uninstaller" dialog (the one with the Install button), then re-open it again and make sure that the list of programs now includes a whole bunch of C++ redistributables.
At this point, the game should run without any problems! But if you are still experiencing issues, try setting the Windows version of the game to Windows XP in winecfg (you can run winecfg from Protontricks as well). I have this set, but I honestly don't know if it makes a damn difference.
After you have started the game, and made sure max out all the settings and set the right resolution, you should restart the game just to make sure it all still works.
If you're going ultrawide or if you plan are to use a controller, there are some additional tweaks we have to do!
Going ultrawide
The "widescreen fix" mod assumes that you are going to run the game at 16:9 aspect ratio, but since we're going ultrawide we need to tweak the configuration for the mod. If we don't do this everything in the game will be thicc.
Navigate to your GTA Vice City game data folder and open GTAVC.WidescreenFix.ini
in the scripts
folder with your favorite editor.
The settings we are interested in are the following:
; Set game aspect ratio (auto|4:3|5:4|16:9|*:*).
ForceAspectRatio = 21:9
; Used to properly scale frontend textures, such as menu background or >
FrontendAspectRatio = 21:9
Then, I also scaled down the UI a little bit using these settings:
; The settings below are used to scale parts of the game UI differently.
; If set to "0.0" original values will be used.
HudWidthScale = 0.79 ; Original value is 1.0.
HudHeightScale = 0.8 ; Original value is 1.0714285.
If you start the game now, everything should be a lot less stretched.
Note: Unless you are feeling adventurous, make sure that you save this file with Windows Line Endings (CRLF).
Getting any controller to work
First of all, we must make sure to completely disable controller support for the game within Steam (I'm dead serious), you can do this under the game preferences for Vice City.
The reason for doing this is that Steam is going to try to emulate controller support using keyboard strokes. Or at least that's how it seems to me, because with controller support enabled, I accelerate vehicles with "forward", instead of "A", and so on.
I think that if you disable controller support in Steam then GInput takes over and handles it instead,
The easiest way to do this in my opinion is to set the WINEDELLOVERRIDES
launch options in Steam.
WINEDLLOVERRIDES="dinput8=n,b" %command%
Alternatively, you can enable this globally, see the "Proton/Wine" setup instructions for GInput.
Using a Switch Pro Controller
Steam already has great support for the Nintendo Switch Pro controller! So for most games, it just works.
Unfortunately, this game does not have any official controller support (we just modded that in), so we need to get some stand-alone firmware and drivers in order to get that to work.
To do this, your kernel has to support the hid-nintendo
firmware,
and newer kernels already have this built in, but you can add can add it if you don't already have it.
To check if you have it installed, you can run modinfo hid_nintendo
.
The Arch Wiki of course has a section for this on the Gamepad page.
You then need to get joycond
.
Even if you already have this— you might have to update to a newer version because you need the "virtual controller" support.
What this means, is that our controller is not going to identify as a Nintendo Switch Pro controller, but instead identify as a generic PC controller. This has much better support with GInput.
On Arch Linx, you can simply install joycond
from the AUR and enable the service:
yay -S joycond-git
sudo systemctl enable joycond --now
Then, when you pair the controller, remember to hold the "plus" and "minus" buttons instead of the bumpers: This will pair the controller in virtual mode, making it identify as a generic game pad.
Using this mode, the game even displayed the correct button names, I didn't have to Tweak any configuration!