Jump to content




Photo
* * * * * 9 votes

Pinscape Controller software V2

pinscape

  • Please log in to reply
906 replies to this topic

#1 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 04 May 2016 - 07:32 PM

I'm pleased to announce that the new Pinscape V2 software is finally here!
 
This started out as a little two- or three-week project back in February.  It obviously turned out to be vastly more work than I expected.  And like all software, it's not truly finished yet; I still have a number of things on my to-do list for it.  But it's reached the point where it's fully usable, and the remaining to-do items are all nice-to-haves, so I'm publishing it.  This will let me finally turn my attention to the much-delayed new version of the Build Guide for the expansion boards.
 
This release should be considered a "beta", of course.  I've tested it pretty extensively and for quite a while now, but testing on one machine is never good enough to find every bug.  If you run into anything wrong or confusing or weird, let me know.  If it doesn't work for you at all or causes problems you can't live with, you can always go back to the V1 release at any time.
 
New configuration procedure
 
The big change from V1 is an entirely new approach to configuration.  In the old version, you had to create your own private copy of the source code repository on mbed, edit the header files, and compile your own custom binary.  None of that is required any more!  Instead, you can use the standard, pre-compiled version of the binary, and set all options via the new and improved Config Tool on Windows.
 
The source code is still fully available, of course, so you can still do more extensive surgery on it if you want to.  But if you just want to set configuration options, you don't have to touch the source code or even visit mbed at all any more.
 
Here's the basic procedure for using the new version.
 
First, download the new Config Tool, here:
 
 
Installation is easy - just unzip this into a folder on your PC.  There you'll find the main config tool program, PinscapeConfigTool.exe.  Double-click that file to run the config tool.
 
NOTE!  There's an HTML directory inside the new program folder that's full of .htm files.  Don't try to load them into a browser or run them directly.  They're just resources for the config tool that run inside it to provide parts of the UI.
 
When you first fire it up, the program will automatically go grab the latest firmware version from the site above.  There's a download status report toward the bottom of the first screen.  The firmware file is only about 60K, so it should download almost instantly if you have a decent connection.
 
 (I know a lot of people don't like software that contacts the mothership on its own like this, so there's a checkbox right next to the status report that lets you turn this feature off if you prefer.  The software doesn't send any private data or spy on you in any way - it just checks for new versions and downloads them if available.)
 
If you have a KL25Z attached with the V1 firmware installed, the setup program should show it in a list in the main window.  It'll see that the old firmware is installed, so the only option it'll offer for the device is Update Firmware.
 
 
win1.png
 
 
 
If you have a brand new KL25Z without a previous Pinscape version installed, that's also covered.  Lower down on the page you'll find a button to Set up a new KL25Z.  Click that and it will lead you through the procedure, which will ultimately take you to the firmware installer screen (the same place that the Update Firmware button goes).
 
Now, this is important: with the new version, you should always do firmware updates through the config tool rather than by the old Windows drag-and-drop method.  The drag-and-drop method still works, and it won't do any harm, but it will reset the Pinscape option settings on the device to the factory defaults.  If you use the config tool, it will automatically save your current settings and restore them after the update.
 
Assuming that the auto-download of the firmware worked properly, when you reach the Update Firmware screen, you should already have a copy of the latest Pinscape Controller .bin file in your Downloads folder.  The Update Firmware screen will list the available versions.  These will have names like this:
 
    Pinscape Controller 2016-05-04-0358
 
The numbers at the end are the build date and time - this case, May 4, 2016, at 03:58 GMT.  That lets you keep see at a glance which version is newest.  What's more, the config tool will show you which version you currently have installed on each device (after you upgrade to V2 - the V1 software doesn't have any way report this information), so you can tell if the available version is newer than what you're currently running.
 
The Update Firmware screen will lead you through a few steps to do the update or initial install.  Once you have the V2 firmware installed, the main screen will show more options for your updated unit:
 
win20.png
 
 
 
