Jump to content



Photo

Pinball FX2 With Backglass 2nd Monitor

pinballfx2

  • Please log in to reply
53 replies to this topic

#1 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 749 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 23 May 2013 - 03:39 PM

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.
 
 
 
Current limitations:
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".
Attached File  gpedit.jpg   92.21KB   176 downloads
Double click that, put a checkbox in "success", hit apply, and close GPEdit. This enabled the ability for file system logging to occur.

Attached File  gpedit2.jpg   49.18KB   136 downloads
 
 
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, Attached File  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".
Attached File  auditing2.jpg   46.71KB   105 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"
Attached File  auditing3.jpg   60.37KB   89 downloads
and click OK and then click "OK" on all the boxes until you're back to explorer.  
Attached File  auditing4.jpg   62.7KB   90 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. Attached File  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.


#2 Sir Cheddar

Sir Cheddar

    His Sharpness

  • VIP
  • 383 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights



Posted 23 May 2013 - 03:50 PM

Great idea to use file access audit to detect what table FX2 is loading. Gonna try this soonish :)

 

Thanks!



#3 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 749 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 23 May 2013 - 04:08 PM

If someone wants to tell me how to make the pictures show up normally and not look ridiculous, I'll happily clean things up here.



Great idea to use file access audit to detect what table FX2 is loading. Gonna try this soonish :)

 

Thanks!

Thank you. Perhaps you can also make appropriate changes to your fplaunch scripts for everyone once you get it working.


Edited by BigBoss, 23 May 2013 - 04:07 PM.


#4 djcpe

djcpe

    Enthusiast

  • Members
  • PipPipPip
  • 159 posts
  • Location:Ohio, USA

  • Flag: United States of America

  • Favorite Pinball: Metallica, Wizard of Oz, Star Trek

  • PS3 Gamer Tag: Escape4
  • 360 Gamer Tag: Escape4

Posted 23 May 2013 - 04:19 PM

I'm waiting for the official cab support from Zen Studios. Not in a rush. The tables already play sweet.

#5 Sir Cheddar

Sir Cheddar

    His Sharpness

  • VIP
  • 383 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights



Posted 23 May 2013 - 08:22 PM

Well, I finally had to deactivate UAC but it runs nicely :)

Now for FPLaunch...

 

 

Edit: Boy, where did that evening go? SWMBO had some things that had to be done first.

Well, I fix it up tomorrow.


Edited by Sir Cheddar, 23 May 2013 - 10:32 PM.


#6 rockyrocket

rockyrocket

    Enthusiast

  • Silver Supporter
  • 145 posts
  • Location:Bristol,UK

  • Flag: United Kingdom

  • Favorite Pinball: xenon

Posted 24 May 2013 - 03:47 PM

Thanks for this!, I will defo try this when I have more time next week.

So I am just thinking out loud but I guess that you could also launch an individual table by each one having its own .fpt file linked to a specific AHK file that starts PBFX2 then sends the correct key combo (ENT + LEFT + LEFT ect) for each?.

Maybe with a loading image to hide the splash screens - think this would work?.



#7 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 May 2013 - 04:39 PM

Thanks for this!, I will defo try this when I have more time next week.

So I am just thinking out loud but I guess that you could also launch an individual table by each one having its own .fpt file linked to a specific AHK file that starts PBFX2 then sends the correct key combo (ENT + LEFT + LEFT ect) for each?.

Maybe with a loading image to hide the splash screens - think this would work?.

 

WIth the Pinball FX 2 I had to use        

 

Send {Enter Down}, Send {Enter Up}

Send {Right Down}, Send {Right Up}

 

Keypresses like this and sendinput commented out


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#8 rockyrocket

rockyrocket

    Enthusiast

  • Silver Supporter
  • 145 posts
  • Location:Bristol,UK

  • Flag: United Kingdom

  • Favorite Pinball: xenon

Posted 24 May 2013 - 07:49 PM

Thanks for this!, I will defo try this when I have more time next week.

