Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
DJRobX

PBX to HP conversion app

Recommended Posts

I have severe performance issues with PinballX on my cab.   Despite trying everything I can think of, I am not able to tackle and fix the problem.    Hyperpin does not have the issue, so it's back to HyperPin for me.

PinballX features a some very very nice tools these days to manage tables and media that I wasn't willing to give up.   Specifically:

1) Game List Manager
2) PBX Recorder

So I wrote a quick C# app to read the PinballX configuration and write a HyperPin compatible configuration.

1) Combine all of PinballX's separate Visual Pinball databases into one Visual Pinball database
2) Based on which database the table was in, write VPEXETABLES.TXT to launch the correct version of Visual Pinball (exe names derived from pinballx config).
3) Create symbolic links from .VPX files to .VPT files to work around the VPX renaming issue without altering the originals.
4) Created a batch file to use FFMPEG included with PBX recorder to convert the "MP4 renamed to F4V" that PBX recorder creates, to a "FLV renamed to F4v" that HyperPin can use. 

So now any time I update my PBX game list with the PBX GUI, I just run this app and it will configure HyperPin accordingly.   No more manually editing vpexetables. 

Some other general notes about my setup:

In PinballX I have always had all of the media for the different VPs versions combined together, so when I move something from VPX to VP, I don't have to move the media files or worry of duplicates.  I have the following junctions.   Junctions are like shortcuts to folders, so you can have multiple directories that refer to the same actual folder without taking up extra disk space.   You use "mklink /j <link name> <target folder name>" at a command prompt to make them. 

C:\PinballX\Media\Visual Pinball X => C:\PinballX\Media\Visual Pinball
C:\Pinballx\Media\Visual Pinball PM5 => C:\PinballX\Media\Visual Pinball

Now that I'm running HyperPin, I've created these junctions:

C:\HyperPin\Media\Visual Pinball\Wheel Images = C:\PinballX\Media\Visual Pinball\Wheel Images
C:\HyperPin\Media\Visual Pinball\Backglass Images = C:\PinballX\Media\Visual Pinball\Backglass Images

I leave the table videos folder separate as the video format that PBX recorder creates is not compatible.  So when step 4 (ConvertVideos.bat) runs it will convert anything in PInballX's video folder that doesn't exist in HyperPin's. 

I wrote this for personal use and don't intend to support or maintain this, but figured I'd share it publicly incase it's useful to someone.     FP is not supported by this process (hyperpin can probably just pick up the FP database directly anyway).   I think FP has kind of the same issue with multiple FP versions though.    I don't like or use FP,  but if someone wants to adapt the process to FP it would probably be really easy.   The C# source is included.

The root folders for HP and PinballX are defined in the .config file .

Please note that the tool overwrites the VP pinball database in the HP folder and the VPExeTables.txt file.   Backup configurations before trying this!   No warranty!   

 

 

Px2hp.zip

  • Upvote 2

Share this post


Link to post
Share on other sites

Thank you for sharing. I'm not yet at least in the situation of having problem with PBX, but, I see the problem and your solution seems to maintain the PBX structure in case you'll revert. Very nice. I've played a bit with junction ideas myself but, because of different reasons. Anyway, I'll keep this in mind IF some day I end up where you are.

  • Upvote 1

Share this post


Link to post
Share on other sites

I'm also using HP as I do not like PX, and because I'm very much used to it.

I only have one single problem at the moment: I noticed that the exclusive fullscreen mode of VPX gives me some extra performance with absolutely fluid ball movement in every situation. But now HP is loosing focus when starting a table: the screen goes black, shortly displays the VPX table when it has been started, but immediately switches back to HP. I have to ALT-TAB back to the table. Does not happen with all tables but with many. And it only happens with the exclusive fullscreen mode, does not happen in windowed fullscreen mode. Any solution for this behavior?

Share this post


Link to post
Share on other sites

Try running HP as administrator.   That stopped that on mine     Microsoft keeps messing around with the ability for applications to set focus to other ones, more things work if the application has administrative rights.    

Of course it doesn't fix the fact that the "Hold to exit 1...2..3.." doesn't work right.    The dialog will pop up over HP instead of the table (not too bad) but if you cancel, it won't return back to the table automatically.   Might be able to modify FPlaunch to return focus to VP, but it won't be "right".   