The next thing you'll want to do is click Settings.  This will take you to a new screen where you can select all of the options for the device.  Hopefully that'll all be self-explanatory, but there's a lot there.  If anything's unclear, let me know and I'll try to improve the on-screen explanation.  My goal is that this should be practically self-documenting, so you shouldn't need to consult the manual for most of the features and options.  And of course it should be much easier to use than hand-editing a C++ header file!
 
Once you've set all of the settings the way you want, click the Program KL25Z button at the bottom of the screen.  This will program the new settings into the device.  The device will automatically reboot itself, and the new settings will be in effect.
 
The new tool also has the ability to back your settings to a text file, and restore settings from a previous backup.  This will let you recover your settings if anything goes wrong with the device.  It also makes it easy to copy your settings from one device to another.
 
The plunger sensor viewer is also much improved in this version, by the way.  It shows more information, including the sensed edge position on each frame, the current calibration ranges, and the scan time per frame.  It also has a new command to capture the pixel data to a file for off-line analysis.  .This could be helpful in debugging installation problems where the software can't get a reliable fix on the shadow edge position and it's not clear why.
 
 
Other new features
 
Optical plunger sensor improvements:  The TSL1410R code was almost completely rewritten.  It can now read the sensor at full resolution in about 2.5ms - that's about 400 frames per second, which is fast enough to capture the plunger release motion as it happens, in detail, without significant motion blur or aliasing.  V1 wasn't fast enough to track the release motion in that kind of detail, so it had to resort to some heuristics to guess when a release motion was taking place.  That worked pretty well, but it added some slight time lag and could sometimes be fooled.  The new faster frame rate allows the software to detect release motion much more precisely and almost instantly.  The old version was already pretty good, so the difference in the subjective "feel" isn't dramatic, but I think you can tell the difference in close observation.  It's probably pretty obvious that The Quest For The Perfect Plunger has always been one of my big obsessions with this project, so I get unreasonably excited when I can manage to get it a step closer like this.
 
Keyboard mappings for buttons:  The V1 software only let you map input buttons to joystick buttons.  The new software adds the option to map buttons to regular keyboard keys.  Joystick buttons are still supported, of course, and you can even mix and match - some buttons map to the joystick, some to the keyboard.  The advantage of keyboard keys is that it's virtually universal among PC pinball software to accept keyboard input, whereas only a subset accept joystick input.
 
Night mode:  You can now set up a button or switch that puts the device into Night Mode, to allow quieter play during late hours when you don't want to disturb housemates or neighbors.  When in Night Mode, the output controller disables ports that you designate as "noisy" - e.g., your knocker, contactors/solenoids, gear motor, etc.  Only the designated "noisy" ports are disabled, and each port can be designated as noisy or not individually, so you still get the benefit of your flashers and other lighting effects during quiet play.  You can set this up with a physical button dedicated to triggering the mode, or you can just turn it on and off from a little control program on the PC (NightMode.exe, which is included in the setup program download).
 
Gamma correction:  You can designate individual output ports for "gamma correction", which adjusts the output port intensity level to better match the way the human eye perceives brightness.  You can enable this if desired for your flashers, LED strips, and other lighting devices.  It can improve the appearance of "fading" effects and color mixing in RGB devices.
 
USB stability:  This version has yet more fixes for yet more USB bugs.  Hopefully I'll find the last one someday and it'll be perfect.  But there always seems to be one more USB bug, so I also added a new "last resort" feature:  you can now program the device (in the Settings page) to automatically reboot itself if the USB connection gets broken and can't be restored within a given time limit.  This will hopefully serve as a bulletproof workaround for any remaining intractable connection problems anyone has.  Of course, this sort of kludge has a downside, which is that the device could mistakenly think it needs to reboot itself when it really doesn't, so you can turn it off entirely if you don't need it or it becomes troublesome in its own right.
 
