Thanks Thanks:  0

Thread: Visual Pinball Bezel support

Page 1 of 2 12 LastLast
Results 1 to 20 of 31
  1. Collapse Details
    Visual Pinball Bezel support 
    #1
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    Hi Guys,

    Would it or is it possible to ever have bezel support added to Visual Pinball? I have a big 50'' 4K HDTV and wish to run VP vertical fullscreen with a bezel on the sides if possible. Meaning I want to play it not in a cab but sitting in my chair. With a 50" HDTV the height is bigger than my Vertical monitor and would think it would look awesome with a custom bezel for each table that way I can play VP at my desk as a top down view like you could with a pinmame cab.

    Thanks
    Last edited by Krakerman ; 01-06-2017 at 11:14 PM.
     

  2. Collapse Details
    Re: Visual Pinball Bezel support 
    #2
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    Where visual pinball stores the fullscreen information?
    and how to toggle between fullscreen and windowed mode?

    If you are able to answer those questions, adding bezel support should be a trivial job to do.
     

  3. Collapse Details
    Re: Visual Pinball Bezel support 
    #3
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    Looks like the Registry.

    HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\VP10\Player
     

  4. Collapse Details
    Re: Visual Pinball Bezel support 
    #4
    RocketLauncher Developer

    MainSecondary
    Join Date
    Apr 2014
    Posts
    4,792
    Is that for VP10?

    Because on my registry I have the following keys:
    HKEY_CURRENT_USER\Software\Visual Pinball\DX9\Player\FullScreen
    HKEY_CURRENT_USER\Software\Visual Pinball\DX9.physmod5.accelmod\Player\FullScreen
    HKEY_CURRENT_USER\Software\Visual Pinball\Player\FullScreen

    Have no idea of which ones do what.
     

  5. Collapse Details
    Visual Pinball Bezel support 
    #5
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    Yes I believe the one I mentioned was for vp10 but all setting for VP9 are also in the registry too as you noted.

    The other is for VP9 PhysMod version.
    Last edited by Krakerman ; 01-11-2017 at 02:47 PM.
     

  6. Collapse Details
    Re: Visual Pinball Bezel support 
    #6
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    I don't have much free time and neither have currently Visual Pinball installed, so could you please help a little bit more on the information gathering to add support for that?

    It seams that there are multiple fullscreen options all over the place with Visual Pinball.

    HKEY_CURRENT_USER\Software\Visual Pinball\VP10\Player\FullScreen
    HKEY_CURRENT_USER\Software\Visual Pinball\DX9\Player\FullScreen
    HKEY_CURRENT_USER\Software\Visual Pinball\DX9.physmod5.accelmod\Player\FullScreen
    HKEY_CURRENT_USER\Software\Visual Pinball\Player\FullScreen

    Which are the values for the fullscreen enable and disabled option?
    These registry entries are always created by Visual Pinball when the executable is firstly launched, or do I have to create them myself?
    There are any extra fullscreen registry settings possible, like for example a per game setting or a old version setting?
    The fullscreen setting works on all VP versions? I recall that some time ago there were issues with fullscreen in some not that old version. Therefore, I need to know if I have to set this option always to false in some VP version.
     

  7. Collapse Details
    Re: Visual Pinball Bezel support 
    #7
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    All of those values are for different versions of VP as there are various versions. So for VP9 for it's fullscreen settings would be HKEY_CURRENT_USER\Software\Visual Pinball\DX9\Player\FullScreen and for VP10 HKEY_CURRENT_USER\Software\Visual Pinball\VP10\Player\FullScreen ect ect those that you listed are pretty much covers all the VP versions VP8 saves it's fullscreen settings here HKEY_CURRENT_USER\Software\Visual Pinball\Player\FullScreen. When you install VP and change the settings in the editor they are saved to those registry settings. No per game settings only per VP versions or as you can say Player. No issues with each VP player fullscreen they are independent of each other. You prob need to have an option for each of those VP versions example: VP8/VP9/VP9Mod5/VPX as it is known as VP10.

    If there is issues I can ask the guys over on the VPForums as they are very helpful and know the ins and outs much better than me.
     

  8. Collapse Details
    Re: Visual Pinball Bezel support 
    #8
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    Thks for the feedback.
    Which value they use for fullscreen and windowed mode? True or false, Enabled or disabled, or something else?
     

  9. Collapse Details
    Re: Visual Pinball Bezel support 
    #9
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    I have no way to check this, but please test if this module works:

    Code:
    MEmu := "Visual Pinball"
    MEmuV := "v8 & v9.2 & v9.9 & v9.9.3 & v10.2"
    MURL := ["http://sourceforge.net/projects/vpinball/"]
    MAuthor := ["djvj","bleasby"]
    MVersion := "2.0.2"
    MCRC := 
    iCRC := 
    MID := 
    MSystem := ["Visual Pinball"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; Requires VPinMame v2.4
    ; If you want to use a picture while the table is loading, place it on the dir with this module and define the width & height and its filename in the variables below.
    ; You can also set the color of the background
    ; If you use Esc as your exit_emulator_key, set EscClose to true. The emu closes faster if you don't use Esc, and this value doesn't seem to matter if you use Win7
    ;
    ; VPinMame uses the registry to store configs @ HKEY_CURRENT_USER\Software\Freeware\Visual PinMame
    ; Each time a new table is ran, it pulls the default configs into a new folder in the registry
    ; Visual Pinball stores settings in the registry @ HKEY_USERS\S-1-5-21-440413192-1003725550-97281542-1001\Software\Visual Pinball
    ;----------------------------------------------------------------------------
    StartModule()
    BezelGUI()
    FadeInStart()
    BezelStart()
    
    settingsFile := modulePath . "\" . moduleName . ".ini"
    EscClose := IniReadCheck(settingsFile, "Settings", "EscClose","false",,1) ; This fixes VP from crashing (in WinXP) on exit when using Esc as your exit key.
    showDMD := IniReadCheck(settingsFile, "Settings", "ShowDMD","true",,1)
    updateDefaultDMD := IniReadCheck(settingsFile, "Settings", "UpdateDefaultDMD","true",,1) ; Set this to true if you want the script to set the default position of the DMD on next run.
    dmdX := IniReadCheck(settingsFile, "Settings", "DMDX","45",,1) ; Your new default X position of the DMD
    dmdY := IniReadCheck(settingsFile, "Settings", "DMDY","35",,1) ; Your new default Y position of the DMD
    dmdWidth := IniReadCheck(settingsFile, "Settings", "DMDWidth","300",,1) ; Your new default DMD Width
    dmdHeight := IniReadCheck(settingsFile, "Settings", "DMDHeight","75",,1) ; Your new default DMD Height
    validateDMDLaunch := IniReadCheck(settingsFile, "Settings|" . romName, "ValidateDMDLaunch", "false",,1)
     
    7z(romPath, romName, romExtension, 7zExtractPath)
    
    ;initialize Visual Pinball Object
    vpObj = {}
    vpObj := { "Visual Pinball": { "regLocation" : "Software\Visual Pinball\Player" }
    		  ,"Visual Pinball 9.2.1": { "regLocation" : "Software\Visual Pinball\DX9\Player" }
    		  ,"Visual Pinball 9.9.0": { "regLocation" : "Software\Visual Pinball\DX9\Player" }
    		  ,"Visual Pinball 9.9.3": { "regLocation" : "Software\Visual Pinball\DX9\Player" }
    		  ,"Visual Pinball 10.2.0": { "regLocation" : "Software\Visual Pinball\VP10\Player" }} 
    
    vpVersion := FileVersion(executable)
    RLLog.Info("Module - Visual Pinball version " . vpVersion)
    
    ; Update default DMD position & size so when new tables are ran, they use the new defaults
    If ( updateDefaultDMD  = "true" ) {
    	dmdXcur := ReadReg("Software\Freeware\Visual PinMame\default","dmd_pos_x")
    	dmdYcur := ReadReg("Software\Freeware\Visual PinMame\default","dmd_pos_y")
    	dmdWcur := ReadReg("Software\Freeware\Visual PinMame\default","dmd_width")
    	dmdHcur := ReadReg("Software\Freeware\Visual PinMame\default","dmd_height")
    	If ( dmdXcur != dmdX or dmdYcur != dmdY or dmdWcur != dmdWidth or dmdHcur != dmdHeight ) {
    		WriteReg("Software\Freeware\Visual PinMame\default","dmd_pos_x",dmdX)
    		WriteReg("Software\Freeware\Visual PinMame\default","dmd_pos_y",dmdY)
    		WriteReg("Software\Freeware\Visual PinMame\default","dmd_width",dmdWidth)
    		WriteReg("Software\Freeware\Visual PinMame\default","dmd_height",dmdHeight)
    	}
    }
    
    ;select full screen mode
    fullscreenReg := ReadReg(vpObj[vpVersion].regLocation,"FullScreen")
    If ((Fullscreen = "true") and (fullscreenReg != 1))
    	WriteReg(vpObj[vpVersion].regLocation,"FullScreen",1)
     
    Run(executable . " /exit /play -""" . romPath . "\" . romName . romExtension . """",emuPath, "Min") ; hide does not work
     
    WinWait("Preparing Table AHK_class #32770")
    WinWaitClose("Preparing Table AHK_class #32770",,4)
    Sleep, 500
     
    ; script to look for Please answer window, selects Yes I am and hits enter to continue loading table
    Loop {
    	Sleep 50
    	IfWinExist, Please ; Nag screen the first time a table is ran
    	{	WinActivate, Please
    		IfWinActive, Please
    		{	SetControlDelay -1
    			ControlClick, Button2, Please answer AHK_class #32770 ; Click Yes I am
    			ControlSend, Button1, {Enter}, Please answer AHK_class #32770 ; Click the OK button
    		}
    	} Else ifWinExist, Game Info ; unknown window
    	{	WinActivate, Game Info
    		IfWinActive, Game Info
    		{	Send {Enter}
    			Send {Enter}
    		}
    	} Else ifWinExist, Notice ; sound not 100% acurate
    	{	WinActivate, Notice
    		IfWinActive, Notice
    		{	Send {Enter}
    			Send {Enter}
    		}
    	} Else ifWinExist, VBScript ; all msg boxes from vp script (like vb/vpm version not high enough...)
    	{	WinActivate, VBScript
    		IfWinActive, VBScript
    		Send {Enter}
    	} ;Else IfWinExist, Error ; serious errors - like z buffer too small and so on
       ; {
    		; we have some error and we want to see it so we don't send Enter
    		; Send {Enter}
    		; Gui, Destroy
    		; WinActivate, Error
    		; WinWaitActive, Error
    		; WinWaitClose, Error
    		; WinClose, ahk_class VPinball
    		; Process, WaitClose, %executable%
    		; ExitModule()
    	; }
    	IfWinExist, Visual Pinball Player,, DMD ;Check if visual pinball is Ready
    		IfWinActive, Visual Pinball Player,, DMD ;Check if visual pinball is Ready
    			Break
    }
     
    Sleep, 500
    WinWait("ahk_Class VPPlayer")
    Sleep, 500
    Loop {
    	IfWinActive, ahk_class VPPlayer
    		Break
    	WinActivate, ahk_class VPPlayer
    	Sleep, 50
    }
    WinWaitActive("ahk_class VPPlayer")
    BezelDraw()
    Sleep, 1000
     
    ; Give focus to the dmd so it appears on top of the playfield
    If showDMD = true
    {	DetectHiddenWindows, off ; don't detect dmd if it is hidden
    	WinActivate, ahk_class MAME
    	If validateDMDLaunch = true
    		WinWaitActive("ahk_class MAME",,2)
    	ControlClick,, ahk_class MAME ; clicking the dmd to set the WS_EX_TOPMOST parameter (AlwaysOnTop)
    	DetectHiddenWindows on
    	WinActivate, ahk_class VPPlayer
    	WinWaitActive("ahk_class VPPlayer")
    }
     
    FadeInExit()
    Process("WaitClose",executable)
    7zCleanUp()
    BezelExit()
    FadeOutExit()
    ExitModule()
     
    ReadReg(path,var) {
    	RegRead, regValue, HKEY_CURRENT_USER, %path%, %var%
    	Return %regValue%
    }
     
    WriteReg(path,var, value) {
    	RegWrite, REG_DWORD, HKEY_CURRENT_USER, %path%, %var%, %value%
    }
     
    CloseProcess:
    	FadeOutStart()
    	If escClose = true
    	{	DetectHiddenWindows, On ;Or next line will not work
    		Sleep, 50
    		;ControlSend, Button1, q, ahk_class #32770
    		ControlSend, Button2, r, ahk_class #32770 ; in case q crashes VP, use this
    	}
    	; If ( exe = vp8tag ) {
    		; WinClose, ahk_class VPinball
    	; } Else {
    		Sleep, 150
    		WinHide, ahk_class VPinball ;This line fixes where the VP Window flashes real quick when closing the window for a cleaner exit
    		WinMinimize, ahk_class VPinball
    		WinClose("ahk_class VPinball")
    	; }
    Return
    
    FileVersion( PE := "",  Qry := "040904B0\FileDescription" ) { ; by SKAN 18-Aug-2014  http://goo.gl/XdJIIC
      Local pInfo := 0
      If Sz := DllCall( "Version\GetFileVersionInfoSizeW", "WStr",PE ? PE : PE := A_AhkPath, "Int",0 )
      If DllCall( "Version\GetFileVersionInfoW", "WStr",PE, "Int",0, "UInt",VarSetCapacity( V,Sz ), "Str",V ) 
      If DllCall( "Version\VerQueryValueW", "Str",V, "WStr","\StringFileInfo\" . Qry, "PtrP",pInfo, "Int",0 )
         Return StrGet( pInfo, "UTF-16" )
    }
     

  10. Collapse Details
    Re: Visual Pinball Bezel support 
    #10
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    Will test tonight...thanks


    Sent from my iPhone using Tapatalk
     

  11. Collapse Details
    Re: Visual Pinball Bezel support 
    #11
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    I just realized that it is still incomplete. Problems with doing something without being able to test it.

    I will try to get some time to improve it in the next couple of days.


    Sent from my XT1068 using Tapatalk
     

  12. Collapse Details
    Re: Visual Pinball Bezel support 
    #12
    RocketLauncher Developer

    MainSecondary
    Join Date
    Apr 2014
    Posts
    4,792
    That won't work with physmod5 tables bleasby, I'd also ditch the vpObj object and just split the file version and use the major version code for testing what registry key to use so you don't have to rely on specific versions.
     

  13. Collapse Details
    Re: Visual Pinball Bezel support 
    #13
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    Here is a pic to give you an idea on what RL could do for VP. This is just a fast mock up but imagine the cool bezels that could be done for each table.

    Attached Images Attached Images
    Last edited by Krakerman ; 01-14-2017 at 02:43 AM.
     

  14. Collapse Details
    Re: Visual Pinball Bezel support 
    #14
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    Brolly, are you adding support for this them?
    My doubt for doing this without testing is that it seams that vp actually has windowed mode resolutions to select, so I don't know if VP resizes the game if the window is resized, if it changes the internal resolution when it resizes or even if it just stretches the user selected resolution.
    If it is the first case we would need to use the bezel fixresmode (except if we can define a custom resolution which would be equal to the case 3 bellow). If it is the second a simple bezel normal code would suffice. If it is the third alternative, we should use the precalculated bezel resolution to change the VP windowed mode resolution settings before it launches the table.
    About the vpObj versions, I just installed the official VP install package and used it to acquire the possible versions available. I just assumed that any other version would be a beta version replaced by one of the official versions released, that is why I didn't included any physmod stuff.


    Sent from my XT1068 using Tapatalk
     

  15. Collapse Details
    Re: Visual Pinball Bezel support 
    #15
    RocketLauncher Developer

    MainSecondary
    Join Date
    Apr 2014
    Posts
    4,792
    No, I have my hands full at the moment with other stuff, but I can have a look at it when I have some time, shouldn't be hard to adjust your module with the changes I suggested, but then again you said it wasn't complete so you better finish it first

    I have no idea about windowed resolutions, krakerman can probably help here.
     

  16. Collapse Details
    Re: Visual Pinball Bezel support 
    #16
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    I will give a deep look at it next week them.
    I should have enough time to make a VP test setup to make sure that I check all needed stuff.

    Sent from my XT1068 using Tapatalk
     

  17. Collapse Details
    Re: Visual Pinball Bezel support 
    #17
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    Krakerman, please test if this module works well with bezels in all possible visual pinball versions:

    https://www.dropbox.com/s/glvq1ype07...nball.ahk?dl=0
     

  18. Collapse Details
    Re: Visual Pinball Bezel support 
    #18
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    Will try it out tonight and let you know.

    Thanks


    Sent from my iPhone using Tapatalk
     

  19. Collapse Details
    Re: Visual Pinball Bezel support 
    #19
    Senior Member
    MainSecondary
    Join Date
    Jul 2014
    Posts
    1,978
    No bezel showing???

    Get game screen on my primary display that is rotated and fullscreen for cabinets and my backglass on my secondary display but my bezel not showing.

    I created a folder under bezels named Visual Pinball and a sub folder named after the table
    (Ex. Black Knight (Williams 1980)) and put the bezel in that folder but cannot get the bezel to show when I run that table.
    Last edited by Krakerman ; 01-25-2017 at 08:36 PM.
     

  20. Collapse Details
    Re: Visual Pinball Bezel support 
    #20
    RocketLauncher Developer bleasby's Avatar
    MainSecondary
    Join Date
    Apr 2014
    Posts
    2,662
    logs?
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •