Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
We do often include affiliate links to earn us some pennies. See more here.

How-to: upscale old games on Linux

By - | Views: 62,539

Any tool that makes it easier to play older Windows games on Linux deserves some praise, and none more so than Lutris in my book. But...have you tried running a really old game and found that it is hilariously minuscule on your fancy modern HiDPI monitor? Resolutions which are commonplace today were not even dreamed of back in the 1990's. Take a game like Space Cadet, the classic pinball game many of us spent an embarrassing amount of time with.


3D Pinball for Windows – Space Cadet

This game was originally bundled with Microsoft Plus! 95, a sort of enhancement pack for Windows 95. We're talking 1995 here, 25 years ago at the time of writing. Colloquially known as Space Cadet pinball, the actual title is 3D Pinball for Windows – Space Cadet and is essentially a single pinball table rewrite of the original game Full Tilt!, using mostly the original art.

Note: I will not include any links nor instructions how to obtain a copy of this game.

Running "Space Cadet pinball" in Lutris is as simple as adding the game, using any recent Wine version. I personally recommend using a separate Wine prefix for each game. There are any number of instruction videos available on this topic if you're unsure how to do that, but know that all the default settings are fine as-is in Lutris.

The game runs without fuss and looks something like this on a modern Linux PC. You may have to zoom in a bit to see it! Screenshot resolution is 3440x1440. 

What is this, a game for ants? Although Lutris has some tricks up its sleeve, virtual desktop does not help, and running the game in fullscreen doesn't make it any larger. Xephyr is a possible solution but since it also requires extra packages and is a more complex solution, I have something else in store for you.

 

Enter xpra

Very simplified description: xpra is a clever little thing that allows you to run an application in an X server inside another X server. It can do this locally or remotely, which may interest some of you, but we're only interested in upscaling a tiny window this time.

We'll use the excellent script run_scaled by kaueraal and install it systemwide for your current user. This way you can use this script for any other game as well. 

These instructions are specific to Debian, if you're using a Debian based distro like Ubuntu or derivatives thereof, you should be good to go. Others may have to adapt the instructions to their distro of choice. 
 

Instructions

  • sudo apt install xpra xvfb

Clone the run_scaled script with git, alternatively download it manually from the link above. Copy it to your preferred binary executable directory, in this example we're using the current user directory ~/.local/bin/ but if you prefer something else, simply modify this path. Just make sure it is listed in your $PATH environment variable.

  • git clone https://github.com/kaueraal/run_scaled.git
  • cd run_scaled/
  • cp run_scaled ~/.local/bin/

Open Lutris, select the game and choose Configure, System options tab, scroll down to Command prefix and input the script along with desired scaling factor. In the example image I used a factor of 3, you can use fractional scaling to fine tune it for your resolution. You can use values smaller than 1 as well.

  • run_scaled --scale=3

With that done: this is how it looks with 3x scaling on the same monitor. 

Much better. There's going to be a few drawbacks, as nothing is perfect. It can possibly reduce performance, introduce blurring and probably more but it's an option that does work. If other solutions for your old favourite classic didn't work, perhaps this will.

Article taken from GamingOnLinux.com.
Tags: HOWTO, Wine
30 Likes
About the author -
author picture
Using the powers of Debian for great justice.
See more from me
The comments on this article are closed.
37 comments
Page: «3/4»
  Go to:

PopeRigby Apr 11, 2020
Love the Doom Eternal wallpaper (:
DigitalSin Apr 12, 2020
I use xrandr for fullscreen apps...

To avoid the usage of the scaler which is built in the display, and use the GPU own scaler instead, when not using the native resolution of the monitor, execute:
$ xrandr --output "<output>" --set "scaling mode" "<scaling mode>"

To show the available outputs and settings, execute:
$ xrandr --prop

To set scaling mode = Full for just every available output, execute:
$ for output in $(xrandr --prop | grep -E -o -i "^[A-Z\-]+-[0-9]+"); do xrandr --output "$output" --set "scaling mode" "Full"; done

Not exactly for windowed apps, but useful to know :)
Liam Dawe Apr 12, 2020
Quoting: WorMzyMy point is that the article title makes it seem like this is a Lutris-specific thing, but the article is about a "game manager"-agnostic solution which just happens to be usable in Lutris.

If the author wants to include Lutris-specific instructions, that's their prerogative. I just think "How-to: upscale old games on Linux" works perfectly well as a title (although "on Linux" is redundant) and doesn't potentially put off some potential readers who don't think the article will be useful for them since they don't use Lutris.
Fair point about Lutris, have removed it from the title. Also, "on Linux" is not at all redundant and I've explained this each time people say it, that's for the SEO :)
whizse Apr 12, 2020
View PC info
  • Supporter
