Thread: Nintendo GameCube help

Results 1 to 9 of 9
  1. Collapse Details
    Nintendo GameCube help 
    #1
    Junior Member
    MainSecondary
    Join Date
    Dec 2018
    Posts
    10
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    ive tesed my games in dolphin emulator and they run fine. but ive added the module now in RL and now i get the error in my next post. what am i doin wrong? i think it might have something to do with the ahk isnt the same version as my emulator, how do i update it?
    Last edited by Nackers ; 01-07-2019 at 03:59 AM.
     

  2. Collapse Details
    Re: Nintendo GameCube help 
    #2
    Junior Member
    MainSecondary
    Join Date
    Dec 2018
    Posts
    10
    now i get this

    Untitled.png
     

  3. Collapse Details
    Re: Nintendo GameCube help 
    #3
    Member
    MainSecondary
    Join Date
    Jul 2015
    Posts
    51
    Did you try the module in this thread?
    http://www.rlauncher.com/forum/showt...1593#post41593
     

  4. Collapse Details
    Re: Nintendo GameCube help 
    #4
    Senior Member tonesmalone's Avatar
    MainSecondary
    Join Date
    Jun 2014
    Posts
    704
    Yep. You need the new dolphin module.


    Sent from my iPhone using Tapatalk Pro
     

  5. Collapse Details
    Re: Nintendo GameCube help 
    #5
    Junior Member
    MainSecondary
    Join Date
    Mar 2015
    Posts
    6
    Hi guys,

    I have spend the day trying to fix dolphin running on RL without succes.
    I prefer use the vey last Dolphin-x64 5.0.9299 who run really great on my computer.
    There is huge improvement from the previous version u used (4.XXXX).
    But unfortunatly i have many RL error when trying to launch game with RL.
    It s same error whatever the dolphin version i used : Dolphin-x64 5.0.9299, Dolphin-x64 5.0.9293, Dolphin-x64 5.0.7062, Dolphin-x64 5.0.

    https://imageshack.com/a/img923/6853/4BNR53.jpg
    Attachment 2904

    I have try all module version i have find (as the one listed below) without succes.
    I have also try to tweak them without succes. They is errors and errors again and again whatever i fix the previous one.

    i notice that the old fonction "IniReadCheck" in old module file have been replace by "moduleIni.Read". Can it be something ?

    When i used my old module files with the latest emu version (see down this post) the game launch and i have this error who look less bad than the one with the updated module file.

    https://imageshack.com/a/img924/8338/8Aodyo.jpg
    Attachment 2903

    So please guys help me i turn crazy trying to fix it

    Quote Originally Posted by Tomkun View Post
    Code:
    MEmu := "Dolphin"
    MEmuV := "v5.0"
    MURL := ["https://dolphin-emu.org/"]
    MAuthor := ["djvj","bleasby"]
    MVersion := "2.2.0"
    MCRC := "C7DEEF2C"
    iCRC := "9DF8C36F"
    MID := "635038268884477733"
    MSystem := ["Nintendo Gamecube","Nintendo Wii","Nintendo WiiWare"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; Be sure you are running at least Dolphin v4.0 or greater.
    ; If you get an error that you are missing a vcomp100.dll, install Visual C++ 2010: http://www.microsoft.com/download/en/details.aspx?id=14632
    ; Also make sure you are running latest directx: http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3
    ; Dolphin will sometimes crash when connnecting a Wiimote, then going back to the game. After all Wiimotes are connected that you want to use, it shouldn't have anymore issues.
    ; Convert all your games to ciso using Wii Backup Manager to save alot of space by stripping everything but the game partition. http://www.wiibackupmanager.tk/
    ; If you want to keep your Dolphin.ini in the emu folder, create a "portable.txt" file in MyDocuments\Dolphin Emulator\
    ;
    ; Bezels:
    ; If the game does not fit the window, you can try setting stretch to window manually in dolphin.
    ;
    ; Setting up custom Wiimote or GCPad profiles:
    ; First set UseCustomWiimoteProfiles or UseCustomGCpadProfiles to true in RocketLauncherUI for this module
    ; Launch Dolphin manually and goto Options->(Wiimote or Gamecube Pad) Settings and configure all your controls how you want your default setup to look like. This will be used for all games that you don't set a custom profile for. No need to save any profiles.
    ; All your controls are stored in WiimoteNew.ini or GCPadNew.ini and get copied to a _Default_(WiimoteNew or GCPadNew).ini on first launch. This ini contains all the controls for all 4 controllers.
    ; Do not confuse this with Dolphin's built-in profiles as those only contain info for only one controller. The (WiimoteNew or GCPadNew).ini and all the profiles RocketLauncher uses contain info for all controllers in one file.
    ; This new profile now called _Default_(WiimoteNew or GCPadNew).ini will be found in Dolphins settings folder: \Config\Profiles\(Wiimote or GCPad) (RL)\Default.ini
    ; For each game or custom control sets you want to use, edit the controls for all the controllers to work for that game and exit Dolphin. Now copy the (WiimoteNew or GCPadNew).ini to the "(Wiimote or GCPad) (RL)" folder and name it whatever you like.
    ; In RocketLauncherUI's module settings for Dolphin, Click the Rom Settings tab and add each game from your xml you want to use a this custom profile for.
    ; Now for all those games you added, make sure the Profile setting it set to the custom profile you want to load when that game is launched.
    ; Any game not added will use the "_Default_(WiimoteNew or GCPadNew).ini" profile RocketLauncher makes on first launch.
    ;
    ; To Pair a Wiimote:
    ; Highly suggest getting a Mayflash DolphinBar as it makes pairing and using wiimotes as easy as with a real Wii: http://www.amazon.com/TOTALCONSOLE-W010-Wireless-Sensor-DolphinBar/dp/B00HZWEB74
    ; If using the DolphinBar, just make sure Dolphin is set to continuously scan for wiimotes and set controls to use real wiimotes for as many wiimotes you have.
    ; You do not need to pair the wiimote with the PC first as you would with a standard blueooth and wiimote.
    ; DolphinBar should be on Mode 4. Wiimotes don't get paired until after Dolphin is running, not before!!
    ; After Dolphin is running, press 1+2 on each wiimote and after a few moments, the wiimote will pair and vibrate and one led will lock solid. Do this for each wiimote. That's it!
    ;
    ; If using a standard LED Bar:
    ; Make sure all your wiimotes have already been paired with your PC's bluetooth adapter
    ; All 4 leds on the wiimote should be flashing
    ; Press your Refresh key (set in RocketLauncherUI for this module) or enable continuous scanning in Dolphin
    ; Press 1 + 2 on the wiimote and one led should go solid designating the player number
    ;
    ; MultiGame:
    ; Currently unable to get disc swapping to work. See MultiGame section below for additional details.
    ;
    ; Netplay:
    ; If you're using a GameCube game with saves, synchronize your memory cards, Wii NAND needs to be synchronized, and some settings (such as CPU Clock Override) must be either synchronized or disabled.
    ; Because netplay may require different settings than you would normally use with local play, the module will look for any inis in your Dolphin user config folder ending with "_netplay" and use those configs instead of your normal ones.
    ; So for example, after you tweak all your dolphin settings for netplay, copy your dolphin.ini to dolphin_netplay.ini in the same folder.
    ; When the module launches and you choose multiplayer from RocketLauncher on screen menu, the module will backup dolphin.ini and copy dolphin_network.ini to dolphin.IniDelete
    ; On exit, the module will restore your backed up dolphin.ini and any other ini files in this folder (and all subfolders) that had the "_netplay" in the name.
    ; Guide on tweaking performance for netplay: https://dolphin-emu.org/docs/guides/netplay-guide/
    ; Another guide: https://docs.google.com/document/d/1CIkBAGcf_-kBUa4urn4KUj2U4UA6y_2a7stXJz85yiE/
    ;
    ; Linking a GameCube game with VBA-M
    ; Game tested: Legend of Zelda, The - Four Swords Adventures (USA)
    ; VBA-M emulator tested: visualboyadvance-m2.0.0Beta1
    ; dolphin emulator tested: dolphin-master-4.0-6725-x64
    ; On RocketLaunchUI, dolphin, GameCube Module settings set your VBA-M executable and VBA Bios file path on the VBALink tab.
    ; On RocketLaunchUI, dolphin, GameCube, Game name Module Settings enable VBA Link
    ; If your Game Boy Advanced Windows appear frozen after the RocketLauncher fade screen loads, increase the value of the VBADelay on GameCube, VBALink settings. Default value is 500 milliseconds.
    ; A game with one VBA window will use a two screens bezel file, Bezel [2S].png, the first screen for the GameCube game and the second one for the VBA screen. Two VBAs = Bezel [3S].png, again first screen for the GameCube game and second and third for the VBA screens, and so on.
    ;----------------------------------------------------------------------------
    StartModule()
    BezelGui()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)			; instantiate emulator executable object
    
    Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
    UseCustomWiimoteProfiles := moduleIni.Read("Settings", "UseCustomWiimoteProfiles","false",,1)	; set to true if you want to setup custom Wiimote profiles for games
    UseCustomGCPadProfiles := moduleIni.Read("Settings", "UseCustomGCPadProfiles","false",,1)	; set to true if you want to setup custom GCPad profiles for games
    HideMouse := moduleIni.Read("Settings", "HideMouse","true",,1)					; hides mouse cursor in the emu options
    RefreshKey := moduleIni.Read("Settings", "RefreshKey",,,1)						; hotkey to "Refresh" Wiimotes, delete the key to disable it
    Timeout := moduleIni.Read("Settings", "Timeout","5",,1)							; amount in seconds we should wait for the above hotkeys to timeout
    renderToMain := moduleIni.Read("Settings", "Render_To_Main","false",,1)
    enableNetworkPlay := moduleIni.Read("Network", "Enable_Network_Play","false",,1)
    controlTypePort1 := moduleIni.Read(romName . "|Controls", "Control_Type_Port_1",,,1)
    controlTypePort2 := moduleIni.Read(romName . "|Controls", "Control_Type_Port_2",,,1)
    controlTypePort3 := moduleIni.Read(romName . "|Controls", "Control_Type_Port_3",,,1)
    controlTypePort4 := moduleIni.Read(romName . "|Controls", "Control_Type_Port_4",,,1)
    
    ;options to Gamecube and VBA Link
    enableVBALink := moduleIni.Read(romName, "enableVBALink", "false",,1)
    VBAExePath := moduleIni.Read("VBA Link", "VBAExePath",,,1)
    VBABiosPath := moduleIni.Read("VBA Link", "VBABiosPath",,,1)
    VBADelay := moduleIni.Read("VBA Link", "VBADelay", 500,,1)
    
    If (renderToMain = "true") {
    	emuPrimaryWindow := new Window(new WindowTitle("Dolphin","Qt5QWindowIcon"))	; instantiate primary emulator window object
    	emuGameWindow := emuPrimaryWindow
    } Else {
    	emuPrimaryWindow := new Window(new WindowTitle("Dolphin","Qt5QWindowIcon"))	; instantiate primary emulator window object
    	emuPrimaryWindow.ExcludeTitle := "FPS"	; when main window doesn't have the game, FPS will not be on the title bar
    	emuGameWindow := new Window(new WindowTitle("FPS","Qt5QWindowIcon"))
    }
    emuPrimaryWindow := new Window(new WindowTitle("Dolphin","Qt5QWindowIcon"))	; instantiate primary emulator window object
    emuGameWindow := If renderToMain = "true" ? emuPrimaryWindow : new Window(new WindowTitle("FPS","Qt5QWindowIcon"))	; Older dolphins used "FPS ahk_class wxWindowClassNR"
    emuScanningWindow := new Window(new WindowTitle("Scanning for ISOs","#32770"))
    emuNetPlaySetupWindow := new Window(new WindowTitle("Dolphin NetPlay Setup","Qt5QWindowIcon"))
    emuNetPlayWindow := new Window(new WindowTitle("Dolphin NetPlay","Qt5QWindowIcon"))
    emuWiimoteWindow := new Window(new WindowTitle("Dolphin Controller Configuration","#32770"))
    emuOpenROMWindow := new Window(new WindowTitle("Select","#32770"))
    emuErrorWindow1 := new Window(new WindowTitle("Warning","#32770"))
    emuErrorWindow2 := new Window(new WindowTitle("Error","#32770"))
    emuWiimoteWindow.CreateControl("OK")
    
    ; Determine where Dolphin is storing its ini, this will act as the base folder for settings and profiles related to this emu
    dolphinININewPath := new File(A_MyDocuments . "\Dolphin Emulator\Config\Dolphin.ini")	; location of Dolphin.ini for v4.0+
    dolphinINIOldPath := new File(emuPath . "\User\Config\Dolphin.ini")	; location of Dolphin.ini prior to v4.0
    portableTxtFile := new File(emuPath . "\portable.txt")
    If (!portableTxtFile.Exist() && dolphinININewPath.Exist())
    {	dolphinBasePath := A_MyDocuments . "\Dolphin Emulator"
    	RLLog.Info("Module - Dolphin's base settings folder is not portable and found in: " . dolphinBasePath)
    } Else If (portableTxtFile.Exist() || dolphinINIOldPath.Exist())
    {	dolphinBasePath := emuPath . "\User"
    	RLLog.Info("Module - Dolphin's base settings folder is portable and found in: " . dolphinBasePath)
    } Else
    	ScriptError("Could not find your Dolphin.ini in either of these folders. Please run Dolphin manually first to create it.`n" . dolphinINIOldPath.FileFullPath . "`n" . dolphinININewPath.FileFullPath)
    dolphinINI := new IniFile(dolphinBasePath . "\Config\Dolphin.ini")
    
    If (enableVBALink = "true"){
    	VBAExePath := AbsoluteFromRelative(EmuPath, VBAExePath)
    	VBABiosPath := AbsoluteFromRelative(EmuPath, VBABiosPath)
    	StringUtils.SplitPath(VBAExePath, VBAFile, VBAPath)
    	SelectedNumberofPlayers := NumberOfPlayersSelectionMenu(4)
    	If (SelectedNumberofPlayers = 1) {
    		enableVBALink := "false"
    	} Else {
    		; backup original ini
    		dolphinINIBackup := new File(dolphinBasePath . "\Config\Dolphin_Backup.ini")
    		dolphinINI.Copy(dolphinINIBackup.FileFullPath)
    		Loop, % SelectedNumberofPlayers
    		{ 	tempCount := A_Index-1
    			dolphinINI.Write(5, "Controls", PadType%tempCount%)
    		}
    	}
    }
    
    If (enableVBALink = "true")
    	BezelStart(SelectedNumberofPlayers+1)
    Else
    	BezelStart()
    
    If (enableVBALink = "true" and !bezelPath)   ; disabling fullscreen if VBA Link mode
    	Fullscreen := "false"
    
    If (renderToMain = "true" && (enableVBALink = "true" || bezelEnabled = "true")) {   ; disabling toolbar and statusbar if bezels or vba link is used as it will show when rendering to the main window
    	dolphinINI.Write("False", "Interface", "ShowToolbar")
    	dolphinINI.Write("False", "Interface", "ShowStatusbar")
    }
    
    If (renderToMain = "true")
    	hideEmuObj := Object(emuScanningWindow,0,emuNetPlayWindow,0,emuNetPlaySetupWindow,0,emuErrorWindow1,0,emuErrorWindow2,0,emuGameWindow,1)
    Else
    	hideEmuObj := Object(emuScanningWindow,0,emuNetPlayWindow,0,emuNetPlaySetupWindow,0,emuErrorWindow1,0,emuErrorWindow2,0,emuPrimaryWindow,0,emuGameWindow,1)
    
    ; Set control types in each port
    dolphinDevice := 0
    Loop 4 {
    	If controlTypePort%A_Index%
    		dolphinINI.Write(controlTypePort%A_Index%, "Core", "SIDevice" . dolphinDevice)
    	dolphinDevice++
    }
    
    7z(romPath, romName, romExtension, sevenZExtractPath)
    
    If StringUtils.Contains(romExtension,"\.zip|\.7z|\.rar")
    	ScriptError(MEmu . " does not support compressed roms. Please enable 7z support in RocketLauncherUI to use this module/emu.")
    
    If RefreshKey {
    	RefreshKey := xHotKeyVarEdit(RefreshKey,"RefreshKey","~","Add")
    	xHotKeywrapper(RefreshKey,"RefreshWiimote")
    }
    
    Fullscreen := If Fullscreen = "true" ? "True" : "False"
    HideMouse := If HideMouse = "true" ? "True" : "False"
    
    networkSession := ""
    If (enableNetworkPlay = "true") {
    	RLLog.Info("Module - Network Multi-Player is an available option for " . dbName)
    	dolphinNickname := dolphinINI.Read("NetPlay", "Nickname")
    	dolphinAddress := dolphinINI.Read("NetPlay", "Address")
    	dolphinCPort := dolphinINI.Read("NetPlay", "ConnectPort")
    	dolphinHPort := dolphinINI.Read("NetPlay", "HostPort")
    	netplayNickname := moduleIni.Read("Network", "NetPlay_Nickname","Player",,1)
    	getWANIP := moduleIni.Read("Network", "Get_WAN_IP","false",,1)
    	networkPlayers := 4	; Max amount of networkable players
    
    	If (getWANIP = "true")
    		myPublicIP := GetPublicIP()
    
    	defaultServerIP := moduleIni.Read("Network", "Default_Server_IP", myPublicIP,,1)
    	defaultServerPort := moduleIni.Read("Network", "Default_Server_Port",,,1)
    	lastIP := moduleIni.Read("Network", "Last_IP", defaultServerIP,,1)	; does not need to be on the ISD
    	lastPort := moduleIni.Read("Network", "Last_Port", defaultServerPort,,1)	; does not need to be on the ISD
    
    	If (netplayNickname != dolphinNickname)
    		dolphinINI.Write(netplayNickname, "NetPlay", "Nickname")
    
    	MultiplayerMenu(lastIP,lastPort,networkType,networkPlayers,0)
    	If networkSession {
    		RLLog.Info("Module - Using a Network for " . dbName)
    
    		restoreIniObject := Object()	; initialize object
    		currentObj := ""
    		dolphinConfigPath := dolphinBasePath . "\Config"
    		Loop, % dolphinConfigPath . "\*.ini"
    		{
    			If StringUtils.InStr(A_LoopFileName, "_netplay.ini",,,,0) {
    				RLLog.Info("Module - Found a network specific ini: " . A_LoopFileFullPath)
    				networkIni%A_Index%File := new File(A_LoopFileFullPath)
    				originalIni%A_Index%File := new File(StringUtils.RegExReplace(A_LoopFileFullPath, "_netplay",,,-1,15))
    				backupIni%A_Index%File := new File(originalIni%A_Index%File.FileFullPath . ".backup")
    				originalIni%A_Index%File.Move(backupIni%A_Index%File,1)	; backup original ini
    				networkIni%A_Index%File.Copy(originalIni%A_Index%File)	; copy network ini to original name
    			}
    		}
    		
    		moduleIni.Write(lastPort, "GlobalModuleIni", "Network", "Last_Port")
    
    		If (networkType = "client") {
    			moduleIni.Write(lastIP, "GlobalModuleIni", "Network", "Last_IP")	; Save last used IP and Port for quicker launching next time
    			dolphinINI.Write(lastIP, "Network", "Address")
    			dolphinINI.Write(lastPort, "Network", "ConnectPort")
    		} Else	; server
    			dolphinINI.Write(lastPort, "Network", "HostPort")
    
    		dolphinINI.Write(romPath, "Network", "ISOPath0")	; makes browser only show the one game we want to play
    		dolphinINI.Write(1, "General", "ISOPaths")	; makes browser only show the first path set
    		dolphinINI.Write(romPath . "\" . romName . romExtension, "General", "LastFilename")
    		RLLog.Info("Module - Starting a network session using the IP """ . networkIP . """ and PORT """ . networkPort . """")
    	} Else
    		RLLog.Info("Module - User chose Single Player mode for this session")
    }
    
    gcSerialPort := 5	; this puts the BBA network adapter into the serial port. If previous launch was Triforce, AM-Baseboard would be set here and would result in Unknown DVD command errors
    
    ; Compare existing settings and if different than desired, write them to the emulator's ini
    dolphinINI.Write(Fullscreen, "Display", "Fullscreen", 1)
    dolphinINI.Write(renderToMain, "Display", "RenderToMain", 1)
    dolphinINI.Write(HideMouse, "Interface", "HideCursor", 1)
    dolphinINI.Write("False", "Interface", "ConfirmStop", 1)
    dolphinINI.Write("False", "Interface", "UsePanicHandlers", 1)
    dolphinINI.Write(gcSerialPort, "Core", "SerialPort1", 1)
    
     ; Load default or user specified Wiimote or GCPad profiles for launching
    If (StringUtils.InStr(systemName, "wii") && UseCustomWiimoteProfiles = "true")
    	ChangeDolphinProfile("Wiimote")
    If (UseCustomGCPadProfiles = "true")
    	ChangeDolphinProfile("GCPad")
    
    HideAppStart(hideEmuObj,hideEmu)
    
    If networkSession
    	primaryExe.Run()	; must be launched w/o -b for browser list to work
    Else
    	primaryExe.Run(" -b -e """ . romPath . "\" . romName . romExtension . """")	; /b = batch (exit dolphin with emu), /e = load file
    
    emuGameWindow.Wait()
    emuGameWindow.Get("ID")
    emuGameWindow.WaitActive()
    
    If networkSession {
    	RLLog.Info("Module - Opening NetPlay window")
    
    	; Get the 6-letter ID of the game
    	If (romExtension = ".wbfs")
    		gameID := RLObject.readFileData(romPath . "\" . romName . romExtension,512,6,"UTF8")
    	Else If (romExtension = ".iso")
    		gameID := RLObject.readFileData(romPath . "\" . romName . romExtension,0,6,"UTF8")
    	Else If (romExtension = ".ciso")
    		gameID := RLObject.readFileData(romPath . "\" . romName . romExtension,32768,6,"UTF8")
    
    	; Must wait for Dolphin to finish scanning isos before netplay window can be opened so the game list is populated. Opening too early and the game list will be blank or partially filled.
    	If emuScanningWindow.Exist()
    		emuScanningWindow.WaitClose(60)	; wait 60 seconds max. hopefully doesn't take longer than that to scan your isos...
    	Else {
    		errlvl := emuScanningWindow.Wait(5)	; wait 5 seconds max to appear
    		If errlvl
    			RLLog.Info("Module - Timed out waiting for ""Scanning for ISOs"" window to appear. It may have finished before it could be detected, moving on.")
    		Else
    			RLLog.Info("Module - ""Scanning for ISOs"" window found.")
    	}
    	emuPrimaryWindow.MenuSelectItem("Tools", "Start NetPlay")
    	matchMode := A_TitleMatchMode	; store for restoration later
    	MiscUtils.SetTitleMatchMode(3)	; changes match mode so title must match exactly
    	emuNetPlaySetupWindow.Wait()
    	emuNetPlaySetupWindow.WaitActive()
    	emuNetPlayWindow.ExcludeTitle := emuNetPlaySetupWindow.WinTitle.GetWIndowTitle()		; set emuNetPlayWindow exclude title for the below command
    	If (networkType = "client") {
    		RLLog.Info("Module - Clicking Connect button")
    
    		emuNetPlaySetupWindow.CreateControl("Button1")		; instantiate new control for button1
    		emuErrorWindow1.CreateControl("Button1")
    		emuErrorWindow2.CreateControl("Button1")
    
    		While !breakLoops {
    			emuNetPlaySetupWindow.GetControl("button1").Click()	; click connect button
    			RLLog.Info("Module - Waiting for Host to start game")
    			errlvl := emuNetPlayWindow.Wait(2)	; waits 2 seconds
    			If errlvl {	; 1 if timed out, now check for any error windows and close them
    				Loop, 2		; loop through both error windows
    					If emuErrorWindow%A_Index%.Exist()	; error windows that can appear when host is not running yet
    						emuErrorWindow%A_Index%.GetControl("button1").Click()	; click ok to clear the error
    				RLLog.Info("Module - Host not running yet, trying again")
    				Continue
    			} Else {	; window exists
    				RLLog.Info("Module - Connected to host, waiting for host to start game")
    				Break
    			}
    		}
    	} Else {	; server
    		emuNetPlayWindow.CreateControl("ListBox1")	; create a control called ListBox1
    		emuNetPlayWindow.CreateControl("Button8")	; create a control called Button8 (the Host's Start button)
    		emuNetPlaySetupWindow.CreateControl("ListBox1")	; create a control called ListBox1
    		emuNetPlaySetupWindow.CreateControl("Button3")	; create a control called Button3 (the Host button)
    		emuNetPlaySetupWindow.GetControl("ListBox1").Get("List")	; Get the text from the ListBox
    		loopList := emuNetPlaySetupWindow.GetControl("ListBox1").List	; can't use this object directly on the Parse Loop below
    		Loop, Parse, loopList, `n
    		{
    			If StringUtils.InStr(A_Loopfield, gameID,,,,0) {
    				idLocation := A_Index	; record the location in the ListBox of our game
    				RLLog.Info("Module - Game list shows """ . A_LoopField . """ as item " . A_Index)	; logging each items in ListBox
    			}
    		}
    		If !idLocation {	; game was not found in list
    			ScriptError("Could not find your """ . romName . """ in the game selection window for netplay. Possibly the gameID could not be found in your game. Please check your the RocketLauncher log and report this error.",,,,,1)
    			Gosub, CloseProcess
    			FadeInExit()
    			Goto, CloseDolphin
    		}
    		emuNetPlaySetupWindow.GetControl("ListBox1").Control("Choose",idLocation)	; selects our game in the ListBox
    		RLLog.Info("Module - Clicking Host button")
    		emuNetPlaySetupWindow.GetControl("Button3").Click()	; click host button
    		emuNetPlayWindow.Wait()	; this window should now appear when hosted correctly
    		RLLog.Info("Module - Waiting for " . networkPlayers . " players until the game is started")
    		While !breakLoops {
    			emuNetPlayWindow.GetControl("ListBox1").Get("List")	; Get the text from the ListBox
    			If StringUtils.InStr(emuNetPlayWindow.GetControl("ListBox1").List,"[" . networkPlayers . "]",,,,0) {
    				RLLog.Info("Module - All players have joined, starting game")
    				Break
    			}
    			TimerUtils.Sleep(100,0)
    		}
    		emuNetPlayWindow.GetControl("Button8").Click()	; click Start button
    	}
    	MiscUtils.SetTitleMatchMode(matchMode)	; restore old match mode
    }
    
    
    If (enableVBALink = "true") {
    	vbaINI := new IniFile(VBAPath . "\vbam.ini")
    	vbaINI.CheckFile()
    	vbaINIBackup := new File(VBAPath . "\vbam_Backup.ini")
    	vbaINI.Copy(vbaINIBackup.FileFullPath)
    	;removing fullscreen from VBA-M
    	vbaINI.Write(0, "preferences", "fullScreen")
    	;setting other VBA-M ini options
    	VBABiosPathDoubleSlash := StringUtils.Replace(VBABiosPath,"\","\\","all")
    	vbaINI.Write(0, "preferences", "pauseWhenInactive")
    	vbaINI.Write(VBABiosPathDoubleSlash, "GBA", "BiosFile")
    	vbaINI.Write(1, "GBA", "LinkAuto")
    	vbaINI.Write("127.0.0.1", "GBA", "LinkHost")
    	vbaINI.Write(3, "GBA", "LinkType")
    	vbaINI.Write(SelectedNumberofPlayers, "preferences", "LinkNumPlayers")
    	vbaINI.Write(1, "preferences", "useBiosGBA")
    	vbaINI.Write(1, "Display", "Stretch")
    	vbaINI.Write(1, "Display", "Scale")
    	
    	;running VBA-M
    	Loop % SelectedNumberofPlayers {
    		currentScreen := A_Index + 1
    		VBA%currentScreen%Exe := new Process(VBAExePath)	; instantiate a new process for each instance of VBA we need to run
    		VBA%currentScreen%Exe.Run(" """ . VBABiosPath . """")
    		; msgbox % "PID: " . VBA%A_Index%Exe.PID . "`nVBABiosPath: " . VBABiosPath
    		VBA%currentScreen%Window := new Window(new WindowTitle(,,,,VBA%currentScreen%Exe.PID))
    		VBA%currentScreen%Window.Wait()
    		TimerUtils.Sleep(VBADelay,0)
    		bezelBottomOffsetScreen%currentScreen% := 24 ; to hide emu bottom bar
    	}
    	;waiting for VBA-M windows bios loading
    	timeout := A_TickCount
    	VBAGBABiosWindow := new Window(new WindowTitle("gba_bios - VisualBoyAdvance-M"))
    	Loop {	
    		VBAGBABiosWindow.Get("List")	; Get a list of all vba-m hwnd IDs
    		If (VBAGBABiosWindow.List[0] = SelectedNumberofPlayers){
    			Loop % VBAGBABiosWindow.List[0] {	; loop through each vba-m window
    				currentScreen := A_Index + 1
    				Screen%currentScreen%ID := VBAGBABiosWindow.List[A_Index]	; record each vba-m window's hwnd ID
    			}
    			RLLog.Info("Module - gba_bios Loaded")
    			Break
    		}
    		If (timeout < A_TickCount - 10000) {
    			RLLog.Warning("Module - Timed out waiting gba_bios to load")
    			Break
    		}
    		TimerUtils.Sleep(100,0)
    	}
    	;Resizing Windows to fill screen if no bezel file is found
    	If !(bezelPath) {
    		Loop % (SelectedNumberofPlayers + 1) {
    			If (A_Index = 1) {	; the main Dolphin window
    				X1 := 0
    				Y1 := 0
    				W1 := A_ScreenWidth//2
    				H1 := A_ScreenHeight
    				emuGameWindow.WinTitle.PID := ""	; remove PID from object's WinTitle so only the window hwnd ID is acted upon
    				emuGameWindow.RemoveBorder()	
    				emuGameWindow.RemoveTitlebar()
    				emuGameWindow.ToggleMenu()
    				emuGameWindow.Move(X1,Y1,W1,H1)
    			} Else {	; the vba-m windows
    				X%A_Index% := A_ScreenWidth//2
    				Y%A_Index% := (A_Index-2)*(A_ScreenHeight//SelectedNumberofPlayers)
    				W%A_Index% := A_ScreenWidth//2
    				H%A_Index% := (A_ScreenHeight//SelectedNumberofPlayers)+bezelBottomOffsetScreen%A_Index%
    				VBA%A_Index%Window.WinTitle.ID := Screen%A_Index%ID	; set ID of window into object
    				VBA%A_Index%Window.WinTitle.PID := ""	; remove PID from object's WinTitle so only the window hwnd ID is acted upon
    				VBA%A_Index%Window.RemoveBorder()
    				VBA%A_Index%Window.RemoveTitlebar()
    				VBA%A_Index%Window.ToggleMenu()
    				VBA%A_Index%Window.Move(X%A_Index%,Y%A_Index%,W%A_Index%,H%A_Index%)
    			}
    		}
    		TimerUtils.Sleep(50)
    		Loop % SelectedNumberofPlayers {
    			currentScreen := A_Index + 1
    			VBA%currentScreen%Window.Activate()	; put focus on all the VBA windows
    		}
    		VBA1Window.Activate()	; put focus on the first VBA window
    	}
    }
    
    BezelDraw()
    
    emuGameWindow.Activate()
    
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    
    CloseDolphin:
    If networkSession {
    	Loop {	
    		If !IsObject(backupIni%A_Index%File)
    			Break
    		RLLog.Info("Module - Restoring the original ini: " . backupIni%A_Index%File.FileFullPath . " to " . originalIni%A_Index%File.FileFullPath)
    		backupIni%A_Index%File.Move(originalIni%A_Index%File.FileFullPath,1)		; restore all backed up inis
    	}
    }
    
    7zCleanUp()
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    
    ChangeDolphinProfile(profileType) {
    	Global settingsFile,romName,dolphinBasePath,RLLog,moduleIni
    	profile := moduleIni.Read(romName, "profile", "Default",,1)
    	RLProfilePath := new Folder(dolphinBasePath . "\Config\Profiles\" . profileType . " (RL)")
    	currentProfileFile := new File(dolphinBasePath . "\Config\" . profileType . "New.ini")
    	defaultProfileFile := new File(RLProfilePath.FilePath . "\_Default_" . profileType . "New.ini")
    	customProfileFile := new File(RLProfilePath.FilePath . "\" . profile . ".ini")
    	If !currentProfileFile.Exist() {
    		RLLog.Warning("Module - You have custom " . profileType . " profiles enabled, but could not locate " . currentProfileFile.FileFullPath . ". This file stores all your current controls in Dolphin. Please setup your controls in Dolphin first.")
    		Return
    	}
    	If !defaultProfileFile.Exist() {
    		RLLog.Warning("Module - Creating initial Default " . profileType . " profile by copying " . profileType . ".ini to " . defaultProfileFile.FileFullPath)
    		RLProfilePath.CreateDir()
    		currentProfileFile.Copy(defaultProfileFile.FileFullPath)	; create the initial default profile on first launch
    	}
    	If (profile != "Default" && !customProfileFile.Exist())
    		RLLog.Warning("Module - " . romName . " is set to load a custom " . profileType . " profile`, but it could not be found: " . customProfileFile.FileFullPath)
    	currentProfileFile.Read()	; read current profile into memory
    	customProfileFile.Read()	; read custom profile into memory
    	If (currentProfileFile.Text != customProfileFile.Text) {	; if both profiles do not match exactly
    		RLLog.Info("Module - Current " . profileType . " profile does not match the one this game should use.")
    		If (profile != "Default") {	; if user set to use a custom profile
    			RLLog.Info("Module - Copying this defined " . profileType . " profile to replace the current one: " . customProfileFile.FileFullPath)
    			customProfileFile.Copy(currentProfileFile.FileFullPath,1)
    		} Else {	; load default profile
    			RLLog.Info("Module - Copying the default " . profileType . " profile to replace the current one: " . defaultProfileFile.FileFullPath)
    			defaultProfileFile.Copy(currentProfileFile.FileFullPath,1)
    		}
    	} Else
    		RLLog.Info("Module - Current " . profileType . " profile is already the correct one for this game, not touching it.")
    }
    
    ConnectWiimote(key) {
    	Global Timeout,emuPrimaryWindow,emuGameWindow,emuWiimoteWindow
    	If !emuWiimoteWindow.Exist()
    	{
    		MiscUtils.DetectHiddenWindows("OFF") ; this needs to be off otherwise WinMenuSelectItem doesn't work for some odd reason
    		emuPrimaryWindow.Activate()
    		emuPrimaryWindow.MenuSelectItem("Options","Controller Settings")
    		emuWiimoteWindow.Wait()
    		emuWiimoteWindow.WaitActive()
    	}
    	;emuWiimoteWindow.Activate() ; test if window needs to be active
    	If !emuWiimoteWindow.GetControl(key)
    		emuWiimoteWindow.CreateControl(key)
    	emuWiimoteWindow.GetControl(key).Click()
    	emuWiimoteWindow.GetControl("OK").Click()
    	emuGameWindow.Activate()
    }
    
    PairWiimote:
    	ConnectWiimote("Pair Up")
    Return
    
    RefreshWiimote:
    	ConnectWiimote("Refresh")
    Return
    
    HaltEmu:
    	If RefreshKey
    		XHotKeywrapper(RefreshKey,"RefreshWiimote","OFF")
    Return
    
    MultiGame:
    	; MultiGame doesn't work with Dolphin currently because Dolphin hides itself from Winspector Spy and cannot send any commands to the emulator through scripts.
    	If (fullscreen = "True")
    	{	KeyUtils.SetKeyDelay(50)
    		KeyUtils.Send("{Alt Down}{Enter Down}{Enter Up}{Alt Up}")	; go windowed to get the menubar
    	}
    	If bezelEnabled
    		emuGameWindow.ToggleMenu()	; put the menubar back
    	; emuPrimaryWindow.MenuSelectItem("File","Change Disc...")
    	emuPrimaryWindow.MessageUtils.PostMessage("0x111", "00288")	; Change Disc
    	OpenROM(emuOpenROMWindow.WinTitle.GetWindowTitle(), selectedRom)
    	emuPrimaryWindow.WaitActive()
    	If bezelEnabled
    		emuGameWindow.ToggleMenu()	; remove the menubar again
    	If (fullscreen = "True")
    		KeyUtils.Send("{Alt Down}{Enter Down}{Enter Up}{Alt Up}")	; restore fullscreen
    Return
    
    RestoreEmu:
    	If RefreshKey
    		XHotKeywrapper(RefreshKey,"RefreshWiimote","ON")
    Return
    
    CloseProcess:
    	breakLoops := 1
    	FadeOutStart()
    	If (enableVBALink = "true") {
    		Loop % SelectedNumberofPlayers
    		{	currentScreen := A_Index + 1
    			;VBA%currentScreen%Window.Activate()
    			VBA%currentScreen%Window.Close()
    			TimerUtils.Sleep(100,0)
    		}
    		dolphinINIBackup.Move(dolphinINI.FileFullPath)
    		vbaINIBackup.Move(vbaINI,1)
    	}
    	If networkSession {
    		If emuNetPlaySetupWindow.Exist()
    			emuNetPlaySetupWindow.Close()
    		If emuNetPlayWindow.Exist()
    			emuNetPlayWindow.Close()
    		If !emuGameWindow.Exist()	; if game never launched, close the main emu window
    			emuPrimaryWindow.Close()
    	}
    	If emuGameWindow.Exist()
    		emuGameWindow.Close() ; this needs to close the window the game is running in otherwise dolphin crashes on exit
    Return
    
    ; Unused messages for reference from Dolphin v4.0 build 6980 x64:
    ; emuPrimaryWindow.PostMessage("0x111", "0261")		; Toggle Fullscreen
    ; emuPrimaryWindow.PostMessage("0x111", "0258")		; Toggle Play/Pause
    ; emuPrimaryWindow.PostMessage("0x111", "0259")		; Stop
    ; emuPrimaryWindow.PostMessage("0x111", "0260")		; Reset
    ; emuPrimaryWindow.PostMessage("0x111", "00539")	; Show Toolbar
    ; emuPrimaryWindow.PostMessage("0x111", "00540")	; Show Statusbar
    ; emuPrimaryWindow.PostMessage("0x111", "05123")	; Refresh List
    ; emuPrimaryWindow.PostMessage("0x111", "0305")		; Change Disc
    ; emuPrimaryWindow.PostMessage("0x111", "00218")	; Load State Slot 1
    ; emuPrimaryWindow.PostMessage("0x111", "00227")	; Load State Slot 10
    ; emuPrimaryWindow.PostMessage("0x111", "00208")	; Save State Slot 1
    ; emuPrimaryWindow.PostMessage("0x111", "00217")	; Save State Slot 10
    ; emuPrimaryWindow.PostMessage("0x111", "00303")	; Start Netplay
    ; emuPrimaryWindow.PostMessage("0x111", "05000")	; Open
    
    ; Unused messages for reference from Dolphin v4.0.2 x86:
    ; emuPrimaryWindow.PostMessage("0x111", "00248")	; Toggle Fullscreen
    ; emuPrimaryWindow.PostMessage("0x111", "00245")	; Toggle Play/Pause
    ; emuPrimaryWindow.PostMessage("0x111", "00246")	; Stop
    ; emuPrimaryWindow.PostMessage("0x111", "00247")	; Reset
    ; emuPrimaryWindow.PostMessage("0x111", "00501")	; Show Toolbar
    ; emuPrimaryWindow.PostMessage("0x111", "00502")	; Show Statusbar
    ; emuPrimaryWindow.PostMessage("0x111", "00217")	; Load State Slot 1
    ; emuPrimaryWindow.PostMessage("0x111", "00226")	; Load State Slot 10
    ; emuPrimaryWindow.PostMessage("0x111", "00207")	; Save State Slot 1
    ; emuPrimaryWindow.PostMessage("0x111", "00216")	; Save State Slot 10
    ; emuPrimaryWindow.PostMessage("0x111", "00286")	; Start Netplay
    ; emuPrimaryWindow.PostMessage("0x111", "05000")	; Open
    ; emuPrimaryWindow.PostMessage("0x111", "05006")	; Exit
    isd file :

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <INISCHEMA>
    	<INIFILES>
    		<INIFILE name="%ModuleName%" required="false">
    			<INITYPE>Module</INITYPE>
    			<SECTIONS>
    				<SECTION name="Settings" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="Fullscreen" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Enables/Disables Fullscreen</DESCRIPTION>
    						</KEY>
    						<KEY name="UseCustomWiimoteProfiles" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Set to true if you want to use custom Wiimote profiles for Wii games</DESCRIPTION>
    						</KEY>
    						<KEY name="UseCustomGCPadProfiles" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Set to true if you want to use custom Gamecube Pad profiles for Gamecube games</DESCRIPTION>
    						</KEY>
    						<KEY name="HideMouse" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Hides mouse cursor in the emu options</DESCRIPTION>
    						</KEY>
    						<KEY name="RefreshKey" required="false" nullable="true">
    							<KEYTYPE>xHotkey</KEYTYPE>
    							<DESCRIPTION>Hotkey to "Refresh" Wiimotes, delete the key to disable it</DESCRIPTION>
    						</KEY>
    						<KEY name="Timeout" required="false" minLength = "1">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>Amount in seconds we should wait for the PairKey and Refresh key to timeout</DESCRIPTION>
    						</KEY>
    						<KEY name="Render_To_Main" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Default false for legacy support. If true, renders the game in the main Dolphin window. When false, dolphin will open a 2nd window and emulate the game to that.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="Controls" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="Control_Type_Port_1" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for all games in Port 1.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    						<KEY name="Control_Type_Port_2" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for all games in Port 2.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    						<KEY name="Control_Type_Port_3" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for all games in Port 3.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    						<KEY name="Control_Type_Port_4" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for all games in Port 4.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="Network" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="Enable_Network_Play" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>If true, when this game is launched, will give an option if you want to play Single or Multi-Player.</DESCRIPTION>
    						</KEY>
    						<KEY name="NetPlay_Nickname" required="false" nullable="false">
    							<KEYTYPE>String</KEYTYPE>
    							<DESCRIPTION>Sets the Nickname you will appear as in Multi-Player.</DESCRIPTION>
    						</KEY>
    						<KEY name="Default_Server_IP" required="false" nullable="true">
    							<KEYTYPE>String</KEYTYPE>
    							<DESCRIPTION>If you always connect to the same server as a client, put the IP address here. If no IP is entered on the GUI, this is the IP used.</DESCRIPTION>
    						</KEY>
    						<KEY name="Default_Server_Port" required="false" nullable="true" minLength="0" maxLength="65535">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>If you always connect to the same server as a client, put the Port here. Servers must make sure this port is forwarded through all firewalls.</DESCRIPTION>
    						</KEY>
    						<KEY name="Get_WAN_IP" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Will retrieve your WAN IP automatically, which is different than your LAN IP when behind a router. If you get a windows firewall prompt to allow RocketLauncher or Autohotkey to talk out, please allow it. You only really need this enabled if you are acting as a server and need to tell your clients your IP. Default is true.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="VBA Link" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="VBAExePath" required="false" nullable="false">
    							<KEYTYPE>FilePath</KEYTYPE>
    							<FULLROW>true</FULLROW>
    							<DESCRIPTION>Relative path to your VBA-M emulator executable.</DESCRIPTION>
    							<PATHTYPE>Relative</PATHTYPE>
    							<BASEPATH>%EmulatorPath%</BASEPATH>
    						</KEY>
    						<KEY name="VBABiosPath" required="false" nullable="false">
    							<KEYTYPE>FilePath</KEYTYPE>
    							<FULLROW>true</FULLROW>
    							<DESCRIPTION>Relative path to your VBA Bios file.</DESCRIPTION>
    							<PATHTYPE>Relative</PATHTYPE>
    							<BASEPATH>%EmulatorPath%</BASEPATH>
    						</KEY>
    						<KEY name="VBADelay" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>Increase this delay if your Game Boy Advanced Windows appear frozen after load. Default value is 500 milliseconds.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="%RomName%" required="false">
    					<SECTIONTYPE>Rom</SECTIONTYPE>
    					<KEYS>
    						<KEY name="profile" required="false" nullable="true">
    							<KEYTYPE>String</KEYTYPE>
    							<DESCRIPTION>Only add a game to this ini if it needs a profile that is not your default. Profile name is the ini file, without the .ini extension</DESCRIPTION>
    						</KEY>
    						<KEY name="enableVBALink" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Enables Nintendo Game Boy Advance Link with Gamecube.</DESCRIPTION>
    						</KEY>
    						<KEY name="Control_Type_Port_1" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for this game in Port 1.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    						<KEY name="Control_Type_Port_2" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for this game in Port 2.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    						<KEY name="Control_Type_Port_3" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for this game in Port 3.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    						<KEY name="Control_Type_Port_4" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>This setting allows you to force the control type to be used for this game in Port 4.</DESCRIPTION>
    							<VALUES>
    								<VALUE description="None">0</VALUE>
    								<VALUE description="Standard Controller">6</VALUE>
    								<VALUE description="GameCube Adapter for Wii U">12</VALUE>
    								<VALUE description="Steering Wheel">8</VALUE>
    								<VALUE description="Dance Mat">9</VALUE>
    								<VALUE description="DK Bongos">10</VALUE>
    								<VALUE description="GBA">5</VALUE>
    								<VALUE description="Keyboard">7</VALUE>
    								<VALUE description="AM Baseboard">11</VALUE>
    							</VALUES>
    						</KEY>
    					</KEYS>
    				</SECTION>
    			</SECTIONS>
    		</INIFILE>
    	</INIFILES>
    </INISCHEMA>
    My old dolphin module (.AHK)

    Code:
    MEmu = Dolphin
    MEmuV =  v4.0 r6928
    MURL = https://dolphin-emu.org/
    MAuthor = djvj & bleasby
    MVersion = 2.1.2
    MCRC = ABBCC8CC
    iCRC = C6A0A085
    MID = 635038268884477733
    MSystem = "Nintendo Gamecube","Nintendo Wii","Nintendo WiiWare"
    ;----------------------------------------------------------------------------
    ; Notes:
    ; Be sure you are running at least Dolphin v4.0 or greater.
    ; If you get an error that you are missing a vcomp100.dll, install Visual C++ 2010: http://www.microsoft.com/download/en/details.aspx?id=14632
    ; Also make sure you are running latest directx: http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3
    ; Dolphin will sometimes crash when connnecting a Wiimote, then going back to the game. After all Wiimotes are connected that you want to use, it shouldn't have anymore issues.
    ; Convert all your games to ciso using Wii Backup Manager to save alot of space by stripping everything but the game partition. http://www.wiibackupmanager.tk/
    ; If you want to keep your Dolphin.ini in the emu folder, create a "portable.txt" file in MyDocuments\Dolphin Emulator\
    ;
    ; Bezels:
    ; If the game does not fit the window, you can try setting stretch to window manually in dolphin.
    ;
    ; Setting up custom Wiimote or GCPad profiles:
    ; First set UseCustomWiimoteProfiles or UseCustomGCpadProfiles to true in RocketLauncherUI for this module
    ; Launch Dolphin manually and goto Options->(Wiimote or Gamecube Pad) Settings and configure all your controls how you want your default setup to look like. This will be used for all games that you don't set a custom profile for. No need to save any profiles.
    ; All your controls are stored in WiimoteNew.ini or GCPadNew.ini and get copied to a _Default_(WiimoteNew or GCPadNew).ini on first launch. This ini contains all the controls for all 4 controllers.
    ; Do not confuse this with Dolphin's built-in profiles as those only contain info for only one controller. The (WiimoteNew or GCPadNew).ini and all the profiles RocketLauncher uses contain info for all controllers in one file.
    ; This new profile now called _Default_(WiimoteNew or GCPadNew).ini will be found in Dolphins settings folder: \Config\Profiles\(Wiimote or GCPad) (RL)\Default.ini
    ; For each game or custom control sets you want to use, edit the controls for all the controllers to work for that game and exit Dolphin. Now copy the (WiimoteNew or GCPadNew).ini to the "(Wiimote or GCPad) (RL)" folder and name it whatever you like.
    ; In RocketLauncherUI's module settings for Dolphin, Click the Rom Settings tab and add each game from your xml you want to use a this custom profile for.
    ; Now for all those games you added, make sure the Profile setting it set to the custom profile you want to load when that game is launched.
    ; Any game not added will use the "_Default_(WiimoteNew or GCPadNew).ini" profile RocketLauncher makes on first launch.
    ;
    ; To Pair a Wiimote:
    ; Highly suggest getting a Mayflash DolphinBar as it makes pairing and using wiimotes as easy as with a real Wii: http://www.amazon.com/TOTALCONSOLE-W010-Wireless-Sensor-DolphinBar/dp/B00HZWEB74
    ; If using the DolphinBar, just make sure Dolphin is set to continuously scan for wiimotes and set controls to use real wiimotes for as many wiimotes you have.
    ; You do not need to pair the wiimote with the PC first as you would with a standard blueooth and wiimote.
    ; DolphinBar should be on Mode 4. Wiimotes don't get paired until after Dolphin is running, not before!!
    ; After Dolphin is running, press 1+2 on each wiimote and after a few moments, the wiimote will pair and vibrate and one led will lock solid. Do this for each wiimote. That's it!
    ;
    ; If using a standard LED Bar:
    ; Make sure all your wiimotes have already been paired with your PC's bluetooth adapter
    ; All 4 leds on the wiimote should be flashing
    ; Press your Refresh key (set in RocketLauncherUI for this module) or enable continuous scanning in Dolphin
    ; Press 1 + 2 on the wiimote and one led should go solid designating the player number
    ;
    ; Netplay:
    ; If you're using a GameCube game with saves, synchronize your memory cards, Wii NAND needs to be synchronized, and some settings (such as CPU Clock Override) must be either synchronized or disabled.
    ; Because netplay may require different settings than you would normally use with local play, the module will look for any inis in your Dolphin user config folder ending with "_netplay" and use those configs instead of your normal ones.
    ; So for example, after you tweak all your dolphin settings for netplay, copy your dolphin.ini to dolphin_netplay.ini in the same folder.
    ; When the module launches and you choose multiplayer from RocketLauncher on screen menu, the module will backup dolphin.ini and copy dolphin_network.ini to dolphin.IniDelete
    ; On exit, the module will restore your backed up dolphin.ini and any other ini files in this folder (and all subfolders) that had the "_netplay" in the name.
    ; Guide on tweaking performance for netplay: https://dolphin-emu.org/docs/guides/netplay-guide/
    ; Another guide: https://docs.google.com/document/d/1CIkBAGcf_-kBUa4urn4KUj2U4UA6y_2a7stXJz85yiE/
    ;
    ; Linking a GameCube game with VBA-M
    ; Game tested: Legend of Zelda, The - Four Swords Adventures (USA)
    ; VBA-M emulator tested: visualboyadvance-m2.0.0Beta1
    ; dolphin emulator tested: dolphin-master-4.0-6725-x64
    ; On RocketLaunchUI, dolphin, GameCube Module settings set your VBA-M executable and VBA Bios file path on the VBALink tab.
    ; On RocketLaunchUI, dolphin, GameCube, Game name Module Settings enable VBA Link
    ; If your Game Boy Advanced Windows appear frozen after the RocketLauncher fade screen loads, increase the value of the VBADelay on GameCube, VBALink settings. Default value is 500 milliseconds.
    ; A game with one VBA window will use a two screens bezel file, Bezel [2S].png, the first screen for the GameCube game and the second one for the VBA screen. Two VBAs = Bezel [3S].png, again first screen for the GameCube game and second and third for the VBA screens, and so on.
    ;----------------------------------------------------------------------------
    StartModule()
    BezelGui()
    FadeInStart()
    	
    settingsFile := modulePath . "\" . moduleName . ".ini"
    Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
    UseCustomWiimoteProfiles := IniReadCheck(settingsFile, "Settings", "UseCustomWiimoteProfiles","false",,1)	; set to true if you want to setup custom Wiimote profiles for games
    UseCustomGCPadProfiles := IniReadCheck(settingsFile, "Settings", "UseCustomGCPadProfiles","false",,1)	; set to true if you want to setup custom GCPad profiles for games
    HideMouse := IniReadCheck(settingsFile, "Settings", "HideMouse","true",,1)					; hides mouse cursor in the emu options
    RefreshKey := IniReadCheck(settingsFile, "Settings", "RefreshKey","",,1)						; hotkey to "Refresh" Wiimotes, delete the key to disable it
    Timeout := IniReadCheck(settingsFile, "Settings", "Timeout","5",,1)							; amount in seconds we should wait for the above hotkeys to timeout
    renderToMain := IniReadCheck(settingsFile, "Settings", "Render_To_Main","false",,1)
    enableNetworkPlay := IniReadCheck(settingsFile, "Network", "Enable_Network_Play","false",,1)
    
    ;options to Gamecube and VBA Link
    enableVBALink := IniReadCheck(settingsFile, romName, "enableVBALink", "false",,1)
    VBAExePath := IniReadCheck(settingsFile, "VBA Link", "VBAExePath", ,,1)
    VBABiosPath := IniReadCheck(settingsFile, "VBA Link", "VBABiosPath", ,,1)
    VBADelay := IniReadCheck(settingsFile, "VBA Link", "VBADelay", 500,,1)  
    
    ; Determine where Dolphin is storing its ini, this will act as the base folder for settings and profiles related to this emu
    dolphinININewPath := A_MyDocuments . "\Dolphin Emulator\Config\Dolphin.ini"	; location of Dolphin.ini for v4.0+
    dolphinINIOldPath := emuPath . "\User\Config\Dolphin.ini"	; location of Dolphin.ini prior to v4.0
    portableTxtFile := emuPath . "\portable.txt"
    If (!FileExist(portableTxtFile) && FileExist(dolphinININewPath))
    {	dolphinBasePath := A_MyDocuments . "\Dolphin Emulator"
    	Log("Module - Dolphin's base settings folder is not portable and found in: " . dolphinBasePath)
    } Else If (FileExist(portableTxtFile) || FileExist(dolphinINIOldPath))
    {	dolphinBasePath := emuPath . "\User"
    	Log("Module - Dolphin's base settings folder is portable and found in: " . dolphinBasePath)
    } Else
    	ScriptError("Could not find your Dolphin.ini in either of these folders. Please run Dolphin manually first to create it.`n" . dolphinINIOldPath . "`n" . dolphinININewPath)
    dolphinINI := dolphinBasePath . "\Config\Dolphin.ini"
    
    If (enableVBALink = "true"){
    	VBAExePath := AbsoluteFromRelative(EmuPath, VBAExePath)
    	VBABiosPath := AbsoluteFromRelative(EmuPath, VBABiosPath)
    	SplitPath, VBAExePath, VBAFile, VBAPath
    	SelectedNumberofPlayers :=NumberOfPlayersSelectionMenu(4)
    	If (SelectedNumberofPlayers=1){
    		enableVBALink = "false"
    	} Else {
    		; backup original ini
    		FileCopy, %dolphinINI%, %dolphinINIBackup% 
    		dolphinINIBackup := dolphinBasePath . "\Config\Dolphin_Backup.ini" 
    		Loop, % SelectedNumberofPlayers
    		{ 	tempCount := a_index-1
    			IniWrite, 5, %dolphinINI%, Controls, PadType%tempCount%
    		}
    	}
    }
    
    ; Win titles used throughout module
    dolphinTitle := "Dolphin ahk_class wxWindowNR"
    dolphinGameTitle := If renderToMain = "true" ? dolphinTitle : "FPS ahk_class wxWindowNR"
    dolphinScanningTitle := "Scanning for ISOs ahk_class #32770"
    dolphinNetPlaySetupTitle := "Dolphin NetPlay Setup ahk_class wxWindowNR"
    dolphinNetPlayTitle := "Dolphin NetPlay ahk_class wxWindowNR"
    dolphinErrorTitle1 := "Warning ahk_class #32770"
    dolphinErrorTitle2 := "Error ahk_class #32770"
    
    If (enableVBALink = "true")
    	BezelStart(SelectedNumberofPlayers+1)	
    Else
    	BezelStart()
    
    If (enableVBALink = "true" and !bezelPath)   ; disabling fullscreen if VBA Link mode
    	Fullscreen := "false"
    
    If (renderToMain = "true" && (enableVBALink = "true" || bezelEnabled = "true")) {   ; disabling toolbar and statusbar if bezels or vba link is used as it will show when rendering to the main window
    	IniWrite, False, %dolphinINI%, Interface, ShowToolbar
    	IniWrite, False, %dolphinINI%, Interface, ShowStatusbar
    }
    
    hideEmuObj := Object(dolphinScanningTitle,0,dolphinNetPlayTitle,0,dolphinNetPlaySetupTitle,0,dolphinErrorTitle1,0,dolphinErrorTitle2,0,dolphinTitle,0,dolphinGameTitle,1)	; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
    7z(romPath, romName, romExtension, 7zExtractPath)
    
    If romExtension in .zip,.7z,.rar
    	ScriptError(MEmu . " does not support compressed roms. Please enable 7z support in RocketLauncherUI to use this module/emu.")
    
    If RefreshKey {
    	RefreshKey := xHotKeyVarEdit(RefreshKey,"RefreshKey","~","Add")
    	xHotKeywrapper(RefreshKey,"RefreshWiimote")
    }
    
    Fullscreen := (If ( Fullscreen = "true" ) ? ("True") : ("False"))
    HideMouse := (If ( HideMouse = "true" ) ? ("True") : ("False"))
    
    networkSession :=
    If (enableNetworkPlay = "true") {
    	Log("Module - Network Multi-Player is an available option for " . dbName,4)
    	IniRead, dolphinNickname, %dolphinINI%, NetPlay, Nickname
    	IniRead, dolphinAddress, %dolphinINI%, NetPlay, Address
    	IniRead, dolphinCPort, %dolphinINI%, NetPlay, ConnectPort
    	IniRead, dolphinHPort, %dolphinINI%, NetPlay, HostPort
    	netplayNickname := IniReadCheck(settingsFile, "Network", "NetPlay_Nickname","Player",,1)
    	getWANIP := IniReadCheck(settingsFile, "Network", "Get_WAN_IP","false",,1)
    	networkPlayers := 4	; Max amount of networkable players
    
    	If (getWANIP = "true")
    		myPublicIP := GetPublicIP()
    
    	defaultServerIP := IniReadCheck(settingsFile, "Network", "Default_Server_IP", myPublicIP,,1)
    	defaultServerPort := IniReadCheck(settingsFile, "Network", "Default_Server_Port",,,1)
    	lastIP := IniReadCheck(settingsFile, "Network", "Last_IP", defaultServerIP,,1)	; does not need to be on the ISD
    	lastPort := IniReadCheck(settingsFile, "Network", "Last_Port", defaultServerPort,,1)	; does not need to be on the ISD
    
    	If (netplayNickname != dolphinNickname)
    		IniWrite, %netplayNickname%, %dolphinINI%, NetPlay, Nickname
    
    	MultiplayerMenu(lastIP,lastPort,networkType,networkPlayers,0)
    	If networkSession {
    		Log("Module - Using a Network for " . dbName,4)
    
    		restoreIniObject := Object()	; initialize object
    		currentObj :=
    		dolphinConfigPath := dolphinBasePath . "\Config"
    		Loop, %dolphinConfigPath%\*.ini
    		{
    			If InStr(A_LoopFileName, "_netplay.ini") {
    				Log("Module - Found a network specific ini: " . A_LoopFileFullPath,4)
    				networkIni := A_LoopFileFullPath
    				originalIni := RegExReplace(A_LoopFileFullPath, "_netplay","","",-1,15)
    				backupIni := originalIni . ".backup"
    				FileMove, %originalIni%, %backupIni%,1	; backup original ini
    				FileCopy, %networkIni%, %originalIni%	; copy network ini to original name
    				currentObj++
    				restoreIniObject[currentObj,"originalIni"] := originalIni
    				restoreIniObject[currentObj,"backupIni"] := backupIni
    			}
    		}
    		
    		IniWrite, %lastPort%, %settingsFile%, Network, Last_Port
    
    		If (networkType = "client") {
    			IniWrite, %lastIP%, %settingsFile%, Network, Last_IP	; Save last used IP and Port for quicker launching next time
    			IniWrite, %lastIP%, %dolphinINI%, NetPlay, Address
    			IniWrite, %lastPort%, %dolphinINI%, NetPlay, ConnectPort
    		} Else	; server
    			IniWrite, %lastPort%, %dolphinINI%, NetPlay, HostPort
    
    		IniWrite, %romPath%, %dolphinINI%, General, ISOPath0	; makes browser only show the one game we want to play
    		IniWrite, 1, %dolphinINI%, General, ISOPaths	; makes browser only show the first path set
    		IniWrite, %romPath%\%romName%%romExtension%, %dolphinINI%, General, LastFilename
    		Log("Module - Starting a network session using the IP """ . networkIP . """ and PORT """ . networkPort . """",4)
    	} Else
    		Log("Module - User chose Single Player mode for this session",4)
    }
    
    gcSerialPort = 5	; this puts the BBA network adapter into the serial port. If previous launch was Triforce, AM-Baseboard would be set here and would result in Unknown DVD command errors
    
    iniLookup =
    ( ltrim c
    	Display, Fullscreen, %Fullscreen%
    	Display, RenderToMain, %renderToMain%
    	Interface, HideCursor, %HideMouse%
    	Interface, ConfirmStop, False
    	Interface, UsePanicHandlers, False
    	Core, SerialPort1, %gcSerialPort%
    )
    Loop, Parse, iniLookup, `n
    {
    	StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
    	IniRead, tempVar, %dolphinINI%, %split1%, %split2%
    	If ( tempVar != split3 )
    		IniWrite, % split3, %dolphinINI%, %split1%, %split2%
    }
    
     ; Load default or user specified Wiimote or GCPad profiles for launching
    If (InStr(systemName, "wii") && UseCustomWiimoteProfiles = "true")
    	ChangeDolphinProfile("Wiimote")
    If (UseCustomGCPadProfiles = "true")
    	ChangeDolphinProfile("GCPad")
    
    HideEmuStart()
    
    If networkSession
    	Run(executable, emuPath)	; must be launched w/o /b for browser list to work
    Else
    	Run(executable . " /b /e """ . romPath . "\" . romName . romExtension . """", emuPath)	; /b = batch (exit dolphin with emu), /e = load file
    
    Prev_TitleMatchMode := A_TitleMatchMode
    SetTitleMatchMode RegEx
    If (renderToMain = "false") {
    	WinWait("(Dolphin.*\|)")
    	WinGet, dolphinID, ID
    	dolphinTitle = ahk_ID %dolphinID%
    	WinWaitActive(dolphinTitle)
    } Else {
    	WinWait(dolphinTitle)
    	WinGet, dolphinID, ID
    }
    SetTitleMatchMode %Prev_TitleMatchMode%        
    
    If networkSession {
    	Log("Module - Opening NetPlay window")
    
    	; Get the 6-letter ID of the game
    	If (romExtension = ".wbfs")
    		gameID := RLObject.readFileData(romPath . "\" . romName . romExtension,512,6,"UTF8")
    	Else If (romExtension = ".iso")
    		gameID := RLObject.readFileData(romPath . "\" . romName . romExtension,0,6,"UTF8")
    	Else If (romExtension = ".ciso")
    		gameID := RLObject.readFileData(romPath . "\" . romName . romExtension,32768,6,"UTF8")
    
    	; Must wait for Dolphin to finish scanning isos before netplay window can be opened so the game list is populated. Opening too early and the game list will be blank or partially filled.
    	If WinExist(dolphinScanningTitle)
    		WinWaitClose(dolphinScanningTitle,,60)	; wait 60 seconds max. hopefully doesn't take longer than that to scan your isos...
    	Else {
    		WinWait, %dolphinScanningTitle%,,5	; wait 5 seconds max to appear
    		If ErrorLevel
    			Log("Module - Timed out waiting for ""Scanning for ISOs"" window to appear. It may have finished before it could be detected, moving on.")
    		Else
    			Log("Module - ""Scanning for ISOs"" window found.")
    	}
    	WinMenuSelectItem, %dolphinTitle%,, Tools, Start NetPlay
    	matchMode := A_TitleMatchMode	; store for restoration later
    	SetTitleMatchMode, 3	; changes match mode so title must match exactly
    	WinWait(dolphinNetPlaySetupTitle)
    	WinWaitActive(dolphinNetPlaySetupTitle)
    	If (networkType = "client") {
    		Log("Module - Clicking Connect button")
    		While !breakLoops {
    			ControlClick, Button1, %dolphinNetPlaySetupTitle%	; click connect button
    			Log("Module - Waiting for Host to start game")
    			WinWait, %dolphinNetPlayTitle%,,2,%dolphinNetPlaySetupTitle%	; waits 2 seconds
    			If ErrorLevel {	; 1 if timed out, now check for any error windows and close them
    				Loop, 2		; loop through both error windows
    					If WinExist(dolphinErrorTitle%A_Index%)	; error windows that can appear when host is not running yet
    						ControlClick, Button1, % dolphinErrorTitle%A_Index%	; click ok to clear error
    				Log("Module - Host not running yet, trying again")
    				Continue
    			} Else {	; window exists
    				Log("Module - Connected to host, waiting for host to start game")
    				Break
    			}
    		}
    	} Else {	; server
    		ControlGet, List, List,, ListBox1, %dolphinNetPlaySetupTitle%	; get list of selectable games
    		Loop, Parse, List, `n
    			If InStr(A_Loopfield, gameID) {
    				idLocation := A_Index	; record the location in the ListBox of our game
    				Log("Module - Game list shows """ . A_LoopField . """ as item " . A_Index)	; logging each items in ListBox
    			}
    		If !idLocation {	; game was not found in list
    			ScriptError("Could not find your """ . romName . """ in the game selection window for netplay. Possibly the gameID could not be found in your game. Please check your the RocketLauncher log and report this error.",,,,,1)
    			Gosub, CloseProcess
    			FadeInExit()
    			Goto, CloseDolphin
    		}
    		Control, Choose, %idLocation%, ListBox1, %dolphinNetPlaySetupTitle%	; selects our game in the ListBox
    		Log("Module - Clicking Host button")
    		ControlClick, Button2, %dolphinNetPlaySetupTitle%	; click host button
    		WinWait(dolphinNetPlayTitle,,,dolphinNetPlaySetupTitle)	; this window should now appear when hosted correctly
    		Log("Module - Waiting for " . networkPlayers . " players until the game is started")
    		While !breakLoops {
    			ControlGet, List, List,, ListBox1, %dolphinNetPlayTitle%
    			If InStr(List,"[" . networkPlayers . "]") {
    				Log("Module - All players have joined, starting game")
    				Break
    			}
    			Sleep, 100
    		}
    		ControlClick, Button8, %dolphinNetPlayTitle%,,,,,dolphinNetPlaySetupTitle	; click start button
    	}
    	SetTitleMatchMode, %matchMode%	; restore old match mode
    }
    
    
    If (enableVBALink = "true") {
    	Screen1ID := dolphinID
    	vbaINI := CheckFile(VBAPath . "\vbam.ini")
    	vbaINIBackup := VBAPath . "\vbam_Backup.ini"
    	FileCopy, %vbaINI%, %vbaINIBackup% 
    	;removing fullscreen from VBA-M
    	IniWrite, 0, %vbaINI%, preferences, fullScreen
    	;setting other VBA-M ini options
    	StringReplace, VBABiosPathDoubleSlash,VBABiosPath, \, \\, all 
    	IniWrite, 0, %vbaINI%, preferences, pauseWhenInactive
    	IniWrite, %VBABiosPathDoubleSlash%, %vbaINI%, GBA, BiosFile
    	IniWrite, 1, %vbaINI%, GBA, LinkAuto
    	IniWrite, 127.0.0.1, %vbaINI%, GBA, LinkHost
    	IniWrite, 3, %vbaINI%, GBA, LinkType
    	IniWrite, %SelectedNumberofPlayers%, %vbaINI%, preferences, LinkNumPlayers
    	IniWrite, 1, %vbaINI%, preferences, useBiosGBA
    	IniWrite, 1, %vbaINI%, Display, Stretch
    	IniWrite, 1, %vbaINI%, Display, Scale
    	
    	;running VBA-M
    	Loop, %SelectedNumberofPlayers%
    	{	currentScreen := a_index + 1
    		Run(VBAFile . " " . """" . VBABiosPath . """",VBAPath,, Screen%currentScreen%PID)
    		WinWait("ahk_pid " . Screen%currentScreen%PID)
    		sleep, %VBADelay%
    		bezelScreen%currentScreen%H := bezelScreen%currentScreen%H+24 ; to hide emu bottom bar
    	}
    	;waiting for VBA-M windows bios loading
    	timeout := A_TickCount
    	Loop
    	{	WinGet, id, list, gba_bios - VisualBoyAdvance-M
    		If (id=SelectedNumberofPlayers){
    			Loop, %id%
    			{	currentScreen := a_index + 1
    				Screen%currentScreen%ID := id%A_Index%
    			}
    			Break
    		}
    		If (timeout<A_TickCount-10000)
    			Break
    		Sleep, 100
    	}
    	;Resizing Windows to fill screen if no bezel file is found
    	If !(bezelPath) {
    		Loop, % (SelectedNumberofPlayers+1)
    		{	If (a_index=1){
    				X1 := 0 , Y1 := 0 ,	W1 := A_ScreenWidth//2 , H1 := A_ScreenHeight
    			} Else {
    				X%a_index% := A_ScreenWidth//2 , Y%a_index% := (a_index-2)*(A_ScreenHeight//SelectedNumberofPlayers) ,	W%a_index% := A_ScreenWidth//2 , H%a_index% := (A_ScreenHeight//SelectedNumberofPlayers)
    			}
    			WinSet, Style, -0xC00000, % "ahk_id " . Screen%A_Index%ID
    			ToggleMenu(Screen%A_Index%ID)
    			WinSet, Style, -0xC40000, % "ahk_id " . Screen%A_Index%ID
    			WinMove,  % "ahk_id " . Screen%A_Index%ID, , % X%A_Index%, % Y%A_Index%, % W%A_Index%, % H%A_Index%
    			;check If window moved
    			timeout := A_TickCount
    			Loop
    			{	WinGetPos, X, Y, W, H, % "ahk_id " . Screen%A_Index%ID
    				If (X=X%A_Index%) and (Y=Y%A_Index%) and (W=W%A_Index%) and (H=H%A_Index%)
    					Break
    				If (timeout<A_TickCount-4000)
    					Break
    				Sleep, 50
    				WinMove, % "ahk_id " . Screen%A_Index%ID, , % X%A_Index%, % Y%A_Index%, % W%A_Index%, % H%A_Index%
    			}
    		}
    		Sleep, 50
    	}	
    }
    
    BezelDraw()
    WinActivate, %dolphinGameTitle%
    HideEmuEnd()
    FadeInExit()
    Process("WaitClose", executable)
    
    CloseDolphin:
    If (networkSession && restoreIniObject.MaxIndex()) {
    	Loop % restoreIniObject.MaxIndex()
    	{	Log("Module - Restoring the original ini: " . restoreIniObject[A_Index,"backupIni"] . " to " . restoreIniObject[A_Index,"originalIni"],4)
    		FileMove, % restoreIniObject[A_Index,"backupIni"], % restoreIniObject[A_Index,"originalIni"],1		; restore all backed up inis
    	}
    }
    
    7zCleanUp()
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    
    ChangeDolphinProfile(profileType) {
    	Global settingsFile,romName,dolphinBasePath
    	profile := IniReadCheck(settingsFile, romName, "profile", "Default",,1)
    	RLProfilePath := dolphinBasePath . "\Config\Profiles\" . profileType . " (RL)"
    	currentProfile := dolphinBasePath . "\Config\" . profileType . "New.ini"
    	defaultProfile := RLProfilePath . "\_Default_" . profileType . "New.ini"
    	customProfile := RLProfilePath . "\" . profile . ".ini"
    	If !FileExist(currentProfile) {
    		Log("Module - You have custom " . profileType . " profiles enabled, but could not locate " . currentProfile . ". This file stores all your current controls in Dolphin. Please setup your controls in Dolphin first.",2)
    		Return
    	}
    	If !FileExist(defaultProfile) {
    		Log("Module - Creating initial Default " . profileType . " profile by copying " . profileType . ".ini to " . defaultProfile, 2)
    		FileCreateDir % RLProfilePath
    		FileCopy, %currentProfile%, %defaultProfile%	; create the initial default profile on first launch
    	}
    	If (profile != "Default" && !FileExist(customProfile))
    		Log("Module - " . romName . " is set to load a custom " . profileType . " profile`, but it could not be found: " . customProfile,2)
    	FileRead, cProfile, %currentProfile%	; read current profile into memory
    	FileRead, nProfile, %customProfile%	; read custom profile into memory
    	If ( cProfile != nProfile ) {	; if both profiles do not match exactly
    		Log("Module - Current " . profileType . " profile does not match the one this game should use.")
    		If (profile != "Default") {	; if user set to use a custom profile
    			Log("Module - Copying this defined " . profileType . " profile to replace the current one: " . customProfile)
    			FileCopy, %customProfile%, %currentProfile%, 1
    		} Else {	; load default profile
    			Log("Module - Copying the default " . profileType . " profile to replace the current one: " . defaultProfile)
    			FileCopy, %defaultProfile%, %currentProfile%, 1
    		}
    	} Else
    		Log("Module - Current " . profileType . " profile is already the correct one for this game, not touching it.")
    }
    
    ConnectWiimote(key) {
    	Global Timeout
    	wiimoteClass := "Dolphin Controller Configuration ahk_class #32770"
    	IfWinNotExist, %wiimoteClass%
    	{
    		DetectHiddenWindows, OFF ; this needs to be off otherwise WinMenuSelectItem doesn't work for some odd reason
    		WinActivate, Dolphin ahk_class wxWindowNR,,,FPS
    		WinMenuSelectItem, ahk_class wxWindowNR,, Options, Controller Settings,,,,,,FPS
    		WinWait(wiimoteClass)
    		WinWaitActive(wiimoteClass)
    	}
    	;WinActivate, %wiimoteClass% ; test if window needs to be active
    	ControlClick, %key%, %wiimoteClass%
    	ControlClick, OK, %wiimoteClass%
    	; WinActivate, FPS ahk_class wxWindowClassNR ; for older dolphins
    	WinActivate, %dolphinGameTitle%
    }
    
    PairWiimote:
    	ConnectWiimote("Pair Up")
    Return
    
    RefreshWiimote:
    	ConnectWiimote("Refresh")
    Return
    
    CloseProcess:
    	breakLoops := 1
    	FadeOutStart()
    	If (enableVBALink = "true"){
    		Loop, %SelectedNumberofPlayers%
    		{	currentScreen := a_index + 1
    			;WinActivate, % "ahk_pid " . Screen%currentScreen%PID
    			WinClose("ahk_id " . Screen%currentScreen%ID)
    			sleep, 100
    		}
    		FileMove, %dolphinINIBackup%, %dolphinINI% 
    		FileMove, %vbaINIBackup%, %vbaINI%,1 
    	}
    	If networkSession {
    		If WinExist(dolphinNetPlaySetupTitle)
    			WinClose(dolphinNetPlaySetupTitle)
    		If WinExist(dolphinNetPlayTitle)
    			WinClose(dolphinNetPlayTitle)
    		If !WinExist(dolphinGameTitle)	; if game never launched, close the main emu window
    			WinClose(dolphinTitle)
    	}
    	If WinExist(dolphinGameTitle)
    		WinClose(dolphinGameTitle) ; this needs to close the window the game is running in otherwise dolphin crashes on exit
    Return
    Here my old dolphin (.ISD)

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <INISCHEMA>
    	<INIFILES>
    		<INIFILE name="%ModuleName%" required="false">
    			<INITYPE>Module</INITYPE>
    			<SECTIONS>
    				<SECTION name="Settings" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="Fullscreen" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Enables/Disables Fullscreen</DESCRIPTION>
    						</KEY>
    						<KEY name="UseCustomWiimoteProfiles" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Set to true if you want to use custom Wiimote profiles for Wii games</DESCRIPTION>
    						</KEY>
    						<KEY name="UseCustomGCPadProfiles" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Set to true if you want to use custom Gamecube Pad profiles for Gamecube games</DESCRIPTION>
    						</KEY>
    						<KEY name="HideMouse" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Hides mouse cursor in the emu options</DESCRIPTION>
    						</KEY>
    						<KEY name="RefreshKey" required="false" nullable="true">
    							<KEYTYPE>xHotkey</KEYTYPE>
    							<DESCRIPTION>Hotkey to "Refresh" Wiimotes, delete the key to disable it</DESCRIPTION>
    						</KEY>
    						<KEY name="Timeout" required="false" minLength = "1">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>Amount in seconds we should wait for the PairKey and Refresh key to timeout</DESCRIPTION>
    						</KEY>
    						<KEY name="Render_To_Main" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Default false for legacy support. If true, renders the game in the main Dolphin window. When false, dolphin will open a 2nd window and emulate the game to that.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="Network" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="Enable_Network_Play" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>If true, when this game is launched, will give an option if you want to play Single or Multi-Player.</DESCRIPTION>
    						</KEY>
    						<KEY name="NetPlay_Nickname" required="false" nullable="false">
    							<KEYTYPE>String</KEYTYPE>
    							<DESCRIPTION>Sets the Nickname you will appear as in Multi-Player.</DESCRIPTION>
    						</KEY>
    						<KEY name="Default_Server_IP" required="false" nullable="true">
    							<KEYTYPE>String</KEYTYPE>
    							<DESCRIPTION>If you always connect to the same server as a client, put the IP address here. If no IP is entered on the GUI, this is the IP used.</DESCRIPTION>
    						</KEY>
    						<KEY name="Default_Server_Port" required="false" nullable="true" minLength="0" maxLength="65535">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>If you always connect to the same server as a client, put the Port here. Servers must make sure this port is forwarded through all firewalls.</DESCRIPTION>
    						</KEY>
    						<KEY name="Get_WAN_IP" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Will retrieve your WAN IP automatically, which is different than your LAN IP when behind a router. If you get a windows firewall prompt to allow HyperLaunch or Autohotkey to talk out, please allow it. You only really need this enabled if you are acting as a server and need to tell your clients your IP. Default is true.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="VBA Link" required="false">
    					<SECTIONTYPE>Global</SECTIONTYPE>
    					<KEYS>
    						<KEY name="VBAExePath" required="false" nullable="false">
    							<KEYTYPE>FilePath</KEYTYPE>
    							<FULLROW>true</FULLROW>
    							<DESCRIPTION>Relative path to your VBA-M emulator executable.</DESCRIPTION>
    							<PATHTYPE>Relative</PATHTYPE>
    							<BASEPATH>%EmulatorPath%</BASEPATH>
    						</KEY>
    						<KEY name="VBABiosPath" required="false" nullable="false">
    							<KEYTYPE>FilePath</KEYTYPE>
    							<FULLROW>true</FULLROW>
    							<DESCRIPTION>Relative path to your VBA Bios file.</DESCRIPTION>
    							<PATHTYPE>Relative</PATHTYPE>
    							<BASEPATH>%EmulatorPath%</BASEPATH>
    						</KEY>
    						<KEY name="VBADelay" required="false" nullable="false">
    							<KEYTYPE>Integer</KEYTYPE>
    							<DESCRIPTION>Increase this delay if your Game Boy Advanced Windows appear frozen after load. Default value is 500 milliseconds.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    				<SECTION name="%RomName%" required="false">
    					<SECTIONTYPE>Rom</SECTIONTYPE>
    					<KEYS>
    						<KEY name="profile" required="false" nullable="true">
    							<KEYTYPE>String</KEYTYPE>
    							<DESCRIPTION>Only add a game to this ini if it needs a profile that is not your default. Profile name is the ini file, without the .ini extension</DESCRIPTION>
    						</KEY>
    						<KEY name="enableVBALink" required="false" nullable="false">
    							<KEYTYPE>Boolean</KEYTYPE>
    							<DESCRIPTION>Enables Nintendo Game Boy Advance Link with Gamecube.</DESCRIPTION>
    						</KEY>
    					</KEYS>
    				</SECTION>
    			</SECTIONS>
    		</INIFILE>
    	</INIFILES>
    </INISCHEMA>
    Last edited by regalad ; 01-07-2019 at 12:38 PM.
     

  6. Collapse Details
    Re: Nintendo GameCube help 
    #6
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,032
    Force an update to RL by clicking the globe icon on the RocketLauncherUI -> Settings tab in RLUI.
     

  7. Collapse Details
    Re: Nintendo GameCube help 
    #7
    Junior Member
    MainSecondary
    Join Date
    Mar 2015
    Posts
    6
    Thanks for answer Agent47

    Quote Originally Posted by agent47 View Post
    Force an update to RL by clicking the globe icon on the RocketLauncherUI -> Settings tab in RLUI.
    Can it break something on my set ? I m working on it from 3 years
     

  8. Collapse Details
    Re: Nintendo GameCube help 
    #8
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,032
    It's unlikely but like any other software you should backup your current install before updating. The only thing that I know will break are custom modules if you're using them and didn't follow the steps on the wiki to ensure they don't get overwritten.
     

  9. Collapse Details
    Re: Nintendo GameCube help 
    #9
    Junior Member
    MainSecondary
    Join Date
    Mar 2015
    Posts
    6
    Quote Originally Posted by agent47 View Post
    It's unlikely but like any other software you should backup your current install before updating. The only thing that I know will break are custom modules if you're using them and didn't follow the steps on the wiki to ensure they don't get overwritten.
    Big thanks Agent47. it s working great now.
    Just another question if someone can help. Last time i have used dolphin emulator i was able to turn left and right on mario kart arcade with my keyboard input.
    but now it s not working anymore. All control are set the same as last time (wiimote emulated).
    Did someone know how to fix this ?
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •