Sbaby Posted December 18, 2024 Share Posted December 18, 2024 Hi 😽 I've been using LaunchBox for years to run my pinball games (Future Pinball, Visual Pinball, Pinball FX (2023), Pinball M, Pinball FX3, Pinball Arcade, and Zaccaria Pinball) on a single screen in desktop mode, and everything was working perfectly. Recently, I wanted to try the PinUp Popper frontend to explore the 3-screen setup, including a vertical screen, temporarily excluding the fourth screen (my TV, which I usually use for desktop mode). Everything worked fine with the new setup. (For now, I’d like to focus only on the first 4 games listed above.) I had installed the emulators in separate folders thinking that I could keep both the LaunchBox desktop mode and the PinUp Popper 3-screen mode active. However, I’ve realized that these simulators are likely writing configuration files or even modifying system registries. As a result, even when launching from separate folders, I end up with rotated screens or incorrect configurations when launching from LaunchBox. I'm forced to adjust the configuration every time to return to desktop mode, which is not very convenient. I know that using separate computers or setting up a dual boot would be a better solution, but unfortunately, I'm working on the same Windows 11 setup. To be honest, I'd love to have two different ways to launch the pinball games based on how I feel for the evening. For example, if I want to stand in front of three screens, I’d use PinUp Popper, but if I want to relax on the couch, I’d prefer BigBox with a single screen and desktop mode. Maybe someone has already encountered this issue and can help me solve it with a script or other solution. For example, I'd like to create a script to run at the launch of the pinball games from LaunchBox that would activate desktop mode, and another script to switch to cabinet mode when I play with PinUp Popper. I’ve seen some registry files in the VisualPinball and Future Pinball folders, but I’m a bit scared to run them—who knows what could happen? Ahahah! I’ve also come across some settings files for Pinball FX that I could maybe use, perhaps overwriting the file every time I launch, but I’m not sure. I’d prefer to ask first to see if anyone has already done this and can help me without me going through too many trial and error attempts. Thanks in advance! ☺️ Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 20, 2024 Share Posted December 20, 2024 On 12/18/2024 at 3:09 PM, Sbaby said: I'm forced to adjust the configuration every time to return to desktop mode, which is not very convenient. I can only [possibly] help with Visual Pinball. First thing is to make note of exactly which settings are changed and what those settings are for the 2 configurations, respectively. Next, find where those settings are saved to. VPX had started going to saving certain settings to .ini(?) files (haven't taken the time [yet] to fully look into it). These files can be per-table (which you don't need for what you're asking about) or global. Other settings are still saved to registry. Once you know the what's and where's, then you can start creating your scripts. One setting you'll need is for the ForceDisableB2S. Which (at least used to be [via old notes]) is located in the registry under [HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller]. To change that, (one way is to) create a .reg file (i.e. B2Son.reg) that contains: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller] "ForceDisableB2S"=dword:00000001 Create a 2nd file (i.e. B2Soff.reg) with the same text and change the last "1" to a "0". Then just double click one or the other of the files to change it. Once you've confirmed that works, then it's just a matter of transposing that into AHK (or batch file) lingo. Then there's the ScreenRes.txt file in which you set the screen number(s), screen positions etc. This [can be] a global settings file in which you could have 2 copies of (one for each configuration) and then your script could copy and rename for the one to be used/loaded. It's been a while since I messed with this, and it may even be an easier process. (i.e. command-line parameters to load certain configs?) But noting exactly what needs changed between the 2 (for your setup) needs to be spelled out 1st. Quote Link to comment Share on other sites More sharing options...
Sbaby Posted December 21, 2024 Author Share Posted December 21, 2024 (edited) I thank you for the path you have set me on I’ve realized that with three screens in cabinet mode, I prefer using the 32-bit version of VisualPinballX.exe, while in desktop mode, I find the 64-bit version VisualPinballX64.exe works better. This is mainly because the 32-bit version is far more compatible with all the tables I have, both old and new, whereas the 64-bit version performs very well in desktop mode. For the 32-bit version, switching between desktop and cabinet modes is simple. I save the entire registry folder HKEY_CURRENT_USER\Software\Visual Pinball into two .reg files: one configured for cabinet mode and the other for desktop mode. When launching the game, I just run the appropriate .reg file to apply the desired settings. However, I’ve noticed an issue: disabling the B2S doesn’t work properly. Although the .reg file saves all the other settings, it doesn’t save the one related to B2S, so the backglass ends up overlapping the screen. Renaming the backglass every time I launch a game would be too cumbersome and time-consuming. The solution I found is to use the 64-bit version for desktop mode. This version saves configurations not in the registry but in a configuration file: C:\Users\"user"\AppData\Roaming\VPinballX\VPinballX.ini. By adding the line ForceDisableB2S = 1 to this file, the issue is resolved perfectly. Another important configuration is for the DMD, either internal or external. Unfortunately, I have a small number of tables that won’t show the internal DMD in desktop mode alongside the external one, unless I press F1 and set it there. This is inconvenient because it breaks my streamlined startup process. I've tried tweaking things a bit, but I can't figure out the problem. Basically, when everything is set to external DMD (without selecting “show internal DMD”), all tables show it indifferently and correctly even in desktop mode. ... well, that's exactly what I want. . this allows me to not even edit the screenres config . It seems like there’s a variable in the code that says, "if you’re in desktop mode, enable the internal DMD as well," but some tables still don’t display it. These tables are few, but it’s annoying, and I’m forced to press F1 to enable it.do you have any ideas? Edited Friday at 02:46 AM by Sbaby Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 21, 2024 Share Posted December 21, 2024 1 hour ago, Sbaby said: It seems like there’s a variable in the code that says, "if you’re in desktop mode, enable the internal DMD as well," but some tables still don’t display it. These tables are few, but it’s annoying, and I’m forced to press F1 to enable it. When you edit the table then open the Script Editor, you'll see something like If Table1.ShowDT = true then UseVPMColoredDMD = true VarHidden = 1 Else UseVPMColoredDMD = False VarHidden = 0 End If or Dim DesktopMode: DesktopMode = Table1.ShowDT .... .... If not DesktopMode then l23bg.visible=0 l36bg.visible=0 l48bg.visible=0 l67bg.visible=0 l71bg.visible=0 l72bg.visible=0 l82bg.visible=0 End If In the 2nd one, 123bg through 182bg are the elements that comprise the tables built-in DMD. (shown for reference) In either case (and those are just examples), you can force set the show-desktop("ShowDT")/desktop-mode to True. i.e. change to DesktopMode = True. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 22, 2024 Share Posted December 22, 2024 On 12/21/2024 at 2:40 PM, Sbaby said: It seems like there’s a variable in the code that says, "if you’re in desktop mode, enable the internal DMD as well," but some tables still don’t display it. These tables are few, but it’s annoying, and I’m forced to press F1 to enable it. Update... Looks like you may be able to a table override from the tables configuration file. Didn't test it. But looks feasible. If the table doesn't have a configuration file, just create a text file with the same name as the tables .vpx filename, and give it the file extension .ini Quote Link to comment Share on other sites More sharing options...
Sbaby Posted December 23, 2024 Author Share Posted December 23, 2024 (edited) Summary of the situation I want to provide a quick summary to clarify the situation. I have installed Pinup Popper Baller, which automatically configures my three screens and the display settings for Visual Pinball and Future Pinball, including the positions of the DMD and FlexDMD. In cabinet mode, I have no issues with any ROMs or tables; everything displays correctly. The default system registry for the DMD related to the ROMs is configured as shown in the attached image. HKEY_CURRENT_USER\Software\Freeware\Visual PinMAME\ In this mode, I use the 32-bit executable VPinballX.exe, which records changes in: HKEY_CURRENT_USER\Software\Visual Pinball There are no issues with any of the 20 tables I’m currently testing. I believe the DMD on the third screen is managed by FlexDMD and the dmdevice.ini file, which defines the position and display settings for the external DMD. (Perfect) Switching to desktop mode To quickly switch to desktop mode and make it easier to use without making too many changes, I prefer using the 64-bit version, VPinballX64.exe. Unlike the 32-bit version, this one saves changes in an .ini file located here: C:\Users\"user"\AppData\Roaming\VPinballX\VPinballX.ini. For 15 out of the 20 tables, when launched in desktop mode, the internal DMD automatically activates (even though it’s disabled in the system registry for both the ROMs and the default setting). This likely happens because it’s configured in the table script to activate in desktop mode. This functionality works perfectly for me because it avoids using the FlexDMD and doesn’t require me to move it manually inside the playfield. Additionally, in desktop mode, the FlexDMD is still activated but remains in the background beneath the playfield screen. This works perfectly for me since it’s not visible. WinDMD active and visible FlexDMD active but not visible I am aware of the dmdevice.ini file, where the position of FlexDMD can be configured, but I prefer not to move it because I already have custom coordinate settings based on the background image for cabinet mode (3screen) Problem with 5 tables The issue lies with the other 5 tables, which do not automatically display the internal DMD. I’ve tried the methods you suggested, but each script is different, and even after adjusting settings, I still couldn’t get it to work. I also wasn’t able to get it working by modifying the associated .ini file for the table. The only solution I found was to create a .reg file for each table that activates the internal DMD by modifying the registry under the ROM entry: HKEY_CURRENT_USER\Software\Freeware\Visual PinMAME\romname. This method works: I’ve set up an additional app (Additional Apps) in LaunchBox to trigger the registry and set ShowWinDMD to 1 at launch and return it to 0 upon exit. While this system works, I have to admit I’m not thrilled with it because it modifies the entire ROM configuration, not just that one parameter. If I change any ROM settings, I need to recreate the .reg files. For now, this works, but I’d like to know: Is there a command line that can change only that registry parameter? Or, can it be set directly in the .ini file in some way? With this method, I’ve solved the issue for 3 of the 5 tables. Remaining tables There are two remaining tables that I don't know how to fix: Star Trek 25th Anniversary (Data East 1991) Secret Agent (Original 2024) v1.0 For Secret Agent, I understand the problem since it doesn’t use MAME ROMs. But for Star Trek, which uses VPinMAME ROMs, I don’t understand why the internal DMD isn’t showing. I’m attaching the link for the tables that are having issues. There are no ROMs, of course. https://we.tl/t-Q93b376MxS I’m looking forward to your suggestions, thank you! --------------------------------------------------------------------------------------------------------------- Update 03-01-2025 I decided to update all my Visual Pinball X tables to make them compatible with the latest 64-bit version. At this point, switching between modes becomes very straightforward: you just need to load a different INI file via the command line, one for desktop mode and one for cabinet mode. The two INI files can be easily placed in the emulator’s folder, and the command line looks like this: For desktop mode: VPinballX64.exe -ini VPinballX_DESKTOP.ini -minimized -exit -play For cabinet mode: VPinballX64.exe -ini VPinballX_CABINET.ini -minimized -exit -play The only parameters that differ between the two files are: ForceDisableB2S BGSet This makes switching between the two modes simple and efficient! As for the DMD, let’s continue the discussion below: Edited Friday at 02:51 AM by Sbaby Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 23, 2024 Share Posted December 23, 2024 11 hours ago, Sbaby said: I’ve set up an additional app (Additional Apps) in LaunchBox to trigger the registry and set ShowWinDMD to 1 at launch and return it to 0 upon exit. While this system works, I have to admit I’m not thrilled with it because it modifies the entire ROM configuration, not just that one parameter It will only change the entries/parameters you have listed in the .reg file (like the example shown in my 1st response only has one entry). If you saved/backed-up the entire reg section, yes, it will adjust all the ones listed. 11 hours ago, Sbaby said: For now, this works, but I’d like to know: Is there a command line that can change only that registry parameter? Indirectly, yes. This is where we get 'creative'. There aren't any command-line parameters specifically for showwindmd (DMD/Display Window) or showpindmd (external DMD (dll)). But you can set/reset those in the tables script. (See When all else fails below) There're (up to 9) Custom Parameters you can pass to the tables script using -c1 [Value]. 'Value' is any word you want it to be, placed after -cx (where x is a number 1 thru 9). i.e. To pass the Value "joewashere" as parameter "1", your [LaunchBox] command-line parameters would be: -c1 joewashere -minimized -exit -play To get the parameters' Value from inside the script, use GetCustomParam(1) (where "1" is a number 1 thru 9, corresponding to the "x" in -cx) Star Trek: For this table, I don't think you need to change the 2 'show...dmd' registry entries. "I don’t understand why the internal DMD isn’t showing." The internal DMD for Star Trek is forced-hidden by default in the script. It uses the same variable as shown in my 2nd post, VarHidden. And is hardcoded to "1" (line 47). To override this variable, check for the Value of the parameter -c1, then reset the variable. (if the command-line parameters do not contain -c1 joewashere, this won't trigger nor error.) Alternately: (Because I always love to give options) You can simply change the "1" to a "0" on line 47 in a copy of the script. No command line parameters required. If VPX was setup correctly, you should be able to right-click the .vpx table (file) and select Extract VBS. Or from the Windows Command Prompt, you can run VPinballx.exe -ExtractVBS "Star Trek 25th Anniversary (Data East 1991).vpx" This will create a new file "Star Trek 25th Anniversary (Data East 1991).vbs". Edit that file (with any text editor), change the "1" to a "0", and save. If a vbs file named the exact same as the table exists in the same folder as the table, it will override the tables internal script. Rename the vbs file to something like "NO-Star Trek 25th Anniversary (Data East 1991).vbs" (anything that's not the exact same name as the table) if you wish the use the internal script. Rename it back to the same name as the table to override the internal script. This method is nice because you can change all sorts of stuff in the extracted script file, then just rename the file to use the original table-script. From here, you can create a batch file / AHK script / whatever, that when ran will rename the file with/without "NO-" at the beginning, before launching the table. So....: Look for the variable VarHidden in the script(s) and see what they're doing with it. Adjust accordingly. "VarHidden" is commonly used, but someone may use a different word for it. If you don't see that particular variable 'name', you can [usually] see what they used inside the sub routine Sub Table1_Init, for .hidden. (The routine may just be called Sub Table_Init [without the "1"].) Either way, all tables will have a something-something_Init When all else fails: If the above isn't working (i.e. Simpsons), and you do have to change showwindmd and/or showpindmd, you can add those into the above _Init routine. (Setting "True" or "False" to whatever they need to be.) This WILL change the Registry. So you'll want to change them back when exiting the table. Look for Sub Table1_exit() (or Sub Table_exit() [without the "1"]) and reset them. (Re-Setting "True" or "False" to whatever they need to be.) These MUST be placed BEFORE Controller.Stop! You can hard code this in the extracted script by removing the If line and End If. Again, with this method, no command-line parameters are required. But you DO still need the parts the "_exit()" sub routine. Note: this When all else fails section does the exact same thing as executing your .reg files. Provided the .reg files only contain the 2 entries. Quote Link to comment Share on other sites More sharing options...
Sbaby Posted December 24, 2024 Author Share Posted December 24, 2024 8 hours ago, JoeViking245 said: ... Thank you so much for everything! With your help, a lot of study, and a bit of AI, I was able to create VBS scripts that activate the DMD in desktop mode and hide it in cabinet mode. With Star Trek, it was quite simple: Dim DesktopMode: DesktopMode = Table1.ShowDT If DesktopMode = True Then VarHidden = 0 Ramp16.visible = 1 Ramp15.visible = 1 Primitive13.visible = 1 TransReel.visible = 1 Else VarHidden = 1 Ramp16.visible = 0 Ramp15.visible = 0 Primitive13.visible = 0 TransReel.visible = 0 End If However, with other Bigus tables, I had to declare Dim WshShell and call the ROM's system registry, but in the end, it works great. For example, with Batman: Sub Table1_Init ' Initialize the game vpmInit Me ' Declare the WshShell variable at the beginning Dim WshShell Set WshShell = CreateObject("WScript.Shell") With Controller .GameName = cGameName If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description: Exit Sub .SplashInfoLine = "Batman - The Dark Knight (Stern 2008)" .HandleKeyboard = 0 .ShowTitle = 0 .ShowDMDOnly = 1 .ShowFrame = 0 .HandleMechanics = 0 ' Detect the mode and set DMD visibility Dim DesktopMode: DesktopMode = Table1.ShowDT If DesktopMode = True Then ' Desktop Mode - Show the DMD .Hidden = 0 WshShell.RegWrite "HKEY_CURRENT_USER\Software\Freeware\Visual PinMame\bdk_294\showwindmd", 1, "REG_DWORD" If Err.Number <> 0 Then MsgBox "Error modifying the registry: " & Err.Description Exit Sub End If Else ' Cabinet Mode - Hide the DMD .Hidden = 1 WshShell.RegWrite "HKEY_CURRENT_USER\Software\Freeware\Visual PinMame\bdk_294\showwindmd", 0, "REG_DWORD" If Err.Number <> 0 Then MsgBox "Error modifying the registry: " & Err.Description Exit Sub End If End If ' Start the game On Error Resume Next .Run GetPlayerHWnd If Err Then MsgBox Err.Description On Error Goto 0 End With It works perfectly! -------------------------------------------- I would still have one last question regarding VisualPinball: how can I make the internal DMD slightly larger by default? I manage fine with FlexDMD, but it seems the same approach doesn't work for the VPINMAME DMD. If I change it with the mouse, it doesn't maintain the size. 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 24, 2024 Share Posted December 24, 2024 10 hours ago, Sbaby said: However, with other Bigus tables, I had to declare Dim WshShell and call the ROM's system registry, but in the end, it works great. For example, with Batman: Using Set WshShell = CreateObject("WScript.Shell") adds another layer to things. I tested with .Games(cGameName).Settings.Value("showwindmd")=False [or True] and it worked fine. Also DesktopMode is already declared up on line 75 (Batman). Though adding WshShell doesn't really hurt anything, it is one more 'layer'. To an external call (where an internal one already exists). 10 hours ago, Sbaby said: how can I make the internal DMD slightly larger by default? I manage fine with FlexDMD, but it seems the same approach doesn't work for the VPINMAME DMD. If I change it with the mouse, it doesn't maintain the size. Right click the DMD Click Show Window Border Mouse to the lower right corner until you see the double arrow Click and drag to resize Click the window to drag/move to where you want it Click and hold.. wiggle/shake it a little (weird, I know) Right click and click Show Window Border (to hide the border) Click the playfield then exit/restart the table Quote Link to comment Share on other sites More sharing options...
Sbaby Posted December 24, 2024 Author Share Posted December 24, 2024 2 hours ago, JoeViking245 said: Using Set WshShell = CreateObject("WScript.Shell") adds another layer to things. I tested with .Games(cGameName).Settings.Value("showwindmd")=False [or True] and it worked fine. Also DesktopMode is already declared up on line 75 (Batman). Though adding WshShell doesn't really hurt anything, it is one more 'layer'. To an external call (where an internal one already exists). I tried adding what you suggested, but unfortunately, I can’t make it work in my script. I added WshShell because I was getting an error when trying to use vpmInit Me. Maybe my VPX configuration is different from yours; I’m not sure. I’m attaching my original VPX file in VBS format so you can take a look and perhaps figure out what’s wrong. If y ou have any other suggestions or maybe a practical example, I’d be happy to try again. Thanks! Batman Dark Knight (Stern 2008)_Bigus(MOD)2.0.vbs 2 hours ago, JoeViking245 said: Right click the DMD Click Show Window Border Mouse to the lower right corner until you see the double arrow Click and drag to resize Click the window to drag/move to where you want it Click and hold.. wiggle/shake it a little (weird, I know) Right click and click Show Window Border (to hide the border) Click the playfield then exit/restart the table That's exactly what I was doing! The only thing I hadn't tried was 'Click and hold... wiggle/shake it a little (weird, I know)'. Since I did it once, it works every time now. Incredible! How do you know all this stuff? Haha! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 24, 2024 Share Posted December 24, 2024 41 minutes ago, Sbaby said: I’m attaching my original VPX file in VBS format so you can take a look and perhaps figure out what’s wrong. Sounds like more work for me. lol That was the only thing I had changed in the script when it worked. So if you had changed anything else in the script or maybe transposed my change... 49 minutes ago, Sbaby said: That's exactly what I was doing! The only thing I hadn't tried was 'Click and hold... wiggle/shake it a little (weird, I know)'. Since I did it once, it works every time now. Incredible! How do you know all this stuff? Haha! "a lot of study". But no AI stuff. Glad you got it working! Quote Link to comment Share on other sites More sharing options...
Sbaby Posted Wednesday at 08:51 PM Author Share Posted Wednesday at 08:51 PM (edited) On 12/24/2024 at 4:24 PM, JoeViking245 said: "a lot of study". But no AI stuff. Glad you got it working! Thank you for the clarification! Now that I’ve resolved the switch for Visual Pinball, I’m moving on to Future Pinball. After doing some research, I discovered a quick and effective way to make it work, and I’d like to share it with you. FUTURE PINBALL To summarize, I will not describe all the configurations of Future Pinball for Desktop and for Cabinet. In summary, the .reg file covers everything that is configurable through the program options, such as displays, graphics, and screen rotations. The three zipped files, on the other hand, concern the BAM configurations. I created two separate launchers for the Future Pinball frontend with BAM, one for Desktop Mode and one for Cabinet Mode. Both launchers perform similar operations, but with specific configurations for each mode. The operation is as follows : Enter the registry with regedit here HKEY_CURRENT_USER\Software\Future Pinball and export future pinball configurations for desktop mode and then save another one for cabinet mode Run the registry file : For Desktop mode: BAM_reg_for_desktop_SBABY.reg For Cabinet mode: BAM_reg_for_cabinet_SBABY.reg Extraction of BAM configuration files from a ZIP file: For Desktop mode: BAM_settings_for_desktop_SBABY.zip For Cabinet mode: BAM_settings_for_cabinet_SBABY.zip The extracted files are: bam.cfg default.cfg reality.dat These are overwritten in the BAM folder to ensure proper startup of the selected mode. I put 7z.exe and 7z.dll for convenience in the same folder as the script. Starting the game via FPLoader.exe with the necessary parameters to automatically start the *.fpt table Below is an image with the DESKTOP MODE configuration for Launchbox Script for the Launcher (Fake Emulator ahk to exe) in Desktop Mode ; Set the working directory to the one containing the .ahk file SetWorkingDir, %A_ScriptDir% ; Extract ZIP file RunWait, .\7z.exe x "BAM_settings_for_desktop_SBABY.zip" -o%A_ScriptDir% -y Sleep 300 ; Run the registry file RunWait, C:\Windows\regedit.exe /s "%A_ScriptDir%\BAM_reg_for_desktop_SBABY.reg" Sleep 100 ; Launch the game (FPLoader.exe) without blocking the script Run, "FPLoader.exe" /open "%1%" /play /exit Script for the Launcher (Fake Emulator ahk to exe) in Cabinet Mode ; Set the working directory to the one containing the .ahk file SetWorkingDir, %A_ScriptDir% ; Extract ZIP file RunWait, .\7z.exe x "BAM_settings_for_cabinet_SBABY.zip" -o%A_ScriptDir% -y Sleep 300 ; Run the registry file RunWait, C:\Windows\regedit.exe /s "%A_ScriptDir%\BAM_reg_for_cabinet_SBABY.reg" Sleep 100 ; Launch the game (FPLoader.exe) without blocking the script Run, "FPLoader.exe" /open "%1%" /play /exit Note : Some users also consider the \plugins\iCom.cfg file in addition to these three. I am currently using only the three files mentioned, and everything is functioning correctly. Edited Wednesday at 08:58 PM by Sbaby 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.