Jump to content




Photo
* * * * * 1 votes

DMD Coloring for Everyone (PinDMD3 & PC Monitor)

color dmd pindmd3 vpm

  • Please log in to reply
312 replies to this topic

#1 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 514 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 25 January 2017 - 11:54 PM

Hi guys,
 
Some of you might have heard about Pinball Browser, an application that allows browsing and editing all the sounds, images, videos, messages etc of Stern SAM games. It was written by oga83 over at Pinside and it's an excellent tool. One of its features is the possibility to add color data to the DMD frames. Once done, it's possible to re-route the DMD signal from the real pin through a Raspberry Pi which adds the color data and displays it in all glory on an LCD display. The software doing that is called SmartDMD and is written by oga83 as well.
 
As it happened, Lucky1 managed to do the same in the firmware of his RGB LED dot matrix contoller called *******. Those of you who have one have probably already used it. It allows you to have frame-by-frame coloring in VPM games. It works by either using a modified ROM from Pinball Browser or by detecting frames and applying different color palettes to each frame, or even replace entire frames. The result is similar to what SmartDMD and ColorDMD offer for real pins, and it's pretty awesome!
 
Until now, in the virtual pinball community, this has been an exclusive feature for ******* owners. However, since opening access to cool technology usually comes with hell of a lot more benefits than drawbacks, Lucky1 decided to team up with some folks and implement this in a way so everybody can use it.
 
The first step came with a VPM patch from Lucky1 that allowed VPM to delegate DMD rendering to an external DLL. This already went upstream a few months ago and is now part of the official VPinMAME source, thanks to Toxie. The second step was DJRobX adding support for modified ROMs to the unofficial SAM source. This allows VPM to actually understand Pinball Browser's ROM modifications and send the color info to the DLL. (Note that this is only one of two ways of coloring ROMs, the second way doesn't use Pinball Browser, doesn't modify ROMs and works also for non-SAM games - hence this thread here at VPF.)
 
The third step was for me to integrate the DLL's API into DMD Extensions, a tool that allows the usage of real DMDs for Pinball Arcade, Pinball FX2 and Pro Pinball and that was already shipped with the VPX 10.2 release. DMD Extensions also comes with a virtual DMD which renders quite nicely on computer monitors. So having DMD Extensions integrated with VPM now allows us to have one single DLL that renders to all supported real DMDs plus the monitor. Which is a good base for adding coloring. :)
 
So after a couple of weeks of work, we are now reaching a point where it has become somewhat stable, and I'm happy to announce that if you have a *******, PinDMD3 or computer monitor (duh), you can fully benefit from frame-by-frame coloring using DMD Extension's DLL.
 
Games
 
Currently there are only a few games available in color, which are all SAM games modified through Pinball Browser. Here are some of them:
 
spiderman_zpssem0jlil.gif
 
 
avengers_zpslkbib4em.gif
 
metallica_zpsr9upqp2n.gif
 
 
By making the coloring feature available to everyone, we hope that some of you might start coloring non-SAM ROMs as well. There are a lot of great games out there.
 
How does this work?
 
Stern SAM games through Pinball Browser are explained above: The ROM is modified with additional color data which is then applied to each frame individually.
 
For all other games, we do the coloring ourselves: Every frame coming from VPM is analyzed. If matched, color info is added. Static content can be entirely replaced, dynamic content (with scores, video modes etc) can be enhanced. 
 
Usually there are no animations in a game when nothing's going on, so there is a default palette. For each animation you then define key frames where you want the palette to change. For four shades, we increase the color depth, so you're able to set 16 individual colors for every frame even for non-SAM games. With that you're able to do pretty awesome stuff.
 
Technically, it would be possible to add even more colors, but it turns out 16 colors are plenty. Remember, 16 colors means out of ~16 million colors you get to pick 16 for every frame. That means while you cannot do large gradients in one frame, you can do it over multiple frames. 
 
