r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

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

r3dux | February 11, 2012

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:

sudo apt-get install wine

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

winecfg

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: http://www.futurepinball.com/download.html. 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: http://www.futurepinball.com/downloads/Sci-Fi%20Classic.exe.

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

wine ./FuturePinballSetup_v1.9.1.20101231.exe

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:

wine ./Sci-Fi\ Classic.exe

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:

pasuspender wine ~/.wine/drive_c/Games/Future\ Pinball/Future\ Pinball.exe

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:

YouTube Preview Image

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 ;)

To find the process ID (PID) run:

r3dux@r3d-laptop:~$ ps -ef | grep wine
r3dux    11553  2721  0 09:38 pts/0    00:00:00 pasuspender wine /home/r3dux/.wine/drive_c/Games/Future Pinball/Future Pinball.exe
r3dux    11554 11553 51 09:38 pts/0    00:03:40 /home/r3dux/.wine/drive_c/Games/Future Pinball/Future Pinball.exe                                      
r3dux    11557     1  0 09:38 ?        00:00:02 /usr/bin/wineserver
r3dux    11563 11561  0 09:38 ?        00:00:00 C:\windows\system32\winedevice.exe MountMgr                                      
r3dux    11661  2721  0 09:45 pts/0    00:00:00 grep wine

Then to kill the pasuspender/Wine process, enter:

sudo kill -9 <PID-of-pasuspender-process>

So in the above, I’d run:

sudo kill -9 11553

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:

r3dux@r3d-laptop:~$ ps -ef | grep wine
r3dux    11669  2721  0 09:47 pts/0    00:00:00 grep wine

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

pulseaudio -k

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

Cheers!

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 ubuntuforums-fr.org, 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%…

Comments
No Comments »
Categories
Gaming, How-To, Linux
Tags
Emulator, Error, Future Pinball, Glitch, Linux, Pinball, Sound, Texture, wine
Comments rss Comments rss
Trackback Trackback

How To: Partially workaround Adobe Flash plugin issues on Linux

r3dux | December 28, 2011

Flash on Linux has always been a mess, especially on 64-bit, so when I upgraded my flash plugin the other day to the latest 11.2 beta I wasn’t in the least bit surprised when it broke. This time, watching videos with people in them had the people looking like they were from Avatar – all the skin was blue, and in general the colours were well off. For example:

Flash Red/Pink Colour Issue

Flash being, well, Flash...

To fix this up, you need to twiddle with the flash settings at /etc/adobe/mms.cfg, or if you wanted to, do the twiddling through the Flash-Aid plugin like below (in my final working config I actually use the top option of GPU validation as enabled and disable VDPAU):

Flash Plugin Acceleration Options

Flash Plugin Acceleration Options

Once that’s done, restart your browser and hey-presto – correct colours in Youtube:

Flash Colours Restored

Flash Colours Restored

You may have to turn on or off some combination for it to work with your particular machine in a trial & error style, because what might work in YouTube might crash when using other flash video sites (vimeo, gametrailers etc). After some playing around, I’ve decided to live with the bad youtube colours and use the following settings in the /etc/adobe/mms.cfg config file:

$ cat /etc/adobe/mms.cfg 
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0

And as I’m a curious lad, I thought I’d make a table of what works and what doesn’t (on my setup – LMDE w/ NVidia 290 drivers):

Firefox 5.0
Settings YouTube Vimeo GameTrailers
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=1
Works Crashes plugin Crashes plugin
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0
Bad Colours Works Works
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=1
Works Crashes browser Crashes browser
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=0
Bad Colours Works Works


Chrome 16.0.912.63
Settings YouTube Vimeo GameTrailers
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=1
Crashes plugin Crashes plugin Crashes plugin
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0
Bad Colours Works Works
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=1
Crashes tab Crashes tab Crashes tab
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=0
Bad colours Works Works

Looks like there’s no clear winner that works for everything… Oh wells, there’s a good write-up with alternate solutions and things over on WebUpd8 here – even though they talk about flash 10.2 on Ubuntu, this is the first time I’ve had this issue and it’s on LMDE (Debian based) with the flash 11.2 beta and the same fixes work here. I guess if you’re that bothered, you could always downgrade to some previous flashplugin (like something from the 10.x series) and see how that holds out.

But on the upside, it’s kinda funny watching things in Avatar mode =P

Avatar Flash

Comments
No Comments »
Categories
How-To, Linux
Tags
Channels, Color, Colour, Flash, Glitch, Linux, Pink, Workaround
Comments rss Comments rss
Trackback Trackback

How To: Fix Stuttering Sound in 9.04 Jaunty Jackalope

r3dux | April 24, 2009

Just upgraded my 8.10 Intrepid Ibex Ubuntu distro to 9.04 Jaunty Jackalope, and bar a slight keyboard configuration issue (paraphrased as: “current layout not found – will leave keyboard config alone”) and having to take a close look at my GRUB menu.lst before deciding to take the package maintainers version (new ver includes updated entries of your current ver – but backup your current menu.lst just in case!) everything went fine. In fact, 9.04 feels more fluid & responsive in some aspects, so all good so far.

The only problem I’ve noticed (and fixed) so far is that using my external Creative soundcard, and likely the Intel onboard card, sound stutters a bit. This is due to ALSA’s “glitch-free” (I kid you not) drivers, having, er, glitches when used through PulseAudio. I guess you could remove PulseAudio, if you really wanted to, but there’s a simple one line fix – just edit the file /etc/pulse/default.pa and add following line:

load-module module-hal-detect tsched=0

Then, either restart PulseAudio with /etc/init.d/pulseaudio restart or reboot – and job done – no more glitching sound.

