Jump to content



Photo
- - - - -

Instructions: Custom Animations in Hyperpin with PinDMD and HyperDMD


  • Please log in to reply
13 replies to this topic

#1 Zablon

Zablon

    Pinball Fan

  • Members
  • PipPipPipPip
  • 642 posts

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 16 February 2013 - 07:04 PM

I posted this over at Hyperspin forums, but figure I'll put it here too.

 

This thread is for integrating HyperDMD into Hyperpin for use with the PinDMD. I wanted to start a new thread dedicated to this portion as this was not the intended use of HyperDMD, and it's a very specific use case. The instructions below will work for people using HyperDMD without a PinDMD, however they are not really necessary or optimal if not using a PinDMD.

**Note: at this time HyperDMD does NOT work with PinDMD2!

The idea here is to accomplish this without having to edit every table script. Eventually, I'd like to see a standalone ahk that does all this via DLL calls or within FPlaunch. Unfortunately, it seems that due to timings and the way the program works, that will be difficult. The PinDMD is quite finicky about what is controlling it.

Feel free to change and improve upon this initial idea and please share them here.

Disclaimer: I am not a programmer, I can muddle through scripts, but that's about it. This method isn't perfect or the fastest way. Sometimes you need to reload a Future Pinball table to get the DMD to work because the timings were off(it took longer to initiallize for some reason but rarely once timings are adjusted to your system), other times some B2S tables require the same thing. There are probably much more elegant ways to accomplish this via dll calls, and I'm sure once this is out there for people to scrutinize, someone will post a faster more reliable way to do this, however for now this is what we have. This program has great potential, and while the instructions are nice, they are really only written for tables, and I wanted to accomplish this w/o having to edit scripts for every table I already have. I tested about 50 tables one after another without issue. Depend9ing on how a table is scripted or if it uses a ROM or not, you will still have a blank DMD when the game starts because the ROM call clears the DMD. At this time there is no way around it unless you make a call from within the table script itself calling to a scene. I do not go into this here yet but will be looking into it in the future for custom DMD's for every table that doesn't use a DMD.

What the script as written does:

Loads Hyper Pin
Loads HyperDMD with initial Attraction Scene that runs while in Hyperpin
Loads a custom logo or scene (I suggest logo) that can be set to be different for VP or FP while table is loading, and in some cases will stay there if DMD is not used in game (varies by how table was written)
Loads Attraction scene on table exit
Will close out of HyperDMD when Hyperpin is closed

Now on to whats needed:

Grab BBB's Hyper DMD and install it and play around with it to create a scene or 2. I really suggest playign with this as it is a great and fun tool!! I suggest for starters create a main animation, and 2 static images (one for FP one for VP) Name your animation set "Attract", name your primary animation "Attract", and each static image FP and VP respectively.

You will also need a non L version of Autohotkey - You can get it here and install it on your cabinet PC. http://www.autohotke....asic-versions/

Instructions:

1. Right click on your desktop and in the menu there should be a "new" option, highlight it and click on "new autohotkey script"

2. An icon will appear on your desktop. Right click on it and click "edit script"

3. Paste the following into it, replacing the paths in the first 2 lines with your paths to Hyperpin and HyperDMD. I suggest putting HyperDMD inside your Hyperpin folder. (credit to Horsey as this is really what he posted in another thread)

HyperPin = C:\Hyperpin\Hyperpin.exe ; change to match your path to Hyperpin
HyperDMD = C:\Hyperpin\HyperDMD\HyperDMD.exe ; change to match your path to HyperDMD

Run, %Hyperpin%
Sleep, 4000 ; this waits for hyperpin to load before starting HyperDMD. Change this to match when yours loads (generally lower value)
Run, %HyperDMD% -set Attract -scene Attract -start -silent ; change the -set and -scene names to whatever you named your scenes

Process, WaitClose, Hyperpin.exe
Run, %HyperDMD% -exit
return


5. Once it is edited to your needs, save it. Right click on it and click "compile script" This file will now be your startup file. Name it something like "pinballstartup and place the exe it creates in the root of your C:\ drive . Create a shortcut and place that in your startup folder (and remove Hyperpin from your startup folder).

6. Now make a backup of your fplaunch.ahk file then right click on it and click edit script.

Due to each version of fplaunch being a bit different, this needs to be manually edited and compiled rather than me posting the entire script. These are the places where these commands must be placed right now, but may change in the future (and hopefully at some point will be included in fplaunch).

For ease of finding, I will post the lines above and below each line that is being added and the added part will be in red. Every line with a path needs edited to your paths

bigbossfp:
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -scene fp ; optional if you want a "loading" screen while table loads
Sleep, 500
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -kill ; Kills DMD attract mode feed from HyperDMD so FP can take over
Sleep, 1000 ; Necessary sleep before FP takes over DMD May need adjusted higher if there are tables that don't pick up DMD

toLog("bigbossfp Called")


========================

bigboss:
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -scene vp ; optional if you want a loading screen while table loads
Sleep, 150 ; optional and adjust according to length of above line animation time -shorter is better
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -kill ; Kills DMD attract mode feed from HyperDMD so VP can take over

toLog("bigboss Called")


========================

ExitScript:
toLog("ExitScript Called")
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -start ; Gives HyperDMD control DMD scene for all exiting tables
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -scene Attract ; if setting a different scene it must be on a different line otherwise comment this out

ExitApp


=========================

OPTIONAL if you have Slamit installed
Run, "..\slamit\go.bat", "..\SlamIt"
Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -kill ; Kills HyperDMD attract scene for Slamit - not tested as I don't have this installed, might need -exit instead and a timer
WinWait, ahk_class SlamIt Pinball - Big Score


========================

7. Save and right click it to compile it (make sure to backup your original fplaunch.exe!! and replace it)

That's it. You should now be able to click your pinballstartup file and it should load hyperpin and you can test.

I would suggest testing a few tables of each type (VP normal, UVP, B2S, FP) and verify they work as expected. If they don't, you may need to adjust the "sleep" commands timings some to account for the speed of your PC. You could even lower all those values if they are too high by lowering them until it breaks something.

Again, this is in no way perfect, but it is pretty damn cool smile.png

This is more or less what the final product will look like. I'm hoping to see some really cool attaction animations come out of this!!
 
 

Edited by Zablon, 18 February 2013 - 07:13 AM.


#2 Zablon

Zablon

    Pinball Fan

  • Members
  • PipPipPipPip
  • 642 posts

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 19 February 2013 - 05:01 AM

For those that haven't played with HyperDMD, it also can trigger sounds as shown here in my new improved Attract mode.

 



#3 russdx

russdx

    Pinball Fan

  • VIP
  • 1,317 posts
  • Location:Bristol UK

  • Flag: United Kingdom

  • Favorite Pinball: NBAFB

Posted 19 February 2013 - 09:48 AM

thats cool :)

 

im gonna add custom pinDMD start up screen animations soon, so when the pinDMD first powers up it will cycle a set amount of frames that have been downloaded to the firmware :)



#4 Zablon

Zablon

    Pinball Fan

  • Members
  • PipPipPipPip
  • 642 posts

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 20 February 2013 - 06:01 PM

Awesome! That will be a cool option too!!



#5 Aurich

Aurich

    Enthusiast

  • Members
  • PipPipPip
  • 306 posts
  • Location:Southern California

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

  • Favorite Pinball: Scared Stiff

Posted 20 February 2013 - 07:52 PM

thats cool :)
 
im gonna add custom pinDMD start up screen animations soon, so when the pinDMD first powers up it will cycle a set amount of frames that have been downloaded to the firmware :)

Sweet, that sounds great.

#6 toolmaker

toolmaker

    Enthusiast

  • Gold Supporter
  • 59 posts
  • Location:Los Angeles CA.

  • Flag: United States of America

  • Favorite Pinball: Scared Stiff

Posted 30 April 2013 - 09:03 PM

Wanted to share a little mod I did on this tutorial for my cabinet.  At first the goal was to display a graphic logo for each game that had been started as opposed to a static VP or FP logo.  This was quite easy to do and worked well but required a graphic logo scene in HyperDMD for each VP and FP table as defined in each respective database.  This is a lot of work, not to mention that some games would require the creation of a custom graphic.  Looking for an easy way out, I decided to go with a basic background with a text definition that was updatable. This was not how I originally envisioned this turning out but it does work and adds a bit more to the cabinet.

 

Here is what I did:

I altered my FPLaunch.ahk as directed in Zablon's tutorial above and then altered the code as follows...

 

From:

Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -scene VP

Sleep, 5000

Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -kill

Sleep, 1000

 

To:

Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -scene VP -Text1_Text "NOW LOADING\n%tableDescription%\nONE MOMENT PLEASE..."

Sleep, 5000

Run, C:\Hyperpin\HyperDMD\HyperDMD.exe -kill

Sleep, 1000

 

I then altered my VP scene in HyperDMD which basically consisted of an image background with the inclusion of a text definition which was named Text1. Note that this scenes text definition must be updatable.

 

After testing, I realized that the "%tableDescription%" was only displaying the uppercase letters.  This was because the description had both upper and lower case letters and the basic font file that comes with HyperDMD does not have lower case letters defined.  So now I have two options, re-name everything in my XML database to uppercase letters, or alter the font graphic.  Again, taking the easy way out, I altered the font graphic file which basically consisted of copying the uppercase letters and pasting them where the lower case letters should go.  Yeah, I know that I should have just created a font graphic that includes both the uppercase and lowercase letters, but time was of the essence and this was just a proof of concept at this point.

 

I have attached the font graphic for those of you that want to give this a try.  Keep in mind that some of the game names are long and they are truncated as a result.  I tried to eliminate this as much a possible by using a smaller text and adjusting my spacing on the text definition in the scene but it still happens on some games.

 

Note that you can also change "%tableDescription%" to "%shortDescription%" which just eliminates the year but I chose to keep it in.