So I am just thinking out loud but I guess that you could also launch an individual table by each one having its own .fpt file linked to a specific AHK file that starts PBFX2 then sends the correct key combo (ENT + LEFT + LEFT ect) for each?.

Maybe with a loading image to hide the splash screens - think this would work?.

 

WIth the Pinball FX 2 I had to use        

 

Send {Enter Down}, Send {Enter Up}

Send {Right Down}, Send {Right Up}

 

Keypresses like this and sendinput commented out

Not sure I understand your reply chepas,

I am thinking about using AHK to navigate the table choice menu to a pre-selected table, it would exit back to the menu -but then you could in theory have each individual table on the hyperpin wheel.



#9 Sir Cheddar

Sir Cheddar

    His Sharpness

  • VIP
  • 383 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights



Posted 24 May 2013 - 11:41 PM

Thank you. Perhaps you can also make appropriate changes to your fplaunch scripts for everyone once you get it working.
And done. Took me a little longer because of some weirdness with compatibly mode/run as admin on my system. Had to use the compatibility administrator kit to get it working.
The problem was probably caused by me mucking around too much with said kit in the first place.

#10 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 May 2013 - 04:28 AM

Not sure I understand your reply chepas,

I am thinking about using AHK to navigate the table choice menu to a pre-selected table, it would exit back to the menu -but then you could in theory have each individual table on the hyperpin wheel.

 

Yes , the same way I have it done. Was just trying to explain to you that instead of just sending Send {enter} it might be best to send {enter up} {enter down}. I had selected tables on imagesearch before but wasn't reliable enough in the end.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#11 Zarquon

Zarquon

    Hobbyist

  • Members
  • PipPip
  • 37 posts
  • Location:Vancouver, BC

  • Flag: Canada

  • Favorite Pinball: Medevil Maddness

Posted 28 May 2013 - 08:05 AM

OK got this working once I figured out how to add gpedit to my system.

 

Now is it just me or is there a limitation / bug that when navigating thru the menu if you view a table then go to another table then back with out playing any tables that the back glass does not change.  i.e. it stays on the last "new" selection.

 

Note: For if you are using Win 7 Home Premium check out http://www.askvg.com...arter-editions/



#12 Sir Cheddar

Sir Cheddar

    His Sharpness

  • VIP
  • 383 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights



Posted 28 May 2013 - 04:10 PM

OK got this working once I figured out how to add gpedit to my system.

 

Now is it just me or is there a limitation / bug that when navigating thru the menu if you view a table then go to another table then back with out playing any tables that the back glass does not change.  i.e. it stays on the last "new" selection.

 

Note: For if you are using Win 7 Home Premium check out http://www.askvg.com...arter-editions/

No, on my system it behaves like it should, it goes back to the "old" backglass. My system is Win 7 Professional so gpedit.msc works out of the box.



#13 Zarquon

Zarquon

    Hobbyist

  • Members
  • PipPip
  • 37 posts
  • Location:Vancouver, BC

  • Flag: Canada

  • Favorite Pinball: Medevil Maddness

Posted 28 May 2013 - 05:16 PM

I will take a look at the security audit logs when I get home tonight and see if it is updating entries as I scroll through and then back.



#14 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 749 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 30 May 2013 - 06:15 AM

Ok, so Epic Quest is called "Looter". I made an epic quest image for this table. I noticed also that the audit bit didnt get set on the looter.pxp so I had to enable that separately in windows explorer. Perhaps I just didnt have the folder contents set to inherit permissions from the parent. But in any case, if you add Looter.pxp.bmp for epic quest and it's not updating, make sure you set the audit entry for that table (see step #5 in the guide above).

 

The (sort of crappy) epic quest backglass is here:

http://thebigboss.or.../Looter.pxp.bmp



OK got this working once I figured out how to add gpedit to my system.

 

Now is it just me or is there a limitation / bug that when navigating thru the menu if you view a table then go to another table then back with out playing any tables that the back glass does not change.  i.e. it stays on the last "new" selection.

Every now and then I see something like this so I have to kill pinball fx2 and restart it then it works again. I am trapping system log event #4663 so if you see something logging in this case but it's not 4663, please let me know what you're seeing.




Note: For if you are using Win 7 Home Premium check out http://www.askvg.com...arter-editions/

Thank you for finding that :) Nice job.



#15 Sir Cheddar

Sir Cheddar

    His Sharpness

  • VIP
  • 383 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights



Posted 30 May 2013 - 09:46 AM

Ok, so Epic Quest is called "Looter". I made an epic quest image for this table. I noticed also that the audit bit didnt get set on the looter.pxp so I had to enable that separately in windows explorer. Perhaps I just didnt have the folder contents set to inherit permissions from the parent. But in any case, if you add Looter.pxp.bmp for epic quest and it's not updating, make sure you set the audit entry for that table (see step #5 in the guide above).
 
The (sort of crappy) epic quest backglass is here:
http://thebigboss.or.../Looter.pxp.bmp

Thanks! I haven't looked at your backglass yet, but I have a feeling one of Screenshots 13, 15, 17, or 18 from Epic_Quest_screenshots.zip on the Zen Pinball Press page would do nicely.
They are all 1280x720

#16 rockyrocket

rockyrocket

    Enthusiast

  • Silver Supporter
  • 145 posts
  • Location:Bristol,UK

  • Flag: United Kingdom

  • Favorite Pinball: xenon

Posted 30 May 2013 - 08:23 PM

So I have been playing with this a bit today and so far its mostly working, but the backglass loads the default image correctly but only the default one.

Looking in the logs I have some .pxp events but with a handle id of mostly 4456 but with occasional 4460 with a process id of 1300 if that helps?.

I have to admit that this is with XP64 and a non standard install - its so close to working I can feel it :)



#17 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 749 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 30 May 2013 - 11:18 PM

 

Thanks! I haven't looked at your backglass yet, but I have a feeling one of Screenshots 13, 15, 17, or 18 from Epic_Quest_screenshots.zip on the Zen Pinball Press page would do nicely.
They are all 1280x720

Nice, so I used image 18 and replaced the above image on my server with a nicer one after some small amount of photoshopping. Thanks.



#18 Darien

Darien

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: ---------

  • Favorite Pinball: Elvira & The Party Monsters

Posted 14 August 2013 - 11:21 AM

Awesome work. Thank you.

but I seem to have a problem with the changing of the backglass. The command calls gui2.pxp.bmp fine.  And syslog is showing the PXPs... but my image remains static (gui2) does "ShowBackglass" look for a certain event ID?

Edit: Erm, I seem to be having a similar issue to Rocky up there, if anyone came up with a solution.


Edited by Darien, 14 August 2013 - 11:24 AM.


#19 newandy

newandy

    Hobbyist

  • Platinum Supporter
  • 32 posts
  • Location:New York

  • Flag: United States of America

  • Favorite Pinball: circus voltair

Posted 30 August 2013 - 12:49 AM

They just released another table

 

Earth Defense

 

So I created a BMP file for the backglass and added it to my d:\Program Files (x86)\Steam\Images directory where the rest of my BMP backglass files are.  I named it EarthDefense.pxp.bmp as I was that was the name of the table in the steam apps directory

 

d:\Program Files (x86)\Steam\SteamApps\common\Pinball FX2\data_steam\EarthDefense.pxp

 

When slect that table in hyperpin and nav to that table the backglass does not display.  When I Nav to any other table (I have all of them) the backglass displays fine and changes accordingly.

 

Any Ideas what I am doing wrong?



#20 newandy

newandy

    Hobbyist

  • Platinum Supporter
  • 32 posts
  • Location:New York

  • Flag: United States of America

  • Favorite Pinball: circus voltair

Posted 04 September 2013 - 02:22 PM

Anyone??







Also tagged with one or more of these keywords: pinballfx2