freezy / dmd-extensions

A toolbox for virtual pinball dot matrix displays.
GNU General Public License v2.0
130 stars 55 forks source link

DMDExt and Pinball FX3 lag issue #385

Open jdegagne opened 1 year ago

jdegagne commented 1 year ago

DMDext and Pinball FX3 working fine for the longest time.

All of a sudden the virtual DMD for FX3 is now running very slow. The actual FX3 DMD on Steam runs at the correct speed.

Using the DMDExt in PinballFX Steam also and that is running correctly.

Gone through Freezy's setup and haven't found a solution. Hoping someone else has had this issue. ex: Champion's Pub - when using "Launch a Ball" to choose a mode, the selection carousel on the DMD is running super slow when holding the launch button down.

numeric DMD tables seems to run OK

TIA

freezy commented 1 year ago

Any way you could screen capture it? I just tried champion's pub in FX3 and it seems to be fine. Also, a log would be cool.

jdegagne commented 1 year ago

Thank you Freezy

to view FX3 only (Steam) with no DMD Ext through PUP: https://www.youtube.com/watch?v=Rfaj63x2ZAg

to view FX3 with DMD Ext through PUP that lags: https://www.youtube.com/watch?v=WJ1HLDKWqew

to view Pinball FX with DMD Ext that runs smoothly: https://www.youtube.com/watch?v=ToAwaYDXOPM

from log: [13] 2023/06/27 15:02:59.918 ERROR | [PinUpOutput] Attempt to find PuP_Trigger function but dmddevicePUP.dll is outdated

from PUP log: 20230627 15:02:59 Open called 20230627 15:02:59 Set Game Name thread BALLY_Champion_Pub 20230627 15:02:59 Set B2S init 20230627 15:03:02 Start Thread Matching 20230627 15:03:02 create PuPCap 20230627 15:03:02 Init Game name:BALLY_Champion_Pub 20230627 15:03:02 No PuPCapture found: nothing to do

freezy commented 1 year ago

Those videos are private, can you make them public, please?

jdegagne commented 1 year ago

Sorry, Freezy - they are public now

freezy commented 1 year ago

Thanks. Can you post the entire log of the run that lags, please?

If I got this correctly, that lagging output doesn't come from dmdext, but from PUP that gets the frame data from dmdext?

@nailbuster any idea why this would be lagging like that?

nailbuster commented 1 year ago

i think @jdegagne terminology is incorrect. I think he means via Popper frontend, not PuP?

also, what does your Popper launch script look like for fx3? can you post.

jdegagne commented 1 year ago

Hi @nailbuster , It's Frogdog

yes terminology should be frontend Popper, not PUP

I'll provide Popper launch script on next post

Freezy, here's the recent log of executing FX3 through PUP

dmddevice log: [13] 2023/06/29 13:16:15.993 ERROR | [PinUpOutput] Attempt to find PuP_Trigger function but dmddevicePUP.dll is outdated

PUP log:

20230629 13:16:16 Open called 20230629 13:16:16 Set Game Name thread BALLY_Champion_Pub 20230629 13:16:16 Set B2S init 20230629 13:16:17 Start Thread Matching 20230629 13:16:17 create PuPCap 20230629 13:16:17 Init Game name:BALLY_Champion_Pub 20230629 13:16:17 No PuPCapture found: nothing to do

freezy commented 1 year ago

@jdegagne I need the entire DmdDevice.log where I can see how the render graph is set up, which version is used, etc.

jdegagne commented 1 year ago

@nailbuster Popper Launch Script for FX3

Launch Script

rem remove the next two rem lines to setup PUpDMD for FX3 cd /d "C:\pinball\Visual Pinball\VPinMAME" start /min "" "PUPDMDControl.exe" FX3 PINUP[GAMENAME]

SET ALTPARAM=-class if "[ALTMODE]"=="classic" (SET ALTPARAM=-class ) if "[ALTMODE]"=="hotseat2" (SET ALTPARAM=-hotseat_2 ) if "[ALTMODE]"=="hotseat3" (SET ALTPARAM=-hotseat_3 ) if "[ALTMODE]"=="hotseat4" (SET ALTPARAM=-hotseat_4 )

START "" "[STARTDIR]Launch\VPXSTARTER.exe" 5 5 20 "Pinball FX3"

START "" "[DIREMU]\steam.exe" -applaunch 442120 %ALTPARAM% -table_[GAMENAME]

timeout 25 START /min "" "[STARTDIR]Launch\SendFXNewGame.exe"

close script "[STARTDIR]LAUNCH\PUPCLOSER.EXE" WINTIT "Pinball FX3" 4 1

jdegagne commented 1 year ago

@freezy That's what the entire log shows - is that the problem?

DmdDevice.log

freezy commented 1 year ago

Yes, that's a problem, can you post your DmdDevice.log.config and dmdext.log.config? There are instructions how to extract a log here. Make sure the log level is at Info at least.

jdegagne commented 1 year ago

@freezy here's the updated config files - thank you for the attention you are giving this issue the DMDDevice log is still showing no change

DMDDevice.log.config <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" autoReload="true" throwExceptions="false" internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >

dmdext.log.config

<?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" autoReload="true" throwExceptions="false" internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >

<targets>

    <!-- 
        add your targets here 
        See https://github.com/nlog/NLog/wiki/Targets for possible targets.
        See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
    -->

    <target name="console" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false"
         layout="${pad:padding=4:inner=[${threadid}]} ${date} ${pad:padding=5:inner=${level:uppercase=true}} | ${message} ${exception:format=ToString}">
        <highlight-row condition="level == LogLevel.Trace" foregroundColor="DarkGray" />
        <highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" />
        <highlight-row condition="level == LogLevel.Info" foregroundColor="Gray" />
        <highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
        <highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
        <highlight-row condition="level == LogLevel.Fatal" foregroundColor="Magenta" />
    </target>

</targets>

<rules>
    <logger name="*" minlevel="Trace" writeTo="file" />
</rules>

While trying to fix the issue, I upgraded DMDExt. Not sure if I followed install correctly but haven't had issues before. DmdDevice.log

freezy commented 1 year ago

Can you make DmdDevice.log.config look like that? You can also download and replace the file. In yours, the rules seem to be missing.

jdegagne commented 1 year ago

Thanks @freezy looks like I'm getting somewhere

I still see lag but here's the log info DmdDevice.log

freezy commented 1 year ago

Just to be sure we're not hunting ghosts, can you try with the latest build here? Lots of things have changed since 2.1.2.

freezy commented 1 year ago

Other question: Did this, at some point in the past, work properly? If so, do you remember which version that was?

jdegagne commented 1 year ago

It worked properly for years, then all of a sudden it didn't. Don't know if I touched a keystroke that changed something.

I didn't have the most current version - I may have had the 2021 version.

The puzzling part is how it works fine in the Pinball FX

freezy commented 1 year ago

@nailbuster How does that work if PUPDMDControl.exe is the host? Where does the frame data come from?

jdegagne commented 1 year ago

@nailbuster Pinball FX doesn't need any launch script setup - it runs directly from Steam

How does the launch script for Pinball FX3 look?

jdegagne commented 1 year ago

Hi @freezy revisiting this as I haven't come up with a solution

Updated to latest 2.2 and when I launch directly through Pinball FX Steam there are no lagging issues.

When I launch FX3 through PInUp I still get the lag on the DMD.

Should I: Reinstall FX3 on Steam? Reinstall PinUp ?

Thanks again, I'm perplexed with something I have used for years is suddenly lagging

nailbuster commented 1 year ago

I wouldn't re-install anything.

What are you pc specs? If you run taskman on BG is the system cpu/gpu high? The video shows your fulldmd background video is a bit lagging too so could just be you're near the max outside of popper but playing mp4s and fx3 is too much?

