Jump to content
LaunchBox Community Forums

JoeViking245

Moderators
  • Posts

    4,136
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by JoeViking245

  1. You are very welcome.

    50 minutes ago, Alex F. said:

    is this the one you used

    I don't have PinballX, so no.  But it's the same principle.

    52 minutes ago, Alex F. said:

    Where exactly do I put this batch file to be executed?

    Pretty much anywhere you want. As long as you can remember where that is. (in the example below, we'll put it in your LaunchBox folder)

    54 minutes ago, Alex F. said:

    Would this batch file take me from Big Box (back) to PinballX?

    Only if your copy of PinballX is located in the directory "F:\PinballX".

     

    1 hour ago, Alex F. said:

    please guide me through here

    Try this:  Open Windows Explorer, and go to folder where you have LaunchBox installed.  Right click on an empty space in the directory list (like below the last file. Not next to one) and select New and then select Text Document.

    image.thumb.png.514a47f7024d2f53a8ae384260bf8b44.png

    Type in a name that makes sense to you (i.e. "BigBox2PinballX") and hit enter.  You should not have a file named "BigBox2PinballX.txt").

    Click on that file and hit enter (or just double click it).  This will open up Notepad.  Copy the following text and paste it into Notepad.  (Note: it's different from the one I showed above.  Use this one)

    cd Core
    start /w "" BigBox.exe
    cd "F:\PinballX"
    start "" PinballX.exe

    Now you need to know where your PinballX.exe file is located.  i.e.  in the folder "F:\PinballX".  I'm guessing it's somewhere else.  So on the 3rd line (above), you need to change the part inside the quotes to the path where yours is actually located.

    Now close Notepad.  It'll ask if you want to save it.  Yes

    You now need to rename the file to a bat[ch].  Right now, it should look like this:

    image.png.04fb9a936937e31def524e54e67e975e.png

    If you don't see ".txt" on the end of it, at the top of Windows explorer, click the View tab and check the box File name extensions.

    image.thumb.png.4ebcf791d784ceb043da4774025cc97a.png

    Click (once) on the file and press F2 on your keyboard [to edit the filename].  Using the arrow keys, move right 2 times then hit Delete 3 times.  This will delete "txt".  Now type in "bat" (without the quotes) and hit Enter.  You'll get a message box about "Are you sure you want to change it?".  Click Yes.  It will now look like this:

    image.png.8947d9edeca08727ef1c46e52bc6c08f.png

    Now, wherever it was that you told PinballX to launch "BigBox.exe", tell it to launch "BigBox2PinballX.bat" (or whatever you called it) instead.

  2. 13 minutes ago, Alex F. said:

    The question remains if there's a "launch program on exit" option for BigBox

    In short, no.

    What I've done for something similar is to start BigBox from a batch file using the 'wait' parameter which will "pause" the batch file from continuing until BigBox exits.

    f:
    cd "F:\LaunchBox\Core"
    start /w "" BigBox.exe
    
    cd F:\PinballX
    start "" PinballX.exe

    What this does:

    • Switches to the F drive
    • Changes to the "Core" subfolder under LaunchBox
    • Starts BigBox.exe and 'waits here' until it exits
    • After BigBox has exited, change to some other folder where the 'other program' resides
    • Start that 'other program'

    Then instead of PinballX starting BigBox directly, have it execute this batch file to start BigBox.

  3. 1 hour ago, whazzzzzup17 said:

    I want to say thank you for all of your help.

    You're welcome. :) 

    If you're shooting for up to 8 players, I think you're crazy. lol  Here's 4 (I hope)

    WinHide, ahk_class Shell_TrayWnd ;Hide taskbar
    
    ; RetroArch locations
    RA1 := "E:\_arcade\LaunchBoxPortable\Emulators\RetroArch1"
    RA2 := "E:\_arcade\LaunchBoxPortable\Emulators\RetroArch2"
    RA3 := "E:\_arcade\LaunchBoxPortable\Emulators\RetroArch3"
    RA4 := "E:\_arcade\LaunchBoxPortable\Emulators\RetroArch4"
    
    ;Ask the user how many single player games
    InputBox, UserInput, Enter RetroArch Instances (up to 4), Please enter the amount of single player games (<=4):, , 300, 150
    
    If (UserInput == 1)
    {
       Run, "%RA1%\retroarch.exe" -f -L "%RA1%\cores\%1%.dll" "%2%", , , p1
    }
    else If (UserInput == 2)
    {
       Run, "%RA1%\retroarch.exe" -L "%RA1%\cores\%1%.dll" "%2%", , , p1
       Run, "%RA2%\retroarch.exe" -L "%RA2%\cores\%1%.dll" "%2%", , , p2
       Sleep,  1000   ;give the windows a sec to load
       Loop,  UserInput
       {
          WinSet, Style, -0xC00000, ahk_pid p%A_Index%
          WinSet, Style, -0x40000, ahk_pid p%A_Index%
          
       }
       WinMove, ahk_pid %p1%, , 0, 0 ,A_ScreenWidth/2, A_ScreenHeight
       WinMove, ahk_pid %p2%, , A_ScreenWidth/2, 0 ,A_ScreenWidth/2, A_ScreenHeight
    }
    else If (UserInput == 3)
    {
       Run, "%RA1%\retroarch.exe" -L "%RA1%\cores\%1%.dll" "%2%", , , p1
       Run, "%RA2%\retroarch.exe" -L "%RA2%\cores\%1%.dll" "%2%", , , p2
       Run, "%RA3%\retroarch.exe" -L "%RA3%\cores\%1%.dll" "%2%", , , p3
       Sleep,  1000   ;give the windows a sec to load
       Loop,  UserInput
       {
          WinSet, Style, -0xC00000, ahk_pid p%A_Index%
          WinSet, Style, -0x40000, ahk_pid p%A_Index%
          
       }
       WinMove, ahk_pid %p1%, , 0, 0 ,A_ScreenWidth/2, A_ScreenHeight/2
       WinMove, ahk_pid %p2%, , A_ScreenWidth/2, 0 ,A_ScreenWidth/2, A_ScreenHeight/2
       WinMove, ahk_pid %p3%, , 0, A_ScreenHeight/2 ,A_ScreenWidth/2, A_ScreenHeight/2
    }
    else If (UserInput == 4)
    {
       Run, "%RA1%\retroarch.exe" -L "%RA1%\cores\%1%.dll" "%2%", , , p1
       Run, "%RA2%\retroarch.exe" -L "%RA2%\cores\%1%.dll" "%2%", , , p2
       Run, "%RA3%\retroarch.exe" -L "%RA3%\cores\%1%.dll" "%2%", , , p3
       Run, "%RA4%\retroarch.exe" -L "%RA4%\cores\%1%.dll" "%2%", , , p4
       Sleep,  1000   ;give the windows a sec to load
       Loop,  UserInput
       {
          WinSet, Style, -0xC00000, ahk_pid p%A_Index%
          WinSet, Style, -0x40000, ahk_pid p%A_Index%
          
       }
       WinMove, ahk_pid %p1%, , 0, 0 ,A_ScreenWidth/2, A_ScreenHeight/2
       WinMove, ahk_pid %p2%, , A_ScreenWidth/2, 0 ,A_ScreenWidth/2, A_ScreenHeight/2
       WinMove, ahk_pid %p3%, , 0, A_ScreenHeight/2 ,A_ScreenWidth/2, A_ScreenHeight/2
       WinMove, ahk_pid %p4%, , A_ScreenWidth/2, A_ScreenHeight/2 ,A_ScreenWidth/2, A_ScreenHeight/2
    }
    else
    {
       MsgBox Invalid Selection
       WinShow, ahk_class Shell_TrayWnd ;Restore TaskBar
       ExitApp
    }
    
    Sleep,  1000   ; because you never know
    last := p%UserInput%
    Process, WaitClose, %last%
    WinShow, ahk_class Shell_TrayWnd ;Restore TaskBar
    ExitApp
    
    
    $F12:: HideShowTaskbar(hide := !hide) ;Toggle taskbar.
    
    HideShowTaskbar(action) ;revised. Same AHK thread, different answer
    {
       ;https://www.autohotkey.com/boards/viewtopic.php?p=414584&sid=dac3435aa858994dfe2ffd9cb41fdb7d#p414584
       if action
          WinHide, ahk_class Shell_TrayWnd
       else
          WinShow, ahk_class Shell_TrayWnd
    }

    I like the shorter HideShowTaskbar method. :)  But if doesn't work on your PC, change it back to the "other" one (and change line #1 and the line right before ExitApp [2 locations]).   If you don't need to manually toggle the TB at all, you can remove everything from "$F12::" on down.

    Any hotkeys you assign (i.e. F12 as shown) will function until the last Player #'s window is closed/exited.  So if 3 players is selected, you can exit p1 and p2, and F12 will still work.  But if you exit [only] p3 (leaving p1 and p2 still open) F12 will not work anymore.

    If only "1" player is selected, I'm pretty sure the "-f" makes it fullscreen.

    There's probably some other stuff I'm forgetting to mention, but I think you get the gist. 

  4. 42 minutes ago, whazzzzzup17 said:

    I have all the code, it runs, but I can't get it to align properly.

    Without copying your script (which is quite impressive looking!!!) and running it myself (cause I ain't making 4 copied of RA. And it's my bedtime right now.  lol), is the alignment issue by chance: say you select 2 players, there's a little gap on the very left, in between the 2 windows, and on the very right?

    That's what I had seen when playing with it earlier today (but using notepad windows [easier to test that way]).  Using WindowSpy.ahk (included with [a full install of] AutoHotkey), I found on my 1920 x1080 monitor, the difference (the 'little gap') was 7.  So setting window #1's x value to -7 (instead of 0 [zero]) pushed it up against the left edge.  Then each windows' width was 974.  Ya, the math don't add up to 1920. But I'm sure M$ has some logical reasoning for it. ;) 

     

    How I found the -7... Opened 2 copies of Notepad.  Clicked one and hit {Win}{Left Arrow}.  The selected the other copy to be the right.  Then with WindowSpy

    image.png.f252eca5b76ceb633239bf3ab78c8cea.pngimage.png.8fdeec14db464983f2fe1ed2f20ce28b.png

    [left window]      [Right Window] 

    The height (1047) is without the taskbar being hidden, so ignore it. ;)  And don't ask me about the "953". (maybe the math will make sense to me in the morning.)

    And if that wasn't the alignment issue you're experiencing...  Could you explain more, please?

    • Like 1
  5. 5 hours ago, Runadumb said:

    '7za.exe' is not recognized as an internal or external command,

    The files aren't even getting extracted to be able to be converted.  (as in, there's nothing there for chdman to convert)  So chances are your FOR loop is fine.  I'm not sure what "7za.exe" is.  (I've always had/used 7z.exe)  But I'm sure 7za works.  

    Options:

    Place a copy of 7za.exe in the same folder as your batch file.  (Should only need the one file)

    OR

    Change the line that calls it to include the full path to where your '7za.exe' is located.  i.e.

    "C:\Program Files\7zip\7za.exe" x -y -onew_dir "4x4 Evo (USA).7z"

    (adjust to the actual path where yours is located) 

  6. 1 hour ago, Scorpion_83 said:

    the shell [cmd window] stays active on the screen

    Not sure if this will work in your case, but... create a shortcut to your batch file. Then right click the shortcut and select Properties.  Then in the Shortcut tab, for Run:, select "Minimized" and click OK.

    Then point to the shortcut instead of the batch file itself.

  7. 5 minutes ago, Kiinkyfoxx said:

    Would it be worth giving each Run its own PID

    Absolutely!  Then (as you said) use it to Set and Move, respectively, and then also "Process, WaitClose..." (changing RunWait to just Run).

  8. 5 minutes ago, whazzzzzup17 said:

    I got it to work

    Sweet!!  

     

    6 minutes ago, whazzzzzup17 said:

    I added a " on the second line before %2%

    You should have a quote at the very end of both lines as well (similar to my 1st post, but never transferred over 😊).  If fact, should probably quote all paths to 'future proof it'.  (Only really needed if the path and/or filename has a space in it.  But is also cheap insurance.)

    RA1 := E:\_arcade\LaunchBoxPortable\Emulators\RetroArch1
    RA2 := E:\_arcade\LaunchBoxPortable\Emulators\RetroArch2
    
    Run, "%RA1%\retroarch.exe" -L "%RA1%\cores\%1%.dll" "%2%"
    RunWait, "%RA2%\retroarch.exe" -L "%RA2%\cores\%1%.dll" "%2%"

     

    25 minutes ago, whazzzzzup17 said:

    Just need to work on aligning one to the left and right of the screen and removing the title bar. I can probably figure that out though.

    If you need help with that, let me know.   Hint: (from a copy & paste)

    WinSet, Style, -0xC00000, a    ; remove the titlebar and border(s)
    WinMove, a,, 0, 0, 1280, 1024  ; move the window to 0,0 and reize it to 1280x1024. Adjust accordingly

     

    • Like 1
  9. 15 minutes ago, whazzzzzup17 said:

    the cores show up as missing

    RetroArch uses the cores. Not AutoHotkey.  So effectively what's happening is you're sending the command:

    Autohotkey.exe -L vba_next_libretro rom_name

    So AHK is trying to load/launch the script "-L".  Which of course doesn't exist.

    There's something here about a 'Pandora's Box', 'can of worms', 'what have I gotten myself into'....  lol

    So ya, in retrospect, RA needs to know what core to load. For proof of concept [that this'll work], for your Associated Platform "Nintendo Game Boy Advance" (I'm assuming your Pokémon game is in GBA), completely remove the core

    image.thumb.png.ecb93b6d90f99c07b9fa7ddc871698b8.png

    Now in the Extra Command-Line Parmeters field (the one just to the right), put

    "E:\_arcade\LaunchBoxPortable\ThirdParty\AutoHotkey\MyAHKs\CustomEmulator.ahk" vba_next_libretro

    Note: this Extra Command-Line Parmeter, I'm pretty sure, overrides the Default Command-Line Parameters in the Details Tab. But leave it there.

    Oh, and as suggested above, you probably will need to Un-Check those 2 boxes.  When done, save.

     

    Now edit "CustomEmulator.ahk"

    Run, E:\_arcade\LaunchBoxPortable\Emulators\RetroArch1\retroarch.exe -L %1% "%2%
    RunWait, E:\_arcade\LaunchBoxPortable\Emulators\RetroArch2\retroarch.exe -L %1% %2%

    Try running Pokémon LeafGreen and cross your fingers.

     

     

     

    • Like 1
  10. 4 hours ago, Douglas Lassance said:

    how to get the box images to download

    Make sure your 'new' Platform is set to Scrape As the actual platform.  ToolsOptionsManage Emulators  Edit your emulator and change Scrape As if needed. Save

    image.png.906db73bc0ba70b6b64a456cda12726c.png

    Select all the games in your new Platform (click on one, then hit Ctrl+A).  ToolsDownloadUpdate Metadata and Media for All Games.

    image.thumb.png.749aa72f3910dfd87a54c08b95bef3ee.png

    ...follow the prompts.

  11. 9 hours ago, whazzzzzup17 said:

    How would I record the romPath variable to an ahk script?

    You can't pass LaunchBox variables to a Running AutoHotkey Script (nor an Additional App).

    To do what you want (one method at least) is to create an AHK script that 'is your emulator'.

    image.thumb.png.80db9e9cd6634a99de6f7275f6719f07.png

    If you need to pass the full/path/to/the/romfile.exe, uncheck the 2 boxes.

    Then in CustomEmulator.ahk

    Run, E:\_arcade\LaunchBoxPortable\Emulators\RetroArch1\retroarch.exe "%1%"
    RunWait, E:\_arcade\LaunchBoxPortable\Emulators\RetroArch2\retroarch.exe "%1%"

    RunWait on the 2nd instance keeps the script 'running'. Otherwise, it would launch the 2 instances and close, LB would see that as the emulator exiting and you get the "Thank you for Playing" shutdown screen right away.

    Not sure what this does for pause screens or exiting RA, but should get you in the right direction.

  12. 11 hours ago, Soomin papa said:

    What I want to do is to do the sequence of pressing the trigger button while the select button is pressed.

    Z-triggers are an animal of their own and require special attention.  It probably could be cleaned up a bit, but I think this gives you what you're trying to do.

    Joy5::
    Joy6::
    Joy7::
    Press=
    SetTimer, WatchAxis, 5
    return
    
    WatchAxis:
    {
       GetKeyState, SelectButton, Joy7
       GetKeyState, L1Button, Joy5
       GetKeyState, R1Button, Joy6
       GetKeyState JoyZButtons, JoyZ
       JoyZButtons := Round(JoyZButtons)
       PressPrev= %Press% 
       
       if (SelectButton = "D")
       {
          if (L1Button = "D")
          {
             ; Load state
             Press=L1
             if Press= %PressPrev%
                return
             SendInput {F3}
             Sleep 750
             
          }
          else if (R1Button = "D")
          {
             ; Save state
             Press=R1
             if Press= %PressPrev%
                return
             SendInput {F1}
             Sleep 750
          }
          
          else if (JoyZButtons > 60)
          {
             ; Prev slot
             Press=LZ
             if Press= %PressPrev%
                return
             SendInput !{F2}
             Sleep 750
             Press=
          }
          else if (JoyZButtons < 40)
          {
             ; Next slot
             Press=RZ
             if Press= %PressPrev%
                return
             SendInput {F2}
             Sleep 750
             Press=
          }
       }
    }

     

  13. 46 minutes ago, mp3deej said:

    The last time it did this and I pointed i the correct directory, and when I started launchbox, none of the games showed up, it was blank and asked to import.

    Do you have a LaunchBox folder inside your LaunchBox folder?  i.e.  E:\Users\sound\LaunchBox\LaunchBox\

  14. 2 hours ago, totoro said:

    Another question: I´ve configured every Wii-Game - where necessary - via dolphin wiki, so there are lots of custom configs in my setup. Will these apply to rvz-formatted games as well or do I have to reconfigure all over again?

    I'm not sure about the conversion part. It was quite a while ago when I did mine and I only have 13. :)   Just make a copy of 2 or 3 of your games and test on those. I suspect you won't have any problems though.

    As far as the configurations, I'm pretty sure Dolphin reads the game's ID from inside the file, regardless of compression format (or none).  So Mario Kart Wii, in whatever format (wbfs, iso, rvz...) will always be read as "RMCE01".  And that is also how the configurations are saved and then associated to the rom. 

  15. 12 hours ago, Douglas Lassance said:

    it's possible to play console games using commands such as `mame megadriv sor2`

    Yes.  You'd set this up in your Emulator settings for MAME under Associated Platforms - Default Command-Line Parameters

    image.thumb.png.e323d48bd326b94212a835dafb6e3c50.png

    Note: I've only just recently learned that the media flag ["-cart"], in most cases isn't necessary.  So the Default Parameter could be just "megadriv".

    Make sure the Associated Platform is named the exact same as your actual Platform's name.

    12 hours ago, Douglas Lassance said:

    Does LaunchBox currently support this feature and the listing of these roms?

    LaunchBox [in part] doesn't currently support the importing of MAME's softlists (consoles, computers etc... aka: non-Arcade Machines).  It'll import the roms without issue, but it won't give them their proper names.  So sor2.zip will import as "sor2", vs. "Streets of Rage II".

    There is a plugin that can import MAME's softlist roms into LaunchBox, apply their proper game Titles and also set it (them) up as an Associated Platform with the corresponding Default Command-Line Parameters.

     

  16. You have mame.exe under "..\Tron Mame\" (which is not an issue).  Any chance you have different installs of MAME and when you tested it through MAME itself, you did it from a different copy of 'mame.exe'?  Since it worked outside of LaunchBox, it'll work inside of LB.  Is it safe to assume other Arcade games you launch with your MAME emulator (as [sorta] shown in the images) work through LaunchBox?  (they're all using ..\Tron Mame\mame.exe\ ?)

    You shouldn't need tron.ini at all.  But since you do, make sure "rompath" inside of it points to where your roms are (if not in the default "roms" folder).

    Also make sure you have "tron.zip" AND "midssio.zip" (both required) accessible to where rompath (in tron.ini or better yet, mame.ini) points to.

     

  17. You're probably going to need to start the multiplayer using a batch file (or similar) because you're having to launch multiple copies of the emulator.

    You may be able to add an Additional App to your game and set it to launch Before Main app.  You'd need to do it game specific because you can't pass variables to an Additional App.  So the Main App would load up the Player 1 copy of SM3, and the Additional App would load the other copy of SM3 that's setup for Player 2.

  18. Did you setup LaunchBox's Screen Capture Key to F12 (which is coincidentally(?) also MAME's Save Snapshot key)?

    Tools - Options - Gameplay - Screen Capture

    Then when you exit a game (after having taken a screenshot [or 2]) you should get a message box asking if you want to save the snapshot(s) to your game.

  19. 10 hours ago, *D1sk* said:

    this does not work at all after configuring and restarting

    Note that when you configure and restart, the configuration does not get saved to your Lightgun.cfg file (located in your ../ctrl/ folder) even though you have in your mame.ini file under #CORE INPUT OPTIONS "ctrl    Lightgun".  It gets saved back to "default.cfg" located in ../cfg/  So you'd need to copy/rename it accordingly after exiting and before restarting.

    Now this is for standalone MAME.  I've never used MAME through Retroarch, so cannot attest that 'all is the same'.

  20. 14 hours ago, alexandreleblanc said:

    For the software list roms which configuration is the best (Merged, Non-Merged or split)? And do you suggest to put all the bios in a dedicated Bios folder ?

    I'm not saying it's "best", but for me I use a split set for softlist roms.  (Non-merged isn't [typically] a download option for softlists)

    If you have a full MAME set (MAME machines, not softlists) and your mame.ini rompath points to it, there's really no sense in moving the softlist BIOS files somewhere else.

    But I'm not always the most sensible guy, so I place (copy) my softlist BIOS files into the root folder of where the softlist rom folders are kept, which I have in a folder name "software".  It looks something like:

    D:\Emulators\MAME\software\
    D:\Emulators\MAME\software\32x\
    D:\Emulators\MAME\software\a800\
    D:\Emulators\MAME\software\a5200\
    D:\Emulators\MAME\software\a7800\
    D:\Emulators\MAME\software\32x.zip
    D:\Emulators\MAME\software\a800.zip
    D:\Emulators\MAME\software\a5200.zip
    D:\Emulators\MAME\software\a7800.zip

    Then in MAME.ini, I only need to add "software" to the  rompath (because MAME is smart and knows to 'drill down' to the softlist subfolders).  Note: the softlist subfolders need to be named the exact same as MAME references them.  (Which is how they should be already from a proper softlist download.)  So...

    D:\Emulators\MAME\software\Atari 800\

    ...will not work.  (Unless you [also] add "Atari 800" to the rompath.)  

  21. 3 hours ago, OldSchool80s said:

    Sure wish there was a way to trigger something prior to running the actual game. (And then I’d have it show the control panel, then wait for any input…) then it continues on to launching the emulator/game.

    You could do what was suggested above (find a startup theme you like and adjust the image priorities) and then increase the Startup Load Delay time.  This won't wait until you provide input but it could make it display longer while the game is loading.

    Another possibility that may work is, similarly, find a main Theme that one of the displayed images is Box - Front (since Arcade doesn't have 'boxes'), and adjust the image priorities.

     

×
×
  • Create New...