
Why add a flexdmd to an electro-mechanical table? Isn't that like putting lipstick on a pig?
Yes! Although more like putting an LCD display on a fine antique grandfather clock!
So why do it? My reason is that my low frills cabinet contains three frills. Contact speakers underneath the flippers for poor man's DOF, a sound activated LED strip that flashes a glow behind and below the cabinet, and a ZeDMD. Sum total for all three was under 100$, maybe under 70$. I wanted more from my 'real' DMD than a blank space or a marquee image when playing EM tables. I had also been messing around with @scutters tutorials on adding flex to solid state pinmame tables
https://www.vpforums...topic=47807&hl=
and this is an even easier process. Two other good reasons for doing this are
1. Single screen players who love EM games or play VPX standalone in cabinet mode
2. People who do graphic mods of EM tables with modern themes. Sure, you can enjoy the idea of the latest anime on a 60's style table, but if the mod is tricked out in the latest comic fashion, you need either a PUP dmd, or at least a DMD.
For starters, adding Flex will often freeze VPX if mistakes are made, especially if it can't find your images. Backup your table and save often. In fact you may want to keep your task manager window up and running.
Then download this file:
https://drive.google...?usp=drive_link
This contains all the graphics you need to run this Flexdmd. In your tables folder, create a folder called "Flex" and unzip the images into Tables\Flex\EMReel. I also included a few .vbs sample files. If they are renamed exactly like your table file and match the vpx table version you have, your tables will run with this script instead. Just move the vbs files to your table folder. JPSalas's Paradise is an example that is fairly recent.
My display only shows the current player's score because I use mine with a backglass. I also wear a belt with suspenders because my belt is awesome! If you see what is going on in the Flex_Init and FlexUpdate subs, you should find enough to figure out how to add balls remaining or other players' scores if you want. It depends on how big the lips of your pig are!
the first thing I'll do is create a background image. This is my Paradise background.

