Ok, so in short, I wrote an app that will enable you to show an image on your backglass monitor for pinball fx2 that can change for each table you select. However, this required a bit of system level hacking to get working. It is working well for me. Each time you select a different table in the pinball fx GUI, the backglass on the 2nd monitor updates with the appropriate table image. I am no graphic artist, so my table image pack (included) sucks. If someone wants to take the time to make better images, I strongly welcome it.
I wrote this for myself and it does everything I need for myself. There is a lot to set up. The goal of this project was to enable backglass support in pinball fx2, for me. I never planned to actually release this. But some of you may want this feature. So I'll provide the app and layout what you need to do to make it work. Note, I apologize that the steps arent easier. I'm sure someone may come along here and simplify my guide. I'm a developer not a document writer
As for the actual images, they are simply the name of the table file used +.bmp. Use this pattern for those making new and better images.
1) Images must be in MS Paint BMP format. You can edit them in whatever you want, but open and save them in paint before running.
2) System must be capable of running gpedit.msc. Some basic versions of Windows dont provide this. There are probably manual registry keys that can be changed to provide the same functionality. In short, we need to be able to enable system security audit object access.
3) This utility works by having windows add file system log entries when accessing only pinball fx table files and then the app registers events to be notified when those entries exist in the log and updates the backglass when those events occur. So the app needs admin to run.
Ok, so lets get started. First things first:
1. Download the package. http://thebigboss.or...fxbackglass.zip
2. create a folder somewhere and extract this. I created an images folder in my steam directory. My steam directory is d:\steampinball. So I will be working with those paths. So for me, it is d:\steampinball\images
3. Load gpedit.msc (winkey+r, gepdit.msc, enter). Here navigate to computer configuration, Windows Settings, Local Policies, Audit Policy. Find "Audit Object Access".
gpedit.jpg 92.21KB 174 downloads
Double click that, put a checkbox in "success", hit apply, and close GPEdit. This enabled the ability for file system logging to occur.
4. Next, locate your steam installation folder and we need to enable logging for just the pinball fx2 table files. On my system, these are located at d:\steampinball\SteamApps\common\Pinball FX2\data_steam. You may have installed your SteamApps to c:\program files(x86) or something similar. In either case, locate that directory in windows explorer. (If you're having a hard time, use the windows search and locate *.pxp files).
5. Right click on the data_stream folder and select properties. Click "security", "advanced", click the "auditing" tab, auditing1.jpg 57.51KB 112 downloads
click "edit", click "add", in the "enter the object name to select" box, enter "everyone" and click "check names".
auditing2.jpg 46.71KB 104 downloads
Click "OK". This brings up another box. Here check on "List folder / Read data". Or it may be just "read data" based on your operating system. For windows 7, it was "List folder / Read data". Put a check box in "Successful"
auditing3.jpg 60.37KB 89 downloads
and click OK and then click "OK" on all the boxes until you're back to explorer.
auditing4.jpg 62.7KB 89 downloads
Step 3 enabled system level auditing. Step 5 enabled system log entry when any files are read in the data_stream folder.
6. Ok now if you run pinball fx2 and open your syslog and look in your security log, you should see some log entries for a bunch of the PXP files. The backglass monitor will monitor these entries and change the backglass as new entries are created.
7. Next, the backglass runs in a separate app that just shows a picture set to the size and location of your choosing. So first, we need to run the app. Just double click ShowBackglass.exe. Doing this will show a blank form and some buttons and a box with some text in it. showimage1.jpg 47.73KB 100 downloads
This box will show us the command line we will need to use. As we move the window around and resize it, the text in that box will change (hit calculate to force it to change).
Here the command line we need is /left=80 /top=307 /width=809 /height=473. In your configuration it will be different based on where you locate and how you size your window. Note, pinball fx2 may rotate your display when you load it. So the location of windows on 2nd and 3rd monitors will change. So you probably want to rotate your main display to portrait prior to running this. You will have to decide which works for you. You can always revisit this step and adjust your command line later.
8. Now we have everything we need. In fact, if you run ShowBackglass.exe with the command line from above (start, run, fullpath to showbackglass.exe /left=80 /top=307 /width=809 /height=473 /picture=gui2.pxp.bmp) it will run on the 2nd monitor with an image of pinball fx2 provided by gui2.pxp.bmp image included in the download. Kill showbackglass with alt+f4.
9. Next, you need to set ShowBackglass.exe to run as administrator (right click on the exe, compatibility, run as administrator). Now, after that, If you run this running and run pinball fx2, it should change images as you select tables.
10. Now last step is to get this to auto launch when you run pinball fx2 and to quit when you exit pinball fx2. This is done via fplaunch scripts. Here is an example of my launch script:
SetWorkingDir, D:\steampinball\images Run, "D:\steampinball\images\ShowBackglass.exe" /left=1100 /top=0 /width=1659 /height=1050 /picture=gui2.pxp.bmp,,UseErrorLevel Run, "c:\Program Files (x86)\Steam\Steam.exe" -applaunch 226980,,UseErrorLevel Sleep, 5000 ;let steam launch pinball fx2 before poll for it to close Process, WaitClose, Pinball FX2.exe Run, taskkill /IM ShowBackglass.exe,,UseErrorLevel
Taskkill is provided with windows, but if you need something else to kill off the showbackglass app, I have written something called appkiller (http://thebigboss.or...e/AppKiller.zip) that does the job. The command line for app killer would be:
Run, D:\steampinball\appkiller.exe ShowBackglass.exe 0,,UseErrorLevel
Appkiller will simply kill an app on cmd line. If you have any issues with taskkill just use appkiller. Make sure you set appkiller also to run as administrator because it needs to kill showbackglass, a process that will be owned by administrator.
11. Unfortunately, I am not using hyperpin any longer. So someone else will have to detail how to edit Sir Cheddar's edits in order to integrate this into hyperpin close. But really, it won't be too complex. additions to his scripts might look something like this:
Run, "%SteamDirPath%\Steam.exe" -applaunch 226980" Run, "%SteamDirPath%\Images\ShowBackglass.exe" /left=1100 /top=0 /width=1659 /height=1050 /picture=gui2.pxp.bmp Process, wait, Pinball FX2.exe
CloseFX2: toLog("CloseFX2 Called") Process,Close,Pinball FX2.exe Run, %SteamDirPath%\Images\appkiller.exe ShowBackglass.exe 0,,UseErrorLevel Process, WaitClose, Pinball FX2.exe
Edited by BigBoss, 23 May 2013 - 04:09 PM.