Jump to content



Photo
* * * * * 5 votes

Call for testing


  • Please log in to reply
1630 replies to this topic

#1001 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 January 2020 - 08:12 PM

I have mixed VPX and VP9 definitions in the same Visual Pinball database by using the  <alternateExe>  tag.  Does PinballY  support that tag in the database?  

 

No, afraid not.  PinballY handles that by using a separate database folder for each system.

 

 

Secondly, I have made sue if PinemHi which is in PinballY but, it looks to me that it is pulling scores...is there a way to report scores also?  I have not seen an option to supply my PinemHi ID and password for reporting scores or participating in the challenges.  

 

No, PinballY doesn't do anything with the reporting side.  That's something you could probably add with Javascript if you wanted - see the help section on Javascript scripting > System Classes > HttpRequest.



#1002 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 03 January 2020 - 10:20 PM

Hi mjr


I finally found a fix for the missing menu options.  It was a nightmare to find but hopefully this will help someone else :).

 

The original problem:

menu_after_change.png

 

 

You were in the right area when you mentioned Aero.  The strange thing is although I was enabling an Aero theme, and I made sure desktop composition wasn't disabled for the PinballY.exe, my global Windows settings related to Visual Performance were overwriting some key features that seem to need to be enabled for the menu items to show in PinballY.

 

To Fix

1/ I select an Aero Windows theme.

 

2/ Goto: Control Panel\All Control Panel Items\Performance Information and Tools\Adjust Visual Effects

I was using 'Adjust for best performance' and this was switching off a lot of features.  A key setting seems to be 'Smooth Edges for Screen Fonts'.

 

 

Therefore I setup a custom configuration and switch on the following options as a minimum:

 

important_win7_performance_settings_to_f

 

And menus working!

 

menus_working.png

 

This also fixed the issue of the missing wheel images and wheel text :)

 

Thanks!


Edited by atarian, 03 January 2020 - 10:22 PM.


#1003 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 January 2020 - 11:00 PM

Atarian - that's great that you tracked it down!  Thanks for sharing the details.  That's a ridiculously hidden bit of system configuration.  It makes a kind of sense that it would affect the text display, but I never would have guessed - I haven't seen any mention of this anywhere in the Windows API documentation.  Sheesh, they really should change the description of the option to "Check this box if you want programs using certain system calls to be able to display text AT ALL, let alone with smooth edges".

 

I'll add this to the troubleshooting section so that the next person who runs into doesn't have to dig around the system control panels like you did.



#1004 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 04 January 2020 - 07:07 PM

I had trouble getting my button mappings working in PinballY once playing a table in VPX. I thought I will come back to this later, so started using the screenshot capture feature. Initially I got incorrect screenshots because I run VPX in exclusive fullscreen. The reason for doing this is it is the only way I can guarantee super smooth stutter free play across all tables. For the purposes on screenshot creation of course this does not matter so I flipped VPX to non-exclusive fullscreen and successfully created loads of screenshots. A great feature :).

