Content Provider gtxjoe Posted December 31, 2015 Content Provider Share Posted December 31, 2015 PIN2DMD supports uploading of PPM images (128 x 32) using the VC++ version of PIN2DMD.exe. This would be useful for displaying logos for non-DMD tables. This feature has been mentioned in previous posts and details are in the tools folder here: https://github.com/lucky01/pin2dmd Here are a bunch of PPM images I have created for this To test this, download the attached zip and unzip the files to the "PIN2DMD-master\tools\vc++\Binary" folder. Open a dos command window and navigate to "PIN2DMD-master\tools\vc++\Binary" and type pin2dmd /i <<ppm filename>> For example: pin2dmd /i ballyred.ppm or pin2dmd /i hyperpin.ppm Here are details on how to load these images when starting a Visual Pinball table and exiting a table (based on Fren's "Pin2Dmd - Table Support" post) if you are comfortable modifying table scripts. Assumes you have the PIN2DMD github files located in c:\ I am displaying the gottlieb logo for the Genie table and when exiting the table, I blank the PIN2DMD table. At the top of the table script after Option Explicit Randomize Add this code '************ BEGIN PIN2DMD PALETTE LOADING ************** '************ freneticamnesic, Rascal and gtxjoe ******* Const PIN2DMD = True Const PIN2DMDDIR = "C:\PIN2DMD-master\tools\vc++\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 /i gottlieb.ppm",,TRUE oShell.CurrentDirectory = ORIGDIR Set oShell = Nothing Dim DelayTime, StartTime DelayTime = 0 StartTime = Timer Do While DelayTime < 1 DelayTime = Timer - StartTime Loop '************* END PIN2DMD PALETTE LOADING *************** and replace the exit subroutine Sub Gemini_Exit() savehs If B2SOn Then Controller.stop End Sub with this '************ BEGIN PIN2DMD PALETTE RESET ************** '************ freneticamnesic, Rascal and gtxjoe ******* Sub ResetPalette Dim rShell Dim WScript Set rShell = CreateObject("WScript.Shell") rShell.CurrentDirectory = "C:\PIN2DMD-master\tools\vc++\Binary" If PIN2DMD = True then rShell.run "pin2dmd.exe /i blank.ppm",,TRUE Set rShell = Nothing End Sub Sub Gemini_Exit() savehs If B2SOn Then Controller.stop ResetPalette End Sub '************* END PIN2DMD PALETTE RESET *************** Next step would be to create a batch file or autohotkey script that can be used by Hyperpin or Pinballx to load these based on the table that is launched, to eliminate the need to modify table scripts... LOGO_PPM_files.zip Link to comment Share on other sites More sharing options...
ANDRESDC Posted January 1, 2016 Share Posted January 1, 2016 Hello gtxjoe !!! Can you recommend me a PPM creator ? of course to create 128x32 files. For example I would like to create an image that says something like: "Happy New Year 2016". Thanks in advance! Andrew. Link to comment Share on other sites More sharing options...
Content Provider lucky1 Posted January 1, 2016 Content Provider Share Posted January 1, 2016 Gimp and Photoshop just to name two. Link to comment Share on other sites More sharing options...
Content Provider gtxjoe Posted January 2, 2016 Author Content Provider Share Posted January 2, 2016 I used Photoshop Resize/crop a png or jpg image to 4 to 1 ratio. Adjust the image to your liking and then resize the canvas to 128x32 and save in PPM format If you google search for png to ppm there are free online converters Link to comment Share on other sites More sharing options...
ANDRESDC Posted January 2, 2016 Share Posted January 2, 2016 Thanks a lot !!! It was in "ascii" as deafult when saving, when I switch to "binary" the image appear with pin2dmd.exe /i xxx.ppm Thanks !!! Enviado desde mi SM-N910U mediante Tapatalk Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 17, 2016 Content Provider Share Posted January 17, 2016 I've created a handful of PIN2DMD images for specific tables, and a few for some missing pinball manufacturers from gtxjoes list. I'm not sure if I'll continue this, my hope is pinballx will support it soon so we won't need to convert all to PPM but I guess we'll see. https://www.dropbox.com/sh/2y3a8zgpi5yli0i/AACWUvNm38euZk7KGVJxt9-ea?dl=0 Link to comment Share on other sites More sharing options...
OzStick Posted January 17, 2016 Share Posted January 17, 2016 So can PIN2DMD.EXE be run as a standalone, without the need for any other files or apps? I'm wanting to set it up in PinballX to reset the palette when exiting a table and it would be nice to not have to install the entire pin2dmd-master directory structure onto my cabinet PC. Link to comment Share on other sites More sharing options...
Rappelbox Posted January 17, 2016 Share Posted January 17, 2016 Maybe you need the dlls, but apart from that, nothing else is needed Pin2dmd can be reset to standard palette by entering Pin2dmd.exe /c in cmd or embedded in a batch-file which is then called by pbx when exiting a table Greets, Dom Link to comment Share on other sites More sharing options...
OzStick Posted January 17, 2016 Share Posted January 17, 2016 You're a champ Rappelbox, I'll give it a try. Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 18, 2016 Content Provider Share Posted January 18, 2016 I just uploaded 9 or 10 variations of logos to the dropbox folder. The logos previously created were based on the wheel images so some scale funny and lose detail. The images I uploaded ended in "-dmd-logo.ppm" are based on the logo as it appears on the actual DMD of the game, so the detail is better at 128x32. I'm still working on good ways to do this. I probably won't do many of the colored DMD logos but I will for the handful of games I enjoy playing. It's easy enough (most of them...) so others can join in too. Hopefully we get proper support in PinballX soon. Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 18, 2016 Content Provider Share Posted January 18, 2016 Some examples on the PIN2DMD setup I should probably focus a bit more time on the EM games though. Fast Draw turned out good. I think they're the ones that will get the most use since the DMD is not used for those games. Link to comment Share on other sites More sharing options...
vampirolatino2 Posted January 18, 2016 Share Posted January 18, 2016 Indeed. And those tables that have the numeric score in the backglass, but can be used in the dmd too. I always leave them in the BG, it looks better and more natural. The dots in numeric score looks a little off, so I choose not to run it. Those tables like for example BTTF. TMNT, etc will benefit of your dmd logos. And those spanish tables that don't have vpinmame support. Nice example shots! Link to comment Share on other sites More sharing options...
OzStick Posted January 19, 2016 Share Posted January 19, 2016 Rather than editing table scripts, could this possibly be done as a global BAT or EXE file? In PinballX we have the ability run programs before and after table loading and, in addition, parameters can be passed. One such parameter is [TABLENAME] so if someone can figure out how to parse the table name to our BAT file then it may be a simple matter of putting the PPM files into a common folder from which they can be called. I'd have a stab at it but I'm not very good with coding from scratch - I can adapt code, I just can't write it! Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 19, 2016 Content Provider Share Posted January 19, 2016 Rather than editing table scripts, could this possibly be done as a global BAT or EXE file? In PinballX we have the ability run programs before and after table loading and, in addition, parameters can be passed. One such parameter is [TABLENAME] so if someone can figure out how to parse the table name to our BAT file then it may be a simple matter of putting the PPM files into a common folder from which they can be called. I'd have a stab at it but I'm not very good with coding from scratch - I can adapt code, I just can't write it! I can create a bat file to launch this with the table launch just fine I think actually... That wasn't my initial goal. Originally I wanted these to pop up in the launcher and go from there but now that you mention it that way would solve the script editing at least for now. Right now I've done it using one bat per ppm - if someone wanted to write a better script to load the ppm automatically that would be better. I'll try it shortly and share an example Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted January 19, 2016 Content Provider Share Posted January 19, 2016 What is being discussed shares some similarities with my project where I am displaying custom instruction cards on per table basis. Can certainly take script elements to make it work for this: http://www.gameex.info/forums/topic/16462-update-visual-pinball-mini-dmdb2s-screen-for-apron-now-with-instruction-card-splash-viewer/ Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 20, 2016 Content Provider Share Posted January 20, 2016 I don't seem to be able to gain control of the PIN2DMD from PBX. If I try to write to it using CMD I get a PIN2DMD not found error. I don't seem to be able to disable PBX from using the DMD either, even if I delete all videos, it still has control of it and I see no settings to turn it off. Right now I'm stuck, I could probably hack something together in the short term that would work if I could access like I need to but it just doesn't work with PBX currently. Link to comment Share on other sites More sharing options...
Content Provider lucky1 Posted January 20, 2016 Content Provider Share Posted January 20, 2016 That is because pbx claims the USB device as soon as it finds a pindmd device, no matter if you play a video or not. I modified the XDMDNative.dll by searching for the USB VID/PID in the source (search for hex 57 E4) and modified it to something else (eg E7 E5). This prevents pinballx from finding the pin2dmd and you can control it with pin2dmd.exe. I attached my modified DLL. XDMDNative.zip Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 20, 2016 Content Provider Share Posted January 20, 2016 That's exactly what's needed. Thank you again. Sent from my XT1585 using Tapatalk Link to comment Share on other sites More sharing options...
randr Posted January 20, 2016 Share Posted January 20, 2016 Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 21, 2016 Content Provider Share Posted January 21, 2016 The quickest thing we can do right now is launch these files to display on the DMD when we are playing a pre-1987 SS game or an EM game, the kind of tables that have scores on the backglass instead of between the speaker area. If you use the modified .dll that lucky1 uploaded, and you have 2.1 or higher PinballX, and the newest PIN2DMD fw, you can do this for your system settings in PBX: Obviously, the location of your pin2dmd.exe will be slightly different... What I did was put all the .ppm files in the same folder as the pin2dmd.exe, you can put them in a subfolder, and just account for that in the launch parameters. I name the ppm files the same as the VP table. If you have an older version of PBX you can use [TABLEFILE] but you'll have to add the extension (.vpt, .vpx) before the .ppm extension on your files. This is probably as far as I'll go until PBX supports pin2dmd natively.The toughest part of all this is re-naming your ppm files to match the table names. Then of course a lot of people have preview DMD video that won't work with the modified dll - so of course this is mostly for naught right now. Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 21, 2016 Content Provider Share Posted January 21, 2016 Totally worth it though Here's how it works Link to comment Share on other sites More sharing options...
Content Provider gtxjoe Posted January 21, 2016 Author Content Provider Share Posted January 21, 2016 Nice - you got it working Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted January 21, 2016 Content Provider Share Posted January 21, 2016 Lucky1 did heh Sent from my XT1585 using Tapatalk Link to comment Share on other sites More sharing options...
OzStick Posted January 21, 2016 Share Posted January 21, 2016 Really nice work. Pity about the lack of support in PBX currently - it's like shooting yourself in one foot, then before it heals properly you shoot yourself in the other foot! Link to comment Share on other sites More sharing options...
karlson18 Posted January 21, 2016 Share Posted January 21, 2016 Yeeees great work thank you very much lucky1 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.