Jump to content

FPLaunch MOD: Pause and Loading screens...


samwyze

Recommended Posts

not much code there, only few lines, it will be easy to insert it

what's the idea with this jukebox and ledblinky - you run them as table, together? never separate?

and you don't run ledset on that jukebox, but you run ledclear, why?

what would happen on exit key while in jukebox - will it open exit menu and exit cleanly?

I'm asking cause i don't have it so can't test it

i thought that jukebox is some application that runs while you play other tables

about this b2s code - it's nice but i won't put it in - thing is if b2s is launched from table it has to be closed from table

if it is launched from fplaunch it has to be closed from fplaunch

so if you want tables you don't have to edit then they should have closing of b2s done in exit code in script, not on esc key which half people don't have on a cab, and other half can't use cause it opens dialog box in vp

Edited by blur
Link to comment
Share on other sites

My ledBlinky was intergrated with VP in the fplaunch (hardcoded as PinJukeLaunch). The ledblinky and the jukebox are both ran via the shortcut with the parameter for startup.

The exit key overrides the 1...2...3... closing screen and closes imediately (would be nicer if it closed with 1..2..3.. screen).

I dont have the ledset running because the blinky is an alternative to it.

The ledclear should be ran (in my head, but not in my code) upon closing of the jukebox.

Currently ledclear is called when a VP table is ran (non-pinjukelaunch).

This could be usefull for people that would like their FP tables to have ledblinky going to the sounds.

As far as the B2S code goes....

I wasn't asking for the addition, but I know it's nice to not have to modify EVERY table.

It closes properly the way that it is setup. When the table is closed via the fplaunch, the table closes the B2S - It works perfectly, even with the 1...2...3...

Of course, I am running xp 32bit, and I can't speak for all users, but this is a big thing for me :)

Link to comment
Share on other sites

your b2s code will work great on any platform - cause you just don't launch b2s from ahk, but from table, and then close it from ahk

it will work but it is not clean

for this jukebox/ledblinky solution - it all looks too specific for me - it doesn't look like something every body will use, and use it in exactly that way???

how many are really using this jukebox? Please post here if you use it, let's see if we can get even few votes.

then if they use it do they also use ledblinky instead of ledwiz, or somebody would like to use ledwiz?

then if we touched led blinky, why not use ledblinky instead of ledwiz all the time? what are pro and cons, what are diffs?

then we have this dmd arena - we have two products (afaik) - one is hyperdmd sofware - that i don't know - spins something on third screen if there is no real dmd in table, and there is this pindmd - which should also spin something on it when dmd is not used by the game - which one should we support hyperdmd or pindmd?

each one of them is probably easy to support with only few lines of code if you made your mind what to use - but fplaunch has to be fit for all of them - not just one group

i could probably put all that one liners inside and control them with few variables in settings.ini but you have to give me logic behind it - cause i'm not using any of these products

about this exit menu - jukebox can be launched but script would try to activate vp and mame and all that, and wait for exe to close on exit - how did you solve that?

ups - looking at your script i see when you run jukebox you skip all acitvates - but there is no hotkey and no waitclose command - so fplaunch will just skip to exitscript and there it will first run ledset (which should be run only on exit not on start) and it will try to actvate hyperpin in a loop?

Edited by blur
Link to comment
Share on other sites

I never got the exit menu to work. It jus closes the jukebox on the exit key press, and leaves ledblinky runnng. That was probably the worst thing about my code.... It basically is hacked into the fplaunch. Funny, that you would say my b2s is the non-clean part. If nobody is interested in having the jukebox & ledblinky, then skip it. They are both free programs, but the ledblinky can be purchased for $20 to get rid of a 3 second intro.

Obviously, it would need to be inserted into the code better than the way I did, and would need some testing done. Settingsons PinJukeLaunch needs to be setup first, then LedBlinky, and finally this sniplet of code that launches and exits.

LedBlinky makes the lights flash to the music. It is sound activated software that runs your ledwiz.

Thanks for your work.

Edited by boogies2
Link to comment
Share on other sites

Blur just to clarify - PinDMD itself requires nothing to be put in FPlaunch. HyperDMD is what changes that and can be either PinDMD or just displayed (like pinmame).

I understand what you are saying and the question is should each of those offshoots be in FPlaunch as a single script, or should they be branches of FPLaunch (which gets confusing)? Or should they just simply be a completely separate thread ahk that people with those items can download? Like what I"m working on with HyperDMD, it works in tandom with PinDMD - however not everyone with a PinDMD will use it. This is why I was trying to make it work as a separate ahk outside of FPLaunch.

Link to comment
Share on other sites

This is why I was trying to make it work as a separate ahk outside of FPLaunch.

yup, like ledwiz - two bats called from fplaunch and that's it, and you can still develop fplaunch and ledwiz independent

I can also put some bat calls for hyperdmd and put it in a right place.

Edited by blur
Link to comment
Share on other sites

I never got the exit menu to work. It jus closes the jukebox on the exit key press, and leaves ledblinky runnng. That was probably the worst thing about my code.... It basically is hacked into the fplaunch. Funny, that you would say my b2s is the non-clean part. If nobody is interested in having the jukebox & ledblinky, then skip it. They are both free programs, but the ledblinky can be purchased for $20 to get rid of a 3 second intro.

Obviously, it would need to be inserted into the code better than the way I did, and would need some testing done. Settingsons PinJukeLaunch needs to be setup first, then LedBlinky, and finally this sniplet of code that launches and exits.

LedBlinky makes the lights flash to the music. It is sound activated software that runs your ledwiz.

Thanks for your work.

Menus are not important. It can be without menus - no problem.

What is important is that on start of jukebox we execute what is needed, and on exit of jukebox we execute what is needed.

And now we don't have it cause with these changes - fplaunch will execute startup commands and then just go to exitscript and then execute exit commands, if i'm not mistaken, and i think i'm not.

Let's go line by line through your changes to virgin wip 9 code (there are only few lines):

- around launch of ledclear.bat you added code to run ledclear only on tables that are not jukebox, but commented it, so ledclear is always executed

- you have Paused = 0se instead of Pause = 0 (probably typo)

- then on vp launch if table is jukebox you run jukebox and ledblinky , and if it is not - you close ledblinky and run vp - you are probably closing ledblinky on next run of vp table cause you didn't find a way to catch jukebox exit, but then if next table is fp - ledblinky will not close, and on every launch of any vp table you will close ledblinky eventhough you don't have to

- now since you are running only two runs and you don't have any runwait or proces waitclose - you drop through vp launching code to the go to exitscript command (maybe you could use runwait and then close blinky)

- next change - you moved rosve close after table close probably to kill backglass after the table exits

- then there is close blinky procedure which closes blinky only if table is not jukebox

- and in on exit script you run ledset only if table is not jukebox (cause probably it would start running in paralell with jukebox and interfere with ledblinky because of runwait problem?)

so from previous:

on start of jukebox you will run ledclear and then jukebox and ledblinky and nothing else

on exit of jukebox you don't run anything cause fplaunch is long gone

on start of some real vp table - you will run ledclear again, then you close ledblinky and then run vp

on exit from real vp table you just run ledset

what you wanna do is probably - run real vp tables same as before - on jukebox - run ledclear, then ledblinky, then runwait of jukebox, then close ledblinky, then ledset

I'm not sure if runwait is possible with jukebox but it should be - of course not on link, on link you cant use runwait - but you could on exe or bat, and for bat you have to make sure but is runing as log as jukebox

about this b2s code being not clean - i did not say your b2s code is not clean - i said running some exe from vpinball and then leaving it there without closing it on close of vpinball is not clean

I'm still waiting for votes for jukebox, anybody?

Link to comment
Share on other sites

Nice setup! Your video just reminded me to check on updates for LEDBlnky. Long ago I asked for PacLED64 and Hyperpin support and I see that at least there is PacLED64 support now (and looks like Hyperpin too! Time to do some experimenting :D

Link to comment
Share on other sites

About b2s support - i just remembered why it is done like that - at one point in time rosve asked me to include his support for his b2s backglasses (or bent asked me, don't remember - it is probably in this thread, or some b2s thread). So i included those few lines from rosve - to run b2s exe and to kill b2s exe. To use it table had to end with b2s and lauch of b2s had to be false.

At that point we could actually avoid running the b2s from fplaunch and just use fplaunch to kill it, but we didn't.

Now everybody has dozens of his tables configured to not launch backglass - so whatever we do now - people will have to change their tables - either all new ones, or all old ones.

For me if i would look what is the best - ideal - final solution - disregarding compatibility with old tables - it would be to have table script run b2s exe and close b2s exe on exit of table.

BUT - new solution that is on the way - direct b2s does exactly that and it's much easier to configure it then uvp - so it will probably replace all current uvp and b2s tables.

Back to jukebox - i can do this:

- leave ledwiz as it is now

- add one if to vp table launch - if table = jukebox runwait jukebox.bat

so you would have to put this in jukebox.bat:

- run ledblinky but in background

- run jukebox but in foreground so that bat script waits for it to finish

- kill ledblinky - this line is executed after jukebox exits

Can you do that and test it? i can help you with bat.

Also if you want to use ledblinky instead ledwiz all the time - you can just use ledwiz = true and put whatever commands you want in ledset.bat and ledclear.bat.

Edited by blur
Link to comment
Share on other sites

put this in jukebox.bat in hyperpin folder

pathtoledbleanky\ledblinky.exe (or whatever is the name of the exe)

pathtojukebox\jukebox.exe (actually you run that utility from setingsons, not jukebox directly?)

taskkill /f /im ledblinky.exe

try to run bat file directly without hyperpin

hopefully ledblinky will go to background, jukebox to foreground and stop further execution of bat script untill you exit fro jukebox, and then ledblinky will close

if ledblinky closes right away - that means both programs ledblinky and jukebox went to back so we'll have to do something else

if just ledblinky starts and no jukebox - that means we have to put ledblinky to background

Link to comment
Share on other sites

I created jukebox.bat in the hyperpin folder.

My three lines are:

"C:\Docume~1\Player1\My Documents\LEDBlinky_5_1\LEDBlinky\LEDBlinky.exe" audio.lwax

"C:\Docume~1\Player1\My Documents\PinJukeLaunch\PinJukeLaunch\PinJukeLaunch.exe" launch_juke.cfg

taskkill /f /im ledblinky.exe

It runs ledblinky with the paramenter for audio, but then halts and waits for it to close.

It doesn't execute the next line (PinJukeLaunch) until I close ledblinky, but the jukebox doesn't have focus and my keys don't seem to respond, except ESC key (maybe it isn't reading the parameter correctly).

Once I exit the PinJukeLaunch, the batch file closes.

Link to comment
Share on other sites

I managed to get HyperDMD - using PinDMD working perfectly with Hyperpin, VP and FP (finally). I ended up using an external executable to load HyperDMD and Hyperpin (via Horseys instructions) and exits when Hyperpin closes. Finding the correct places places in FPlaunch to put the changes was interesting because FP's timings for things and when they happen are very delicate. I think I have them in the best places now. I'll paste the code and exe in here tomorrow. I have one more line I want to add, but need to make something first to test it. I'm just happy I finally figured it out. :P

Edited by Zablon
Link to comment
Share on other sites

I have great news (for the enemy :) remember baldrick?) - i said before that focus problem is solved - but still even I on my rig had loss of focus every now and then, rarely but it happened.

So I made a switch - instead of writing thousands of checks in fplaunch i removed every check and put it in external file.

At first i used bat and vbs from bill but soon i found out that vbs can't doo much - so i switched to ahk.

So now on exit from fplaunch i run one small exe which is compiled ahk which does actually same things as before - it tries to get focus on hp in a loop, but it does it tens time better. Now i can even have taskbar on backglass - it will still focus ok. Also I added some diagnostic solenoid sounds - first one will happen after process waitclose on vp or fp exe - so when you hear first one vp is closed - second one will be from external script that tries to activate hp. It can repeat several times cause it is run in a loop. After last sound - you know focus is achieved three times in a row and script exits.

There is also one new setting - focusSleep - time in miliseconds between each check - so if it ever happens that you hear sounds and then there is no focus - it can be only one thing - hp had focus but lost it and you can enlarge focusSleep time to give hp more time to catch in, default is 100 - but this 100 is repated several times in check loop.

So this and jukebox and hyperdmd which would be just small one liners and we are ready to go public :)

Edited by blur
Link to comment
Share on other sites

Blur, your explanation is logical :proud:

For anyone that is curious what ledBlinky & DWJukebox is:

Speak now, or forever hold your peace

:party:

Dude that was super inspiring, thanks for the vid cause the past couple days worth of ledBlinky and Jukebox chatter had me all confused.

I want this now. I have an FP only cab but I guess DWJukebox and ledBlinky only care about HyperPin huh so it's doable?

ps. Gonna need you to have a chat with my wife and tell her how important this is ;).

Link to comment
Share on other sites

Blur, here's what I got:

start C:\Docume~1\Player1\MyDocu~1\LEDBlinky_5_1\LEDBlinky\LEDBlinky.exe audio.lwax

start /wait C:\Docume~1\Player1\MyDocu~1\PinJukeLaunch\PinJukeLaunch\PinJukeLaunch.exe launch_juke.cfg

taskkill /f /im ledblinky.exe

start C:\Docume~1\Player1\MyDocu~1\LEDBlinky_5_1\LEDBlinky\LEDBlinky.exe 2

