Jump to content



Photo
- - - - -

Adding a second screen backglass to the KnockOut Table (Bob5453)


  • Please log in to reply
29 replies to this topic

#1 rosve

rosve

    :)

  • VIP
  • 1,179 posts
  • Location:Always travelling around the world

  • Flag: Sweden

  • Favorite Pinball: Funhouse, Faces, Starship Troopers



Posted 16 May 2011 - 08:59 AM

In this post i am going to describe how to add an active backglass to a normal single screen EM table.
Bob5453 has kindly allowed me to use his Knockout FS table for this "tutorial".

I will try to post screenshots of every step in the process.

Here is the complete tutorial in PDF format (thank you Flying Dutchman)
Building a Second Screen backglass tutorial

The template files needed to create a working backglass can be found here,
B2S Template


So, here we go...



PREPARING THE VP TABLE.
As we no longer need the reels and lights that are normally used on the backdrop, my first step is to move everyting out to the side of the backdrop (not deleting them at this point).


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

As this table was done before VP9.1x I am also adding Layback to the view.


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

To simplify the work I am saving the table to a new folder. I am also copying the ScreenRes.txt and b2s.vbs from the B2S template. These files must always be located in the same folder as your table.


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

OK, now it is time to start editing the script to make it talk to the backglass program.
First of all we need to load the b2s.vbs scriptlet. This should be done at the top of the table scrip.
This is the command to load the b2s file is:
ExecuteGlobal GetTextFile ("b2s.vbs")


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

Add the following lines to the beginning of the table_Init routine

ResetB2SData 0, 49, 0
LaunchBackGlass "KnockOut", False

The ResetB2SData instruction is initializing the data area that is used to communicate with the backglass.
LaunchBackGlass is an instruction that automatically loads the backglass. The second argument is set to False for now. False means that the backglass will not be launched.


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

The B2S solution requires a timer called B2STimer to work correctly. This timer must be left disabled.


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

Now we can go through the script and replace all the emreel and lights with B2SDatas

Lets make the score reels first,
When a new game is started the score is set to zero. You can usually find this code quite easily by searching for the name of the score reel ( or ResetToZero). In the Knockout script it looks like this:

In this screenshot i have already commented the old ResetToZero instructions and replaced them with:
StepB2SData 0, 11, 0, 2, 170, ""
The arguments are: start data, end data, to value, step direction, step interval, step sound
It will reset all player1 and player2 reels to 0 in steps of 170ms without soundfx.

The full syntax is described in the "EM_Backglass_Tutorial.rtf"

At this point it is probably a good idea to start looking at the B2S Data list.
If it was a 4 player game I would have entered:
StepB2SData 0, 23, 0, 2, 170, ""


CODE
B2Sdata                        Function                        
----------------------------------------------------------------------------------------------------------------------------
0-5            Player 1 Score        value 0 - 9
5-11            Player 2 Score        value 0 - 9
12-17            Player 3 Score        value 0 - 9
18-23            Player 4 Score        value 0 - 9
24            Player 1 Rollover        value 0 - 1, display Player1 RollOver light
25            Player 2 Rollover        value 0 - 1, display Player2 RollOver light
26            Player 3 Rollover        value 0 - 1, display Player3 RollOver light
27            Player 4 Rollover        value 0 - 1, display Player4 RollOver light
28            Credits
29            PlayerUp            value 0 - 4, display the active player light.
30            1To4CanPlay        value 0 - 4, display number of players lights.
31            BallInPlay            value 0 - 5, display ball in play light.
32            Tilt            value 0 -1, display Tilt light.
33            Match            value 0 - 10, display Match lights.
34            GameOver            value 0 - 1, display GameOver light.
35            Shoot Again        value 0 - 1, display Shoot Again light
36-49            Unused            value 0 - 254, For table specific needs


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

Next we must change the score routine to update the B2SData's instead of the old score reels
In the KnockOut script the score uses separate reels for each score digit. This makes it very easy to mod.

Once again i have commented out the old lines for updating the em-reels and replaced them with my new
SetB2SData instructions.

The script is now sending both player1 and player2 scores to the backglass.

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

Next I will update PlayerUp, ballInPlay, Tilt, GameOver ....

Soon to be continued...

Edited by rosve, 18 May 2011 - 08:07 AM.


#2 rosve

rosve

    :)

  • VIP
  • 1,179 posts
  • Location:Always travelling around the world

  • Flag: Sweden

  • Favorite Pinball: Funhouse, Faces, Starship Troopers



Posted 16 May 2011 - 08:47 PM

Here is the rest of how to prepare the table Script.

To have a fully working backglass you need to display Number of players, Ball in play, Tilt, ShootAgain, Game over, Player up, credits, Match and rollover lights.
I am giving a couple of examples how to do this.

First you must find where in the script the light you want to set/reset is programmed.
In this example I am setting the "SameplayerShootsAgain" on the backglass.

Where the LightShootAgain is turned on, I am adding,
SetB2SData 35,1
35 is the predefined B2SData for controlling the ShootAgain light
1 is On (0 is Off)


And it must be turned off when a new ball is launced.
(In this script the Tilt light is reset in the same routine.)


This is how the credits are being sent to the credits reel on the backglass,


All the pre-defined commands are listed in the tutorial document.

When all the features you want to control on the bg is programmed, your table is ready to be used with an active B2S backglass

That's all for today.
Tomorrow I will continue with the backglass itself.

#3 rosve

rosve

    :)

  • VIP
  • 1,179 posts
  • Location:Always travelling around the world

  • Flag: Sweden

  • Favorite Pinball: Funhouse, Faces, Starship Troopers



Posted 17 May 2011 - 08:46 PM

The table scrip is ready so it is time to build the backglass.

To make the backglass i need two images, one with the lights off and one with the lights on.
I usually start with a 1024*720 pixel photo/redraw of the backglass but any resolution can be used.
I then apply a light mask to it and add the lights behind the mask. this can be done in any reasonably good paint program. I use Paint.Net for this type of work.

Here is the original image and the light mask,


And the result images, the top image is with all lights on.


Next step is to cut out the lights that can be turned on/off from the "light on image" and save each as a small image (jpeg).
Here is a screenshot of my image folder for this backglass.



Now i have all the data i need to build a simple active backglass

Before starting Visual Basic Express 2010 make sure that the B2S_V2.zip template is copied into the templates folder
"Documents\Visual Studio 2010\Templates\ProjectTemplates"

When VB has started up choose "New Project" from the File meny and then the B2S_V2 template,


When the template files are loaded immidiatly select "Save All" from the File meny. This is where you give the project a name. I am calling my profect "KnockOut".

It is a good practice to "Save All" now and then to avoid loosing too much work if the PC goes funny.


To bring up the "Form Designer", double click on Form1.vb in the Solution Explorer window,


You should now see the design form for the FACES backglass.

Enter the size of your "lights off" image in properties window --> Size, My image is 1024*720.
Then scroll to the "BackgroundImage" property and click on the little button.


Click on the Import button and select your "lights off" image.When you are ready, click OK, and the Form background will change to your new image.

*** SAVE ALL ***

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

Now it time to set the size and position of the score reels (they are actually pictureboxes).
Click on a score picbox to select it (or drag a region with the mouse to select multiple boxes).
Now you can enter the size of the score picbox into the Size property (if you know it).
You can also use the mouse to rezise and move a picbox. Or use the arrow keys to move and shift arrows to resize.
I personally prefer to use the keyboard as it gives a more precise control.
In this image I have placed score reels 2-6 for player 1 (reels 8-12 for player 2) in the correct position.

As this glass only displays 5 digits/player I just put the score reel 1 and 7 in a place where they are out of the way.
The Visibility property of the unused score picboxes must be set to False so they don't show up on the backglass,


The look of the score digits can be changed by right clicking on the EMReelImageList and select "choose images" from the drop down menu (I have included a folder with 3 different sets of digit images with my template files).


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

The following steps must be performed for all lights that shall be displayed on the backglass,
I am using the "Player 1 Up" light as an example.

Check the size of the 1Up picture by pointing with the mouse overit in Windows Explorer,

In this case the size is 64*69 pixels.

Click on the player 1 up picturebox to select it, then enter the size into the Size propery.
Scroll up to the BackGroundImage property and load the new 1up image.

Move the picbox to it's correct position,


Change all other pictureboxes ( tilt, gameover...) that shall be used in the same way.
All remaining (unused) pictureboxes must have the Visibility property set to False.

*** SAVE ALL ***


-------------------------------------------------------------------------------------------------------------------
Building an exe file.
------------------------

Double click somewhere on the background image to bring up the program editor.

In the Form1_Load routine, two variables must be set.
FormSizeX
and
FormSizeY
must be set to the size of your backglass image. Once again, my knockout image is 1024*720.



**** IMPORTANT ****
As I am writing this tutorial I found a bug in the program. Before going on, lets kill the bug.
Line 475 must be deleted. It is a reference to a non existing picturebox (it was the flashing eye on the Faces backglass).



Ok, now that the faulty line is gone it is time to build the exe file.
Select "Build nnnn" from the Debug menu and the backglass.exe will be compiled...


and saved in the projects Release folder,



Before it is possible to launch the new backglass it must be copied to a folder where a ScreenRes.txt is present (or copy the ScreenRes.txt to the release folder)



To run the backglass from within Visual Studio this line must be un-commented, and the path must point to a folder with ta ScreenRes file.


When you are ready with testing the backglass, this line must be commented again before building the exe file.


That's it.
I do hope that this tutorial is understandable. I am not a writer, only a simple engineer.

/Roger.

PS, You can switch between the Program Editor and the Forms Designer by clicking on the tabs above the editor window.
Pfuiii!!!! Time for a beer.

#4 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 18 May 2011 - 12:22 AM

Thanks Rosve, this is really awesome. I will get this to work, even if I have to have Rascal help me. I have the template loaded into VP Express now and I'm adjusting stuff.

You might want to add your template to this thread

Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#5 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 18 May 2011 - 05:05 AM

Thanks Rosve.

This thread should probably be stickied somewhere?


 


#6 Flying Dutchman

Flying Dutchman

    Pinball Wizard

  • VIP
  • 3,208 posts

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

  • Favorite Pinball: Medieval Madness / Champion Pub



Posted 18 May 2011 - 07:10 AM

Great Rosve, please find attached your Tutorial in a handy .pdf format .. wink.gif

Cheers,
FD.

'Flying Dutchman'

In need for a Backglass or 'Active Backglass / UVP' please 'click' on below and visit the complete revised website at:
Posted Image

#7 007

007

    Shaken, not stirred.

  • Platinum Supporter
  • 996 posts
  • Location:On Her Majesty's Secret Service

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

  • Favorite Pinball: EM:s

Posted 18 May 2011 - 07:50 AM

Rosve,

This is really very impressive! Bravo!
Worship.gif

One of us smells like a tart's handkerchief. Afraid it's me. Sorry about that, old boy.


#8 rosve

rosve

    :)

  • VIP
  • 1,179 posts
  • Location:Always travelling around the world

  • Flag: Sweden

  • Favorite Pinball: Funhouse, Faces, Starship Troopers



Posted 18 May 2011 - 07:59 AM

QUOTE (Flying Dutchman @ May 18 2011, 09:10 AM) <{POST_SNAPBACK}>
Great Rosve, please find attached your Tutorial in a handy .pdf format .. wink.gif

Cheers,
FD.


Thanks FD, I will try to move this PDF up to the top of my post and add a link to the template.


#9 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 14 October 2011 - 05:09 PM

I used this thread again to make a B2S backglass. Much easier the 3rd time. smile.gif

Rosve, you have been creating some new number reels, is there anyway you can add these resources to the table template? I also just used the original B2S template, maybe you could update the template in the first post with all of the new reel number images for a little more variety and it would contain the new scripts and changes also.

Great stuff.

I just made a couple of static B2S backglass images (Funhouse, Roadshow) that load now when I start those tables. The second one was just a matter of importing a new backglass image and saving.

I don't use HyperPin or UVP, I just use VPMan to start my tables, so I needed something to display a backglass and this works great.

Thanks Rosve.

Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#10 FDSystems

FDSystems

    Eclectic end-user

  • Charter Member
  • 2,477 posts
  • Location:Bahia

  • Flag: Brazil

  • Favorite Pinball: I will have to find out again.............

Posted 14 October 2011 - 06:47 PM

Useless for me (at least for the time being) as I only play WS tables mon a laptop, but i´m smart(?!?!?!) enough to understand that this is a HUGE step ahead for A lot of VP authors & users.

Thank you rosve for that priceless (!!!) contribution. otvclap.gif otvclap.gif otvclap.gif dblthumb.gif

Edited by 1234fd, 14 October 2011 - 06:47 PM.

From Brasil. Updated version of 1234fd



#11 StevOz

StevOz

    Pinball Fan

  • VIP
  • 1,721 posts
  • Location:Nirvana

  • Flag: Australia

  • Favorite Pinball: Scared Stiff



Posted 15 October 2011 - 12:28 AM

QUOTE (1234fd @ Oct 15 2011, 02:47 AM) <{POST_SNAPBACK}>
Useless for me (at least for the time being) as I only play WS tables mon a laptop, but i´m smart(?!?!?!) enough to understand that this is a HUGE step ahead for A lot of VP authors & users.

Thank you rosve for that priceless (!!!) contribution. otvclap.gif otvclap.gif otvclap.gif dblthumb.gif


Not true B2S is also usable for WS tables. wink.gif

http://www.vpforums....showtopic=14783

Files I have uploaded here...

 

http://www.vpforums....ownloads&mid=34


logoshort.gif


#12 FDSystems

FDSystems

    Eclectic end-user

  • Charter Member
  • 2,477 posts
  • Location:Bahia

  • Flag: Brazil

  • Favorite Pinball: I will have to find out again.............

Posted 15 October 2011 - 01:16 AM

QUOTE (StevOz @ Oct 14 2011, 09:28 PM) <{POST_SNAPBACK}>
QUOTE (1234fd @ Oct 15 2011, 02:47 AM) <{POST_SNAPBACK}>
Useless for me (at least for the time being) as I only play WS tables mon a laptop, but i´m smart(?!?!?!) enough to understand that this is a HUGE step ahead for A lot of VP authors & users.

Thank you rosve for that priceless (!!!) contribution. otvclap.gif otvclap.gif otvclap.gif dblthumb.gif


Not true B2S is also usable for WS tables. wink.gif

http://www.vpforums....showtopic=14783


I know Steve, but, imho, it does not add much to the table. I prefer a WS designed table with a nice BG designed specially for it.
Question of personal taste, purely. dblthumb.gif

Fantastic for people using a 2 screen setting !

Edited by 1234fd, 15 October 2011 - 01:18 AM.

From Brasil. Updated version of 1234fd



#13 OxACE

OxACE

    Enthusiast

  • Platinum Supporter
  • 52 posts
  • Location:Maine, USA

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

  • Favorite Pinball: Medieval Madness

Posted 21 October 2011 - 03:31 PM

I am searching for some guidance on converting Eight Ball Deluxe to B2S. The tutorial has information about EM Reels, but Eight Ball Deluxe uses seven segment LED's. I've made some progress but am still a bit stymed on some of the LED controlling aspects.

Are there any readily available (code) examples of something similar, e.g. Cyclone or Bad Cats that can be shared?

Stephen

#14 OxACE

OxACE

    Enthusiast

  • Platinum Supporter
  • 52 posts
  • Location:Maine, USA

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

  • Favorite Pinball: Medieval Madness

Posted 22 October 2011 - 03:10 AM

QUOTE (OxACE @ Oct 21 2011, 11:31 AM) <{POST_SNAPBACK}>
I am searching for some guidance on converting Eight Ball Deluxe to B2S. The tutorial has information about EM Reels, but Eight Ball Deluxe uses seven segment LED's. I've made some progress but am still a bit stymed on some of the LED controlling aspects.

Are there any readily available (code) examples of something similar, e.g. Cyclone or Bad Cats that can be shared?

Stephen


I've got a handle on the coding and connection details but am still looking for some good "seven segment" LED graphics that can be used. (I hate to have to implement something that has likely been done a hundred times already). If Google fails me, I may be back.

#15 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 22 October 2011 - 03:23 AM

