PDA

View Full Version : dragging the dmd



magostin
04-12-2009, 10:44 AM
do you have to drag the dmd to the 2nd screen every time?

or can you somehow lock its position?

magostin

unclewilly
04-12-2009, 10:51 AM
i removed the scripted position from the tables in the download file. Normally when you load a game and position the dmd. the next time you launch the game the dmd retains the previous position.

xzotic
04-12-2009, 10:58 AM
This 'gludge' is causing the issues I am having with seeing the dmd in the first place. i will update my other thread with details. However, i must admit this doesn't look promising... I now understand because you are running in effectively single screen mode you cannot position the dmd in the script onto the 2nd screen (like you can when it is spanned)...hence the manual move and 'hope it will remember' option...which for me anyway is causing significant issues.

magostin
04-12-2009, 11:39 AM
yes, it does not remember the position.
i tried both in and outside of hyperpin.

magostin

magostin
04-15-2009, 07:51 AM
is there any fix to keeping the dmd on the 2nd screen for the next time you play?
is it possible to do it in the script?

magostin

unclewilly
04-15-2009, 12:05 PM
for me it remembers it's position and size every time even after a restart. I will see about a scripted positioning.

magostin
04-15-2009, 01:28 PM
if you right click the dmd,and go to paths...in the drop down box wich display do you have listed?

i have mine at default, i was wondering if this needs to be changed to have it show up on the 2nd screen.

magostin

BUZZ
05-04-2009, 01:57 AM
Hi Guys,
Could someone help me out with a similar problem I have got trying to move dmd.
I can load a vp table ok using Hyperpin, with the backglass showing ok, but cannot get a cursor to display to enable me to drag the dmd to the backglass.
I know this must be something simple but can`t figure out :stupid:
I have tried opening the table outside of HP and then drag onto 2nd monitor, but when I open table thru` HP its back in the bottom of the playfield monitor.
Cheers Buzz

Chappie
05-04-2009, 02:04 AM
I think you are best advised to do all your editing outside of Hyperpin. So just load up the table with VP running only and make sure those four pre-positioning lines in the script are deleted and then size and move your display to the second monitor. Once you have it there, quit back to the editor and save your table. Reload the table and see if it took effect.

Steve

BUZZ
05-04-2009, 02:41 AM
Thanks Chappie tried your suggestion, but dmd still at the base of playfield.

unclewilly
05-04-2009, 07:20 AM
if you need the mouse pointer in hp just press the t key.

BUZZ
05-04-2009, 11:18 AM
Thanks for the tip - i can now drag the dmd to the backglass monitor, and using alt tab keys can get the table back into focus - but after playing the table and exiting back to the front end, and going back in the dmd has reverted back.

Also tried outside oF hp, and made alterations saved table in VP editor, exited out, gone back in and still reverts back to bottom right hand corner ??

