LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 07-31-2017, 10:32 PM   #1
Woolie Wool
LQ Newbie
 
Registered: Jul 2017
Location: Memphis, TN
Distribution: Xubuntu
Posts: 19

Rep: Reputation: Disabled
Possible to force a 4:3 320x200 display for VGA mode 13h games?


I compiled the software rendered versions of D1X-Rebirth and D2X-Rebirth (Descent source ports) for Xubuntu on my laptop (Lenovo Edge 15) and while it normally does a good job scaling resolutions automatically, it doesn't handle 320x200, the video mode used by most old DOS games, very well. 320x200 is technically a 16:10 resolution but it's meant to display in 4:3, filling up an old-school CRT monitor. My Lenovo scales it in 16:10, makes it very blurry, and it doesn't even fill up the entire vertical height of the (16:9) screen. Is it possible to set something up using xrandr or a similar tool to blow up 320x200 to a larger 4:3 aspect ratio just for these programs so 320x200 displays correctly, in 4:3 with pillarboxing?
 
Old 08-01-2017, 05:09 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,720

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
Why not run it in a terminal window? They autoscale nicely.
 
Old 08-01-2017, 12:24 PM   #3
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,606

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
I couldn't seem to get 320x200, but I did get 640x400 @ 75 Hz using my xrander_helper script
Code:
#!/bin/bash

"""
    A script to set up a new mode
    version 1 20150603
    version 2 add check for three parameters
    version 3 use zenity to enter parameters for gtf
    version 4 20160704 New mode name actually now works.
              Add four extra digits to mode name to make conflict
              with an existing mode name less likely
"""

# get parameters for gtf
hvf=$(zenity --forms --title="Screen Resolution Setter" \
             --separator=" " \
             --add-entry="# of Horizontal pixels: " \
             --add-entry="# of Vertical pixels: " \
       -     --add-entry="Frequency: ")
echo ""
echo ""
echo "horiz, vert, frequency: $hvf"

# get the modeline from gtf
modeline=$(gtf $hvf)
modeline=$(echo "$modeline" | tail -n 1)
echo "modeline = $modeline"

# strip mode name from modeline
modeline_sans_name=$(echo $modeline | awk '{$1=""; $2="";print}')
echo "modeline_sans_name = $modeline_sans_name"

# create new mode name - must be unique
hvf=($hvf)
mode=${hvf[0]}x${hvf[1]}_$(($(date +%N)/100000))
echo "mode = $mode"

# now we adapt my old xrandr_1680x1050.sh script
#xrandr --newmode 1680x1050 147.14  1680 1784 1968 2256  1050 1051 1054 1087  -HSync +Vsync
#xrandr --addmode $screen 1680x1050
#xrandr --output $screen --mode 1680x1050

# get name of screen
screen=$(xrandr | grep \ connected | awk '{print $1}')
echo "$screen"

# notify xrandr of new mode
newmode1="xrandr --newmode $mode $modeline_sans_name"
$newmode1
echo "newmode1 = $newmode1"

# made new mode accessible to $screen
newmode2=$(xrandr --addmode $screen $mode)
$newmode2
echo "newmode2 = $newmode2"

# switch to new mode
mode_switch=$(echo "xrandr --output $screen --mode $mode")
# uncomment the following line to implement resolution switching
$mode_switch
echo "mode_switch = $mode_switch"
 
Old 08-02-2017, 05:10 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,720

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
You probably can't do 320x200 because the horizontal frequency required is too low, about 15khz. 640x480 comes out around 30khz horizontal frequency, which is a minimum. Some of those old games were designed to run on the most primitive hercules video cards, and when tv type tubes (remember them?) were the order of the day, horizontal frequency was a fussy animal.
 
Old 08-02-2017, 07:39 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 7,023
Blog Entries: 4

Rep: Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687
shouldn't you be running this in dosbox anyway?
dosbox has options to scale up resolution 2x, 3x and 4x etc., with different interpolation options.
 
Old 08-11-2017, 06:48 PM   #6
Woolie Wool
LQ Newbie
 
Registered: Jul 2017
Location: Memphis, TN
Distribution: Xubuntu
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
shouldn't you be running this in dosbox anyway?
dosbox has options to scale up resolution 2x, 3x and 4x etc., with different interpolation options.
The DOS version of Descent has some nasty bugs and limitations, most notably the way homing weapon tracking changes depending on framerate. DXX-Rebirth fixes all these problems, and can be compiled with a software renderer to look like the original game without the under-the-hood problems.

But now because of the Lenovo Edge 15's networking problems I've switched to a ThinkPad T520 and it won't scale 320x200 at all, just centering the unscaled image in the middle of the screen.

Last edited by Woolie Wool; 08-11-2017 at 07:01 PM. Reason: The previously described bad scaling behavior affected Quake III Arena, not D2X-Rebirth
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: You will want to force your CPU into high performance mode for Vulkan games on Linux due to a bug LXer Syndicated Linux News 0 03-23-2017 01:32 PM
Force xorg to use vga Kjeld Flarup Linux - Kernel 3 10-04-2014 03:29 AM
Crushed-distorted terminal framebuffer font with 320x200 mode. Help Holering Linux - Desktop 2 06-18-2013 06:05 PM
My display goes to power saving mode even during games. A.K Mandriva 1 03-22-2005 10:40 AM
Can't set console display mode to anything but VGA retarded Linux - Newbie 6 05-09-2004 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration