Jump to content



Photo
- - - - -

DOFLinx insides


  • Please log in to reply
16 replies to this topic

#1 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 18 January 2019 - 08:09 AM

Hi DDH69,

 

as an interested software developer I want to ask some DOFLinx insides. I did study the vbs script which is included in each DOFed FuturePinball table but how your application pulls the data from the bunch of magic numbers array? Whats the magic behind it?

 

Wondering

 

Sven



#2 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 18 January 2019 - 08:35 AM

Sure, like all good magic, thanks to William Sakespear, start with

 

Double, double toil and trouble;
Fire burn and caldron bubble.
Fillet of a fenny snake,
In the caldron boil and bake;
......

But in this case.....  Within the VB script in FP I write a known complex bit pattern using the real data type (longest non string type) to the memory in heap of locations.  DOFLinx then searches for these patterns grabbing the memory addresses.  Once the addresses are found DOFLinx changes a bit in one of the addresses to signal to the FP VBS that a link is active.  DOFLinx then monitors these memory addresses and messages are sent via a custom messaging system based in bit wise patterns and where necessary the encoding of strings into ASCII values.  Basically the VBS in FP encodes the messages and DOFlinx decodes them.

 

Its that simple, but then again that hard.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#3 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 18 January 2019 - 08:55 AM

Oh yeah, meant to ask, is it just out of interest or is there something specific you are trying to achieve?


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#4 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 18 January 2019 - 08:58 PM

Ahh Macbeth! Recently did read the book from Jo Nesbo! Very crude stuff! :dblthumb:

 

Yes and no! I am interested and already thought in this direction, the real (double) value was the thing i missed!

And yes I currently have trouble to get run DOFlinx with FuturePinball on a Windows10 machine. A time it was working well but now after Windows, DOF and DOFlinx upgrades I feel like I start from scratch. And I want to know why!



#5 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 18 January 2019 - 09:19 PM

What problem are you having?  Establishing the link?


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#6 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 18 January 2019 - 09:59 PM

Yes, establishing the link. DOFlinx detects the FP process but not the DOFed table :hmm: 



#7 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 18 January 2019 - 11:12 PM

Have you looked at the FP_LINK_WAIT_TIME= ?  It may need to increase.

Have you ensured that you have the latest DOFLinx.vbs in the FP scripts folder?  And of course that you have only the one DOFLinx.vbs, not a sneaky old one hanging around.

 

To test if things are working at all you can;

  1. Stop DOFLinx
  2. Start FP
  3. Load a table with DOFLinx code
  4. Start DOFLinx

This effectively removes the need for the wait time as the memory pattern is there from the moment DOFLinx starts.  Its a manual process, but quite valid for fault finding.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#8 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 20 January 2019 - 11:37 AM

Ok, after testing a lot of settings yesterday, I have some results here.

First of all again it was an access rights problem. I used a tool called VistaUACMaker to get rid of it.
As you suggested I did some parallel testing. One change in the settings - one start of future pinball and DOFlinx.
So I twiggled the settings within UACMaker.
I would like to post a screenshot of the settings here, but it seems I am not allowed to do so or at least I did not see the upload attachment option?!

There was another issue with the device addressing of my both controllers (1 Ledwiz, 1 Pinscape).
I recently added an USB hub where I connected my LEDwiz controller for the backboxing stuff. Maybe I did also change some other things, I cant remember.
The pinscape was device 2, now is 1, the ledwiz was before 2 now is 1. :hmm:

While testing I also had a DOFLinx crash, but again I cant remember what it caused by.

Happily now one thing is left: Getting DOFLinx running at auto start again. :blink:


Edited by svesch, 20 January 2019 - 11:37 AM.


#9 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 20 January 2019 - 09:39 PM

Glad to hear you have progress.

 

The hub will not make a difference as DOFLinx tests for devices in type order.  Have you perhaps enabled LEDWiz emulation on your PinScape?  Either way, once setup the order will not change.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#10 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 21 January 2019 - 04:38 PM

I have it disabled and reenabled for some tests. I also had added keyboard support, so that another USB device was added.


Edited by svesch, 22 January 2019 - 07:07 PM.


#11 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 22 January 2019 - 07:07 PM

Would it be possible to add a more unique adressing scheme?



#12 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 23 January 2019 - 12:47 AM

Can you explain what you mean a bit more?


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#13 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 23 January 2019 - 07:52 AM

Ok.

You now use device IDs 1, 2, 3 and so on. But it is not really clear what device is addressed on the first glance.

Maybe you have an additional adressing level in ini file where you say: device 1 has the VID 0xfafa and the PID 0xf7. Only as a thought.



#14 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 23 January 2019 - 09:55 AM

Appreciate the thought.  I will consider what I might be able to do.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#15 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 23 January 2019 - 04:49 PM

Ok, thanks!

Another thought: I often saw that the DOFed outputs stay active after entering a table within PinballX.

I mean: the main screen of PinballX is driven by DOF directly. And now you enter table xyz and you have the DOF colors at the outputs. Because there seems no real initialisation after establishing the DOFlinx link you see this DOFed outputs until something happens on the table.

That might be intended or not, I think it would be cleaner if the outputs were entirely reseted. And also at the end of the table, but there is not link lost detection, I think?



#16 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 26 January 2019 - 09:42 AM

Thanks for the input.  I thought it did, but needed to check, DOFLinx does turn off all outputs when it opens the output controllers and also when the activating process disappears.  Checked the code and did a practical test on the cabinet today.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#17 svesch

svesch

    Hobbyist

  • Members
  • PipPip
  • 11 posts

  • Flag: Germany

  • Favorite Pinball: ?

Posted 28 January 2019 - 07:59 PM

But not if a new process is linked.