I like to zoom into my backglass screenshots and focus on a detail easily overlooked. My display is 128x32 so shrink the image to that size. Save it in the EMReel folder. You will need to remember exactly how you titled it and capitalization counts, otherwise VPX will freeze when running. Cntr-F will bring up the searchbox to make all the needed edits below. This should do it, but I look forward to any experts' feedback or if I am missing anything.
'put this at the beginning of the script with any other table options
Const UseFlexDMD = 1 ' 1 is on
'Search for "_init" and place this at the beginning of the sub, usually table1_Init
' initalise the FlexDMD display
If UseFlexDMD Then FlexDMD_Init
'Search for "_exit" and place this at the end of the sub. If there is no exit routine, create one: Sub Tablle1_exit [paste text below, then the line 'End Sub']
If UseFlexDMD then
If Not FlexDMD is Nothing Then
FlexDMD.Show = False
FlexDMD.Run = False
FlexDMD = NULL
End if
End if
'Search for whatever is used to update points, usually "Sub addscore" or Sub addscore1(x) and Sub addscore2(x) for many loserman tables. repeat this in the Sub Newball or Nextball if the table is multiplayer. This is a line that is pretty harmless if you place it anywhere it is not needed.
If UseFlexDMD then FlexDMDUpdate
'5 digit score display, 6 digit is further below. Paste only one of these sections at the end of the script.I generally use one digit more than what is used on the backglass
'In this whole section you have to only make at most 3 changes. marked by ****************
'5 digit score diplay,
'********************************************************************************
' Flex DMD routines made possible by scutters' tutorials and scripts, modified by endeemillr
'********************************************************************************
DIm FlexDMDFont
Dim FlexDMDFontActiveScore
Dim FlexDMDScene
Dim ExternalEnabled
Dim LastScoreUpdated
Dim FlexDMD ' the flex dmd display
Dim Flexpath
Dim placemil, place100k, place10k, placek, place100, place10, place1
Dim fso,curdir
Dim Scorearray
Dim digitoffset, digitadjust
Sub FlexDMD_Init() 'default/startup values
Scorearray=Array(0,0,0,0,0)
'arrays to hold characters to display converted from segment codes
Set fso = CreateObject("Scripting.FileSystemObject")
curDir = fso.GetAbsolutePathName(".")
FlexPath = curdir & "\Flex\EMReel\"
Set FlexDMD = CreateObject("FlexDMD.FlexDMD")
If Not FlexDMD is Nothing Then
FlexDMD.GameName = cGameName
FlexDMD.RenderMode = 2
FlexDMD.Width = 128
FlexDMD.Height = 32
FlexDMD.Clear = True
FlexDMD.Run = True
' FlexDMD.TableFile = Table1.Filename & ".vpx"
Set FlexDMDScene = FlexDMD.NewGroup("Scene")
'*******************adjust these values to move the display around where you want it
Const xreel = 32
Const yreel = 8
With FlexDMDScene
digitoffset = 0
digitadjust= 4
'*******************change this next line to whatever you have titled your background image in the flex folder
.AddActor FlexDMD.NewImage("Title",FlexPath & "shangrila.png")
.GetImage("Title").SetAlignedPosition 0,0,0
.GetImage("Title").Visible = True
.AddActor FlexDMD.NewImage("Blackbox",FlexPath & "5reelbox.png")
.GetImage("Blackbox").SetAlignedPosition xreel,yreel,0
.GetImage("Blackbox").Visible = True
.AddActor FlexDMD.Newimage("10K",FlexPath & "0.png")
.Getimage("10K").SetAlignedPosition (xreel + 1),(yreel +1),0
.Getimage("10K").Visible = True
.AddActor FlexDMD.Newimage("1000",FlexPath & "0.png")
.Getimage("1000").SetAlignedPosition (xreel + 12),(yreel +1),0
.Getimage("1000").Visible = True
.AddActor FlexDMD.Newimage("100",FlexPath & "0.png")
.Getimage("100").SetAlignedPosition (xreel + 23),(yreel +1),0
.Getimage("100").Visible = True
.AddActor FlexDMD.Newimage("10",FlexPath & "0.png")
.Getimage("10").SetAlignedPosition (xreel + 34),(yreel +1),0
.Getimage("10").Visible = True
.AddActor FlexDMD.Newimage("1",FlexPath & "0.png")
.Getimage("1").SetAlignedPosition (xreel + 45),(yreel +1),0
.Getimage("1").Visible = True
End With
FlexDMD.LockRenderThread
FlexDMD.Stage.AddActor FlexDMDScene
FlexDMD.Show = True
FlexDMD.UnlockRenderThread
End If
End Sub
'**************
' Update FlexDMD
'**************
Sub FlexDMDUpdate()
if UseFlexDMD then
If Not FlexDMD is Nothing Then FlexDMD.LockRenderThread
If FlexDMD.Run = False Then FlexDMD.Run = True
' Build Scorearray =
Dim flexscore
'*******************change Score(Player) if needed to whatever variable is holding the current player's points often Score(Currentplayer)
flexscore= Score(Player)
If flexscore> 99999 Then flexscore = flexscore - ( INT (flexscore /100000)*100000)
Scorearray(0) = INT (flexscore/10000)
Scorearray(1) = INT ((flexscore - (Scorearray(0)*10000))/1000)
Scorearray(2) = INT ((flexscore - (Scorearray(0)*10000) - (Scorearray(1)*1000))/100)
Scorearray(3) = INT ((flexscore - (Scorearray(0)*10000) - (Scorearray(1)*1000) - (Scorearray(2)*100) )/10) '= 19 should be 1
Scorearray(4) = INT ((flexscore - (Scorearray(0)*10000) - (Scorearray(1)*1000) - (Scorearray(2)*100) - Scorearray(3)*10)/1)
End If
With FlexDMD.Stage
.GetImage("10K").Bitmap = FlexDMD.NewImage("10K",FlexPath & Scorearray(0) &".png").Bitmap
.GetImage("1000").Bitmap = FlexDMD.NewImage("1000",FlexPath & Scorearray(1) &".png").Bitmap
.GetImage("100").Bitmap = FlexDMD.NewImage("100",FlexPath & Scorearray(2) &".png").Bitmap
.GetImage("10").Bitmap = FlexDMD.NewImage("10",FlexPath & Scorearray(3) &".png").Bitmap
.GetImage("1").Bitmap = FlexDMD.NewImage("1",FlexPath & Scorearray(4) &".png").Bitmap
End With
If Not FlexDMD is Nothing Then FlexDMD.UnlockRenderThread
End Sub
'six digit score display
'********************************************************************************
' Flex DMD routines made possible by scutters' tutorials and scripts, modified by endeemillr.
'********************************************************************************
DIm FlexDMDFont
Dim FlexDMDFontActiveScore
Dim FlexDMDScene
Dim ExternalEnabled
Dim LastScoreUpdated
Dim FlexDMD ' the flex dmd display
Dim Flexpath
Dim placemil, place100k, place10k, placek, place100, place10, place1
Dim fso,curdir
Dim Scorearray
Dim digitoffset, digitadjust
Sub FlexDMD_Init() 'default/startup values
Scorearray=Array(0,0,0,0,0,0)
'arrays to hold characters to display converted from segment codes
Set fso = CreateObject("Scripting.FileSystemObject")
curDir = fso.GetAbsolutePathName(".")
FlexPath = curdir & "\Flex\EMReel\"
Set FlexDMD = CreateObject("FlexDMD.FlexDMD")
If Not FlexDMD is Nothing Then
FlexDMD.GameName = cGameName
FlexDMD.RenderMode = 2
FlexDMD.Width = 128
FlexDMD.Height = 32
FlexDMD.Clear = True
FlexDMD.Run = True
' FlexDMD.TableFile = Table1.Filename & ".vpx"
Set FlexDMDScene = FlexDMD.NewGroup("Scene")
'*******************adjust these values to move the display around where you want it
Const xreel = 32
Const yreel = 8
With FlexDMDScene
digitoffset = 0
digitadjust= 4
'*******************change this next line to whatever you have titled your background image in the flex folder
.AddActor FlexDMD.NewImage("Title",FlexPath & "Led Zeppelin.png")
.GetImage("Title").SetAlignedPosition 0,0,0
.GetImage("Title").Visible = True
.AddActor FlexDMD.NewImage("Blackbox",FlexPath & "6reelbox.png")
.GetImage("Blackbox").SetAlignedPosition xreel,yreel,0
.GetImage("Blackbox").Visible = True
.AddActor FlexDMD.Newimage("100K",FlexPath & "0.png")
.Getimage("100K").SetAlignedPosition (xreel + 1),(yreel +1),0
.Getimage("100K").Visible = True
.AddActor FlexDMD.Newimage("10K",FlexPath & "0.png")
.Getimage("10K").SetAlignedPosition (xreel + 12),(yreel +1),0
.Getimage("10K").Visible = True
.AddActor FlexDMD.Newimage("1000",FlexPath & "0.png")
.Getimage("1000").SetAlignedPosition (xreel + 23),(yreel +1),0
.Getimage("1000").Visible = True
.AddActor FlexDMD.Newimage("100",FlexPath & "0.png")
.Getimage("100").SetAlignedPosition (xreel + 34),(yreel +1),0
.Getimage("100").Visible = True
.AddActor FlexDMD.Newimage("10",FlexPath & "0.png")
.Getimage("10").SetAlignedPosition (xreel + 45),(yreel +1),0
.Getimage("10").Visible = True
.AddActor FlexDMD.Newimage("1",FlexPath & "0.png")
.Getimage("1").SetAlignedPosition (xreel + 56),(yreel +1),0
.Getimage("1").Visible = True
End With
FlexDMD.LockRenderThread
FlexDMD.Stage.AddActor FlexDMDScene
FlexDMD.Show = True
FlexDMD.UnlockRenderThread
End If
End Sub
'**************
' Update FlexDMD
'**************
Sub FlexDMDUpdate()
if UseFlexDMD then
If Not FlexDMD is Nothing Then FlexDMD.LockRenderThread
If FlexDMD.Run = False Then FlexDMD.Run = True
' Build Scorearray =
Dim flexscore
'*******************change Score(Player) if needed to whatever variable is holding the current player's points
flexscore= Score(Player)
If flexscore> 999999 Then flexscore = flexscore - ( INT (flexscore /1000000)*1000000)
Scorearray(0) = INT (flexscore/100000)
Scorearray(1) = INT ((flexscore - (Scorearray(0)*100000))/10000)
Scorearray(2) = INT ((flexscore - (Scorearray(0)*100000) - (Scorearray(1)*10000))/1000)
Scorearray(3) = INT ((flexscore - (Scorearray(0)*100000) - (Scorearray(1)*10000) - (Scorearray(2)*1000) )/100) '= 19 should be 1
Scorearray(4) = INT ((flexscore - (Scorearray(0)*100000) - (Scorearray(1)*10000) - (Scorearray(2)*1000) - Scorearray(3)*100)/10)
Scorearray(5) = 0
End If
With FlexDMD.Stage
.GetImage("100K").Bitmap = FlexDMD.NewImage("100K",FlexPath & Scorearray(0) &".png").Bitmap
.GetImage("10K").Bitmap = FlexDMD.NewImage("10K",FlexPath & Scorearray(1) &".png").Bitmap
.GetImage("1000").Bitmap = FlexDMD.NewImage("1000",FlexPath & Scorearray(2) &".png").Bitmap
.GetImage("100").Bitmap = FlexDMD.NewImage("100",FlexPath & Scorearray(3) &".png").Bitmap
.GetImage("10").Bitmap = FlexDMD.NewImage("10",FlexPath & Scorearray(4) &".png").Bitmap
.GetImage("1").Bitmap = FlexDMD.NewImage("1",FlexPath & Scorearray(5) &".png").Bitmap
End With
If Not FlexDMD is Nothing Then FlexDMD.UnlockRenderThread
End Sub
Edited by endeemillr, 07 October 2025 - 12:08 AM.




Top








are all trademarks of VPFORUMS.