Jodannar Posted August 6, 2016 Share Posted August 6, 2016 Im attempting to get my pin2dmd to swap palettes and modes on a per table basis when loading into stern tables in vpinmame. From what I have read I should be able to do this without the use of a palette, as there are the inbuilt palettes that can be switched to. I am able to do this using the Pin2DMD.exe, but cant seem to do it programmatically on table load. what paramaters do I need to pass to pin2dmd on the command line to swap to monochromatic and inbuilt palette 5 as an example? I thought it would be pin2.dmd.exe /p5 or similar. how do you switch to the inbuilt palettes on command line and throw it into monochromatic mode? once I have this I can then do it in visual pinball tables on load. Link to comment Share on other sites More sharing options...
Content Provider gtxjoe Posted August 6, 2016 Content Provider Share Posted August 6, 2016 I think it is pin2.dmd.exe /p 5 Link to comment Share on other sites More sharing options...
Jodannar Posted August 6, 2016 Author Share Posted August 6, 2016 thats what i have been trying, but it doesn't seem to work. always fires up with the palette set to multicolour default. it doesn't seem to be swapping the default palette for me either via the command line or when called through vp script. Note Pin2DMDDIR needs to be set to the correct location of your PIN2DMD.exe Const PIN2DMD = True Const PIN2DMDDIR = "C:\PIN2DMD-master\tools\vb6\Binary" Dim oShell Dim WScript Dim ORIGDIR Set oShell = CreateObject("WScript.Shell") ORIGDIR = oShell.CurrentDirectory oShell.CurrentDirectory = PIN2DMDDIR If PIN2DMD = True then oShell.run "pin2dmd.exe /p5",,TRUE oShell.CurrentDirectory = ORIGDIR Set oShell = Nothing Dim DelayTime, StartTime DelayTime = 0 StartTime = Timer Do While DelayTime < 1 DelayTime = Timer - StartTime Loop Link to comment Share on other sites More sharing options...
Content Provider gtxjoe Posted August 6, 2016 Content Provider Share Posted August 6, 2016 Add the extra space as shown in my post. That script you have works for me with the extra space Link to comment Share on other sites More sharing options...
Jodannar Posted August 7, 2016 Author Share Posted August 7, 2016 with the extra space it works via the command line for me to load a palette and then fire up vp. loading it via the script within vp itself doesn't change the palette Link to comment Share on other sites More sharing options...
Rappelbox Posted August 7, 2016 Share Posted August 7, 2016 Did you change the folder within the script to the correct destination where your pin2dmd.exe actually is? Link to comment Share on other sites More sharing options...
Jodannar Posted August 7, 2016 Author Share Posted August 7, 2016 Yeah that's my correct location for the Exe. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Jodannar Posted August 7, 2016 Author Share Posted August 7, 2016 Looking at the code above I can see \\ outside my quotes for the path. That is likely a problem Actually they are escape characters for the code quoting Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
jawdax Posted August 8, 2016 Share Posted August 8, 2016 at the beginning of the script place this after randomize line Quote '************ BEGIN PIN2DMD PALETTE LOADING **************'************* thanks to Rascal and gtxjoe ***************Const PIN2DMD = TrueConst PIN2DMDDIR = "C:\PIN2DMD-master\tools\vb6\Binary"Dim oShellDim WScriptDim ORIGDIRSet oShell = CreateObject("WScript.Shell")ORIGDIR = oShell.CurrentDirectoryoShell.CurrentDirectory = PIN2DMDDIRIf PIN2DMD = True then oShell.run "pin2dmd.exe /p 5",,TRUEoShell.CurrentDirectory = ORIGDIRSet oShell = NothingDim DelayTime, StartTimeDelayTime = 0StartTime = TimerDo While DelayTime < 1 DelayTime = Timer - StartTimeLoop'************* END PIN2DMD PALETTE LOADING *************** and this at the end of the script Quote '************ BEGIN PIN2DMD PALETTE RESET **************Sub ResetPaletteDim rShellDim WScriptSet rShell = CreateObject("WScript.Shell")rShell.CurrentDirectory = PIN2DMDDIRIf PIN2DMD = True then rShell.run "pin2dmd.exe /c",,TRUESet rShell = NothingEnd SubSub table1_exit():Controller.Stop:ResetPalette:End Sub '************ thanks to Rascal and gtxjoe ************** Link to comment Share on other sites More sharing options...
Jodannar Posted August 8, 2016 Author Share Posted August 8, 2016 I'm running the 2.12 firmware for this. do I need the 2.32 for the palette switching on SAM tables? or does that only apply when on an actual pinball machine rather than virtual? Link to comment Share on other sites More sharing options...
Jodannar Posted August 8, 2016 Author Share Posted August 8, 2016 I just updated my firmware. no change. command line or via visual pinball script doesn't load the palette. I notice I have no palette_option_p.txt file in the pinb2dmd directory. is this required? I thought using the p function used the inbuilt palettes available within the UI? all dlls in the pin2dmd master directory are unblocked. Link to comment Share on other sites More sharing options...
Content Provider gtxjoe Posted August 8, 2016 Content Provider Share Posted August 8, 2016 I am using PIN2DMD firmware v2.07 and it works. You stated earlier that palette switching worked via command line, so the PIN2DMD firmware setup is fine Post the path to the pin2dmd.exe Post the path to visual pinball (did you try running this as admin?) Provide a link to one of your modified .vpt/vpx files so we can try it Link to comment Share on other sites More sharing options...
Jodannar Posted August 9, 2016 Author Share Posted August 9, 2016 Switching is not working via command line. I was incorrect, pinmame colourisation was loading. Upon using pin2dmd via command line with the /p function, a cmd window appears and closes, palette is not swapped and launching any app that uses the display the default palette is used. Setting the palette via pin2dmd.exe gui, the palette swaps successfully. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
jawdax Posted August 9, 2016 Share Posted August 9, 2016 Update netframework and visual c++ Link to comment Share on other sites More sharing options...
Content Provider lucky1 Posted August 9, 2016 Content Provider Share Posted August 9, 2016 Upon using pin2dmd via command line with the /p function, a cmd window appears and closes, palette is not swapped and launching any app that uses the display the default palette is used. Are you entering your command line in a cmd window ? You should open a window by entering cmd und the "run" field, change to the pin2dmd.exe directory and start pin2dmd.exe there with the option /p 5 Link to comment Share on other sites More sharing options...
Jodannar Posted August 9, 2016 Author Share Posted August 9, 2016 Yes, passing it in a command line window. Have tried from pin2dmd directory or fully qualifying path and parameterNothing happens. Loading visual pinball, default palette loaded Update: verified latest .Net framework and Visual C++ redistributable are installedSent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Jodannar Posted August 19, 2016 Author Share Posted August 19, 2016 Any other suggestions? No idea why command line won't even swap palette Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Content Provider lucky1 Posted August 19, 2016 Content Provider Share Posted August 19, 2016 What happens when you start pin2dmd.exe without options and switch palettes ? Link to comment Share on other sites More sharing options...
Jodannar Posted August 19, 2016 Author Share Posted August 19, 2016 Switching via the Exe no options, Gui mode, palette swaps correctly when selected Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Jodannar Posted August 25, 2016 Author Share Posted August 25, 2016 No action via vp or command line parameters. Seriously befuddled Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Content Provider lucky1 Posted August 25, 2016 Content Provider Share Posted August 25, 2016 Did you change your usb drivers with Zadig to LibUSB ? Link to comment Share on other sites More sharing options...
Jodannar Posted August 25, 2016 Author Share Posted August 25, 2016 Yes drivers are correct. Panel works with pinmame and ultra dmd. Using the pin2dmd Exe gui swaps the palette. Doesn't work via command line parameter or script Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Jodannar Posted August 27, 2016 Author Share Posted August 27, 2016 Definitely using libusb-win32 Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Jodannar Posted September 18, 2016 Author Share Posted September 18, 2016 Resolved. Swapped USB ports to a confirmed usb2 port. Issue solved. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Content Provider lucky1 Posted September 19, 2016 Content Provider Share Posted September 19, 2016 You could also try to disable xHCI, eHCI etc in your Bios if possible Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.