Page 1 of 5 123 ... LastLast
Results 1 to 10 of 48

Thread: Pimping StarCraft on a Widescreen Display

  1. #1
    Join Date
    Jun 2008
    Beans
    8

    Smile Pimping StarCraft on a Widescreen Display

    if any of you have ever tried running StarCraft on a widescreen display, you'll know what I'm talking about. Either you can run Starcraft in windowed mode, and be forced to squint at the 640x480 display, or you can try and play in fullscreen mode, without the bottom third of your screen.
    Here I show the ordinary user how to play StarCraft the way it was meant to be played.

    The secret to having StarCraft play in fullscreen mode, is X. If you start StarCraft in a custom XServer with its own resolution, you can get it to display the full screen.

    Open /etc/X11/xorg.conf in your favorite editor, and add the follow lines:
    Code:
    Section "ServerLayout"
        Identifier     "SCLayout"
        Screen      0  "StarCraft Screen"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
    EndSection
    
    Section "Screen"
    	Identifier     "StarCraft Screen"
    	Device         "Device0"
        Monitor        "StarCraft Monitor"
        DefaultDepth    24
        SubSection     "Display"
            Virtual     640 480
            Depth       24
            Modes      "640x480@60" "1280x800@50"
        EndSubSection
    EndSection
    
    Section "Monitor"
        Identifier     "StarCraft Monitor"
        VendorName     "Plug 'n' Play"
        ModelName      "Plug 'n' Play"
        Gamma           1
        ModeLine       "640x480@60" 25.2 640 656 752 800 480 490 492 525  -hsync -vsync
    EndSection
    KeyBoard0 is your keyboard, Device0 is your graphics card, and Mouse0 is your mouse. You should replace these values with the actual values from your xorg.conf

    Next, we must change a line of /etc/X11/Xwrapper.config:
    change the line
    Code:
    allowed_users=console
    to:
    Code:
    allowed_users=anybody
    this allows anybody to start a new Xserver, even from within an xserver. This shouldn't be a security flaw, unless your running a mainframe with thinside clients, but then you probably wouldn't be try to play StarCraft, would you?
    Next, create a text file called scstart. Paste the following in:
    Code:
    #!/bin/sh
    X :1 -layout SCLayout -ac &
    XPID=$!
    sleep 2
    DISPLAY=:1 wine $HOME/.wine/drive_c/\
    Program/Files/Starcraft/StarCraft.exe -- /usr/bin/X :1 -layout SCLayout 
    sleep 1
    kill $XPID
    This is the basic launcher for StarCraft. Later on, I'll show you how to pimp it for extra features, but this is the basic launcher.
    If you want to switch back to your desktop in the midst of a zerg rush, you can press Ctrl + Alt + F7. To switch back, press Ctrl + Alt + F8.


    This is a pretty basic launcher. You'll notice on glaring problem when using this, though. You can't change the volume. The program that handles you pushing the volume buttons is a part of Gnome, and we didn't launch that. Fortunately there is a way around the problem.
    install the xbindkeys package:
    Code:
    sudo apt-get install xbindkeys
    xbindkeys is a nifty little program. It binds specific keys or key codes to commands. I'll show you how to set it up.
    Start by creating a default config file.
    Code:
    xbindkeys --defaults > .scbind
    We are going to tell xbindkeys to use a custom config file, so if you ever decide to use xbindkeys for some other purpose, you can keep your StarCraft commands separate.
    Now we have to determine what the key codes for the volume keys are. Gnome sometimes messes with the keycodes, especially for volume control, so to be extra safe, we are going to find our keycodes from a recovery console. Logout, change the session type to recovery console, and log back in. You will be presented with a console in the lower righthand corner. To type in it, your mouse must be over the terminal. Type in:
    Code:
    xbindkeys -f $HOME/.scbind -mk
    Now press the key combos for volume up, volume down, and mute/unmute. xbindkeys should reply saying something like:
    Code:
    Press combination of keys or/and click under the window.
    You can use one of the two lines after "NoCommand"
    in $HOME/.xbindkeysrc to bind a key.
    
    --- Press "q" to stop. ---
    "(Scheme function)"
        m:0x0 + c:160
    the last line is the important one. It is the keycode for whatever key you just pressed (In my case, mute/unmute). Open up .scbind, and add following lines:
    Code:
    "amixer set Master toggle"
    (mute/unmute keycode)
    "amixer set Master 6+"
    (volume up keycode)
    "amixer set Master 6-"
    (volume down keycode)
    where the stuff in the parentheses are the keycodes xbindkeys returned.
    Now add the following line to scstart under "sleep 2":
    Code:
    xbindkeys --display :1 -f $HOME/.scbind
    There you have it! Volume control for StarCraft. The xbindkeys program is extremely powerful. With a little extra effort, you could have media player controls in StarCraft, this is left as an excercise to the reader (Always wanted to say that! ), while the idea of launching a program in a separate X Server could be applied to any troublesome game.


    So long and thanks for all the fish!

  2. #2
    Join Date
    Aug 2006
    Location
    Columbia, MD
    Beans
    698
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Pimping StarCraft on a Widescreen Display

    Thanks for the post. This can be very useful for many other things as well.

    How bad does this mess with Hardy's minimal xorg.conf files?
    Linux User #471253
    ----
    Sign the Itunes on Linux petition now!

  3. #3
    Join Date
    Jul 2008
    Beans
    1

    Re: Pimping StarCraft on a Widescreen Display

    Hey Calfreak,

    I like your writeup and I think i can do it, except for the fact that I can't find the first part.

    Open /etc/X11/xorg.conf in your favorite editor, and add the follow lines

    I am using a Toshiba Laptop, and it runs in that tiny window surrounded by black, and I can't get it to work either, can you explain it more in depth for us slowbies?

    PM, or email is fine, NelsAV@gmail.com

    Thanks bud

  4. #4
    Join Date
    Jul 2007
    Location
    The U. S. of A.
    Beans
    163
    Distro
    Kubuntu Development Release

    Re: Pimping StarCraft on a Widescreen Display

    I know it's possible to force widescreen in Warcraft III by hacking the registry settings, maybe Starcraft has similar settings.

    Here's a link:
    Linkity-Link

    Best of luck!
    || Kubuntu x86_64 (15.10 Dev.) || KDE 4.9.00 ||
    || Dell Inspiron 570 || 8GB PC3-10600 DDR3 RAM || AMD Phenom II X4 820 @ 2.8Ghz ||
    || Logitech M570 Trackball || Logitech G15 Gaming Keyboard ||
    Conky: ... no such configuration: 'normal'

  5. #5
    Join Date
    Jul 2007
    Beans
    20
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Pimping StarCraft on a Widescreen Display

    Nope, unfortunately SC has no such registry hacks, 640x480 or nothing. Thank you very much for this write up though, you have made a SC fan very happy

  6. #6
    Join Date
    Dec 2008
    Beans
    1

    Cool Re: Pimping StarCraft on a Widescreen Display

    I tried the solution and it worked, except for the fact that the top and bottom of the screen was still off by a total of a inch. The width is full screen; if I move my mouse near the top or bottom it scrolls, so the problem is getting the window to resize to 640x480.

    I'm thinking that it may have to do with my Nvidia video driver having resolution auto-detect capabilities, and my T61 laptop monitor being a widescreen with a 1440x900 native resolution.

    I'm pasting the terminal output XRandR errors I got when running the script below:
    Code:
    This is a pre-release version of the X server from The X.Org Foundation.
    It is not supported in any way.
    Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
    Select the "xorg" product for bugs you find in this release.
    Before reporting bugs in pre-release versions please check the
    latest version in the X.Org Foundation git repository.
    See http://wiki.x.org/wiki/GitPage for git access instructions.
    
    X.Org X Server 1.4.0.90
    Release Date: 5 September 2007
    X Protocol Version 11, Revision 0
    Build Operating System: Linux Ubuntu (xorg-server 2:1.4.1~git20080131-1ubuntu9.2)
    Current Operating System: Linux JM-laptop 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686
    Build Date: 13 June 2008  01:08:21AM
     
    	Before reporting problems, check http://wiki.x.org
    	to make sure that you have the latest version.
    Module Loader present
    Markers: (--) probed, (**) from config file, (==) default setting,
    	(++) from command line, (!!) notice, (II) informational,
    	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.1.log", Time: Thu Dec 18 21:22:14 2008
    (==) Using config file: "/etc/X11/xorg.conf"
    (II) Module "ramdac" already built-in
    expected keysym, got XF86KbdLightOnOff: line 70 of pc
    expected keysym, got XF86KbdBrightnessDown: line 71 of pc
    expected keysym, got XF86KbdBrightnessUp: line 72 of pc
    expected keysym, got XF86KbdLightOnOff: line 70 of pc
    expected keysym, got XF86KbdBrightnessDown: line 71 of pc
    expected keysym, got XF86KbdBrightnessUp: line 72 of pc
    fixme:advapi:SetSecurityInfo stub
    fixme:d3d:IWineD3DImpl_FillGLCaps OpenGL implementation supports 32 vertex samplers and 32 total samplers
    fixme:d3d:IWineD3DImpl_FillGLCaps Expected vertex samplers + MAX_TEXTURES(=8) > combined_samplers
    fixme:win:EnumDisplayDevicesW ((null),0,0x32f410,0x00000000), stub!
    fixme:xrandr:X11DRV_XRandR_SetCurrentMode Cannot change screen BPP from 32 to 8

  7. #7
    Join Date
    Jul 2007
    Beans
    18

    Question Re: Pimping StarCraft on a Widescreen Display

    Hello, your solution seems very interesting; I tried to implement it but ran into this problem:

    Code:
    X.Org X Server 1.5.2
    Release Date: 10 October 2008
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.24-23-xen i686 Ubuntu
    Current Operating System: Linux raziel 2.6.28-8-generic #24-Ubuntu SMP Wed Feb 18 18:48:55 UTC 2009 i686                                                            
    Build Date: 29 January 2009  07:43:28PM                                           
    xorg-server 2:1.5.2-2ubuntu3.00~ppa1 (buildd@rothera.buildd)                      
            Before reporting problems, check http://wiki.x.org                        
            to make sure that you have the latest version.                            
    Module Loader present                                                             
    Markers: (--) probed, (**) from config file, (==) default setting,                
            (++) from command line, (!!) notice, (II) informational,                  
            (WW) warning, (EE) error, (NI) not implemented, (??) unknown.             
    (==) Log file: "/var/log/Xorg.1.log", Time: Sat Feb 21 15:41:38 2009              
    (==) Using config file: "/etc/X11/xorg.conf"                                      
      XRANDR name: VGA-0                                                              
      Connector: VGA                                                                  
      CRT1: INTERNAL_DAC1                                                             
      DDC reg: 0x60                                                                   
      XRANDR name: DVI-0                                                              
      Connector: DVI-D                                                                
      DFP1: INTERNAL_TMDS1                                                            
      DDC reg: 0x64                                                                   
      XRANDR name: LVDS                                                               
      Connector: LVDS                                                                 
      LCD1: INTERNAL_LVDS                                                             
      DDC reg: 0x0                                                                    
    finished output detect: 0
    finished output detect: 1
    finished output detect: 2
    finished all detect
    before xf86InitialConfiguration
    (EE) RADEON(0): Output LVDS enabled but has no modes
    (EE) RADEON(0): No valid modes.
    (EE) Screen(s) found, but none have a usable configuration.
    
    Fatal server error:
    no screens found
    system.reg is not a valid registry file
    userdef.reg is not a valid registry file
    user.reg is not a valid registry file
    wine: could not load L"C:\\windows\\system32\\wine.exe": Module not found
    kill: 9: No such process
    Any ideas why?

  8. #8
    Join Date
    Apr 2007
    Location
    ニッポ&
    Beans
    719
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Pimping StarCraft on a Widescreen Display

    Awesome. I have to give this a tried. Could you upload a screen shot or upload a video of it in action? Thanks

    Sugi

    PS: I'll get back to you on the results of this HOWTO runing on my computer.
    WINE: Super Meat Boy // Far Cry 2 // Lineage 2
    VirtualBox: Snapshots // OSE Issues
    アンディモリを聞いてください。

  9. #9
    Join Date
    Mar 2008
    Beans
    523
    Distro
    Ubuntu Development Release

    Re: Pimping StarCraft on a Widescreen Display

    This definitely does NOT work on 8.10

    The principle is sound, but the in 8.10 the xorg.conf file is mostly empty because the latest version of the xorg server auto-detects almost everything on the fly.

    When I try this in 8.10, the new x server launches just long enough for me to see the plain gray background and the x cursor in the center of the screen, then crashes out.

    restarting x after attempting to apply the settings above, causes my regular desktop to load up at 640x480. No good.

    I 'think' that you would need to explicitly list all of the settings for your default x server AND the settings for your custom server, and then make sure that the right one is launched on boot-up.

    Unfortunately, I have no idea how to do that.

    Any suggestions?

    My particular monitor is a 1440x900 50hz LCD.

  10. #10
    Join Date
    Jan 2008
    Beans
    64

    Re: Pimping StarCraft on a Widescreen Display

    This however DOES work on 9.04. I have the video working without an issue but im running into the issue of no sound. Im gonna try the sound keybinds mentioned and see if that helps the sound issue.

    update: this doesnt seem to help the sound issue. Im betting it has something to do with pulseaudio... perhaps pulse isnt operating in the new environment?
    Last edited by gotsanity; April 22nd, 2009 at 10:07 PM. Reason: update:

Page 1 of 5 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •