Jump to content
LaunchBox Community Forums

Tutorial: Replace startup screen with black screen that boots directly into game with no sight of emulator gui


Recommended Posts

Posted (edited)

  

Decided to change the topic because this is better IMO. It's not only gets rid of command prompts it directly boots into games making emulated games feel more like PC games. With this method you'll replace your .exe for your emulator so you won't need any startup screen settings activated. 

In case someone reads this and wants to do it but isn't familar with what to do download Autohotkey first, right click and make a document call it whatever you want, I called mine Launch Dolphin Hidden.ahk. (this is specifically for Dolphin, but you can find/replace the word Dolphin with another emulator. Will work except the amount of time taken will need to change.) once you've pasted and saved right click on the .ahk and compile script which will make an .exe. This will go in your Launchbox instead of Dolphin.exe or whatever emulator. I also got it working well with Eden (Switch emulator) Demul (Sega arcade) and others that you just couldn't get rid of the GUI on boot no matter what you did as I tried for several years. Only one that will never be great is Teknoparrot just because that one sometimes takes 20+ seconds to load a game. 

#NoEnv
#SingleInstance Force
DetectHiddenWindows, On
SetTitleMatchMode, 2
SetWorkingDir, %A_ScriptDir%

; 1. Create a black overlay that does NOT steal focus (+E0x08000000 = WS_EX_NOACTIVATE)
Gui, BlackScreen:New, -Caption +AlwaysOnTop +ToolWindow +E0x08000000
Gui, BlackScreen:Color, 000000
Gui, BlackScreen:Show, NA x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, DolphinOverlay

; 2. Build the argument string
FullArgs := ""
for index, param in A_Args
{
    if InStr(param, " ")
        FullArgs .= (index > 1 ? " " : "") . """" . param . """"
    else
        FullArgs .= (index > 1 ? " " : "") . param
}

; 3. Launch Dolphin normally
Run, "%A_ScriptDir%\Dolphin.exe" %FullArgs%

; 4. Wait for Dolphin's window to exist, then wait 2.2 seconds for it to initialize
WinWait, ahk_exe Dolphin.exe,, 10
Sleep, 2200

; 5. Destroy the overlay and bring Dolphin to the front
Gui, BlackScreen:Destroy
WinActivate, ahk_exe Dolphin.exe

; 6. Keep the wrapper alive until Dolphin closes
WinWaitClose, ahk_exe Dolphin.exe
ExitApp

; 7. Force-close Dolphin cleanly with F4
$F4::
{
    Process, Close, Dolphin.exe
    ExitApp
}

 

Edited by Jayinem
  • Like 1
Posted

I also just figured out with a script how to replace startup screen that says loading with a pure black screen, it just seems more natural to me. Can post the script if someone wants to use in autohotkey.

Posted

Copying NirCmd into every emulator folder works, but it isn't strictly necessary — you can keep one copy in a permanent location, point the emulator entry in LaunchBox at that single file, and then give the full path to the emulator in the execmd argument. Same result, one file to maintain. On the AutoHotkey loading screen: worth adding +AlwaysOnTop -Caption to the Gui and showing it without activating, otherwise it can steal focus from the game window right at launch. I'd be interested in seeing the script.

Posted (edited)
9 minutes ago, Noah Evans said:

Copying NirCmd into every emulator folder works, but it isn't strictly necessary — you can keep one copy in a permanent location, point the emulator entry in LaunchBox at that single file, and then give the full path to the emulator in the execmd argument. Same result, one file to maintain. On the AutoHotkey loading screen: worth adding +AlwaysOnTop -Caption to the Gui and showing it without activating, otherwise it can steal focus from the game window right at launch. I'd be interested in seeing the script.

Soon as i get home from a restaurant ill post it. Tried 5 or 6 emulators no focus loss. Like in Dolphin only takes 2 seconds really feels like a pc game now with just a  brief black screen then boot. Always hated seeing the gui. Also got rid of seeing guis on escape as well.

Edited by Jayinem
Posted (edited)

In case someone reads this and wants to do it but isn't familar with what to do download Autohotkey first, right click and make a document call it whatever you want, I called mine Launch Dolphin Hidden.ahk. (this is specifically for Dolphin, but you can find/replace the word Dolphin with another emulator. Will work except the amount of time taken will need to change.) once you've pasted and saved right click on the .ahk and compile script which will make an .exe. This will go in your Launchbox instead of Dolphin.exe or whatever emulator. I also got it working well with Eden (Switch emulator) Demul (Sega arcade) and others that you just couldn't get rid of the GUI on boot no matter what you did as I tried for several years. Only one that will never be great is Teknoparrot just because that one sometimes takes 20+ seconds to load a game. 

#NoEnv
#SingleInstance Force
DetectHiddenWindows, On
SetTitleMatchMode, 2
SetWorkingDir, %A_ScriptDir%

; 1. Create a black overlay that does NOT steal focus (+E0x08000000 = WS_EX_NOACTIVATE)
Gui, BlackScreen:New, -Caption +AlwaysOnTop +ToolWindow +E0x08000000
Gui, BlackScreen:Color, 000000
Gui, BlackScreen:Show, NA x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, DolphinOverlay

; 2. Build the argument string
FullArgs := ""
for index, param in A_Args
{
    if InStr(param, " ")
        FullArgs .= (index > 1 ? " " : "") . """" . param . """"
    else
        FullArgs .= (index > 1 ? " " : "") . param
}

; 3. Launch Dolphin normally
Run, "%A_ScriptDir%\Dolphin.exe" %FullArgs%

; 4. Wait for Dolphin's window to exist, then wait 2.2 seconds for it to initialize
WinWait, ahk_exe Dolphin.exe,, 10
Sleep, 2200

; 5. Destroy the overlay and bring Dolphin to the front
Gui, BlackScreen:Destroy
WinActivate, ahk_exe Dolphin.exe

; 6. Keep the wrapper alive until Dolphin closes
WinWaitClose, ahk_exe Dolphin.exe
ExitApp

; 7. Force-close Dolphin cleanly with F4
$F4::
{
    Process, Close, Dolphin.exe
    ExitApp
}

 

Edited by Jayinem
  • Jayinem changed the title to Tutorial: Replace startup screen with black screen that boots directly into game with no sight of emulator gui
Posted (edited)

I figured out how to cover PPU Modules loading in RPCS3 with a black screen. Wasn't fun or easy to figure out, and does take a few seconds longer than some other emulators but I just prefer this to seeing PPU modules compiling. If you use startup screen it will stop working when the game launches so you will still see the PPU module compilation but with this you just see a black screen until the game boots. 

Make an .ahk script and call it RPCS3_Shortcut_Launcher.ahk, paste the script compile it into an exe by right clicking. This becomes your new emulator exe or you can replace RPCS3.exe with RPCS3_Shortcut_Launcher.exe in a game shortcut if you prefer. 

If needed shorten or make longer ; 5. Hold suppression for 14.8 seconds while keeping RPCS3Overlay on top
HoldTime := 14800

3 seconds more would be 17800, 3 seconds less would be 11800. But try to find out how many seconds you need before it boots. SSD will be faster regular HDD slower. 

#NoEnv
#SingleInstance Force
SendMode Input
SetTitleMatchMode, 2
SetWorkingDir, %A_ScriptDir%
SetWinDelay, -1
DetectHiddenWindows, On

; 0. Kill any leftover rpcs3.exe process
Process, Close, rpcs3.exe

; 1. Cover the screen in black immediately
Gui, BlackScreen:New, -Caption +AlwaysOnTop +ToolWindow +E0x08000000
Gui, BlackScreen:Color, 000000
Gui, BlackScreen:Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, RPCS3Overlay

; 2. Register Windows Shell Hook to catch new windows instantly
Gui, +LastFound
hWnd := WinExist()
DllCall("RegisterShellHookWindow", "UInt", hWnd)
MsgNum := DllCall("RegisterWindowMessage", "Str", "SHELLHOOK")
OnMessage(MsgNum, "ShellMessage")

global SuppressActive := true

; 3. Rebuild arguments cleanly
FullArgs := ""
for index, param in A_Args
{
    if (SubStr(param, 1, 1) = ":")
        param := "%RPCS3_GAMEID%" . param
    FullArgs .= (index > 1 ? " " : "") . """" . param . """"
}

if (FullArgs = "")
{
    Gui, BlackScreen:Destroy
    MsgBox, 16, Launcher Error, No game arguments were received from the shortcut!
    ExitApp
}

; 4. Launch rpcs3.exe and capture its exact Process ID (PID)
Run, "%A_ScriptDir%\rpcs3.exe" %FullArgs%,,, Rpcs3PID

; 5. Hold suppression for 14.8 seconds while keeping RPCS3Overlay on top
HoldTime := 14800
StartTime := A_TickCount

while (A_TickCount - StartTime < HoldTime)
{
    ; If rpcs3.exe crashes or exits early during boot, close the wrapper immediately
    Process, Exist, %Rpcs3PID%
    if (!ErrorLevel)
    {
        Gui, BlackScreen:Destroy
        ExitApp
    }

    WinSet, AlwaysOnTop, On, RPCS3Overlay
    WinGet, idList, List, ahk_exe rpcs3.exe
    Loop, %idList%
    {
        this_id := idList%A_Index%
        WinMove, ahk_id %this_id%,, -32000, -32000
    }
    Sleep, 5
}

; 6. Restore ONLY the actual game window at full monitor dimensions
SuppressActive := false
WinGet, allList, List, ahk_exe rpcs3.exe
Loop, %allList%
{
    this_id := allList%A_Index%
    WinGetTitle, this_title, ahk_id %this_id%

    if (InStr(this_title, "FPS:"))
    {
        WinShow, ahk_id %this_id%
        WinRestore, ahk_id %this_id%
        WinMove, ahk_id %this_id%,, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%
        WinActivate, ahk_id %this_id%
        Sleep, 250

        ; Strip window borders/titlebar directly and enforce fullscreen dimensions
        WinSet, Style, -0xC00000, ahk_id %this_id%
        WinMove, ahk_id %this_id%,, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%
    }
}

Sleep, 150
Gui, BlackScreen:Destroy

; 7. Wait for the exact rpcs3.exe process to terminate, then immediately exit the wrapper
Process, WaitClose, %Rpcs3PID%
Process, Close, rpcs3.exe
ExitApp

ShellMessage(wParam, lParam)
{
    global SuppressActive
    if (!SuppressActive)
        return

    if (wParam = 1 || wParam = 4 || wParam = 32772)
    {
        WinGet, procName, ProcessName, ahk_id %lParam%
        if (procName = "rpcs3.exe")
        {
            WinMove, ahk_id %lParam%,, -32000, -32000
            WinSet, AlwaysOnTop, On, RPCS3Overlay
        }
    }
}

$F4::
{
    Process, Close, %Rpcs3PID%
    Process, Close, rpcs3.exe
    Gui, BlackScreen:Destroy
    ExitApp
}
return

 

Edited by Jayinem

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...