Anyway, I'm mentioning this because I want it to be clear that what the current SAM games show off can be equally achieved for all other (non-SAM) games.
 
Setup
 
Firstly you'll need to download the DLL (which by the way is called DmdDevice.dll). The best is to copy it to your C:\Windows\SysWOW64 folder, along with DmdDevice.ini. Remove or rename whatever dmddevice.dll you have in your VPinMAME folder.
 
The next steps will get a lot easier with *cough* VPDB *cough*, but for now, you need to do the following:
 
1. Download the patch file and patch the ROM
2. Create folder in VPM's altcolor folder
3. Copy the palette files there
4. Enable "Use external DMD (dll)" in VPM
5. Use patched ROM in VPX and play the game!
 
This is of course simplified. I won't go into more details because of the SAM rules here, but search "modular dmd drivers" on the other site and you'll find a detailed step-by-step guide by roar.
 
Create
 
As mentioned before, DMD coloring is not exclusive to SAM ROMs. You can color any ROM using ******* Editor written by Steve. Download the Windows or Mac version here.  
 
The first thing you need to do is get or create a frame dump of the game you want to colorize. You can do that by creating a folder called DmdDump where VPM is located. In order to record frames, enable "Show DMD" AND "Use external DMD" in VPM. Finally, use Gzip to compress the resulting .txt file in order to load it into ******* Editor.
 
The goal of the frame dump is to get all available frames of the game. So you basically need to finish the game by playing through all modes while recording. The debug mode in VPX should be helpful to achieve this.
 
Once you have the frame dump, you can start coloring. There is a tutorial on how to do that here and the manual can be found here.
 
If you're going for a SAM ROM, you can also use Pinball Browser. Here's an introduction. You'll need the full version of the software. Buy it, it's cheap and you're supporting a guy who has done awesome work for the pinball community.
 
 
Thanks!
 
This was really a team effort, so tons of thanks to Lucky1, Toxie, DJRobX, our chief of coloring Sharkky and of course oga83. Cheers also to the testers who gave feedback and made it better.
 
PS.: If you see stars, that's VPF's censorship. They're meant to hide PIN-2-DMD without the dashes.


#2 roar

roar

    Enthusiast

  • Members
  • PipPipPip
  • 452 posts

  • Flag: Canada

  • Favorite Pinball: TOM

Posted 26 January 2017 - 01:46 AM

Thanks as always for the amazing work and continuing to push the envelope. AC/DC and Mustang are available too and look amazing.

#3 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 3,726 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 26 January 2017 - 05:32 AM

This community is simply amazing. Thank you guys !!



#4 STAT

STAT

    Pinball and Arcade Freak

  • VIP
  • 4,295 posts
  • Location:Wels - Austria

  • Flag: Austria

  • Favorite Pinball: Indiana Jones

Posted 26 January 2017 - 08:30 AM

:tup:



#5 CaptFlam

CaptFlam

    Enthusiast

  • Members
  • PipPipPip
  • 51 posts

  • Flag: Turkey

  • Favorite Pinball: Addams Family

Posted 26 January 2017 - 09:04 AM

Thanks as always for the amazing work and continuing to push the envelope. AC/DC and Mustang are available too and look amazing.

 

@ Freezy You forgot to mention the other colorization authors like PinballMikeD who did the first version of Metallica and ACDC.

The color version of Family Guy was done by monster_bash.

 

Shrek done by Toon and Pirates of the Carribean by Sironzolot are afaik currently only supported with [Pin2DMD uses stolen and/or infringes IP. PinDMD is the genuine product ;) ] hardware and not correctly working with Freezys dmddevice.dll



#6 Xendo

Xendo

    Enthusiast

  • Members
  • PipPipPip
  • 104 posts

  • Flag: United States of America

  • Favorite Pinball: MM

Posted 26 January 2017 - 02:00 PM