At least it`s all coming together now - I have both FP and VP tables running within hyperpin.
Cheers Buzz

unclewilly
05-04-2009, 01:12 PM
hey buzz what table is it?

BUZZ
05-04-2009, 01:18 PM
Sorry - I have been trying to set Back to the Future - version that came in the HP PACK. Think this is the case with Elvis, Elvira also.
For my setup I have had to rotate to -270 on all the VP tables, but I wouldnt have thought this would effect the dmd.
Buzz

unclewilly
05-04-2009, 01:29 PM
try deleting the registry for the offending tables, then load and play them in vp and place the dmd. Maybe the registry value is not being reset when you move the dmd. Do this outside of hyperpin.
Are you using xp or vista?
Do you have the beta release of hyperpin on this site or are you still using the prebeta that we were testing?

-Scott

BUZZ
05-04-2009, 01:33 PM
Thanks Scott,
Running xp pro, did a clean install of the latest version of HP, not the pre beta tester. Will try the regedit etc. and let you know how I get on.
Cheers Buzz

kingb33
05-04-2009, 01:36 PM
Why not just use the cabinet.dll form VP forums?

http://vpforums.org/index.php?automodule=downloads&req=idx&cmd=viewdetail&f_id=967

That fixes all DMD placement issues really easily. Or am I totally missing something? :o

unclewilly
05-04-2009, 01:46 PM
i forgot to ask if you installed the cabinet VPinmame.dll. If you haven't replaced the standard pinmame dll with that the dmd will never save it's position on the second monitor. Thanks kingb33

BUZZ
05-04-2009, 01:57 PM
Scott,
Tried your suggestion - even out of HP the dmd reverts back to the playfield, although after regedit it starts out bottom left corner, after moving up to backglass, it then returns off centre to bottom right - weird ??

Have got the cabinet dll. in place. Will double check tho.
Buzz

BUZZ
05-04-2009, 02:09 PM
Got the cab dll still no go.

BadBoyBill
05-04-2009, 02:22 PM
Try this Buzz, download the latest FP launch in the stickies, originally we were forcing VP closed for a quick return back to HP, but this didnt allow settings to be saved, so I rewrote how it closes VP to save your credits and I bet this affects DMD placement to.

BUZZ
05-04-2009, 02:33 PM
Thanks Bill,
Installed the latest launch this afternoon - sorry still no go :bawling:

From a previous post - might try this, although I am no expert with scripts !

"If all else fails and you know the coordinates and size that you want the dmd you can always just type it into the table script where you uncommented it. It would probably be the same fore most every table so you could probably figure it out once and set it. "

Buzz

BadBoyBill
05-04-2009, 02:40 PM
Oh I saw your having this problem outside of HP. So just to check you have the latest 9.02 VP installed, you have the cabinet dll file in your install directory for vp and have removed the old dll for sure?

BUZZ
05-04-2009, 02:49 PM
Bill,
I replaced the vpinmame.dll with the version 2.10.2.0 in the vp folder, and double checked I am running vp9.0.2.

BUZZ
05-04-2009, 02:57 PM
Picked this up from over at VP.org

"If you are talking about VP9, tables containing the following rotation commands set the registry which then continues when you run other tables without these lines.
To rotate and position the DMD, add these lines to the script and adjust the x, y and sizes to what you prefer. To find where to put them, hit Script, ctrl-F and find .gamename, then below that add:

.Games("tablename").Settings.Value("dmd_pos_x")=5
.Games("tablename").Settings.Value("dmd_pos_y")=870
.Games("tablename").Settings.Value("dmd_width")=600
.Games("tablename").Settings.Value("dmd_height")=150
use:
.Games("tablename").Settings.Value("rol")=1
for rotated left, "ror" for rotated right, or:
.Games("tablename").Settings.Value("rol")=0
for non rotated screens.

Replace "tablename" with whatever is after .gamename=
If the line says controller.run, then add "controller" to each of the lines, like:

controller.Games("tablename").Settings.Value("dmd_pos_x")=5

You can use just the "rol" line if you don't care about setting the size or position.

Could a table that has this in the script be continuing to run this in others?
Just a thought ??
Buzz

BadBoyBill
05-04-2009, 02:57 PM
Man thats weird, I have to think about it some more why it doesnt work just for you, just an install of the latest vp and replacing the dll allows me to move my dmd anywhere and next time it starts its right where I left it.

BadBoyBill
05-04-2009, 02:58 PM
I think Unclewilly comments all that stuff out when he mods the tables.

BUZZ
05-04-2009, 03:06 PM
Bill,
Found that string in the script of Elvis 19.9
"dmd pos x"
"dmd pos y"
etc.
Wondering if I have a version that hasn`t had the edit done, and that is affecting the others.
Buzz

kingb33
05-04-2009, 05:40 PM
Got the cab dll still no go.

thats so odd...i used to have a problem similar to yours but that cabinet .dll fixed everything

the 100% sure fire way to control the DMD placement is to manually add this line to your table scripts-

Controller.SetDisplayPosition 2261, 819, GetPlayerHWnd

(its a little confusing to explain where it needs to be exactly because it needs to be in a certain spot)

2261 and 819 being your DMD positions. Use "AutoIt" to find those positions on your monitor with a little arrow it provides

http://www.autoitscript.com/autoit3/index.shtml

if u r willing to try it this way (kind of a pain) let me know. i can tell you where it needs to go in the script

unclewilly
05-04-2009, 06:35 PM
if those lines aren't commented out just put a ' in front of them. this is strange. i'm almost positive I commented or removed those lines. maybe I'll start playing around with the dmd positioning in the script.

unclewilly
05-04-2009, 06:43 PM
kingb33, will that line work for placing the dmd on the second monitor. if it does I would like to know where in the script it goes. I place my dmd pretty much in the same place for all my tables so this would make it quite easy. it would also be useful for people with cabinet setups like bill has with the dmd cutout. he could find the position then just add that line of code to each table script.

