How-To: Configure Future Pinball to play in Linux through Wine

April 2012 Update: Iain’s cracked the play-without-playfield-texture-or-don’t-play-at-all issue; the trick is to use PlayOnLinux, which forces use of Wine 1.2.2 for FP! See details in the comment here!

I used to play Visual Pinball back in the day on Windows, and when combined with PinMAME for the ROM side of things it was awesome! But when I moved to Linux the PC gaming basically stopped. However, the other day I picked up Williams Pinball Classics for the 360 – and it’s absolutely brilliant! So this got me thinking about whether Future Pinball (the newer incarnation of Visual Pinball) can run in Linux – and with some tweaking, it can!

Without the tweaks you’re likely to get two specific problems:

  • You can’t start a game (the table loads, lights flash, you can nudge the table and change the camera angles but the game just won’t start), and
  • There’s no sound.

The good news is that both of these can be fixed with a little bit of tweaking! The bad news is that unless you have a videocard with a lot of VRAM (I’m going to guess 1024MB minimum, as the issue occurs on my 512MB card under Gnome Shell) then tables which you download (but strangely not the Sci-Fi table that comes with FP) are likely to be missing the larger textures such as playfields. This is pretty odd as I can fire up FP in a XP virtual machine with 128MB of video RAM allocated (with far less performance, FPS-wise) and the textures will display without issue – they just don’t like to appear through Wine! So if this is a deal-breaker for you then you might be better off trying Future Pinball under an XP virtual machine, or calling the whole thing off. But if you want to get Future Pinball working in Linux, then we can make it happen…

Note: Wine automatically guesses the availble video RAM on your graphics card, and I’ve got to say, I have no idea if its guess is accurate. I took a look at the Wine useful registry keys and I don’t even have the direct3d key to modify the video RAM settings (because installing DirectX in Wine is considered bad-form, apparently), so I’ve no idea how to tell wine to allocate a reasonable amount of video RAM. Perhaps this will change in the future.

Step 1 – Installing Wine

To play Future Pinball you’re going to need a copy of the Wine (Wine Is Not an Emulator) “emulator”, which you can grab from your distro repositories or from WineHQ directly. So either run the following (or your distro’s equivilent package installing command) or grab it from synaptic package manager or such:

Once it’s installed, if winecfg doesn’t automatically run, launch it yourself with the command (don’t sudo this!):

Then, get it to autodetect your drives by going to the Drives tab and clicking on, you guessed it, [Autodetect], like this:

Wine configuration - detecting drives
Wine configuration - detecting drives. Your setup will obviously look a bit different depending on the drives you have mounted.

Once that’s done, click [OK] to close down Wine Configuration. By default, Wine creates a hidden folder called .wine in your home directory where it places its files, including the folder that acts as your C: drive in the folder ~/.wine/drive_c.

Step 2 – Install Future Pinball through Wine

Now we need to go and grab the Future Pinball installer from here: At the time of writing the most recent version is: FuturePinballSetup_v1.9.1.20101231.exe. Although this ships with a few demo tables (very, very barebones) you’ll want at least one table to play, so snag a copy of the Sci-Fi Table installer as well from here:

Once these are downloaded, navigate to the directory you downloaded them to from the commandline and run:

Accept the licence, click Next/Next/Finish etc. and that’s done. Future Pinball will now be installed in ~/.wine/drive_c/Games/Future Pinball.

Now install the the Sci-Fi table by running:

You’ll want to change the installation directory from the default of C:\Program Files\Future Pinball to C:\Games\Future Pinball during the install wizard for this. Don’t bother creating a Tables folder though, as the table itself contains a top-level Tables folder – so just pointing it at C:\Games\Future Pinball will be fine.

Step 3 – Configuration and Tweaking

By default, Wine will attempt to run things as Windows XP (as opposed to 2000, or ME, or Vista or 7 etc). This is fine, but as things stand we’re still not going to be able to play any pinball just yet because Future Pinball itself wants to run as Administrator when running in Windows… but we don’t have a Windows Administrator account (in fact, this same issue appears when running FP in Windows natively – if you don’t “Run As Administrator” it, you can’t start a game) – and unfortunately no, sudo won’t cut it ;) So next we need to workaround this by adding a dll and telling Wine to prefer it.

To do this, download the file: oleaut32.dll and place it in your ~/.wine/drive_c/Games/Future\ Pinball/ folder, then run winecfg again. This time you should see “Future Pinball.exe” in the applications pane of the Applications tab – so click on it to select it:

Wine - Select Future Pinball Application