Create

 
As mentioned before, DMD coloring is not exclusive to SAM ROMs. You can color any ROM using ******* Editor written by Steve. Download the Windows or Mac version here.  
 
The first thing you need to do is get or create a frame dump of the game you want to colorize. You can do that by creating a folder called DmdDump where VPM is located. In order to record frames, enable "Show DMD" AND "Use external DMD" in VPM. Finally, use Gzip to compress the resulting .txt file in order to load it into ******* Editor.
 
The goal of the frame dump is to get all available frames of the game. So you basically need to finish the game by playing through all modes while recording. The debug mode in VPX should be helpful to achieve this.
 
Once you have the frame dump, you can start coloring. There is a tutorial on how to do that here and the manual can be found here.
 
If you're going for a SAM ROM, you can also use Pinball Browser. Here's an introduction. You'll need the full version of the software. Buy it, it's cheap and you're supporting a guy who has done awesome work for the pinball community.

 

Since I saw this I did a little digging and tried to do a colorization on my own.  From what I can tell the reason SAM games are easy is due to being able to load them up in Pinball Browser and see all of the frames and colorize them there. As far as I know there really isn't an easy way to get full dumps of other games. Using the ******* Editor it looks like it uses PinMAME dumps which are recorded while playing. This way isn't going to get you all of the frames necessary for colorization. Especially if you suck at the game....  I could be wrong about this as I just really started digging into it. We need a program that will allow us to just load the ROM and dump the frames.

 

Is there a specific reason why the dll and ini need to be placed in the SysWoW64 folder?  Would make more sense to keep it in the PinMAME folder.


Edited by Xendo, 26 January 2017 - 02:32 PM.


#7 roar

roar

    Enthusiast

  • Members
  • PipPipPip
  • 452 posts

  • Flag: Canada

  • Favorite Pinball: TOM

Posted 26 January 2017 - 03:11 PM

 

Thanks as always for the amazing work and continuing to push the envelope. AC/DC and Mustang are available too and look amazing.

 

@ Freezy You forgot to mention the other colorization authors like PinballMikeD who did the first version of Metallica and ACDC.

The color version of Family Guy was done by monster_bash.

 

Shrek done by Toon and Pirates of the Carribean by Sironzolot are afaik currently only supported with ******* hardware and not correctly working with Freezys dmddevice.dll

 

 

I've got to load up that Family Guy one! Thanks... I'd give the Shrek and POTC a go to if they worked on the pinDMD3.


 

Create

 
As mentioned before, DMD coloring is not exclusive to SAM ROMs. You can color any ROM using ******* Editor written by Steve. Download the Windows or Mac version here.  
 
The first thing you need to do is get or create a frame dump of the game you want to colorize. You can do that by creating a folder called DmdDump where VPM is located. In order to record frames, enable "Show DMD" AND "Use external DMD" in VPM. Finally, use Gzip to compress the resulting .txt file in order to load it into ******* Editor.
 
The goal of the frame dump is to get all available frames of the game. So you basically need to finish the game by playing through all modes while recording. The debug mode in VPX should be helpful to achieve this.
 
Once you have the frame dump, you can start coloring. There is a tutorial on how to do that here and the manual can be found here.
 
If you're going for a SAM ROM, you can also use Pinball Browser. Here's an introduction. You'll need the full version of the software. Buy it, it's cheap and you're supporting a guy who has done awesome work for the pinball community.

 

Since I saw this I did a little digging and tried to do a colorization on my own.  From what I can tell the reason SAM games are easy is due to being able to load them up in Pinball Browser and see all of the frames and colorize them there. As far as I know there really isn't an easy way to get full dumps of other games. Using the ******* Editor it looks like it uses PinMAME dumps which are recorded while playing. This way isn't going to get you all of the frames necessary for colorization. Especially if you suck at the game....  I could be wrong about this as I just really started digging into it. We need a program that will allow us to just load the ROM and dump the frames.

 

