Jump to content



Photo
- - - - -

B2s Server source code change


  • Please log in to reply
33 replies to this topic

#1 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 03 May 2018 - 02:29 PM

I was wondering since the source code was released for B2s Server (I think) if a change could be made.

 

I'm having some trouble with directb2s files being run when I launch a table.  I really wish it would not run a directb2s file if there is not one EXACTLY the same name as the table that is run.  I'm trying to setup some Pinup pak tables to run without the directb2s file running.  Right now I have to rename the table to something strange in order for it not to find the b2s file.  Hope this makes sense to others.  Maybe a checkbox that says use fuzzy logic finding b2s or not.



#2 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 942 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 03 May 2018 - 03:14 PM

I usually just rename the directb2s file to something like "tablename.directb2s.hold" if I want to disable it.  Easy peasy.   :)


Edited by DJRobX, 03 May 2018 - 03:14 PM.


#3 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 03 May 2018 - 04:19 PM

OMG, I love opensource, or at least when source code is released.  I found the source code to B2S Backglass server on SourceForge and commented out some lines that had to do with finding the DirectB2s File.  Compiled and reran register, bam it works perfectly.  I can post if anyone wants it.

 

DJRobX that would not work on my system in certain cases when I have many tables with similar names.  B2s Server would find a directb2s that was close to the name of the table that was run.  I only wanted it to work if it found and exact match. 

 

This is working great now with pup paks as all I have to do is delete or rename the directb2s file "slightly" and it will not run, even if I have many directb2s files with similar names.  Perfect

 

Love this hobby!!!!!

 

these are the lines I commented out in formBackglass.vb

 

        'If Not IO.File.Exists(filename) AndAlso Not IO.File.Exists(shortfilename) Then
        '    If B2SSettings.LocateHyperpinXMLFile() Then
        '        hyperpinfilename = B2SSettings.HyperpinName & ".directb2s"
        '        shorthyperpinfilename = B2SData.ShortFileName(hyperpinfilename)
        '    End If
        '    ' check whether the hyperpin description can be found
        '    If Not IO.File.Exists(hyperpinfilename) AndAlso Not IO.File.Exists(shorthyperpinfilename) Then
        '        If filename.Length >= 8 Then
        '            ' look for short name
        '            B2SSettings.MatchingFileNames = IO.Directory.GetFiles(IO.Directory.GetCurrentDirectory(), filename.Substring(0, 6) & "*.directb2s")
        '            If B2SSettings.MatchingFileNames Is Nothing OrElse Not IsArray(B2SSettings.MatchingFileNames) OrElse B2SSettings.MatchingFileNames.Length <= 0 Then
        '                B2SSettings.MatchingFileNames = IO.Directory.GetFiles(IO.Directory.GetCurrentDirectory(), filename.Substring(0, 6).Replace(" ", "") & "*.directb2s")
        '            End If
        '            If B2SSettings.MatchingFileNames IsNot Nothing Then
        '                For i As Integer = 0 To B2SSettings.MatchingFileNames.Length - 1
        '                    Dim fileinfo As IO.FileInfo = New IO.FileInfo(B2SSettings.MatchingFileNames(i))
        '                    B2SSettings.MatchingFileNames(i) = fileinfo.Name
        '                Next
        '            End If
        '            shortfilename = String.Empty
        '            For Each file As String In B2SSettings.MatchingFileNames
        '                If String.IsNullOrEmpty(shortfilename) Then
        '                    shortfilename = file
        '                End If
        '                If Not String.IsNullOrEmpty(B2SSettings.MatchingFileName) AndAlso file.Equals(B2SSettings.MatchingFileName, StringComparison.CurrentCultureIgnoreCase) Then
        '                    shortfilename = file
        '                    Exit For
        '                End If
        '            Next
        '        End If
        '    End If
        'End If

Edited by Slydog43, 03 May 2018 - 04:23 PM.


#4 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

  • VIP
  • 2,523 posts
  • Location:South Jersey

  • Flag: United States of America

  • Favorite Pinball: -<3<3<3 All Real Pins



Posted 03 May 2018 - 06:16 PM

can someone make a new B2S editor, or fix the one we have to have all the features we have wanted for so many years now.... we have an awesome new frontend now, a new B2S editor would be the icing on the cake!!!
:pokey:  :BDH:  :pokey:  :BDH:  :pokey:  :BDH:


 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#5 jesperpark

jesperpark

    Enthusiast

  • Silver Supporter
  • 271 posts
  • Location:Edmonton Alberta Canada

  • Flag: Canada

  • Favorite Pinball: Medieval Madness

Posted 03 May 2018 - 10:49 PM

Okay I'm not sure if @Slydog43 version would work for me or not.  Is there a way to run the b2S backglass server thus enabling DOF plugin without using a actual backglass file?  For the FSS tables I want to add some DOF feedback options but a B2S file is it not actually needed for these tables.



#6 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 942 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 03 May 2018 - 11:12 PM

 

OMG, I love opensource, or at least when source code is released.  I found the source code to B2S Backglass server on SourceForge and commented out some lines that had to do with finding the DirectB2s File.  Compiled and reran register, bam it works perfectly.  I can post if anyone wants it.

 

DJRobX that would not work on my system in certain cases when I have many tables with similar names.  B2s Server would find a directb2s that was close to the name of the table that was run.  I only wanted it to work if it found and exact match. 

 

This is working great now with pup paks as all I have to do is delete or rename the directb2s file "slightly" and it will not run, even if I have many directb2s files with similar names.  Perfect

 

Love this hobby!!!!!

 

these are the lines I commented out in formBackglass.vb

 

 

Yes, I too love the control of having things open sourced.     :)

Jesper, all you have to do is turn off the error message that pops up when it can't find the .directb2s file.  Then DOF and such will still work with no B2S display.


Edited by DJRobX, 03 May 2018 - 11:16 PM.


#7 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,159 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 03 May 2018 - 11:30 PM

Slydog43, yes pls share binary so I can play either Stranger Things or Stranger Things LE with PUP without having to rename the VPX file

#8 jesperpark

jesperpark

    Enthusiast

  • Silver Supporter
  • 271 posts
  • Location:Edmonton Alberta Canada

  • Flag: Canada

  • Favorite Pinball: Medieval Madness

Posted 04 May 2018 - 03:59 AM

Thanks Rob, I never realized this could be done... learned something new today

 

Sorry for intruding slydog



#9 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 04 May 2018 - 04:14 AM

I hope this works, please tell me.  I reran the B2SBackglassServerRegisterApp exe.

 

Please rename your old file

 

https://drive.google...q86knptxrNbrDP6


Edited by Slydog43, 04 May 2018 - 04:15 AM.


#10 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,807 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 06 May 2018 - 03:22 AM

Did you do the update from this EXE?
June 18, 2017 by Westworld 

http://vpinball.com/...b2s/#post-83824



#11 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 06 May 2018 - 08:29 AM

I used what was on sourceforge.  b2s-backglass-code-18-trunk, so I think so.  I did some more changes to add a checkbox under settings to turn this feature on/off but it did not work.  Will try again soon.


Edited by Slydog43, 06 May 2018 - 08:30 AM.


#12 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,009 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 18 September 2018 - 01:35 PM

Slydog43, yes pls share binary so I can play either Stranger Things or Stranger Things LE with PUP without having to rename the VPX file

 

NailBuster mentioned the idea of updating B2s Server so there is no fuzzy matching...only exact matching. This would help I think.

 

This would allow for two versions (copies) of the same table. One normal VPX that loads the directb2s, and one for PuP (just add PUP to the name) that won't load the directb2s because it needs to be named exactly to match.

 

Would also fix ST SE and allow Stranger Things original to co exist.



#13 Thalamus

Thalamus

    VPF Veteran

  • Platinum Supporter
  • 5,013 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 18 September 2018 - 01:48 PM

