Social

Recent Games

Contact
This form does not yet contain any fields.
    « MKMapView is a Naughty Minx | Main | Oh no you didn't VoiceOver »
    Wednesday
    Mar072012

    Legally Getting and Running X-Com UFO Defense on OS X

    I've been reading a bit about the upcoming Firaxis XCom update and I've been getting a hankering to play the original X-Com. Well, I played it on the Playstation 1, I don't know if I have the disc anymore and even if I do, that's going to be annoying. I had a mouse for the original PS1, but who knows where that is, and who knows if I can even connect it to my PS3. I don't think I've got anything to connect a PS1/PS2 controller to my the PS3. (I know I did have a gizmo for moving Memory Cards over but I don't recall if it had a controller port.) And even if I got a mouse to work somehow … I don't want to play it in my living room with a mouse on the coffee table.

    Anyway, a big hat tip here to my friend Tony who had mentioned to me at some point in the past that if you buy X-Com on Steam that it just ships inside an open source project called DOSBox. And you can download a version of DOSBox for OS X. So this morning while I was watching the Apple liveblogs I did all this. It works, but there are a few tweaks I had to make to make things convenient. Here's what you do.

    1. Buy X-Com on Steam. You can get the first game for $5 or a whole bunch of them for $15. I don't know if you can actually do this from the Mac Steam client, I did it in a Windows 7 virtual machine.
    2. Install DOSBox. Download it, and then put DOSBox.app in your Applications folder.
    3. Copy the files from Windows to somewhere useful on your Mac. I made a DOSBox folder in my Documents, but wherever works for you. Assuming your Steam is working in the default place you want to copy the folder C:\Program Files\Steam\Steamapps\common\XCom UFO Defense.
    4. When you get into DOS that long file name is going to be a pain. I renamed the folder to just XCom – so I have ~/Documents/DOSBox/XCom.
    5. At this point you could just run DOSBox manually, mount the folder, and run the stuff, but there's a better way and that involves a dosbox.conf file. The folder already contains one but you need to pass that to dosbox, and that's a pain as well. Here's the whole command that I use:
      /Applications/DOSBox.app/contents/macos/dosbox -conf /Users/tsanders/Documents/DOSBox/XCom/dosbox.conf
    6. This file didn't completely work for me. There was something not right about fullscreen mode but I didn't want the app in fullscreen on my 27" monitor anyway. The conf file also defaults to a 2x interpolation and I wanted to use the 3x. Lastly the volume was way too loud for me. So here's a list of changes I made:
      • Comment out fullscreen=true (so #fullscreen=true)
      • Change scaler=advinterp2x to scaler=advinterp3x
      • At the bottom in the [autoexec] section change the mount command to the proper path. Mine is mount c /Users/tsanders/Documents/DOSBox/XCom -freesize 1024
      • Add the line "mixer master 25:25" to set the volume levels 25% of maximum
    7. OK, so far so good but that command line is a pain in the rear to enter. That's easy to fix! Run Automator, select the Application type, then in Utilities pick a "Run Shell Script" action. Paste the command over the line that says "cat". You probably don't want Automator to wait for the command to complete, so be sure to add " &" at the end of the line.
      /Applications/DOSBox.app/contents/macos/dosbox -conf /Users/tsanders/Documents/DOSBox/XCom/dosbox.conf &
    8. Save the resulting Automator action in your Applications folder and you're done!
    9. Optional bonus step: Go to images.google.com and get a nice icon image - I just looked for "x-com ufo defense box". Find the app you made in the last step, select it in the Finder and hit cmd-I. In the info window that comes up you can select the icon (it should be the little Automator robot) and just paste an image from the clipboard.

    At this point you have an icon in Finder you can double-click, or something you can launch from Spotlight. No more opening Terminal, navigating to the proper directory, or remembering the syntax of the DOSBox commands. Pretty cool.

    In theory this ought to work for a large number of DOS games. Of course, the devil is really in figuring out the proper settings for that DOSBox config file. That's where the cool part is that the Steam file is already mostly correctly configured. (I didn't chase the fullscreen problem but I suspect it's related to having two monitors, it might work fine with a single monitor.)

    Edited to add March 7, 2012 10:21 PM:When I was working on this I had Automator open and I didn't notice this but the first version of the Automator app continued to run until I quit the game, resulting in a turning gear icon in the menubar. The fix is simple: just put the command line into the background with a simple & at the end. I adjusted step 7 to reflect this.

    Reader Comments (8)

    Wait, was the PS1 version of X-COM the first time you played the game?
    March 7, 2012 | Unregistered CommenterTony
    Yeah it was. I'm pretty sure you knew that at the time but it's been a while since then :-)
    March 7, 2012 | Registered CommenterTimothy Sanders
    Thanks for the instructions on setting up an Automator-based launcher. It works great.

    I've played with this a bit on my MacBook Pro and decided that I want to run in full-screen mode. To do so, I had to change:

    fullscreen=true
    output=opengl
    scaler=normal3x

    The "advinterp" scaling would crash on my machine when using output=opengl. But I don't think I liked the look of that scaler output anyway. Give me my pixelated DOS graphics without any fake smoothiness!
    March 7, 2012 | Unregistered CommenterTony
    Interesting. Did you try any of the other scalers? http://www.dosbox.com/wiki/Scaler lists several choices. I'm pretty sure I don't want full screen on my Mac Pro but I might try using opengl just to see if I can get fullscreen working.
    March 7, 2012 | Registered CommenterTimothy Sanders
    (Well, I had this response all typed up and hit "Create Post", but then I think I forgot to respond to the stupid "captcha" (or WhateverTF) and it didn't actually get posted. Is there some way to not go through that craziness, or would that require actual login accounts that I think you said you disabled? Anyway, blargh to captcha.)

    I tried scaler=hq2x/3x in addition to the advinterp ones, but those also crashed with output=opengl, fullscreen=true. I didn't try any of the others, except scaler=none, which worked fine. But then I had X-COM running in a tiny portion of my "full screen". That didn't seem super helpful.

    I decided I didn't like the way the advinterp scaler worked (when windowed) anyway, because it made all of the text look rounded, as though it were drawn using some weird bubble font. And that's just not X-COMmy.

    Now, I just have to figure out how I'm going to fit X-COM into my over-crowded schedule.
    March 10, 2012 | Unregistered CommenterTony
    Re: comments and accounts. Yes sorta. I can create an account for you and I suspect that will remove the Captcha (I don't have one when I post comments.) However, the only package that lets *you* sign up for an account is $40/month which is considerably more than I'm paying now. Given that I only have a handful of people who might ever comment perhaps I'll just give out accounts manually. You're the first person to complain, but there hasn't been a ton of commenting since I switched to Squarespace and maybe that's the problem. Check your email in a few minutes and we'll try giving you an account.
    March 10, 2012 | Registered CommenterTimothy Sanders
    test
    March 10, 2012 | Registered CommenterTony Wetmore
    Okay, I've logged in now and was able to post without Captcha. Yay!
    March 10, 2012 | Registered CommenterTony Wetmore

    PostPost a New Comment

    Enter your information below to add a new comment.

    My response is on my own website »
    Author Email (optional):
    Author URL (optional):
    Post:
     
    All HTML will be escaped. Hyperlinks will be created for URLs automatically.