Quoting: Dunc(I'm seriously considering going back to a CRT.
Yuck! Don't get me started on CRT's.

I used to lug around a 19" behemoth for LAN parties during my teenage years in the late 1990's. It was terrible, after a few months I actually started to develop muscles.

God what an embarrassment that was. Jocks asked where I worked out. Girls started to notice me. My D&D group refused to speak to me.

I had to lie prostrate for weeks doing absolutely nothing to get back to my sleek spaghetti like physique and nerd cred.

Praise $DEITY for lightweight electronic equipment that's measured in grams.
Audi Apr 12, 2020
Quoting: jkaart
Quoting: GuestI remember this game. Time flies.
Yes! I was about 15y old when I first time played that game in school computer which had Windows XP! :D
Year was 2001.

Windows XP! I'm pretty sure I played this back on Windows 95...so many hours my brothers and I put into this game.
zimano Apr 12, 2020
With games that ran on DOS and Windows 3.11 I've found DOSBox to be great for perfect for scaling (using the integer scaling method where the pixels look chunkier and not blurred). I have no need to use a CRT screen for these older games now.

The problem area for me is certain games released from the Windows 98 to early Windows XP area (lets say between 1998 - 2003). Here's some examples:

X Beyond the Frontier
X-Tension
Medieval Total War (though I think a fix for Windows side now appeared for this)
Cueball World
Total Annihilation

To get these games running correctly, scaled without blurring, is a significant challenge in Linux. With Windows using NVidia Turing, you can now at least use integer scaling along with VMWare Player to run X Beyond the Frontier & X-Tension full screen without looking a blurry mess.

On Linux I've had some success using my NVidia 970 and the following command:

nvidia-settings -a CurrentMetaMode="DP-0: 2560x1440_165 {ViewPortIn=1280x720, ViewPortOut=2560x1440, ResamplingMethod=Nearest }"

This is allowing me to run games at 1280 x 720 and the pixels are scaled up to 2560 x 1440. Limitation of this method is it seems a bit of a hack. Everything seems to think you are still in 1440p resolution so fullscreen games aren't centred at all and my XFCE panel disappears off the screen!

You can still make it work in windowed mode. Run the games in the top left corner for full screen and none blurry scaling. Included some pics:

Spoiler, click me





Things will be so much easier when NVidia supports 1600/2000 series integer scaling at the driver level on Linux. All of a sudden, scaling in Windows is an absolute dream.


Last edited by zimano on 13 April 2020 at 9:02 am UTC
dpanter Apr 12, 2020
Quoting: zimanoIncluded some pics
You have to link the files directly for them to embed properly, and it would be nice to hide them with a spoiler tag so the post doesn't take up a whole page by itself. :)
Example:
Spoiler, click me

ViewPort scaling with Nvidia is yet another way to skin this cat, cheers!


Last edited by dpanter on 12 April 2020 at 10:46 pm UTC
zimano Apr 13, 2020
Quotedpanter: You have to link the files directly for them to embed properly, and it would be nice to hide them with a spoiler tag so the post doesn't take up a whole page by itself.
Done, thanks :)
Dunc Apr 13, 2020
Quoting: MayeulCAs for CRTs... I definitely agree on there being something to their quality. It could be multiple things, like the non-square grid pattern (some recent phones have this), but what I really think makes a lot of difference is the ultra low persistence of the display.
I think it's more to do with the fact that they're analogue. There's no native resolution, so scaling and (to an extent) AA are, effectively, done in hardware for free. I've never used a 4K monitor for any length of time, but from the experience of my (now rather antiquated) phone - 720p in about 4" - I think the extremely high DPI levels we're beginning to see in LCDs will help. Although obviously you run into the sort of problems that we see in the OP. (Yay, back on topic! :D )
MayeulC Apr 13, 2020
Quoting: Dunc
Quoting: MayeulCAs for CRTs... I definitely agree on there being something to their quality. It could be multiple things, like the non-square grid pattern (some recent phones have this), but what I really think makes a lot of difference is the ultra low persistence of the display.
I think it's more to do with the fact that they're analogue. There's no native resolution, so scaling and (to an extent) AA are, effectively, done in hardware for free. I've never used a 4K monitor for any length of time, but from the experience of my (now rather antiquated) phone - 720p in about 4" - I think the extremely high DPI levels we're beginning to see in LCDs will help. Although obviously you run into the sort of problems that we see in the OP. (Yay, back on topic! :D )

Well, it really depends what kind of screen you are talking about... You are right if talking about monochrome CRTs (or the old "vector") displays (though there is definitely a resolution limit imposed by the beam width), but look closer at RGB CRTs, and you'll see color stripes, that make "RGB" pixels. So you have a horizontal resolution at the very least (though pixels could blend a bit into the neighbouring ones if the beam is too wide, some LCDs also have this issue). And most monitors I've seen also have those grouped in horizontal lines (sometimes arranged in a non-square grid, as I wrote above):
Spoiler, click me

So there's also a discrete vertical resolution. What's more, I don't recall the specifics, but I am pretty sure that the beam is actually controlled by the monitor (with vblanks, hblanks, etc to give it time to go back at the start of the screen/line). The only analog thing might be the intensity of the electron beam, and monitors can already approximate this quite well.
Another difference might be that only OLEDs can surpass the blacks of a well-tuned CRT (the phosphor layer will give something of a permanent fluorescence) :)

This video neatly illustrates low-persistence of a CRT, and there are a couple that track moving objects on screen to illustrate persistence influence on motion blur. You can easily do so yourself by running glxgears and tracking the edge of a cog with your eyes. A lot easier to do on a CRT! (Or for an illustration, the big gear is already easier to track as it's turning slowly, thus persistence has less of an effect on it).


Last edited by MayeulC on 13 April 2020 at 4:49 pm UTC
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.