Main > Driving & Racing Cabinets

SOLUTION: Use one PC to start games on two or more PC's (for twin cabs etc)

<< < (2/3) > >>

Pstylz:
I've been working on a "cleaner" way to get BIGBOX/LAUNCHBOX to start up the selected game in preparation for my new project - 4 Player Arcade Racers cabinet(s)    8) >:D
In the OP above, you would need to duplicate and modify the same script for every game and compile.

I have now made a single "GameStart" script/executable that reads the "rom" title sent from BIGBOX to identify the game to start.
The GameStart script then creates an AHK file with the appropriate game title and saves it on the PLAYER 2 machine where the GAME LOOP SCRIPT running on PLAYER 2 will execute.
All that is required now is a ".lnk" of the game to be added into the "\\Arcade\AHK\Links\" folder on both player machines.
NOTE:  The game ".lnk" filename must match what is in BIGBOX   ;)


GAMESTART.EXE

--- Code: ---#SingleInstance force

;---- EXTRACT COMMAND LINE ATTRIBUTES (GAME TITLE) FROM BIGBOX (LAUNCHBOX) ----;
GAME = %1% %2% %3% %4% %5%

;---- START LOCAL GAME (P1) ----;
Run, C:\Arcade\AHK\Links\%Game%.lnk, , Max

;---- DELETE EXISTING GAME.AHK FROM PLAYER 2 ----;
;---- NOTE -- THIS ENSURES THE "GAME START LOOP" FOLDER IS CLEAR ----;
FileDelete, C:\Arcade\AHK\Player2\Game Start Loop\GAME.ahk


;------------------------------------------------------------------------------------------;

;---- CREATE PLAYER 2 START GAME FILE AND THEN SEND TO PLAYER 2 ----;
;---- NOTE: "Y:\" DRIVE IS THE NETWORK DRIVE ON PLAYER 1 CAB OF PLAYER 2 CAB'S "C:\" DRIVE ----;
fileAppend,
(
#SingleInstance force

;---- CLOSE ANY RUNNING GAMES ON P2 BEFORE STARTING NEW GAME ----;
Process, Close, TeknoParrotUi.exe
Process, Close, sdaemon.exe
Process, Close, supermodel.exe
Process, Close, Daytona.exe
Process, Close, emulator_multicpu.EXE
Process, Close, parrotloader.exe
Process, Close, OpenParrotLoader64.exe
Process, Close, OpenParrotLoader.exe
Process, Close, ParrotLoader64.exe
Process, Close, BudgieLoader.exe
Process, Close, Wmn5r.exe
Process, Close, Rally.exe
Process, Close, MK_AGP3_FINAL.exe
Process, Close, racing.exe

;---- START GAME ON PLAYER 2 ----;
Run, C:\Arcade\AHK\Links\%GAME%.lnk, , Max

;---- DELETE GAME SCRIPT FROM GAME START LOOP SEARCH FOLDER ONCE GAME HAS STARTED ----;
FileDelete, C:\Arcade\AHK\Player2\Game Start Loop\GAME.ahk

;---- IF ESC IS PRESSED, CLOSE ALL RUNNING GAMES ON P2 ----;
;---- RUN "WAITING SCREEN" AFTER ALL GAMES CLOSED ON P2 ----;
ESC::
Process, Close, TeknoParrotUi.exe
Process, Close, sdaemon.exe
Process, Close, supermodel.exe
Process, Close, Daytona.exe
Process, Close, emulator_multicpu.EXE
Process, Close, parrotloader.exe
Process, Close, OpenParrotLoader64.exe
Process, Close, OpenParrotLoader.exe
Process, Close, ParrotLoader64.exe
Process, Close, BudgieLoader.exe
Process, Close, Wmn5r.exe
Process, Close, Rally.exe
Process, Close, MK_AGP3_FINAL.exe
Process, Close, racing.exe

;---- CHECK IF EXE "WAITING SCREEN" IS RUNNING ----;
Process, Exist, Player 2 - Waiting Screen 0.4.exe
If Not ErrorLevel ; errorlevel will = 0 if process doesn't exist
Run, C:\Arcade\AHK\Player2\Player 2 - Waiting Screen 0.4.exe, , Max

ExitAPP
return

), Y:\Arcade\AHK\Player2\Game Start Loop\GAME.ahk

;------------------------------------------------------------------------------------------;