Attached Files



#7 Aurich

Aurich

    Enthusiast

  • Members
  • PipPipPip
  • 306 posts
  • Location:Southern California

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

  • Favorite Pinball: Scared Stiff

Posted 01 May 2013 - 06:09 AM

Would love to see a video of it in action if you ever get a chance. :)

 

Edit: Dang, Los Angeles Scared Stiff club.


Edited by Aurich, 01 May 2013 - 06:10 AM.


#8 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 01 May 2013 - 10:32 AM

Cheers for the font, will come in handy. You could try and make a 3px or lower than 6px font. I've failed at making fonts.

 

Copy & resize all your wheels to 128x32 and add a scene called Wheel. Just add one scene entry and you should still be able to send HyperDMD.exe -scene Wheel  -Filename WheelName.png"

Wheelname being variable for %tablename% description.  Same with any videos

 

Pretty good then to just send F10 to hide/unhide it without having to load HD each time.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#9 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 02 May 2013 - 03:07 PM

Attached File  6px_EvilDEad.png   1.04KB   45 downloadsAttached File  6px_Sans_Horse.png   1.07KB   38 downloadsAttached File  8px_Sans_Horse.png   1.53KB   34 downloadsAttached File  27px_EvilDead.png   22.98KB   33 downloadsAttached File  27px_Horse_Squealer.png   24.5KB   29 downloads


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#10 bob808

bob808

    Hobbyist

  • Members
  • PipPip
  • 46 posts

  • Flag: United States of America

  • Favorite Pinball: Big Guns

Posted 23 May 2013 - 10:00 PM

Hi Zablon. I'm making a pin-cab and it will have a small screen above the playfield, but it not a dmd screen, and wont (at least for the most part) be used for dmd purposes. would I be able to use this program(s) to display custom attract screens and info? or is it restricted to the dmd area.  Below is a picture of the little screen area I am talking about.  The dmd will be in the back glass area above it.  Thanks!

img2839e.jpg



#11 darquayle

darquayle

    Enthusiast

  • VIP
  • 200 posts
  • Location:St. Louis, Missouri

  • Flag: United States of America

  • Favorite Pinball: Cirqus Voltaire, Medieval Madness

Posted 24 May 2013 - 12:29 AM

You should be able to do this.  I have set up my 3rd screen with hyperdmd.  It works great.  The size of the area doesn't matter as Hyperdmd acts similar to the DMD from pinmame.  You can resize it and shape it.  As far as sending it information, I use mine to show the table mfg logo when playing a non-DMD supported table and I have it cycle between three images (use flippers to select table, press green button to launch, my personal table's logo (Xenon)) when I'm in Hyperpin.  The information above will get you going.  Creating the proper logos and elements for HyperDMD is a little tricky to get started but once you understand how it works, it's not too difficult.



#12 gogo69

gogo69

    Enthusiast

  • Members
  • PipPipPip
  • 446 posts
  • Location:Salzburg

  • Flag: Austria

  • Favorite Pinball: hard to tell

Posted 06 June 2013 - 08:23 AM

i have a question : i want to use hyperdmd only for showing a custom animation when browsing in hyperpin

ok, so far so good

when i start a tabe , hyperdmd should exit ( so it's not in the way with the pinballs dmd which is also shown on third screen - same position )

when i exit the table back to hyperpin - hyperdmd shoud start again - showing the animation

 

i already got that working ,

but on hyperpin exit back to windowsdesktop the "hyperdmd -exit" command does not work any more because i already used "exit" when starting a table so the "Process, WaitClose, Hyperpin.exe
Run, %HyperDMD% -exit" command gets confused and does not execute the exit command any more.

 

i followed the instructions in first post but i don't use -kill and -start (only for real dmd) i use -exit and -set   

 

can somebody help me to get that exit command working ?

 

edit: tried to use f10 (for hiding) in the script instead of exit and start again

but it seems you first have to click on the hyperdmd windows and then press F10

a simple F10 click does nothing

 

i guess i just leave it as it is

when i shut down the cab via hyperpin an open window (in this case the remaining hyperdmd window on third screen) will get killed anyways....  ;)


Edited by gogo69, 06 June 2013 - 03:18 PM.

my cab : click!


#13 Zablon

Zablon

    Pinball Fan

  • Members
  • PipPipPipPip
  • 642 posts

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 09 June 2013 - 04:39 AM

Initially I used -exit but it causes issues with timing. From what BBB said, there is a "command" you can send that will send F10 to the screen and hide it w/o having to click on it but I never tried it. I would assume there's a line you can add to the script that allows for it not to be in focus.



#14 EddCase

EddCase

    Hobbyist

  • Members
  • PipPip
  • 49 posts
  • Location:United Kingdom

  • Flag: United Kingdom

  • Favorite Pinball: Funhouse

Posted 18 August 2014 - 06:34 PM

Well That will teach me for having several windows open at the same time. ment to post the original message else where. sorry.


Edited by EddCase, 18 August 2014 - 06:52 PM.