Is there a specific reason why the dll and ini need to be placed in the SysWoW64 folder?  Would make more sense to keep it in the PinMAME folder.

 

To get around the sucking at the game part you can run the game in debug mode as freezy had suggested, this will allow you to manipulate the game to get to all the frames... though I suppose you'd have to have a sounds fundamental understanding of the rules and all the modes. Going by the flashing lights on the table will only get you so far I'm guessing. For example there isn't any indication on MM that Barnyard Multiball exists I don't think, you need to know to collect all the animals on the catapult. Or on games with 'sneaky' locks, unless you know they're there you could miss those frames.

 

As far as placing the in the syswow folder, I had that explained to me that all programs in windows will check there for a .dll so you only really need to put it in the one place... I imagine someone can correct me or say that more eloquently.


Edited by roar, 26 January 2017 - 03:11 PM.


#8 gtxjoe

gtxjoe

    Pinball Wizard

  • VIP
  • 4,517 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 26 January 2017 - 04:13 PM

There is no program that can dump all the frames, so you have to play the game to obtain a usable dump.  

 

You can add a wall between the flippers and the outlanes and you can play forever.



#9 Rappelbox

Rappelbox

    Enthusiast

  • Banned
  • PipPipPip
  • 88 posts

  • Flag: Germany

  • Favorite Pinball: Creature fr...... ;)

Posted 26 January 2017 - 06:16 PM

Make that wall collidable to get the drain animations too ;)

Map a free keyboard key to that wall and you're in total control.
www.GermanGamingSupplies.com - European Virtual Pinball Supplies and ready assembled Pinscape Boards, PIN²DMDs, Virtual Pins

Visual Pinball Addicts - the BIGGEST Visual and Virtual Pinball Group worldwide... Newest table releases, tutorials, videos, chat... all that fancy stuff

#10 Xendo

Xendo

    Enthusiast

  • Members
  • PipPipPip
  • 104 posts

  • Flag: United States of America

  • Favorite Pinball: MM

Posted 26 January 2017 - 07:04 PM

There is no program that can dump all the frames, so you have to play the game to obtain a usable dump.  

 

You can add a wall between the flippers and the outlanes and you can play forever.

 

 

Make that wall collidable to get the drain animations too ;)

Map a free keyboard key to that wall and you're in total control.

 

These sound like the perfect combination...  I know how to add walls, but not sure how to map them to control them.



#11 CaptFlam

CaptFlam

    Enthusiast

  • Members
  • PipPipPip
  • 51 posts

  • Flag: Turkey

  • Favorite Pinball: Addams Family

Posted 26 January 2017 - 07:42 PM

You can also throw balls in debug mode and add a hole where they get killed without pinmame recognizing them.

You even can use setup.exe in vpinmame folder and trigger the switch matrix directly using the Keyboard

 

1 2 3 4 5 6 7 8

---------------
Q,W,E,R,T,Y,U,I Select Column 1-8
A,S,D,F,G,H,J,K Select Row 1-8

For example, to toggle switch 34 (Col 3, Row 4) press E while holding F!
If the game has a simulator, press "Del" key to toggle between simulator keys
and the switch keys.



#12 jocooter

jocooter

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:indianapolis

  • Flag: United States of America

  • Favorite Pinball: Addams Family

Posted 10 February 2017 - 11:31 PM

i get color pindmd3 under setup\test but when i actually load the table and play single color

any thoughts?



#13 roar

roar

    Enthusiast

  • Members
  • PipPipPip
  • 452 posts

  • Flag: Canada

  • Favorite Pinball: TOM

Posted 11 February 2017 - 12:23 AM

i get color pindmd3 under setup\test but when i actually load the table and play single color

any thoughts?

 

Did you edit the script for the table to use the colour rom? Search the script for cgamename, it is likely referencing a different rom than you have working in the setup/test.