Cameron
05-04-2009, 06:57 PM
Yeah it would be helpful for me too!

kingb33
05-04-2009, 07:41 PM
let me go back and look where it is...Groni shared this with me looong time ago when we used to be on the 3D arcade boards and we were using PowerPoint Show to setup backglasses in VP8 and we needed a solution for DMD placment. ill report back

kingb33
05-04-2009, 08:05 PM
Here are the actual instructions from Groni. I saved them a long time ago so i wouldn't forget how to do it. It included all the powerpoint stuff too but u can disregard that stuff obviously. This solution though works 100% (well it should) because DMD placement it's scripted right into the table script itself. the DMD placement part is more toward the end of what i'm pasting here. The end sub part of it that he explains is important or it wont work. The key is looking at the script and finding this line: "TABLE1_INIT" or (LOTR_INIT)

That's using Lord of the Rings as an example. I'll show an example of what it looks like at the very last part of this post in my Addams Family table using this method.


PER GRONI:
-----------------------------------------------------------------------------------------------------------
First you start with creating ( optional ) a pps file.
In the PowerPoint Options you have to do some options
Go to the PPS Options an choose on which Monitor the PPS will show.
Also you have to choose the KIOSK MODE. Otherwise PPS will end by clicking with the Mouse. With Kiosk Mode the PPS just ends with ESC.
Save it to PPS or PPSX. ( example LOTR.PPS )

Then you have to Download AUTOIT and SCITE for the Script
for creating the Script.
Google for it. Itīs very easy to find.

Install both Programs.

Then you open

SCITE SCRIPT EDITOR and add these Lines:

WinWaitActive("Visual Pinball Player","")
Sleep (5000)
Winactivate("Visual Pinball Player","")
Sleep (5000)
WinWaitNotActive("Visual Pinball Player","")
winkill("PowerPoint","")
exit

This Script do just one Thing. It waits till the "VISUAL PINBALL PLAYER" is active. When itīs not Active anymore, it kills the PPS or PPSX.

Save it to "QUIT.AU3"

Then you have to add some Lines in the Table Script.
Open the Table in VP and choose SCRIPT.

On the most Tables, two lines are included:

RANDOMIZE OPTIONS

&

TABLE1_INIT ( Or LOTR_INIT )

Under the RANDOMIZE OPTIONS, you add these Lines

Dim ppsx
Set ppsx = CreateObject("wscript.shell")
ppsx.Run("X:\XXXXXXX\lotr.pps")
ppsx.run("X:\XXXXXXXX\quit.au3")

The "X:\XXXXXXX" is your PPS and au3 Destination Folder like C:\Backglasses\LOTR.pps"

This Lines Start the Power Point File and the Autoit Script when the Table Loads.

****ADDING THE DMD: (using Lord of the Rings as an example)

If you want to display the DMD on the Backglass you have to add one more Line at the end of "TABLE1_INIT" (LOTR_INIT) just before the END SUB. Important is to add it in the Sub, not after the End Sub. Commands in the Script always begin with SUB and ends with END SUB. So add it in there.

***ADD THESE LINES TO CONTROL DMD PLACEMENT:

Controller.SetDisplayPosition 1671, 811, GetPlayerHWnd

The 1671, 811 is the Pixel position of the upperleft Corner of the DMD

To find exact Pixel positions on your Display you have to start "AUTOIT WINDOW INFO" this Program tells you the exact Position if you click somewhere on the Desktop.
So load your PPS, click on the upperleft Corner of where the Display should appear, and Window Info tells you the Exact Position.

Thats it.

To Explain it short.

The Table Loads, the Power Point File Load, the AUTOIT Script loads and waits in the Task. When you Quit the Table the AUTOIT Script get Active, and close you PPS.

All done!!!!!!

-------------------------------------------------------------------------------------------------------

MY EXAMPLE: You can see the AddamsFamily_Init() right below....that's where you know to start and then look for the last "End Sub" of that part of script. You can see it at the bottom of my sample. Rigth above that you input the stuff in Groni's example. In your case just the:

Controller.SetDisplayPosition 2261, 819, GetPlayerHWnd

part of it...

Not all tables will always be the "table name"_Init though. Sometimes it's just really actually "table name" or something to that effect

Once you get the hang of it it's really easy to do. I did all my tables in like 2 days a couple years ago once i knew what to look for.

