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

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:

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

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:

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
9 Comments »
Categories
Gaming, How-To, Linux
Tags
Emulator, Error, Future Pinball, Glitch, Linux, Pinball, Sound, Texture, wine
Comments rss Comments rss
Trackback Trackback

iTunes + Zone Alarm do not mix

r3dux | December 26, 2011

Crapple - Upside-Down Apple LogoJust noting this for future reference, but I finally got iTunes working properly on a Windows PC that would at random:
- transfer some songs to iPod Touch devices successfully,
- transfer some other songs, then crash, then the device reports no music on it, or
- corrupt the device so badly it needed fresh firmware restored.

And the the culprit turned out to be…. Zone Alarm. No kidding. Turn off Zone Alarm and everything worked instantly.

iTunes is still a god-awful PoS though, but at least it’ll now transfer music and apps. If you’re getting “app could not be installed because it is not signed” issues with iTunes, and you’re installing legit apps, chances are that turning off Zone Alarm will fix it right up. Amazing.

Comments
2 Comments »
Categories
How-To, Music, Tech
Tags
App, Apple, Apple Sucks, Crash, Error, Firewall, iTunes, Signed, Zone Alarm
Comments rss Comments rss
Trackback Trackback

Cryptic error message of the day

r3dux | July 31, 2011

I love Linux, but sometimes you have to wonder just what was going through the minds of some of the developers. Take, for example the following error message that appeared when I (for all intents and purposes) clicked on my DVD drive:

Linux Error Messages Suck

Can you figure out what the problem was? No? Neither could I. And then I looked at the DVD drive, which was open…

Ah.

Error messages should be expressed in plain language (no codes), precisely indicate the problem, and constructively suggest a solution – and I can see that it’s trying (it’s trying real hard) – but I really still would have preferred “No disc in drive. Please insert a disc.”

Comments
4 Comments »
Categories
Linux
Tags
Cryptic, Drive, DVD, Error, Notification, stupid
Comments rss Comments rss
Trackback Trackback

How To: Disable All WordPress Plugins from the Database

r3dux | September 16, 2010

I added a couple of WordPress plugins the other day to tack on a little bit of extended functionality to the site, but things went badly, and some bizarre interactions between plugins meant that I couldn’t log in to the WordPress administration interface – it would just throw me back to the main site without even having the option to log in… As such, I couldn’t disable the plugins (because you need to be in the administration interface to do that!), so what the heck to do?

You might think to ssh in to the box and remove the plugins from the …/wp-content/plugins/ folder to disable them (as I did) – only this won’t work. What we really need to do is disable the plugins directly from the database – and luckily for us it’s a pretty simple process as long as we can ssh into the box!

Note: If you dont’ have ssh access to your server, you could always take the phpMyAdmin route to achieve the same goal through a web interface, but if the problem you have is related to being redirected all the time (like mine was) then the direct DB access way is really the only way to go!

Gaining SSH Access

If you’re running linux you’ve already got a ssh client built in, if you’re on Windows then you’ll probably want to get yourself a copy of PuTTY or such.

Assuming the IP address of your server is 1.2.3.4, then you can ssh to the box with:

ssh 1.2.3.4 -l <YOUR-USER-NAME>

In the above command the switch is “minus lower-case-L”, not “minus pipe-symbol” or anything, and if you’ve changed your ssh port away from the default of 22, then you can just add the switch -p , so if my ssh daemon was running on port 2233, and I wanted to log in as the user bob, I’d use:

ssh 1.2.3.4 -l bob -p 2233

Connect to MySQL

Once you’ve got a ssh connection to the server, the next thing you’ll want to do is connect to your database, with the following command:

mysql -u <MYSQL-USER-NAME> -p

So if I had a MySQL administrator called dbAdmin I’d use:

mysql -u dbAdmin -p

The -p switch on the end will prompt you to enter the password for your MySQL admin user account – don’t worry if you’ve forgotten the credentials you should use – they’ll be in your WordPress wp-config.php file, which is usually located in your www or htdocs root folder (on Linux this is usually /var/www).

Quick Tip: By placing your wp-config.php file in the web root it’s possible for it to be accessed by malicious types, but you don’t have to place it here! You can, in fact, move the file one level up so that it’s outside of the web-root and WordPress will still be able to find it, but scoundrels won’t! So if you’re running WordPress with all your files in /var/www/ just move the wp-config.php file up to /var/ and it’ll still work and be safer! You can do this from the ssh terminal with:

cd /var/www
mv wp-config.php ..

Manipulate the Database

Once you’ve got administrator access to MySQL you need to connect to your database (again, the database name will be in your wp-config.php file), so if we’d called our database myWebDB then we could connect to it through the MySQL command line interface with:

CONNECT myWebDB;

Once this has connected successfully, all you have to do to disable all plugins is issue the following command:

UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';

That’s it! Attempt to access your site! Any plugins which were causing mayhem will now be disabled, and you can then add them back one-by-one until you find the combination that’s stuffing things up!

Cheers!

Props: Many thanks to Jeff Star of PerishablePress for his article Quickly Disable or Enable All WordPress Plugins via the Database which saved my bacon, and prompted me to write this quick guide.
Flattr this