Expansion boards:  The V1 software already had basic support for the expansion boards, but this version has some improvements to the output port code, and in particular better handling for the TLC5940 chips.
 
 
That's about it!  If you need to "downgrade" back to V1, just go the original mbed repository page and do your normal custom build and install:
 
 
And if you want to look at the new V2 source code, I created a new repository fork for the new version:
 
 
Remember, most people shouldn't need to edit the source code or compile their own binaries any more.  But the source code is there if you're interested in looking at it or customizing it beyond what the Config Tool can do.

Finally, in case you want the source code for the Config Tool itself, you can grab it here:
 
 
It's also entirely open-source, of course.  It's a combination of C# and HTML/Javascript/jQuery code.

Edited by mjr, 07 May 2016 - 07:43 PM.


#2 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 04 May 2016 - 10:36 PM

as always your the man MJR

EDIT: I had to point this out... I guess about maybe a year or less ago, I was building a cab for a friend... and wanted to use the same setup I have in my cab (pinscape w/optical plunger)

after about a dozen atempts to get it working i had no luck.... so I returned the optical sensor , got the new one, same thing... just wouldnt work... soldered, resoldered new wires.... in the end i had to give up and use a linear pot... it worked fine... he has had no issues

 

fast forward to today:

I had the setup laying in a box still all wired up, I was going to send it to MJR...I decided it wasnt worth his time so it sat in the box

hooked it up to a spear PC and ran the new V2.0 on the control board.... so now with the new firmware installed it all it working perfect??

 

what i dont get it was setup exact to my working setup in my cab.... I just dont get why v1.0 worked on my cam and not on this other hardware, but v2.0 does.... craziness!!

 

anyway thanks MJR....  this new config tool is VERY professional looking and in function


Edited by hauntfreaks, 05 May 2016 - 01:58 AM.

 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#3 ScottyVH

ScottyVH

    Novice player, but love the game!

  • Silver Supporter
  • 442 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, Cirqus Voltaire, Simpson's Pinball Party

Posted 04 May 2016 - 10:49 PM

Wow!  This would have saved me so much time and grief setting up a keyboard encoder, nudge, mapping keys on software, etc.  I am using V1 now but only for nudge, so I hope to upgrade to V2 and get rid of my redundent keyboard encoder.  Should really help tidy up my wiring.  Thanks for this -- I can't wait to try it!


test5.gif


#4 roar

roar

    Enthusiast

  • Members
  • PipPipPip
  • 452 posts

  • Flag: Canada

  • Favorite Pinball: TOM

Posted 05 May 2016 - 02:02 AM

Thanks mjr! Looking forward to giving this a go when I get back from Allentown! You had mentioned the new code may handle the issues I've seen with my leaf switches on my flipper buttons a little better, is that the case?

#5 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 05 May 2016 - 06:26 AM

so I wanted to take a look at the setting tab... when i click it i get this error

 

post-73849-0-12576300-1462429277.jpg

Attached Files


Edited by hauntfreaks, 05 May 2016 - 06:31 AM.

 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#6 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 05 May 2016 - 05:18 PM

so I wanted to take a look at the setting tab... when i click it i get this error

 

Out of curiosity, what version of IE do you have installed?  I have a wild guess about what might be going on that would involve a difference in the web-control behavior from the one I test with.  Try this fix to see if it helps:

 

    http://www.mjrnet.or...ix20160505a.zip

 