------------------------------------------------------------------------------------------------------
Ok, an actual example of what he says to do implemented in my Addams Family table. You only really need what's at the bottom but its easier to show the whole area of the script to understand it. Just make sure you "save" the table after adding the line.



Sub AddamsFamily_Init()
vpmInit Me : Randomize
' SaveValue cRegistryName, "Options", 0 : Exit Sub ' This will clear your Registry settings if uncommented

' Impulse Plunger (needs to be defined before menu options in order to adjust in options)
Const IMPowerSetting = 29 ' Plunger Power (adjusted in table options, though)
Const IMTime = 0.5 ' Time in seconds for Full Plunge
Set plungerIM = New cvpmImpulseP : With plungerIM
.InitImpulseP IMPlunger, IMPowerSetting, IMTime
.Random 0.5
.Switch 27
.InitExitSnd SfxPlun,SfxPlunger
.CreateEvents "plungerIM"
End With

AddamsFamilyOptions = CInt("0" & LoadValue(cRegistryName, "Options")) : AddamsFamilySetOptions
If (AddamsFamilyOptions And cOptNoStartMenu) = 0 Then AddamsFamilyShowDips
With Controller
If Controller.Version >= "01200000" Then AddamsFamily.YieldTime = YieldTime
RomName = Array(Romset1,Romset2,Romset3,Romset4,Romset5,Roms et6,Romset7,Romset8,Romset9,Romset10,Romset11)((Ad damsFamilyOptions And (15*cOptRom))\cOptRom)
.GameName = RomName
.SplashInfoLine = "The Addams Family (Williams 1992)" & vbNewLine &_
"VPM Table and Script By PD"
.ShowTitle = False : .ShowFrame = False : .ShowDMDOnly = True
.Games(RomName).Settings.Value("samples")=0 ' Make sure samples are disabled in Vpinmame

.HandleMechanics = False
On Error Resume Next
.Run : If Err Then MsgBox Err.Description
On Error Goto 0
End With

' Tilt
vpmNudge.TiltSwitch = 14
vpmNudge.Sensitivity = 5

' Trough
Set bsTrough = New cvpmBallStack : With bsTrough
.Initsw 18,17,16,15,0,0,0,0
.InitKick BallRelease,0,0
.InitAddSnd SfxOuthole : .InitExitSnd SfxTroughRel,SSolenoidOn
.InitEntrySnd SfxKick, SSolenoidOn
.CreateEvents "bsTrough", Outhole
.IsTrough = True
.Balls = 3
End With

' Thing
Set bsThing = New cvpmBallStack : With bsThing
.Initsw 0,0,0,0,0,0,0,0
End With

' Thing Saucer
Set bsSaucer = New cvpmBallStack : With bsSaucer
.Initsw 0,87,0,0,0,0,0,0
End With

' Thing Kickout
Set bsThingKickout = New cvpmBallStack : With bsThingKickout
.Initsw 0,77,0,0,0,0,0,0
End With

' Swamp Lock
Set bsSwamp = New cvpmBallStack : With bsSwamp
.Initsw 0,73,72,71,0,0,0,0
.CreateEvents "bsSwamp", sw73
End With

' Swamp Kickout
Set bsSwampKick = New cvpmBallStack : With bsSwampKick
.Initsw 0,74,0,0,0,0,0,0
.InitKick sw74,210,10
.KickAngleVar = 2
.KickForceVar = 3
.InitExitSnd SfxKick,SSolenoidOn
End With

' Electric Chair
Set bsChair = New cvpmBallStack : With bsChair
.Initsw 0,43,0,0,0,0,0,0
.InitKick sw43,181,12
.InitExitSnd SfxKick,SSolenoidOn
End With

' The Power Magnet (Left)
Set mMagnetL = New cvpmMagnet : With mMagnetL
.InitMagnet Magnet2, 8 ' Magnet Strength (adjust to taste)
.GrabCenter = False
.CreateEvents "mMagnetL"
End With

' The Power Magnet (Top)
Set mMagnetT = New cvpmMagnet : With mMagnetT
.InitMagnet Magnet1, 8 ' Magnet Strength (adjust to taste)
.GrabCenter = False
.CreateEvents "mMagnetT"
End With