QUOTE (OxACE @ Oct 21 2011, 11:10 PM) <{POST_SNAPBACK}>
QUOTE (OxACE @ Oct 21 2011, 11:31 AM) <{POST_SNAPBACK}>
I am searching for some guidance on converting Eight Ball Deluxe to B2S. The tutorial has information about EM Reels, but Eight Ball Deluxe uses seven segment LED's. I've made some progress but am still a bit stymed on some of the LED controlling aspects.

Are there any readily available (code) examples of something similar, e.g. Cyclone or Bad Cats that can be shared?

Stephen


I've got a handle on the coding and connection details but am still looking for some good "seven segment" LED graphics that can be used. (I hate to have to implement something that has likely been done a hundred times already). If Google fails me, I may be back.


I just made these in blue to use with a B2S backglass. You are welcome to use or mod them if they are what you need.

Attached Files


Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#16 OxACE

OxACE

    Enthusiast

  • Platinum Supporter
  • 52 posts
  • Location:Maine, USA

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

  • Favorite Pinball: Medieval Madness

Posted 22 October 2011 - 03:26 AM

QUOTE (Bob5453 @ Oct 21 2011, 11:23 PM) <{POST_SNAPBACK}>
I just made these in blue to use with a B2S backglass. You are welcome to use or mod them if they are what you need.


Thank you very much. You have likely saved me a bit of time and effort on this project.


#17 maceman

maceman

    Home Pinball Machine Collector/ Restorer

  • VIP
  • 2,271 posts
  • Location:Canada, Eh!

  • Flag: Canada

  • Favorite Pinball: ....**Haunted House**....



Posted 17 November 2011 - 05:32 PM

Roger, Can you please edit the title of this post to say B2S somewhere's...It took me forever to find this tutorial:)

I want to try to do this today with SS.

Cheers,
Maceman


edit: I was just informed that 3 letters or less do not search well, so unfortunately adding B2S wouldn't help. Sorry about that! Maybe call it B2SS smile.gif

Edited by maceman, 17 November 2011 - 05:36 PM.

________________________________________________________________________________
Canada Eh!
hm_avatar.pngss_avatar.jpg MODS ys_avatar5.jpggenie_avatar.pngj2o_avatar.png

#18 luvthatapex

luvthatapex

    Pinball Fan

  • VIP
  • 1,435 posts

  • Flag: United States of America

  • Favorite Pinball: Tron



Posted 22 November 2011 - 03:17 PM

Funny, I had the exact same thing happen to me. I searched for a B2S tutorial for the new Impacto I am building.
Unfortunately search doesn't allow 3 character searches, so luckily just typing tutorial and looking at threads helped me find it.
Can't wait to build my first B2S, thanks rosve!!!!!!!

LTA


QUOTE (maceman @ Nov 17 2011, 12:32 PM) <{POST_SNAPBACK}>
Roger, Can you please edit the title of this post to say B2S somewhere's...It took me forever to find this tutorial:)

I want to try to do this today with SS.

Cheers,
Maceman


edit: I was just informed that 3 letters or less do not search well, so unfortunately adding B2S wouldn't help. Sorry about that! Maybe call it B2SS smile.gif



#19 maceman

maceman

    Home Pinball Machine Collector/ Restorer

  • VIP
  • 2,271 posts
  • Location:Canada, Eh!

  • Flag: Canada

  • Favorite Pinball: ....**Haunted House**....



Posted 22 November 2011 - 04:42 PM

..unfortunately, my laptop is too slow to really run vb express properly... I keep getting various errors and so stopped trying. I think until i get a new laptop I will have to rely on assistance on making the B2S.

Maceman
________________________________________________________________________________
Canada Eh!
hm_avatar.pngss_avatar.jpg MODS ys_avatar5.jpggenie_avatar.pngj2o_avatar.png

#20 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 22 November 2011 - 05:46 PM

QUOTE (maceman @ Nov 22 2011, 11:42 AM) <{POST_SNAPBACK}>
..unfortunately, my laptop is too slow to really run vb express properly... I keep getting various errors and so stopped trying. I think until i get a new laptop I will have to rely on assistance on making the B2S.

Maceman


what's you laptop specs?

Posted Image

You have discovered an Easter egg. Pat yourself on the back.