That just contains one file (basically the implementation file for the Settings page) - unzip that file into the 'html' folder in your config tool install folder, replacing the current one, and see if that helps.  (Make sure that your UNZIP program doesn't create an HTML subfolder of your HTML folder - you need to replace the existing file, not create a new file in a new subdirectory.)


Thanks mjr! Looking forward to giving this a go when I get back from Allentown! You had mentioned the new code may handle the issues I've seen with my leaf switches on my flipper buttons a little better, is that the case?

 

Yep, it has the new debouncing code.  The change is that it polls the physical switch state faster and can therefore do more conservative debouncing without adding lag time.  Hopefully it'll help for your setup.


I had the setup laying in a box still all wired up, I was going to send it to MJR...I decided it wasnt worth his time so it sat in the box

hooked it up to a spear PC and ran the new V2.0 on the control board.... so now with the new firmware installed it all it working perfect??

 

what i dont get it was setup exact to my working setup in my cab.... I just dont get why v1.0 worked on my cam and not on this other hardware, but v2.0 does.... craziness!!

 

That's surprising, but a good kind of surprise.  It's possible that the problem in the past was that your light source was slightly too bright and was saturating the sensor.  The new software has a faster "shutter speed", so the same light level will produce a darker image in each frame.  Maybe that got you under the threshold where there's enough contrast to be usable.

 

Whatever it was, I'm glad it's finally working for you!



#7 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 07 May 2016 - 05:12 PM

Hey MJR this V2 is really nice.  Love all the easy to use features and setup options.

 

I'm having trouble getting the keyboard mapping to function.  With all the defaults, buttons show active and work in game controller properties.  When I remap to a keyboard key instead, it no longer lights up in game controller properties (as I would expect) but it also does not actually perform the keystroke.  I was just testing in notepad.  

 

What steps should I try to troubleshoot why it may not be sending the keyboard keys?

 

Thanks!

-Mike



#8 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 06:31 PM

Hey MJR this V2 is really nice.  Love all the easy to use features and setup options.

 

I'm having trouble getting the keyboard mapping to function.  With all the defaults, buttons show active and work in game controller properties.  When I remap to a keyboard key instead, it no longer lights up in game controller properties (as I would expect) but it also does not actually perform the keystroke.  I was just testing in notepad.  

 

What steps should I try to troubleshoot why it may not be sending the keyboard keys?

 

You're right that the buttons will stop showing up in the game controller panel if you remap them to keyboard keys.  The game controller panel is specifically showing joystick buttons, and once you remap a button as a key, it no longer "presses" the joystick button.

 

The first thing to look at is to make sure that the device is showing up properly as a USB keyboard.  If you open Device Manager, and go to the Keyboards section, you should see an entry for "HID Keyboard Device".  If your actual keyboard is USB as well, you'll have a second entry for that.  To confirm that the "HID Keyboard Device" entry is the Pinscape device, double-click it and go to the Events tab.  In the Information box, you should see something like this:

 

Device HID\VID_FAFA&PID_00F7&MI_01...

 

The VID_FAFA&PID_00F... part is the important bit - if you see that, it's the device we're looking for.  Now go back to the General tab and make sure the device status says "The device is working properly".

 

If that all looks good, I'm not sure what else could be going on.  Maybe you could post a screen capture of the setup window showing your key assignments.  I assume you mapped at least a few keys to something that will show up in Notepad, like A, B, C...  The reason I point this out is that things like Shift and Control keys won't be observable in Notepad because they don't add any text.  But anything that corresponds to a regular letter or number or the like should show up there, so you're doing the right sort of test.

 

And one last thing - you're clicking the "Program KL25Z" button before testing changes, right?  Changes you make in the settings window don't go live until you program them into the device.


Edited by mjr, 07 May 2016 - 06:32 PM.


#9 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 06:44 PM

Just double-checked it on my system, and it looks like I added a bug in the first release version that broke the key input!  

 

I just fixed it, so try grabbing the latest firmware.  If you run the config tool, it should find it and download it automatically, so you should see it offered when you go to the Update Firmware page.  It should show up at the top of the list with the 2016-05-07-1839 time stamp.  Hopefully that'll fix it for you.


Edited by mjr, 07 May 2016 - 06:46 PM.


#10 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 07 May 2016 - 06:54 PM

i'm still having some script issues.... does the settings menu need to run in IE?... that isnt my default browser.... when I force it to use IE... I ger a security warning... then when I disable this warning it continues to say it couldnt let the script run

the new firmware and calibration  is working fine... just not the setting menu


 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#11 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 07:08 PM

i'm still having some script issues.... does the settings menu need to run in IE?... that isnt my default browser.... when I force it to use IE... I ger a security warning... then when I disable this warning it continues to say it couldnt let the script run

the new firmware and calibration  is working fine... just not the setting menu

 

Oh, I think you might be trying to run the .htm file directly - maybe you're double-clicking on it in the Windows desktop, or trying to load it into Chrome or FireFox or IE?

 

Don't!

 

Just run PinscapeConfigTool.exe.  All of the .htm files run inside that.

 

(Sorry for the confusion if that was indeed the problem!  I would have preferred to bury all those files inside the .exe as resources so that they're not out there looking like browser files, but there doesn't seem to be a good way to do that in C#.)


Edited by mjr, 07 May 2016 - 07:24 PM.


#12 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 07 May 2016 - 07:33 PM

Just double-checked it on my system, and it looks like I added a bug in the first release version that broke the key input!  

 

I just fixed it, so try grabbing the latest firmware.  If you run the config tool, it should find it and download it automatically, so you should see it offered when you go to the Update Firmware page.  It should show up at the top of the list with the 2016-05-07-1839 time stamp.  Hopefully that'll fix it for you.

 

That fixed it!  Thanks for the fast response!

 

-Mike



#13 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 07 May 2016 - 07:44 PM

heres a video of how i'm running the tool and what is happening in my case....

 


 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#14 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 07:46 PM

 

Just double-checked it on my system, and it looks like I added a bug in the first release version that broke the key input!  

 

I just fixed it, so try grabbing the latest firmware.  If you run the config tool, it should find it and download it automatically, so you should see it offered when you go to the Update Firmware page.  It should show up at the top of the list with the 2016-05-07-1839 time stamp.  Hopefully that'll fix it for you.

 

That fixed it!  Thanks for the fast response!

 

Great - glad to hear it fixed it!


heres a video of how i'm running the tool and what is happening in my case....

 

 

Yeah, there's some version incompatibility going on.  Did you ever tell me what version of Windows and IE you have installed?  I'll need to see if I can set up a test bed with the same versions to see what the problem is.

 

And did you ever try that updated .htm file I sent you?


Edited by mjr, 07 May 2016 - 07:48 PM.


#15 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 07 May 2016 - 07:48 PM

I never up my IE because i dont use it... so I'm guessing its 8 but will go down and check


 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#16 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 07:50 PM

I never up my IE because i dont use it... so I'm guessing its 8 but will go down and check

 

You should probably update it to the latest.  Even if you don't use it as a browser, it's a critical system component that lots of software (like this one!) uses under the covers.

 

I also need to know your Windows version - that might be the problem as well.  I test on Win 7 and Win 8.


Edited by mjr, 07 May 2016 - 07:51 PM.


#17 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 07 May 2016 - 07:56 PM

I use win7 in all my rigs

 

post-73849-0-41544400-1462650951.jpg

Attached Files


 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#18 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 08:01 PM

I use win7 in all my rigs

 

post-73849-0-41544400-1462650951.jpg

 

You should definitely try updating to IE 11, then.  Hopefully that will fix it.



#19 hauntfreaks

hauntfreaks

    Real 4K Tables Since 2013

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

  • Flag: United States of America

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



Posted 07 May 2016 - 08:11 PM

some of us..uumm... cant upgrade to 11 <wink wink>


it would be awesome to use all the features, but no biggie if i cant, I can use the latest firmware, and plunger config so... there the most important...


 26794541816_30ca1cca80_o.gif 43109635392_fc11af1a57_o.gif


#20 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,871 posts

  • Flag: United States of America

  • Favorite Pinball: Theatre of Magic

Posted 07 May 2016 - 08:15 PM

some of us..uumm... cant upgrade to 11 <wink wink>


it would be awesome to use all the features, but no biggie if i cant, I can use the latest firmware, and plunger config so... there the most important...

 

Okay... not sure there's much I can do about IE8, unfortunately.  It's notoriously incompatible with all of the modern standards, but the big complication is that I don't think I have any systems that are still capable of running it.







Also tagged with one or more of these keywords: pinscape