This starts blinky, opens jukebox (with focus) and has my button configuration set.

Once I press exit, the batch file closes and shuts down ledblinky :)

However, the third line, "taskkill /f /im ledblinky.exe" does not close the ledblinky.

The forth line does (the parameter 2 is to turn off)

Edited by boogies2
Link to comment
Share on other sites

Dude that was super inspiring, thanks for the vid cause the past couple days worth of ledBlinky and Jukebox chatter had me all confused.

I want this now. I have an FP only cab but I guess DWJukebox and ledBlinky only care about HyperPin huh so it's doable?

ps. Gonna need you to have a chat with my wife and tell her how important this is ;).

Should be doable, but not sure why you need to talk to wife - no purchases are required.

If you want a jump-start, try to find settingsons DWJukebox program and follow his tutorial.

I believe you can look up his youtube stuff, and that points you to the vpforums tutorial.

Once you get the jukebox setup, then work on the ledblinky. It's a little PIA, but it's worth it.

Link to comment
Share on other sites

Blur, I've hit a wall with HyperDMD. Calling anything to it via command line is slow (as BBB noted) but I'm not experienced enough to know how to work with the .dll however,

I made everything work just great, but when you push your button to start a game, whatever is displaying when the -kill command is sent stays there until a rom starts, or if the game has no rom, or is not B2S, it just stays that way until you exit the table.

While this works, it's not ideal, so I played with adding commands that add a static image of your choice to the DMD right before it kills the feed. This worked great except for 1 table that I can't for the life of me figure out why (there may be more, but I tested many tables to be sure). The game Diner will NOT load it's B2S DMD when I do this. I figured out it's a timing issue from when HypderDMD releases control and when B2S tries to takeover, so I played with sleep commands and that fixed Diner, but broke other B2S tables that weren't having problems prior.

So long story question is, what determines when a B2S table tries to call a ROM and output, and in the rosve B2S routine, what is the sleep 200 at the end of it for? Since only B2S tables go through the if routine (and all tables go into the Rosve routine) it seems to be something in how different B2S tables are coded and how long it takes them to process. I messed with changing the value in that subroutine with no success as well as adding a sleep command just before the b2s.exe call. It's quite peculiar that one table reacts completely different from the rest.

Edited by Zablon
Link to comment
Share on other sites

Blur, here's what I got:

start C:\Docume~1\Player1\MyDocu~1\LEDBlinky_5_1\LEDBlinky\LEDBlinky.exe audio.lwax

start /wait C:\Docume~1\Player1\MyDocu~1\PinJukeLaunch\PinJukeLaunch\PinJukeLaunch.exe launch_juke.cfg

taskkill /f /im ledblinky.exe

start C:\Docume~1\Player1\MyDocu~1\LEDBlinky_5_1\LEDBlinky\LEDBlinky.exe 2

This starts blinky, opens jukebox (with focus) and has my button configuration set.

Once I press exit, the batch file closes and shuts down ledblinky :)

However, the third line, "taskkill /f /im ledblinky.exe" does not close the ledblinky.

The forth line does (the parameter 2 is to turn off)

Great man, i think you can then safely remove taskkill command and leave your command to kill ledblinky

So now jukebox support will be only one command in run section for vp:

if (tablename = "Jukebox") {
   IfExist %A_ScriptDir%\jukebox.bat
       Run, "%A_ScriptDir%\jukebox.bat",,hide
} else { 
all as before

Table name Jukebox will be reserverd in hyperpin, meaning no other tables can have name Jukebox - but that's not the problem since table names are always longer then that and have version, author and other things added to the name. In jukebox.bat you can change whatever you want - but i will put this template bat for people to see what thay have to put in.

Edited by blur
Link to comment
Share on other sites

So long story question is, what determines when a B2S table tries to call a ROM and output, and in the rosve B2S routine, what is the sleep 200 at the end of it for? Since only B2S tables go through the if routine (and all tables go into the Rosve routine) it seems to be something in how different B2S tables are coded and how long it takes them to process. I messed with changing the value in that subroutine with no success as well as adding a sleep command just before the b2s.exe call. It's quite peculiar that one table reacts completely different from the rest.

rosve routines in fplaunch are very simple - if table ends with b2s rosve starts b2s exe and rosve_close kills b2s exe.

they are both run before vp is run or closed

sleep 200 is just for letting b2s exe launch before we start running vp

what's the idea? you want to run something on table start and on table exit - did you tried using ledwiz bat files which are in the code alread, just put ledwiz = true in settings and whatever you want in ledwiz bat files?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...