;---- WHEN ESC IS PRESSED ON PLAYER 1, CLOSE ALL GAMES ON PLAYER 1 AND SEND A CLOSE ALL GAMES SCRIPT TO PLAYER 2 ----;
;---- START BIGBOX.EXE ON PLAYER 1 IF DOESNT EXIST ----;
ESC::
FileCopy, C:\Arcade\AHK\Escape\GAME.ahk, Y:\Arcade\AHK\Player2\Game Start Loop\
Send !F4::
Process, Close, TeknoParrotUi.exe
Process, Close, sdaemon.exe
Process, Close, supermodel.exe
Process, Close, Daytona.exe
Process, Close, emulator_multicpu.EXE
Process, Close, parrotloader.exe
Process, Close, OpenParrotLoader64.exe
Process, Close, OpenParrotLoader.exe
Process, Close, ParrotLoader64.exe
Process, Close, BudgieLoader.exe
Process, Close, Wmn5r.exe
Process, Close, Rally.exe
Process, Close, MK_AGP3_FINAL.exe
Process, Close, racing.exe
Process, Exist, bigbox.exe
If Not ErrorLevel ; errorlevel will = 0 if process doesn't exist
Run, "C:\Arcade\LaunchBox\BigBox.exe", , Max
ExitAPP
return

return

--- End code ---

PLAYER 2 - LOOKING FOR GAME LOOP SCRIPT:

--- Code: ---;---- LOOK FOR GAME SCRIPT TO EXECUTE GAME ----;
IfExist, C:\AHK\GAME.ahk

Run GAME.ahk

Loop

Sleep, 2000
Reload

--- End code ---

Fursphere:
If you have a frontend running on Cab #2 (BigBox) will the "looking for game" script launch the game in the foreground still? 

I sort of got PSExec running doing this, but if the front end was running on cab #2, it would launch in the background, and you'd have to alt-tab to it.   That seems to be the trickiest part of this whole thing, was getting the game running on the second cabinet without losing windows 'focus'.

I thought about approaching the launchbox/bigbox developers to make this sort of thing integrated, but I decided its such a niche case, it wouldn't be worth their time.  I mean, how many people have multiple emulation cabinets, and then out of that list, how many attempt to 'link' them.  :)

I built my current two two-player cabinets with this specifically in mind, the ability to play 4 player games.   For a brief moment, I considered a 3rd for those rare six player games, but I was already pushing my limits with two full side arcade cabinets, a virtual pinball cabinet and my wife's patience.   ;D

Fursphere:

--- Quote from: Pstylz on March 16, 2022, 10:53:00 pm ---All that is required now is a ".lnk" of the game to be added into the "\\Arcade\AHK\Links\" folder on both player machines.
NOTE:  The game ".lnk" filename must match what is in BIGBOX   ;)


--- End quote ---

Can you give an example of the LNK file you reference here?  Its contents? 
Are you putting the specific game startup command in this file?

For example:

Host Machine:
retroarch.exe -L cores/fbneo_libretro.dll -H romname    ??

Client Machine
retroarch.exe -L cores/fbneo_libretro.dll -C hostname romname   ??

Pstylz:

--- Quote from: Fursphere on July 06, 2022, 09:02:00 pm ---If you have a frontend running on Cab #2 (BigBox) will the "looking for game" script launch the game in the foreground still? 

I sort of got PSExec running doing this, but if the front end was running on cab #2, it would launch in the background, and you'd have to alt-tab to it.   That seems to be the trickiest part of this whole thing, was getting the game running on the second cabinet without losing windows 'focus'.

I thought about approaching the launchbox/bigbox developers to make this sort of thing integrated, but I decided its such a niche case, it wouldn't be worth their time.  I mean, how many people have multiple emulation cabinets, and then out of that list, how many attempt to 'link' them.  :)

I built my current two two-player cabinets with this specifically in mind, the ability to play 4 player games.   For a brief moment, I considered a 3rd for those rare six player games, but I was already pushing my limits with two full side arcade cabinets, a virtual pinball cabinet and my wife's patience.   ;D

--- End quote ---

Hmmmm good question.
You could make the AHK script close BigBox on both machines when a game starts and when "ESCAPE" is pressed to exit a game it can restart BigBox on both machines.

If you wanted to run BIGBOX on both machines you could:
- run the "Looking for game" AHK script on both machines
- modify the GAMESTART script to work on Player 2 machine (changing some directory and drive references)
- modify the ESCAPE script to start BIGBOX on when exiting games for both machines

I'm happy to offer some assistance

Pstylz:

--- Quote from: Fursphere on July 06, 2022, 09:02:00 pm ---I built my current two two-player cabinets with this specifically in mind, the ability to play 4 player games.   For a brief moment, I considered a 3rd for those rare six player games, but I was already pushing my limits with two full side arcade cabinets, a virtual pinball cabinet and my wife's patience.   ;D

--- End quote ---

I've just started my 4P arcade racing cabinet for exactly that reason! 4 Player madness!!!!
I hear you regarding the wife's patience part haha

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version