Features for DMD owners* that aren't officially supported
Real DMDs for virtual pinball cabinets are pretty cool but they need to be supported by the software running the games. This is an attempt to fill some gaps.
* And even if you don't have a real DMD, there's awesome stuff too!
Currently supported displays:
- PinDMD v3, full RGB support
- PinDMD v2, 4 bit (16 shades) support
- PinDMD v1, 2 bit (4 shades) support
- PIN2DMD, full RGB support
- Virtual DMD on a computer monitor, renders nice dots and is useful for debugging.
- Alphanumeric Virtual, a high-resolution virtual segmented display for pre-DMD area games.
- You can also stream the DMD to a browser in your LAN, because, why not!
The primary goal of this project was to add support for real DMDs for games that don't provide support out of the box. Supported games are:
- Pinball FX2/3 through frame grabbing from screen
- Farsight's The Pinball Arcade through grabbing the DMD texture from memory
- Pro Pinball Timeshock through their message queue
- Visual PinMAME through
The command line tool can also display image files on the DMD device and render frames to bitmap files. Many features like this are described in the command line options below, so have a close look at those as well.
Since v1.7, DMD Extensions also support dynamic DMD coloring previously only available for PIN2DMD displays (both side-channel and VNI).
Since v1.8, DMD Exensions supports high-resolution rendering of segmented alpha-numeric displays:
Documentation how to enable and customize this feature can be found here.
- Get the latest release,
copy the content of the zip file to your hard drive, preferable in your
PATH, and unblock the
.exefile (right-click, properties, unblock).
- Download and install the Visual C++ Redistributables for Visual Studio 2017.
- If you haven't already, download and install the .NET Framework 4.5.2.
If you want to use DMD Extensions with VisualPinMAME:
DmdDevice.log.configinto your VPM folder (usually at
- Run the VPM setup
- Click on Test, select the game and click on Game Options.
- Enable Use External DMD and optionally disable Show DMD.
You can also set this as the default by selecting Default Options in the VPM setup, however note that games that you've already configured won't be affected.
x64 vs x86
dmdext.exe, take the bitness of your OS. This is important for Pro Pinball, where the bitness of the binary must be the same as dmdext's.
dmddevice.dllyou probably want the 32-bit version unless you've set up VPM with
Setup64.exeand you know what you're doing.
- Open a command prompt ([Windows]+[R],
You should see a test image on your DMD as well as on a virtual DMD.
- Enable cabinet options in Pinball FX2
- Resize the DMD to:
- Move the DMD to somewhere hidden like off-screen or behind the playfield
- Open a command prompt ([Windows]+[R],
dmdext mirror --source=pinballfx2 --no-virtual[enter] (or
- Start Pinball FX2/3
For further tweaking, see options below.
The DMD from Pinball FX3 is pulled directly from the memory.
- Open a command line prompt ([Windows], type
dmdext mirror --source=pinballfx3 --no-virtual[enter]
- Start Pinball FX3 and play a game.
It doesn't matter whether Pinball FX3 is started before or after
it works with or without cabinet mode.
Note that while the current memory grabber code should also work for future
Pinball FX3 versions, we obviously can't guarantee it. If a new version breaks
dmdext, you should still be able to fall back to the legacy screen grabber
that is used by Pinball FX2 by using the
The Pinball Arcade
For TPA we're pulling frames off the DMD texture from TPA's memory.
- Open a command line prompt ([Windows], type
dmdext mirror --source=pinballarcade --no-virtual[enter]
- Start the DX11 version of The Pinball Arcade.
- Select and start a game (only then it starts mirroring, during attract mode it doesn't, even though TPA does display the DMD).
dmdext while TPA is running doesn't work and will be
Also note that currently only 128x32 DMD games are supported, that means no EM games neither Frankenstein which has a different resolution.
If you happen switch tables often and the last DMD frame gets stuck on your DMD
when changing to an EM game, you can use the
--idle-after option to clear the
Pro Pinball Ultra
In version 1.2.1, Barnstorm Games added support for external hardware through a message queue. To get it running, do the following:
- Make sure you have
ProPinballSlave.batto the Pro Pinball installation folder (usually at
%PROGRAMFILES(X86)%\Steam\SteamLibrary\steamapps\common\Pro Pinball Ultra)
- Add the following command line parameters when launching
Note that this currently works only with the 64-bit version of Pro Pinball. 32
bit binaries will be provided with a later release. If you want to change the
options (e.g. show the virtual DMD), edit
ProPinballSlave.bat and adopt
VPM introduced the possibility of delegating DMD rendering to an external DLL. The main motivation is being able to ship a single build instead of having to release multiple binaries for multiple DMDs.
If you are a PC monitor user or have a RGB display (PinDMDv3 or PIN2DMD), the advantage of dmdext is that Lucky1's coloring features are fully supported. You can set this up as you would for a PIN2DMD:
- Create an
altcolorfolder where VPM is installed (usually
- In that folder, create another one named after the ROM (e.g.
- Download the
.vnifile from your favorite virtual pinball site, put them into that folder and name them
- Run VPM setup, open the ROM's game options and enable Use external DMD (dll) as well as Colorize DMD.
- Download and install Visual Studio 2017
- The unmanaged exports library needs MS Build tools, which come with .NET 3.5. Install Instructions
- Optional: If you want
DmdDevice.dllcopied to your VPM folder after build, point the
VPM_HOMEenvironment variable to your VPM installation folder.
- Clone the repo:
git clone https://github.com/freezy/dmd-extensions.git
- Open the
.slnfile in Visual Studio and build the solution.
DmdDevice.dll is called by VPM, we can't pass any configuration
parameters to it. Instead, we use
DmdDevice.ini which must be located
in the same folder as
VPinMAME.dll or at the path where the
environment variable is pointing to.
Since v1.8 you can also tell
dmdext.exe to read the output configuration from
DmdDevice.ini instead of passing them as command line arguments. The options
are described below.
The output are described by block below.
|How to downscale SEGA 192x64 pixel games to smaller displays. Can have three values:
|Flips the image horizontally (left/right)|
|Flips the image vertically (top/down)|
|Enable or disable frame-by-frame colorization (inactive in VPX bundle)|
|Shows a virtual DMD that renders on the computer screen somewhat nicely|
|Virtual DMD stays on top of most other windows|
|Hide the resize grip|
|If true, allow free resizing of the virtual DMD, otherwise the aspect ratio is locked to the DMD's.|
|If true, read the virtual DMD position from VPM's registry.|
|Position of the virtual DMD. Command line takes in all four in the shown order, where the last (height) is optional.|
|Scale dot size. Use
|Enables the 2-bit pinDMD display.|
|Enables the 4-bit pinDMD2 display.|
|Enables the RGB24 pinDMDv3 display.|
|COM port, e.g.
|Enables the RGB24 PIN2DMD display.|
|Delay in milliseconds to wait after loading a palette.|
|Enables creating an .avi video from the DMD frames.|
|Path to folder or .avi file. If a folder is given, it will create a file named after the current game.|
|Enables streaming the DMD in real time to your browser in your LAN.|
|Port of the web server to listen on|
|Enables output to PinUP.|
You can also override all options per game by using the game's name as section
name and pre-fixing options with the name of the section (apart from
options, which aren't prefixed). For example if you have a PinDMD2 and don't
want to use it for Baywatch which has a different resolution, you would create
a section like this:
[baywatch] pindmd2 enabled = false virtualdmd enabled = true virtualdmd left = 2500 virtualdmd top = 800 virtualdmd width = 1024 virtualdmd height = 256
This is also useful if you just want to fit the virtual DMD onto different backglasses which have slightly different positions.
Also note that dmdext can retrieve the DMD's position from VPM's registry
setting. That means you can use VPM to position the DMD and dmdext will take
the same setting for each game. This behavior can be enabled using the
Command Line Configuration
Input options only apply to dmdext.exe, because the DLL is called externally from VPM where no configuration is necessary (apart from enabling it in VPM).
The following parameters are valid for all of dmdext's commands:
||Use output configuration from
||Sets the color of a grayscale source that is rendered on an RGB destination.||ff3000|
||Exit the program when finished, e.g. when Pinball FX2 doesn't receive any frames anymore.||false|
||Exit after n milliseconds. If set to -1, waits indefinitely or until source finishes when -q used.||-1|
||Don't clear screen when quitting.||false|
||If set, writes all frames as PNG bitmaps to the provided folder.|
Note that all options of dmdext.exe are also available via command line:
dmdext --help dmdext mirror --help dmdext play --help dmdext test --help
mirror command has the following additional parameters:
||Required. The source you want to retrieve DMD data from. One of: [
||How many frames per second should be mirrored.||25|
||Wait for number of milliseconds until clearing the screen. Disable with 0.||0|
||Play this file while idleing instead of blank screen. Supported formats: JPG, PNG, GIF. Animated GIFs are supported.||none|
||screen - Position and size of screen grabber source. Four values:
||0 0 128 32|
||screen - Resize captured screen to this size. Two values: .||128 32|
||screen - How much of the white space around the dot should be cut off (grid size is defined by --resize-to). 1 means same size as the dot, 0.5 half size, etc. 0 for disable.||0|
||propinball - Arguments send from the Pro Pinball master process. Usually something like:
||pinballfx3 - If set, don't use the memory grabber but the legacy screen grabber, like Pinball FX2.||false|
play command has the following additional parameters:
||Path to the file to play. Currently supported file types: PNG, JPG, BIN (raw).||none|
This application is based on .NET 4.5, which only runs on Windows 7 or later. Probably on Vista too, but who cares. If you're still running WinXP then you have my sincerest sympathy, but that's as far as I go. ;)
Flickering with PinDMDv3
Some users reported heavy flickering when running via PinballX. Seems that this is linked to the desktop settings. This seems to help:
- Go to My Computer
- Click on Performance Information and Tools on the bottom left
- Click on Adjust Visual Effects at the top left.
- When the Performance Window pops up, click on Adjust for Best Appearance. All the boxes should automatically get check marked.
- Click on Apply, and then OK to get out.
Thanks to xman72!
Try boosting how fast dmdext grabs the frames. For example, for Pinball FX2, try:
dmdext mirror --source=pinballfx2 --no-virtual -q --fps 60
Default is 25, which seems too slow for some games.
Thanks smoke007 for the tip!
This project comes bundled in two versions: A library which is loaded by VPM
DmdDevice.dll, and an executable,
dmdext.exe for all the other
The executable ignores
DmdDevice.ini because it's configured through command
Slow rendering on certain ROMs with VPM?
Use VPM 3.1. If you can't wait there's a beta build here.
Thanks to djrobx for the fix an all others at #52 for reporting.
Weird positioning or no DMD visible at all?
When you override High DPI scaling in the host app (e.g.
dmdext is put into a different coordinate system, so your
position settings are applied differently. This can lead to wrong positioning
or complete off-screen rendering.
Thanks to outhere for the tip!
Make sure you include the application log. You can usually find it at the same
place you copied your
dmdext.exe. However, there are two
premises for the log to be created:
You need a log config file. If there's no log config file, no log is created. The log config file is called
dmdext.exe. They must be at the same place as the DLL and EXE respectively.
The user running the host app must have write permissions to the log folder. Per default that's the current directory. If you have copied the DLL to the
Windows\SysWOW64folder, you don't have write access. In this case you need to write the log elsewhere. You can do that by editing the log config file. The format of the log file is XML. To change the log file location, find this line:
<target xsi:type="File" name="file" fileName="DmdDevice.log"
And change the
fileNameattribute to somewhere you can write, for example:
<target xsi:type="File" name="file" fileName="C:\Users\youruser\DmdDevice.log"
For problems with DmdDevice.dll, specially with coloring, set the log level to
Trace and reproduce the problem. You can do that by editing
<logger name="*" minlevel="Info" writeTo="file" />
<logger name="*" minlevel="Trace" writeTo="file" />
If you have a crash, please also include which OS/bitness you're using. If it's
about the DLL, let us know where you copied the DLL and which host application
you're using (VPM's
vpinball.exe, also which version).
- NoEx for the excellent TPA grabber code, as well as the Pinball FX3 memory grabber.
- Tom Speirs, Lucky1, CarnyPriest and Russdx for their help on the DMD code
- Lucky1 for instructions and details about the coloring feature
- DJRobX for helping with the dynamic coloring, better performance and much more.
- mjrgh for debugging and optimizing stuff.
- Adrian Page from Barnstorm for his help setting up the slave correctly.
Finally, thanks to JetBrains for their awesome tools and support of the Open Source Community!
GPLv2, see LICENSE.