While we're at it - not db2s related though. Find some rules to follow for "hacked" roms.
I mean, needing to change between avs200 to play a rom with/without sound doens't make a rom hoarder like me very happy :)

From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#14 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,009 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 18 September 2018 - 01:53 PM

While we're at it - not db2s related though. Find some rules to follow for "hacked" roms.
I mean, needing to change between avs200 to play a rom with/without sound doens't make a rom hoarder like me very happy :)

 

In the case of Transformers PuP-Tracks rom (what I'm calling it for now):

 

I’m not sure if you can just have the Custom Rom named a little differently, then have a 2nd copy of the table that uses that Custom rom in the script. You would possibly then just rename the PuP-Pack to match. I’m not sure if DOF would still work with a different named rom…?



#15 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,009 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 18 September 2018 - 03:04 PM

While we're at it - not db2s related though. Find some rules to follow for "hacked" roms.
I mean, needing to change between avs200 to play a rom with/without sound doens't make a rom hoarder like me very happy :)

 

Maybe we need to simply add a separate table in DOF Config Tool for custom Roms, so that we can have 2 copies of a table that will work with everything. One using factory rom, the other using Custom Rom for Pinsound, PuP-Tracks,etc..

 

We could have an established name like:

 

trn_174h   = factory Tron Legacy LE

 

trn_174h_custom = custom rom version

 

 

...BUT what about pinmame? Would we need additional entries in pinmame to allow for one rom to have normal sound/settings, and another for the custom rom to allow for pinsound, etc?


Edited by TerryRed, 18 September 2018 - 03:28 PM.


#16 Thalamus

Thalamus

    VPF Veteran

  • Platinum Supporter
  • 5,013 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 18 September 2018 - 07:15 PM

It's something like this I'm thinking of. But, I don't know the details. I'm pretty sure that Carny and the guys could come up with something. Name seems a bit long though. I have a feeling they prefer to keep it around 8 char max ? h in the end it kind of occupied imo. so is c.


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#17 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,009 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 18 September 2018 - 08:33 PM

If you REALLY needed to....you could also setup something in your launch script in Popper.

 

You have two copies of the table...one original...the other PuP version (named in a way to not load directb2s).

 

Popper would check to see if you have something like PuP-Track or CustomRom in the CustomVariable field (in Games Manager) for the table. If it does have that, than it will copy and replace the "Rom" (using the Rom field entry for the game) from "Custom" folder into VPinMAME before launching (with a small delay buffer). Upon exiting the game it will do a similar check and copy the original rom back from a "OriginalRoms" folder.

 

I personally HATE doing things this way...but with Popper, you can do powerful things like this easily..and once setup....its easy for tables in the future. It's a solution until a more official one comes along.



#18 Thalamus

Thalamus

    VPF Veteran

  • Platinum Supporter
  • 5,013 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 18 September 2018 - 09:01 PM

Well. Popper does almost what I want it to. So, it hasn't become my FE. Well, don't use FE much to be honest anyway. But, how do you expect me to let it fiddle with my rom collection when I'm not happy about it being an installer ? :)

 

For me it's a annoyance needing to change rom. It isn't something I can't manage if I need to. It is more like. If it incontinent then I might just play something else.


Edited by Thalamus, 18 September 2018 - 09:04 PM.

From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#19 Siggi

Siggi

    Enthusiast

  • Platinum Supporter
  • 106 posts
  • Location:Reichelsheim / Germany

  • Flag: Germany

  • Favorite Pinball: today: Monster Bash

Posted 19 September 2018 - 08:01 PM

How can you turn off the .directb2s error massage?



#20 Thalamus

Thalamus

    VPF Veteran

  • Platinum Supporter
  • 5,013 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 19 September 2018 - 09:07 PM

Two ways. You can do it in the b2sserversettings.xml or start a table and then cntr+s when b2s is selected. Then in the very bottom you can turn it off as an option.


From now on. I won't help anyone here at VPF. Please ask Noah why that is.