Now click on the Libraries tab, then on the New Overide for Library dropdown. Find the listing for the file oleaut32, click on it then click [Add] (you can leave the default settings as “native, builtin”. With that done, you should see something like this:

Wine - Future Pinball DLL Override

With the new DLL taking precedence over the Wine built-in we’ll be able to start a game of pinball, so just hit [OK] to save and close the Wine configuration settings and we’re ready to get our flippers on =D

Step 4 – Launch without PulseAudio

Wine doesn’t natively support PulseAudio, although it’s fine with Alsa. So to play with sound we’ll need to bypass PulseAudio with the pasuspender util. To do this, all we have to do is launch Future Pinball like this:

With that done, just press F4 to bring up the table selection window and you should see something like this:
Future Pinball - Table Select

Now click on [Load and Play Table] and we’re good to go.

Step 5 – Play a Mean Pinball

Future Pinball is like an arcade emulator, so you have to “insert a coin” before you can play. The main keys are:

  • 5/6/7/8 – Insert coin for player 1/2/3/4 respectively
  • 1/2/3/4 – Start 1/2/3/4 player game
  • Enter – Launch ball (i.e. shoot ball w/ plunger to start game)
  • Left/Right shift – Left/Right flippers
  • Space – Nudge table
  • F1-F8 – Different camera views
  • F9 – show stats (fps etc.)

So to start a single player game you might press 5 to insert a coin, 1 to start a 1 player game, then Enter to launch the ball – and you’re off! This isn’t my video, and it’s prolly not running on Linux, but this is the kind of stuff FP is capable of:

6 – Cleaning up

FP doesn’t close down cleanly in Wine, so you have to assist it with a bit o’ the old kill -9 ;)

Update: FP will close down properly on Wine 1.5 onwards, so you won’t need to perform these steps. When I originally wrote this I was using Wine 1.3.something.

To find the process ID (PID) run:

Then to kill the pasuspender/Wine process, enter:

So in the above, I’d run:

This will get rid of all wine processes so that after a few seconds when you run ps -ef | grep wine you only see this:

And on the off-chance that pulseaudio stops working, just run the following and it’ll restart for you:

Many thanks to Christopher Leatherly and everyone who had a hand in Future Pinball for its existence, to Mahen for his posts on the WineHQ Future Pinball entry for the fixes needed to get everything running, and to everyone who’s worked on Wine =D


Final Technical Notes

I did try to install FP through the fpwine FP installer script, but it’s legacy because some of the wine options called are deprecated, so I found a modification of the script on, which with suitable tweaking (DCOM98.EXE would throw a fit on install) would install FP into its own ~/.fpwine “shell” but although that added overrides for the oleaut32.dll, ole32.dll, rsaenh.dll and crypt.dll, I still couldn’t get all the textures working in downloaded tables (which would work fine in an XP virtual machine). If I could specify how much VRAM I had to Wine, I think the issue would be solved.

Also, a workaround to minimise VRAM is to disable loading the textures into the editor (available in FP from Preferences | Editor Options…) – but at least for me, it doesn’t minimise VRAM usage enough. And if you’re trying to minimise VRAM and get textures working you’ll probably want to enable non-power-of-2 textures (Preferences | Video / Rendering Options…), try starting tables off at minimum detail settings (i.e. no High Quality textures), and re-start Wine/FP between table reloads as alledgedly it leaks memory (including VRAM), which is only going to make things worse each table you load.

Finally, the fpwine script likes to install version 5.6 of VBScript (vbs56men.exe), which I found completely knackered the table scripts, so I’ve found its best to avoid installing it and leave Wine alone with its own VBScript functionality.

I’m -sure- this is all doable somehow… I just haven’t managed to crack it yet, and it might be the case that Wine needs further work before it can be cracked at all.

The Sci-Fi table works perfectly, but it still feels like 4th and inches to get everthing working 100%…

An introduction to ActionScript 3.0 – Week 9 – Sound

In the final week of the ActionScript intro we get into using sounds with ActionScript, and play audio which is external to our flash file(s), embedded within our flash files as well as covering topics like offsetting and repeating. We also create our own custom pause function (because weirdly, the functionality isn’t natively available).

Flash Sound Document

This wraps up all the ActionScript stuff I taught over a brief course about a year ago, and I’ve got to say, I didn’t mind ActionScript 3 as a language at all. You can do a lot of nice bits and pieces with it which can be embedded directly on the web, or you can use it for some quick prototyping (although if you were prototyping some serious effects, you’d probably be more likely to do so in the processing language), so yeah. Glad I spent a month or so getting my head around it.

Download link: An Introduction to ActionScript 3.0 – Week 9
Audience: Beginners who know a little about variables, functions, objects and how to perform some basic programming math.
Format: PDF
Content License: The document, its contents and the provided source code are released under a creative commons non-commercial attribution share-alike 3.0 license by me (r3dux) and comes with no guarantee of correctness, fitness for purpose or anything of the sort. The audio samples used are the property of their respective owners and are used under a fair-use type of deal.