The reason for the long story is whilst in non-exclusive fullscreen all the PinballY button mappings started working whilst playing VPX. I could call up the PinballY menus and resume play. I guess PinballY can only detect it's keypresses when VPX is not in exclusive fullscreen? I really am hoping this isn't the case as I need to play in exclusive fullscreen :(. I guess there might be a workaround? Anyone else using exclusive fullscreen with PinballY?

Edited by atarian, 04 January 2020 - 07:09 PM.


#1005 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 04 January 2020 - 07:43 PM

The reason for the long story is whilst in non-exclusive fullscreen all the PinballY button mappings started working whilst playing VPX. I could call up the PinballY menus and resume play. I guess PinballY can only detect it's keypresses when VPX is not in exclusive fullscreen? I really am hoping this isn't the case as I need to play in exclusive fullscreen :(. I guess there might be a workaround? Anyone else using exclusive fullscreen with PinballY?

 

I wouldn't have thought exclusive fullscreen would have any effect on the keyboard. 

 

So you're saying that the Exit Game button doesn't work when VP is in exclusive mode, so there's no way to quit out of a game?  Or is it just that you can't use the Pause/Resume menus?



#1006 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 04 January 2020 - 08:50 PM

I just did another test and assigned some keys other than escape to be sure. In exclusive mode the Exit Game key works but exits instantly with no prompt. The Pause key doesn't work so it isn't possible to bring up any menus to resume, etc. Thanks

#1007 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 04 January 2020 - 09:24 PM

I just did another test and assigned some keys other than escape to be sure. In exclusive mode the Exit Game key works but exits instantly with no prompt. The Pause key doesn't work so it isn't possible to bring up any menus to resume, etc. Thanks

 

Okay, that makes more sense to me.  It sounds like what's going on is:

 

1. The keyboard is working

2. But PinballY can't display anything (like menus), because "exclusive" really does mean exclusive - i.e., only VP can use the screen.  PBY is probably trying to display its menus and isn't being allowed to because of the exclusive lock-out.

 

It might be possible to wrest control back from VP by some more aggressive means that just trying to bring the PBY window to the foreground, which is what it does currently.  Windows can certainly switch tasks when you're in that mode with Alt+Tab, but I don't know of a separate API for that.



#1008 rlewis19

rlewis19

    Enthusiast

  • Members
  • PipPipPip
  • 173 posts

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

  • Favorite Pinball: Bank-a-ball

Posted 04 January 2020 - 10:01 PM

Is there a way to get into game edit mode from a game launched by PinballY?  Reason being that some games need to be adjusted to better fit my screen and such.



#1009 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 04 January 2020 - 10:50 PM

Is there a way to get into game edit mode from a game launched by PinballY?  Reason being that some games need to be adjusted to better fit my screen and such.

 

You're talking about VP games, right?

 

VP always loads its editor, so yeah, it's there.  It usually just starts minimized when you start in Play mode, so you don't see the window normally during play.  You can get there by using the normal Windows Alt+Tab combo to scan through top-level windows.



#1010 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 04 January 2020 - 11:24 PM


I just did another test and assigned some keys other than escape to be sure. In exclusive mode the Exit Game key works but exits instantly with no prompt. The Pause key doesn't work so it isn't possible to bring up any menus to resume, etc. Thanks

 
Okay, that makes more sense to me.  It sounds like what's going on is:
 
1. The keyboard is working
2. But PinballY can't display anything (like menus), because "exclusive" really does mean exclusive - i.e., only VP can use the screen.  PBY is probably trying to display its menus and isn't being allowed to because of the exclusive lock-out.
 
It might be possible to wrest control back from VP by some more aggressive means that just trying to bring the PBY window to the foreground, which is what it does currently.  Windows can certainly switch tasks when you're in that mode with Alt+Tab, but I don't know of a separate API for that.
I don't hear the sound that is played when the menu is brought up, but I guess that is due to a complete lock-out? The potential workaround that you mention I guess might be feasible from the PinballY source code, or are you saying that it might be a hack so maybe I might need to catch the keypresses myself with something like Autohotkey (and do something like alt-tab to PinvallY - as I type this I am feeling like I am going back to the days of FPLaunch so I should probably stop now on that line of thought - lol).

Edited by atarian, 04 January 2020 - 11:37 PM.


#1011 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 05 January 2020 - 12:12 AM

I don't hear the sound that is played when the menu is brought up, but I guess that is due to a complete lock-out?

 

Right, although it's a separate lock-out.  That's coming from VP setting the sound system into exclusive mode (which isn't an option anywhere, it's just what it does).  Meaning when VP has input focus, nothing else can use the speakers.

 

For what it's worth, I just gave it a quick try on my machine, setting VP X to exclusive full-screen mode, and PBY has no problem bringing itself to the foreground on 'Pause'.  ('Resume' is less successful, though - it seems to want to set focus back on VP's editor window rather than its full-screen game window.  I'll have to look into that.)  I tried it on Windows 8 - what are you on?  This behavior might vary by Windows version, or maybe even by video driver.

 

 

The potential workaround that you mention I guess might be feasible from the PinballY source code, or are you saying that it might be a hack so maybe I might need to catch the keypresses myself with something like Autohotkey (and do something like alt-tab to PinvallY - as I type this I am feeling like I am going back to the days of FPLaunch so I should probably stop now on that line of thought - lol).

 

No, I wasn't really thinking along those lines, although something like that might end up being necessary, if it turns out to be a video driver thing.



#1012 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 05 January 2020 - 11:08 AM

Hi mjr - thanks for the quick response and for trying that. I am using Windows 7 64-bit. I use the latest nVidia drivers for a GTX 970. Thanks

P.S. Not sure if it's relevant but in PBY as a test I used two standard alphabetical keys for the pause button and exit button, just in case there was a conflict in the way VPX implements ESC. But I got the same behaviour.

Edited by atarian, 05 January 2020 - 11:37 AM.


#1013 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 05 January 2020 - 12:12 PM

I just read some notes about how Microsoft tried to mimic exclusive fullscreen in Windows 10 which is quite interesting. As there is a compatibility option in W10 to disable this 'mimiced' mode and I presume make W10 use the old fashioned exclusive fullscreen) I was wondering if my W7 behaviour would present itself in W10. Just mentioning it in case it aids testing.

https://devblogs.mic...-optimizations/

Edited by atarian, 05 January 2020 - 12:12 PM.


#1014 rlewis19

rlewis19

    Enthusiast

  • Members
  • PipPipPip
  • 173 posts

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

  • Favorite Pinball: Bank-a-ball

Posted 05 January 2020 - 05:24 PM

Hi,

 

As I transition tables from vp9 to vpX, I find myself downloading the vpx version, renaming the older .vpt to something like .vpt_old and then crank up PinballY.  I then choose the unconfigured tables "view" in PinballY and set up the game details.  If a do a chunk of tables (say >6 or so), it's hard to keep track of which old tables I'll need to "hide" later.  Is it possible to create 1 more view that shows database entries with missing .vpt or .vpx files?  If that's not possible, can there be some indication in the PinballY info window that says something like 'Table File Missing'?

 

With PinballX, the frontend also shows 'Visual Pinball' for vp9 and 'Visual Pinball X' for vpX.  PinballY does something similar but doesn't appear to distinguish between the different versions.  (ie: vpx still shows Visual Pinball).   Is this intentional behavior?

 

Thank you!

R



#1015 djlunchbox

djlunchbox

    Enthusiast

  • Members
  • PipPipPip
  • 157 posts

  • Flag: El Salvador

  • Favorite Pinball: WCS 94, Theatre of Magic, TOTAN

Posted 06 January 2020 - 01:05 AM

It does distinguish. If you go to the menus you’ll see all the systems are separated.

If you want to make it more distinguishable, download a new logo for VP9 and add it to the system logo folder. Then when you see the info for that table (name, manufacturer, etc) you’ll have a different logo. Just google Visual Pinball Logo

#1016 rlewis19

rlewis19

    Enthusiast

  • Members
  • PipPipPip
  • 173 posts

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

  • Favorite Pinball: Bank-a-ball

Posted 06 January 2020 - 03:04 PM

It does distinguish. If you go to the menus you’ll see all the systems are separated.

If you want to make it more distinguishable, download a new logo for VP9 and add it to the system logo folder. Then when you see the info for that table (name, manufacturer, etc) you’ll have a different logo. Just google Visual Pinball Logo

That's wonderful!  Thank you.



#1017 djlunchbox

djlunchbox

    Enthusiast

  • Members
  • PipPipPip
  • 157 posts

  • Flag: El Salvador

  • Favorite Pinball: WCS 94, Theatre of Magic, TOTAN

Posted 06 January 2020 - 05:38 PM

No problem just remember naming convention: Visual Pinball X and Visual Pinball 9

 

I added this as my logo for VPX

 

339-3396253_visual-pinball-x-visual-pinb

 

and this for VP9

 

339-3395698_visual-pinball-roms-visual-p


Edited by djlunchbox, 06 January 2020 - 06:07 PM.


#1018 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 06 January 2020 - 09:15 PM

Hi mjr - thanks for the quick response and for trying that. I am using Windows 7 64-bit. I use the latest nVidia drivers for a GTX 970. Thanks

P.S. Not sure if it's relevant but in PBY as a test I used two standard alphabetical keys for the pause button and exit button, just in case there was a conflict in the way VPX implements ESC. But I got the same behaviour.

 

The choice of keys shouldn't make any difference to PinballY, but it was a good test to try different keys just in case it was a conflict on the VP side or somewhere else.

 

So, the way that Windows 8 handles task switching from full-screen applications is to minimize the full-screen window.  That seems to be something that the OS does automatically as soon as you switch to another program.  But program switching is controlled by Windows itself, and it doesn't always allow a background task to take control - the rules for that are complex and aren't documented precisely; they're kind of vague and hand-wavy about it in the API docs, like the Microsoft tech writers aren't sure about it.  So I wouldn't be surprised if there's some variation on Win 7 vs Win 8 vs Win 10, and full-screen might be one of the differences.

Anyway, one thing we could try is to explicitly minimize the VP window when you try to switch away from it.  Here's some Javascript code that you can try out: this will intercept the Pause Game command, minimize the current foreground window, and then let PinballY do its normal task switch attempt.  It also intercepts Resume so that it can restore the old window.  Drop this into a text file called Main.js in your PinballY Scripts folder.

(function() {
    let User32 = dllImport.bind("User32.dll", `
        HWND GetForegroundWindow();
        BOOL SetForegroundWindow(HWND);
        LONG_PTR SendMessageTimeoutW(HWND, UINT, WPARAM, LPARAM, UINT, UINT, DWORD_PTR*);
    `);
    const WM_SYSCOMMAND = 0x0112;
    const SC_MINIMIZE = 0xF020;
    const SC_RESTORE = 0xF120;
    let pausedWindow;
    let result = dllImport.create("DWORD_PTR");
    mainWindow.on("command", ev => {
        if (ev.id == command.PauseGame) {
            pausedWindow = User32.GetForegroundWindow();
            mainWindow.doCommand(command.PauseGame);
            if (pausedWindow)
                User32.SendMessageTimeoutW(pausedWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0, 20, result);
            User32.SetForegroundWindow(mainWindow.hwndFrame);
            ev.preventDefault();
        }
        else if (ev.id == command.ResumeGame) {
            if (pausedWindow)
                User32.SendMessageTimeoutW(pausedWindow, WM_SYSCOMMAND, SC_RESTORE, 0, 20, result);
        }
    });
})();


I should add that if this works, I can add do something like that in the main program, so that you won't need the javascript.  But we can try the javascript version to see if it actually  helps, to see if it's worth making the change in the program itself.



#1019 atarian

atarian

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts

  • Flag: France

  • Favorite Pinball: EMs

Posted 06 January 2020 - 10:04 PM

Hi mjr - many thanks for the time investigating this and for producing a test for me to try - much appreciated. I am away abroad until Wednesday night so sadly can't try it until then (really itching to try as well :)). I will report back once I give it a whirl.

#1020 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 07 January 2020 - 04:45 AM

As I transition tables from vp9 to vpX, I find myself downloading the vpx version, renaming the older .vpt to something like .vpt_old and then crank up PinballY.  I then choose the unconfigured tables "view" in PinballY and set up the game details.  If a do a chunk of tables (say >6 or so), it's hard to keep track of which old tables I'll need to "hide" later.  Is it possible to create 1 more view that shows database entries with missing .vpt or .vpx files?  If that's not possible, can there be some indication in the PinballY info window that says something like 'Table File Missing'?

 

You can create custom filters like this pretty easily.  The help section you want to look at is:

 

http://mjrnet.org/pi...nfo.html#custom

 

For this one, the filter selection rule will be "game file doesn't exist", which is luckily a really easy thing to test for.  The GameInfo object, passed to the custom filter selection function for each game to decide whether or not to include the game in the filter set, has a method called resolveGameFile() that looks up the file information for the game.  One of the thing that can tell you is whether or not the file exists.

 

http://mjrnet.org/pi...resolveGameFile

 

Here's how you can put this together to create the custom filter:

gameList.createFilter({
    id: "missingGameFiles",
    title: "Games without .vpt/.vpx files",
    menuTitle: "Missing Table Files",
    select: game => !game.resolveGameFile().exists,
    group: "[Op]"  // this is an operator menu filter!
});

As always, drop that into a text file called main.js in your PinballY Scripts folder.

 

Note that the new filter will appear in the Operator Menu, which you can access by pressing the 0 (digit ZERO) key, assuming you're using the default key assignments.  You can move it to the main menu if you prefer by changing the group to "[Top]".  You can also set up other ways to access it if you prefer, such as custom menus or custom key assignments.  And many other such filters are possible!  The Javascript help has details on all of that.