#14 jocooter

jocooter

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:indianapolis

  • Flag: United States of America

  • Favorite Pinball: Addams Family

Posted 11 February 2017 - 12:25 AM

i get color pindmd3 under setup\test but when i actually load the table and play single color
any thoughts?

 
Did you edit the script for the table to use the colour rom? Search the script for cgamename, it is likely referencing a different rom than you have working in the setup/test.
I got color working now but next issue is it displays on both DMD and main screen. I hit f3 and all is good till I reload table or load new table.


Sent from my A0001 using Tapatalk

#15 roar

roar

    Enthusiast

  • Members
  • PipPipPip
  • 452 posts

  • Flag: Canada

  • Favorite Pinball: TOM

Posted 11 February 2017 - 12:35 AM

check your dmddevice.ini

 

You probably have virtualdmd enabled.

 

More details here:

 

https://github.com/f.../dmd-extensions


Edited by roar, 11 February 2017 - 12:37 AM.


#16 jocooter

jocooter

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:indianapolis

  • Flag: United States of America

  • Favorite Pinball: Addams Family

Posted 11 February 2017 - 12:39 AM

Browsing threw that now. Yep that was it.. Virtual DMD =true

Sent from my A0001 using Tapatalk
Thx for input!

Sent from my A0001 using Tapatalk

#17 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 514 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 14 February 2017 - 11:55 PM

For those having crashes, try this build. I'll release a new version when the other GitHub issues are resolved.



#18 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 759 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 15 February 2017 - 01:18 AM

I just tried a few of these out, but I get crashes. Tried your last build but same results.

This is in the DMDDevice.log.  Any advice on what to try? (I've tied to put the files only in the variety of suggested locations, system32, syswow64, etc no change)

 

Thanks

-Mike

 [1] 2017/02/14 17:00:45.959  INFO | Determined color path from assembly path: D:\VP\altcolor 
 [1] 2017/02/14 17:00:45.974  INFO | Launching VPinMAME API. 
 [1] 2017/02/14 17:00:45.974  INFO | [vpm] Open() 
 [1] 2017/02/14 17:00:45.974  INFO | [vpm] Set_4_Colors_Palette() 
 [1] 2017/02/14 17:00:45.974  INFO | Setting palette to 4 colors... 
 [1] 2017/02/14 17:00:45.974  INFO | [vpm] PM_GameSettings(1) 
 [1] 2017/02/14 17:00:45.974  INFO | Enabling game colorization 
 [1] 2017/02/14 17:00:45.974  INFO | Setting game name: smanve_101c 
 [1] 2017/02/14 17:00:45.974  INFO | Setting color: #FFFF5820 
 [1] 2017/02/14 17:00:45.991 ERROR | System.BadImageFormatException: Could not load file or assembly 'dmdext, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'dmdext, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null'
   at PinMameDevice.DmdExt.Init()
   at PinMameDevice.DmdDevice.GameSettings(String gameName, UInt64 hardwareGeneration, IntPtr options)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
 


#19 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 514 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 15 February 2017 - 10:17 AM

That's really a weird error. It usually means some 32/64-bit conflict. You're using normal 32-bit VPM, right? I've manually cleaned my build folder and recompiled again, if the attached build works, then fuck you Visual Studio...

 

DmdDevice.zip



#20 osujd

osujd

    Enthusiast

  • Silver Supporter
  • 74 posts

  • Flag: ---------

  • Favorite Pinball: TAF

Posted 15 February 2017 - 11:54 AM

That's really a weird error. It usually means some 32/64-bit conflict. You're using normal 32-bit VPM, right? I've manually cleaned my build folder and recompiled again, if the attached build works, then fuck you Visual Studio...

 

DmdDevice.zip

I don't know why but this post made me laugh! I picture freezy going full out office space on VIsual Studio!







Also tagged with one or more of these keywords: color dmd, pindmd3, vpm