Comments
1 Comment »
Categories
Coding, How-To
Tags
Database, Disable, Enable, Error, MySQL, Plugin, Plugins, Problem, SSH, Wordpress
Comments rss Comments rss
Trackback Trackback

How To: Install Windows 7 Upgrade as a Fresh Install

r3dux | September 3, 2010

Update: See the bottom of the post for another method of performing a upgrade install as a fresh install which only needs a single copy of your Windows 7 upgrade disc and nothing else!

Backstory

I’d had enough of fighting with OpenOffice 3.2 today and finally cracked: I bought a copy of Microsoft Office 2010 Professional Academic edition for $49AUD through Microsoft’s It’s Not Cheating program.

However, since I run Linux I thought I’d just get a copy of CrossOver and I’d be laughing, but this was not to be. I ponied up for Office, set it downloading, then went to get CrossOver only to find it only supports up to Office 2007 – and I don’t mean that Office 2010 won’t work 100%, or will be a little eratic – it won’t work at all. Feck!

Okay, so I can always run it through virtualisation (i.e. a VirtualBox or VMWare instance running some variety of Windows), but I didn’t fancy running the latest, greatest Office on a shonky old copy of XP, so I ponied up (again) for a copy of Windows 7 64-Bit Upgrade (that’s another $49AUD through It’s Not Cheating) and created a new virtual machine, installed Windows 7, entered the key at the end of the install, and it told me it wasn’t valid! Double feck!

At this point I’m $150AUD out of pocket with nothing to show for it, and am starting to furrow my brow.

Trying to deal with the key issue later – I just left the key out to get 7 up and running (it’ll go for 30 days without activation) and tried the key again from within the OS rather than from the installer; this time instead of just key invalid I got an error message stating that this key is not valid for a clean install of Windows… Okay.. now we’re getting somewhere – let’s fix this bad boy.

The Fix

There’s a bunch of stuff on the Web about forcing Windows 7 to accept a clean install from an upgrade disc by creating registry keys, running arcane commands (slmgr -rearm etc.), removing config files from the ISO before install etc. – and to be perfectly honest I didn’t fancy re-installing so I had a quick whirl at all of ‘em. And guess what? They didn’t work, so I’m not going to post them here. Instead I’ll tell you what worked for me [drumroll please....]:

Installing another version of Windows first.

No, really.

It doesn’t have to be 64-bit if you’re migrating 32-bit to 64, it doesn’t have to be one step below Windows 7 (i.e. Vista), it doesn’t even have to be a legal, valid version of Windows! It just has to be some incarnation of Bill’s Marvelous Blue-Screen Machine, and then when you install Windows 7 on top of the existing install, it’ll recognise a prior version of Windows existed, and your “upgrade” key will work perfectly.

Windows 7 Activation

Ba-da-bing Ba-da-BOOM! Shamone! =P

So in my case, this just meant slapping a copy of XP onto a new virtual machine, then the instant that’s finished installing, just changing over the ISO image mounted on the virtual DVD drive from XP to 7, rebooting, and letting this second version of Windows install.

Once you’ve got Windows 7 up and running, your “old” copy of windows will be sitting in C:\Windows.old, and you can either use the built-in Disk Cleanup tool to remove it or just delete that folder and you’re as good as new*.

* = If you’re doing a native Windows 7 install, once you’ve removed the old install then you’re quite literally good as new. If you’re installing on a virtual box using a hard drive which uses dynamic storage (i.e. you allocate, say, 60GB for the HD, but it doesn’t take up any space to begin with, it only takes up space when data is added to the drive) then the space allocated for the old Windows install can’t be fully recovered because dynamic disks can take up more space, but do not resize back down to take up less space when you remove data! But you’re going to put more than 700MB of additional stuff on it anyway, right? So just remove the old Windows install before installing new apps and the like and you’ll break even!

Windown 7 - Remove Previous Windows Installations

It’s not a glamorous hack or sneaky workaround, but it does work, and who doesn’t have an old copy of Windows sitting around somewhere? If you’re feeling particularly cheeky you could try it with a copy of Windows 3.1 or 95 installed and see if it still upgrades clean ;-)

Update: I was discussing this with some colleagues the other day who clued me in to the following rather sneaky (but perfectly legitimate) method of installing Windows 7 Upgrade as a “fresh install”:

  1. Install Windows 7 as a fresh install and do not enter your key while installing.
  2. From within your installed and running (but not activated) version of Windows 7, go to your Windows 7 disc and install it again!
  3. If your Windows 7 Update disc doesn’t show setup type stuff (because it’s UDF and there’s all sorts of issues), just reboot the machine and install Windows 7 over Windows 7, um, dawg ;)

Cheers!!
Flattr this

Comments
2 Comments »
Categories
How-To
Tags
Error, install, Key, OS, Upgrade, VirtualBox, Windows 7
Comments rss Comments rss
Trackback Trackback

« Previous Entries

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



“Endurance is one of the most difficult disciplines, but it is to him that endures that final victory comes.”

 - From the teachings of Buddah.

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