' The Power Magnet (Right)
Set mMagnetR = New cvpmMagnet : With mMagnetR
.InitMagnet Magnet3, 8 ' Magnet Strength (adjust to taste)
.GrabCenter = False
.CreateEvents "mMagnetR"
End With

'Bookcase Mech Handler
Set BookMech = New cvpmMech : With BookMech
.Sol1 = 27
.Length = 150
.Steps = 10
.MType = vpmMechOneSol + vpmMechReverse + vpmMechLinear
.AddSw 82, 0, 0 ' Closed
.AddSw 81, 9, 10 ' Open
.Callback = GetRef("MoveBookcase")
.Start
End With

'Thing Mech Handler
Set ThingMech = New cvpmMech : With ThingMech
.Sol1 = 25
.Length = 150
.Steps = 27
.MType = vpmMechOneSol + vpmMechReverse + vpmMechLinear
.AddSw 84, 0, 0 ' Down
.AddSw 85, 26, 27 ' Up
.Callback = GetRef("MoveThing")
.Start
End With

'Initialize Collections
For Each obj In BookPos : obj.IsDropped = True : Next
For Each obj In SignRPos : obj.IsDropped = True : Next
For Each obj In PostAPos : obj.IsDropped = True : Next : For Each obj In PostBPos : obj.IsDropped = True : Next
For Each obj In PostCPos : obj.IsDropped = True : Next : For Each obj In PostDPos : obj.IsDropped = True : Next
For Each obj In OptoAPos : obj.IsDropped = True : Next : For Each obj In OptoBPos : obj.IsDropped = True : Next
For Each obj In OptoCPos : obj.IsDropped = True : Next : For Each obj In OptoDPos : obj.IsDropped = True : Next

' Initialize Animated Standup Targets
sw41b.IsDropped = True : sw42b.IsDropped = True : sw86b.IsDropped = True : sw45b.IsDropped = True

'Animated Ball Drop Reels Initialize
bChair.setvalue 7 : bVault.setvalue 7 : bSwamp.setvalue 7

' Misc. Initialization
Controller.Switch(22) = True ' coin door closed
Controller.Switch(23) = False ' ticket opto
Controller.Switch(24) = False ' always closed

Dim ppsx
Set ppsx = CreateObject("wscript.shell")
ppsx.Run("C:\PPVP\addams.pps")
ppsx.run("C:\PPVP\quit.exe")

Controller.SetDisplayPosition 2261, 819, GetPlayerHWnd

End Sub

cyberk30
05-04-2009, 08:39 PM
Just tried it and it works great. My DMD is on my second monitor without having to drag it over.

BUZZ
05-04-2009, 11:51 PM
Thanks kingb33,
After trying several hours yesterday with no success, your solution worked.
Now I can set my dmds as I want, and they stay put !!
Million thanks,
Buzz

Bill is it worth making this a stickie, or posting / adding to the main section - this could help out alot of people.

Cameron
05-06-2009, 01:13 PM
Interesting. Thanks for posting!

esoteric_rt
05-06-2009, 10:39 PM
Yip, this system works well for me also - thanks!

Now just a couple other kinks to work out...

gwent
05-28-2009, 09:09 PM
Now if I could just understand how to actually ROTATE the DMD I'd be getting somewhere. I read the VP9 help file, and also the section on the previous page that mentions adding a line. But I'm not having any luck. I just don't understand where exactly I'm supposed to put the line, or what that line should be in the script. How do I know which line it should be that I add? The advice on the previous page and the advice on the VP9 help file say slightly different things. Right now, the table comes up on my primary monitor vertically, as it should. I'm not using a second monitor at the moment, though I may later. So all I want is to rotate the DMD so I can read it when my monitor is vertical for the tables. Has anybody had any success doing this? If somebody could post a table, or even just the script text from a table that has successfully rotated the DMD, I'd be able to see exactly what and where it was inserted. I just can't seem to find where it goes.

Flying Dutchman
05-29-2009, 03:19 AM
Another way of doing this is to use Irfanview (freeware) to autostartup the backglass on a 2nd monitor with the DMD automatically placed in the correct position (drag & save only once => do not forget to 'save' the table afterwards ;) ).

There's less adjustment to the script .. see my thread at VPForums.org

'How to Autostart a Backglass' (http://vpforums.org/index.php?showtopic=2136&view=findpost&p=10705)

Same principle for 4:3 tables as well as FS.

Works wonders as well .. any questions, pls. let me know.

Cheers,
FD.