Because of the latter I stopped using exclusive fullscreen.  On Windows 10 there's very little difference between windowed and true fullscreen on my cab anyway (there was a huge difference on Win8).

Share this post


Link to post
Share on other sites

I'm already starting HP as administrator, that does not do anything here unfortunately, That the "Hold to exit 1..2..3 " message is over HP and not the table is not so important for me but it should focus the table and not HP otherwise I need to keep my keyboard in reach...

VPX is running more fluidly here when using the exclusive fullscreen mode - that's the reason why I would like to keep it that way. But the focus thing is driving me crazy!

If you have any knowledge how to modify the FPLaunch ahk script, please help! :) I would like to give it a try! :)

Share this post


Link to post
Share on other sites

So there's two problems.  The first is probably really easy to fix. 

1) FPLaunch tries to focus VP if it's not in focus.   This is not needed for VPX full screen and actually causes it to lose focus in the fullscreen case.   Try commenting this out:

loading = 1
    Loop {
        ;  WinActivate, ahk_class VPPlayer,,DMD
        Sleep 100

If that causes problems on VP9 tables (it may or may not) then you'll have to add some additional logic to identify if VPX is in use... Ugh.

2) The second problem is way uglier.     If you hold the exit key, the 1-2-3 thing pops up over HP (it cannot pop up over VP).    It's fine if you actually exit, but if you decide not to, VP doesn't come back to focus.    There's something about exclusive fullscreen mode that nothing, not even VP itself, can bring the player back into focus using the normal focus methods.   The only way they found to do it, is is to simulate alt-tab.   You can probably use AHK to send the Alt-Tab, that's exactly what the old VP hack used to do, but of course as in step 1, getting that to NOT mess up VP9 is going to be a pain. 

This whole thing is extremely messy because Microsoft keeps changing up the way focus works from OS version to OS version.    You'll see there's all kinds of "paranoia" code, even optional focus methods because things work differently on different people's cabs. 

 

 

Share this post


Link to post
Share on other sites

you are very brave clark to still use hp, i was reluctant to pbx, i resisted longer than most of the people, but i tried one day and never went back (that was 2 years ago), hp is optimized for xp, pbx for win7 or more, never had focus problem, direct boot, better browsing, better game management, easier to config, more functionalities...
hp 1.0 is as outdated as vp9 dx7, uvp, ledcontrol.vbsfor force feedback
would like to see hp 2.0 one day but shame it should have been out long time ago to compete pbx
my 2 cents ;)

Sent from tapatalk

Share this post


Link to post
Share on other sites

If you use VP windowed mode HP works perfectly fine still.    I still think the HP "loading", and "Hold to exit" screens are way more elegant than PBX, that takes over the whole screen with a loading graphic.   I and others have made feature requests to Tom to this effect.   Yes, it's nitpicky, but the smooth handoff from wheel to VP is always something I've admired about HP even before PBX came out. 

For me HP actually worked best on Win8.  It works very well in win10 too, but there's a very small hesitation loading the first game I pick from the wheel.    The only OS it did NOT work well for me on was Win7, where it had a lot of trouble getting back to the wheel.  The issues with Windowed Full Screen are entirely issues with FPLaunch, not HP.   My little script lets me use all of the PBX game management goodies with HP.  :)  

-- Rob 

 

 

Share this post


Link to post
Share on other sites

That's also my opinion. HP is more elegat and I'm used to it. I have PBX installed on my cab too, but I'm not using it. The most disturbing thing is that I always have to wait 6 seconds to exit. Why 6 seconds?? I only want 2 or 3 seconds, why can't this be manually set??? And the wheel is moving way too fast, so fast that I can not see where it moved until I stopped pressing the button. And why can't the flyer be shown? 

I hope that HP will be updated some day!?

Share this post


Link to post
Share on other sites

I just tried to comment out the single line but it does not do anything here. So it does not work. When starting a table, the screen goes black, then the VPX table is shown - but as soon as this happens, HP is brought back to the top again. No idea why. Some tables work (but they worked before the script change, too): when starting a table, the screen goes black, then the VPX table is shown, then HP is brought back to the top - but right a second after that, the VPX table is brought back to the top again. That happens always at the same tables (like Scared Stiff or Medieval Madness), on e.g. Bad Cats HP stays on top and I have to Alt-Tab.

Any idea?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...