Another workaround is to not use pupdmdcontrol.exe and use dmdext.exe instead for fx3 in your popper launch script. See popper wiki on using dmdext.exe instead of pupdmdcontrol.

jdegagne commented 1 year ago

I wouldn't re-install anything.

What are you pc specs? If you run taskman on BG is the system cpu/gpu high? The video shows your fulldmd background video is a bit lagging too so could just be you're near the max outside of popper but playing mp4s and fx3 is too much?

Another workaround is to not use pupdmdcontrol.exe and use dmdext.exe instead for fx3 in your popper launch script. See popper wiki on using dmdext.exe instead of pupdmdcontrol.

Thank You @nailbuster I will be looking into this immediately and post results

Regards from frogdog

jdegagne commented 1 year ago

[SOLVED] @freezy After updating every last thing in VPINMAME folder and changing the script like @nailbuster suggested. I still had no luck. Went through Popper Wiki to see if there was anything I overlooked. Saw the image where it tells you to make sure you have Borderless Window set in Steam. in the image I noticed that VSYNC was set to ON, while mine was OFF. Not sure how that happened, whether it was a combination of keystrokes that activated that but I never made that setting. Set it to on and sure enough, Virtual DMD functioning great.

Sorry to take you both on the odyssey where it was an FX3 setting that done me in. Hopefully if anyone comes across that, this will help. Plus, I have the latest and greatest in VPINMAME now and will continuing updating from there

Thanks again for all the assistance

jdegagne commented 1 year ago

@freezy @nailbuster perhaps I turned the "SOLVED" sign too soon

I updated all DMD files and my script in the FX3 Emulator for Popper, and it can run in dmd.exe mode, but anytime I try to run on PUPDMDControl.exe, I can't locate the Virtual DMD or it doesn't launch at all.

When I run in the dmdext.exe mode, it seems the DMDext doesn't close, creates a new DMDext when I start another game, and I'm unable to see the DMD of the Alpha Numeric tables (Funhouse) and none of the PUPs in fx3 function when they used to - The Alplha Numeric DMDs and PUPs I believe run when the PUPDMDControl is being used.

Can you diagnose any of this?

My launch script for FX3 in Popper

@echo off

cd /d "C:\pinball\Visual Pinball\VPinMAME" start /min "" "dmdext.exe" mirror --colorize --source=pinballfx3 --no-virtual --use-ini="C:\pinball\Visual Pinball\VPinMAME\DmdDevice.ini"

rem cd /d "C:\pinball\Visual Pinball\VPinMAME" rem start /min "" "PUPDMDControl.exe" FX3 PINUP[GAMENAME]

SET ALTPARAM=-class if "[ALTMODE]"=="classic" (SET ALTPARAM=-class ) if "[ALTMODE]"=="hotseat2" (SET ALTPARAM=-hotseat_2 ) if "[ALTMODE]"=="hotseat3" (SET ALTPARAM=-hotseat_3 ) if "[ALTMODE]"=="hotseat4" (SET ALTPARAM=-hotseat_4 )

START "" "[STARTDIR]Launch\VPXSTARTER.exe" 5 5 20 "Pinball FX3"

START "" "[DIREMU]\steam.exe" -applaunch 442120 %ALTPARAM% -table_[GAMENAME]

timeout 25 START /min "" "[STARTDIR]Launch\SendFXNewGame.exe"

CLOSE SCRIPT

"[STARTDIR]LAUNCH\PUPCLOSER.EXE" WINTIT "Pinball FX3" 4 1

IMG_5722

PUPLOG.txt DmdDevice.log

jdegagne commented 1 year ago

@freezy any insight on why this is happening? ^^^^^^^^

coreduo0099 commented 3 months ago

add a -q for quit after run

start /min "" "dmdext.exe" mirror -q --colorize --source=pinballfx3 --no-virtual --use-ini="C:\pinball\Visual