If you’ve followed the series of posts over time, or just stumbled across one week’s worth of notes and found it useful, then I’m happy I went to the effort – and if you’ve learnt something from them then even better ;)


How To: Fix Broken Sound in ScummVM under Linux

I’m running Ubuntu 9.10 64-bit, and thought I’d have a look at some old LucasArts gems today – but the version of ScummVM taken from the repos wouldn’t play any sound. So I fixed it.

  • The all-in-one complete fix:
    Fire up synaptic and install libsdl1.2debian-pulseaudio then reboot. Sound (i.e. voice, samples etc) and midi should work absolutely fine now. A potential problem with this fix is that it means you have to uninstall libsdl1.2debian-alsa, which it’s possible you might want to keep. This is the route I finally took, but if I find a bunch of apps are now without sound, I’ll update the post and try to find some other methods.
  • Oh, and if you loose all sound after this (YouTube, Totem etc), then you’ve probably got gstreamer set to use ALSA, but have now removed the sdl-alsa lib, so just run gstreamer-properties and point your audio output to PulseAudio Sound Server then log out then back in. Fixed.

    Update: Although working yesterday, I found I had no sound in flash stuff today (YouTube vids etc), so I installed padevchooser from synaptic, which dragged in a couple of other pulseaudio bits and pieces, launched padevchooser, and then from the icon in the system tray (top-right in Gnome) I just selected Default for Default Server and Default Sink – closed then re-opened firefox and everything’s working again. I guess I didn’t come across this yesterday because I already had Firefox open and using flash (npviewer.bin) with the ALSA plugin already resident in memory and in use.

  • The easy fix to get midi working using ALSA:
    Try running ScummVM from the terminal as pasuspender scummvm – if you can hear midi sound when you start a game, that’s half the battle.
  • The slightly more involved midi fix:
    If the easy fix doesn’t work, grab yourself a midi file from somewhere (like this one) and play it from the terminal with timidity name-of-file.mid. If it plays, jolly good. If not, have you got timidity installed? If you have, and still can’t play a midi, read this.

    I’ll assume you can play a basic midi file from the terminal, but there’s no midi in ScummVM games (which was the situation I was in). So, first we need to find out where our midi ports are at – to do this, run the following line from the terminal: aconnect -o -l

    The output I get is:

    Midi in ScummVM wants to play on ports 17 or 65 by default, but on my box we can see that port 128 (i.e. client 128) is where the user-land midi ports are at. So now we need to modify the ScummVM config file with that data. So open up the file ~/.scummvmrc with your text editor of choice and add the line alsa_port=128:0 (or whatever your user-land aconnect -o -l output is), or if the line already exists just amend it to point at your midi port.

  • Give ScummVM another go (from the terminal so you can see its output), point the Music driver device at ALSA or Timidity now, and you should at least get midi sound, and see something like the following in the terminal output:

    Really though, I think the first option is the best, as I’ve not been able to get voice/samples working with anything other than installing the pulseaudio sdl library. I’ve just put the other options in incase you’ve a strong case against getting rid of libsdl1.2debian-alsa, and if I find there’s one in my case, I’ll come back and update things. But for now, I think I might have a crack at The Dig :)

How To: Fix Broken Sound in Totem on Jaunty 9.04

I un-installed ALSA and re-installed a diff version the other day, and somehow managed to lose sound in totem (i.e. movie player) in Ubuntu 9.04. Sound and video was fine in VLC (VideoLan), music played fine in RhythmBox… just no music or sound to avi’s in totem. Anyways, fixed it tonight – here’s how:

Run gstreamer-properties and change your audiosink to ALSA (assuming you’re using ALSA) or whatever you plan on using that works in other apps like this:


Then, open up gconf-editor and change the keys shown in the pic below to alsasink from whatever bastardised string it’s currently at:


And if all that doesn’t work (which it did for me) – try getting totem-xine or using VLC instead ;)

Comments always welcome if this does/doesn’t work for you.

How To: Get Sound Working in Windows 7 64-Bit running in VirtualBox

I’m running Ubuntu 9.04 64-bit, and messing around with Windows 7 RC 64-bit as a guest OS in virtual box – but, alas, no sound in Windows…

The fix? Set the virtual machine to use the ICH AC97 virtual soundcard then google for and install it inside the virtual box running Windows 7. Annoying start-up sounds are now yours to disable treasure.

Next up will be hardware accelerated graphics – works fine in a 32-bit XP guest OS, no joy in 64-bit Win7 so far…