First things first: I copied over a previously installed Starcraft folder from Windows. Version 1.16.1 is required. From the Starcraft CD (or ISO), copy install.exe to your Starcraft folder and rename it StarCraft.mpq. From the Broodwar CD (or ISO) copy the install.exe to your Starcraft folder and rename to BroodWar.mpq. This does away with the CD check (this is officially supported by Blizzard: see patch notes at https://liquipedia.net/starcraft/Patche ... tch_1.15.2 . Note that the NoCD applies to 1.15.2 and up, we will be running 1.16.1)
From there install Wine.
Code: Select all
sudo apt-get install wine
from https://notaz.gp2x.de/misc/starec/ download libscr.tar.xz and extract the contents to your Starcraft directory. Per the directions in libscr.txt you can now run Starcraft by opening lxterminal (or whatever) and switching to your Starcraft directory, then running
That's it. Much easier not having to compile a tweaked Wine, and/or a 3G/1G kernel.
Code: Select all
LD_LIBRARY_PATH=. setarch linux32 -L wine libscr_sa_arm.exe.so
If you are using a 4:3 monitor, or are fine with your 4:3 game being stretched to fill a 16:9 monitor, you are done. If you have 16:9 monitor and prefer to keep the original aspect ratio, things get a little more involved. I ended up using xrandr. This script will display Starcraft fullscreen, centered and pillarboxed (black bars on the sides) to maintain the correct aspect ratio:
Explanation: xrandr --output $vga --mode 640x480 --panning 640x480 --transform 1.33333333,0,-107,0,1,0,0,0,1 places your fullscreen 640x480 window in the center of your monitor, pillarboxed. The right side unfortunately shows stuff from your desktop (wallpaper, open windows) rather than blacking things out like the left side does. So the script above uses python to create a fullscreen black window (the lines between the EOFs are python, see https://en.wikipedia.org/wiki/Here_document). It only needs to be large enough to cover the 854×480 of your fullscreen 480p resolution, but I make it large enough to cover my 2560x1440 monitor to hide some of the xrandr transitions. You can edit window.resize(width,height) to whatever you want, having it be at least 884x510. The PID of the python process that created it is saved for later. After a brief pause (.1 wasn't long enough, .2 was. .3 to be safe) xrandr then gives us our Starcraft resolution. Game is run, then when it exits, xrandr resets us to our old resolution, and the black background window is closed using the stored PID. If anyone has a better way to do this I'd love to hear it
Code: Select all
#!/bin/bash cd "$(dirname "$0")" vga=`xrandr | grep -P " connected (primary )?\d+" | sed -e "s/\(\w\+\) .*/\1/"` res=640x480 && off=107 python - << EOF& import gtk def create_window(): window = gtk.Window() window.set_title('sc_bg') window.set_default_size(200, 200) window.connect('destroy', gtk.main_quit) color = gtk.gdk.color_parse(str('#000000')) window.modify_bg(gtk.STATE_NORMAL, color) window.set_decorated(False) window.show() window.move(-30, -30) window.resize(2590, 1470) create_window() gtk.main() EOF echo $! > /tmp/sc_bg.pid sleep 0.3 xrandr --output $vga --mode $res --panning $res --transform 1.33333333,0,-$off,0,1,0,0,0,1 LD_LIBRARY_PATH=. setarch linux32 -L wine libscr_sa_arm.exe.so xrandr --output $vga --auto --panning 0x0 --scale 1x1 if [[ -e /tmp/sc_bg.pid ]]; then kill `cat /tmp/sc_bg.pid` rm /tmp/sc_bg.pid fi
Things run full speed, up to x16 playback in replays. Also in game, the Speed Settings menu has an Enable CPU throttle setting. Check it to prevent Starcraft from using 100% of a core when it doesn't need to.
Create a menu entry for it with Main Menu, preferences, Main Menu Editor. New Item with name Starcraft (or whatever) and for the command, browse to and select the script from before and use an image of your choice for the icon. Works seamlessly here!