A quick gnome-based sound test is to run the Sound application in System | Preferences (i.e. gnome-sound-properties) and just click the [Test] button on Sound Events | Sound Playback.

From some further reading, it seems tsched=0 is a kludgy workaround that can cause higher CPU usage for sound playback, and the real problem lies with the Ubuntu kernel being high latency.. (see Ubuntu Forum link below, post #43 onwards). I think I’d rather higher CPU usage than the sound breaking up on me, and playing some mp3s in VLC (just because the new Amarok’s still busy scraping together collection details from the NAS :) ) takes 2% of a single core on my laptop. When running at the lowest possible speed of 800Mhz.

I don’t think that’s gonna be a problem…

Sources: lglinux, ubuntu forums

Update:
Even with the above fix, sound would sometimes be a pain on an upgraded 9.04 – mute channels you had to unmute in alsamixer, xine and Gstreamer engine config woes, mplayer has sound but vlc doesn’t, or vice versa, or neither have sound but firefox does… I decided to just wipe the entire system (backing up the /home partition first for a file-system change over) and start again clean.

I think the glitches were from upgrading 8.04 to 8.10 to 9.04 and everything being a mish-mash of legacy code and deprecated configs held together with gaffer-tape and bubblegum… It wasn’t pretty. But with a fresh system slapped on EXT4 partitions, I get zero sound issues, the system boots and runs quicker than I’ve ever seen it go, and it only took a little while of checking some boxes in synaptic to get things back to pretty much where I left off. I’d definitely recommend installing 9.04 fresh – nothing else has that minty new-OS zing, or lack of seriously annoying glitches. Final Note: Be aware that if you go for EXT4 as your filesystem you will have to set some options and cross your fingers if you want to resize the partitions using the tools available in Jaunty, and that there can be a problem with delayed allocation and 0-byte files if the box falls over before committing data. If that doesn’t sound like it’s for you, XFS is fast and safe – and knocks EXT3 into a tinfoil-hat.

Update 2:
I somehow managed to get it so Nautilus and Firefox would play sound (through PulseAudio), but VLC or MoviePlayer or anything else wouldn’t… no idea how – perhaps by having the audacity to use my frackn machine? So obviously some programs are using pulseaudio, which seems to work, and others are trying to use ALSA, which isn’t working because pulseaudio is raping it… Anyway, I tried about 5 things to fix the sound – here’s some details:

1.) From the Simple Guide to Sound on Hardy, Intrepid & Jaunty, I ran:

sudo apt-get install asoundconf-gtk alsa-oss libasound2 libasound2-plugins padevchooser gstreamer0.10-pulseaudio ubuntu-restricted-extras

and rebooted. Did this help? No. And most of it was installed already.

2.) I upgraded ALSA to 1.0.19 (while 1.0.18 is the one in official jaunty repos at the mo) using the script here. Did this help? Not immediately. But it won’t have hurt.

3.) I installed vlc-plugin-pulse – and after changing the audio output to Pulseaudio server, VLC would produce stuttery sound, which is a start.

3.) I read a bunch of this stuff: Multiple Sound Solution, some more, and then even more.

4.) I went System | Preferences | Default Sound Card and chose MY SOUND CARD – *not* pulse audio (you can also do this from the command line with: asoundconf set-default-card CARDNAME – to find out which cards are available, run: asoundconf list). I then went to System | Preferences | Sound and changed all my settings away FROM Pulseaudio TO Alsa Mixer for my soundcard (the reason I say my soundcard is that I’ve got an onboard Intel soundcard, and an external USB Creative one I prefer to use because it has optical input/output) – if you hit the [Test] button with ALSA used for playback and it doesn’t play, that’s your glitch.

5.) ALSA decided it would play, I changed VLC back to ALSA output from Tools | Preferences | Audio – and *bang* – no more suck-ass, stuttery, crackly pulseaudio sound. Pure clean audio from all applications.

I wish I could be more specific about exactly what fixed it for me when I was having no sound – but I genuinely don’t know exactly what combination of steps fixed things. One minute ALSA mixer wouldn’t play, the next it would – it’s some kind of pulseaudio/alsa conflict, and using ALSA gives me the best sound, when Pulseaudio doesn’t hijack it… There are steps to remove pulseaudio, and at the present time, as much as I like the goal of it it’s not doing the job, so the next conflict I get I’m going to go the full hog and purge.

As a last resort if you have no sound make sure none of your mixers are muted by running alsamixer -c 0 for your first soundcard, alsamixer -c 1 for your second etc.. and make sure none of the playback mixers have MM (i.e. Muted) on them at the bottom, pressing ‘M’ on them will unmute and change it to the bizarely named ’00′ – to do this from a nicer GUI, just install gnome-alsamixer.

Last Chance Saloon Update:
If you’ve got sound in some things but not all, check your gstreamer-properties (by typing that very thing at the console) and make sure you’ve got your audiosinks right. gstreamer-properties is just a front-end for the gstreamer part of gconf-editor btw. I’ve discussed it a bit here.

Last LAST Chance Saloon Update on 16/02/2010: If you’re sure it’s pulseaudio which is messing your application up, launch it without going through pulseaudio via pasuspender NAME-OF-YOUR-APPLICATION. I came up against this when trying to fix ScummVM sound the other day under Karmic 9.10.

Good luck!

Comments
7 Comments »
Categories
How-To, Linux
Tags
9.04, ALSA, Glitch, gstreamer, Jackalope, Jaunty, PulseAudio, Stutter, Ubuntu
Comments rss Comments rss
Trackback Trackback

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Error Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Problem PS3 Remix Retro script Slides Sound Systems Texture Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“What is written without effort is in general read without pleasure.”

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox