Jump to content

Mayflash Dolphin Bar And Taito Type X (BLUETOOTH) Trouble


cowboy

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Did you run the first of the batch files? The bar should physically power down and the LED's should turn off. Wasn't this way before, but I think a newer firmware update did this

Yeah the batch files work fine. But what I meant was how can you boot up an emu with rlauncher and have it automatically switch off the bar and then switch it back on when I exit the game?

Link to comment
Share on other sites

 

That will work but you will have to edit the module whenever there is an update. You should really modify RocketLauncher's User Functions.ahk instead. Something like this, or you could just place the batch file code directly in there instead (I don't have access to the ftp so I don't know what's in the .bat files).

StartGlobalUserFeatures(){
	Global systemName
	Log("StartGlobalUserFeatures - Starting")
	if (systemName="Nintendo Wii") {
		Run C:\Users\Joe\Desktop\Hyperspin-HyperLaunch New\Launcher Scripts\Dolphinbar\Enable Dolphinbar.bat
		Sleep, 1500
	}
	Log("StartGlobalUserFeatures - Ending")
}

StopGlobalUserFeatures(){
        Global systemName
	Log("StopGlobalUserFeatures - Starting")
	if (systemName="Nintendo Wii") {
		Run C:\Users\Joe\Desktop\Hyperspin-HyperLaunch New\Launcher Scripts\Dolphinbar\Disable Dolphinbar.bat
		Sleep, 1500
	}
	Log("StopGlobalUserFeatures - Ending")
}

This doesn't work unfortunately

Link to comment
Share on other sites

 

That will work but you will have to edit the module whenever there is an update. You should really modify RocketLauncher's User Functions.ahk instead. Something like this, or you could just place the batch file code directly in there instead (I don't have access to the ftp so I don't know what's in the .bat files).

StartGlobalUserFeatures(){
	Global systemName
	Log("StartGlobalUserFeatures - Starting")
	if (systemName="Nintendo Wii") {
		Run C:\Users\Joe\Desktop\Hyperspin-HyperLaunch New\Launcher Scripts\Dolphinbar\Enable Dolphinbar.bat
		Sleep, 1500
	}
	Log("StartGlobalUserFeatures - Ending")
}

StopGlobalUserFeatures(){
        Global systemName
	Log("StopGlobalUserFeatures - Starting")
	if (systemName="Nintendo Wii") {
		Run C:\Users\Joe\Desktop\Hyperspin-HyperLaunch New\Launcher Scripts\Dolphinbar\Disable Dolphinbar.bat
		Sleep, 1500
	}
	Log("StopGlobalUserFeatures - Ending")
}

This works perfectly! Well almost, the one thing I don't like about this method of disabling the bar is that on launch it slows the fade screen a bit, you see the background layers with nothing else for a second then the loading bar and everything else appears. When exiting the game you see the black DOS window for a second also as the script is running. Maybe incorporating the code directly instead of using the .bat file would fix the issue? Contents of the .bat file are below. If you can incorporate it into the code and get back to us that would be AMAZING! Thank you!

devcon enable "USB\VID_057E&PID_0306&REV_0100"
devcon enable "USB\VID_057E&PID_0306"

devcon disable "USB\VID_057E&PID_0306&REV_0100"
devcon disable "USB\VID_057E&PID_0306"
Link to comment
Share on other sites

I know for sure that I can get rid of the console on the exit. A while back someone asked about turning on/off a controller on emu load/exit and I created functions for it using a usb flash drive as a test because I didn't have that model controller or something. Just need to find where I put that script and switch out the device id's.

 

Yes! Is it possible to get rid of the .bat file and run the code directly from the user functions script?  

Link to comment
Share on other sites

Got distracted for awhile but finished the script, just need to clean up the code a little bit. I have the .bat code in the script (no need for the .bat files anymore) and it's closing clean (no cmd window on exit) but there's still the slight delay issue between the background and the rest of the fade screen. I'm off to bed now, but in the morning I'll finish cleaning up the code and post it here for you to test.

 

Thank you! Looking forward to it. 

Link to comment
Share on other sites

Lol well duh, I know that :-p

 

It still doesn't work for me, the black command line box does flash up but the bar doesn't switch off or on

 

Did you move the devcon.exe file to the two directories specified in the read me? Have you tried running the .bat file directly? Just double click the one to disable the bar and it should turn off, start there so you at least know the .bat file itself is working for you outside of RL. 

Link to comment
Share on other sites

Did you move the devcon.exe file to the two directories specified in the read me? Have you tried running the .bat file directly? Just double click the one to disable the bar and it should turn off, start there so you at least know the .bat file itself is working for you outside of RL. 

 yes to all, however the bat files only work if the make devcon exe open with admin rights, I think this is the issue

Link to comment
Share on other sites

  • 2 months later...

Hey agent47, thanks for showing how to incorporate this into User Functions. I never realized how useful that function is. Question for you though, piggybacking off the User Functions topic: what else could I use besides GlobalSystemname? Like would it be possible to use a "Global Emulator" function/header, i.e every time I run RetroArch (regardless of system) I can run a script? Or even one's for specific rom names, for instance with certain PC games? I'm pretty intrigued by this now, it seems very very useful. 

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 3 weeks later...

I've also been following this thread n need to try this out again. I don't have taito type x set up yet, but the dolphin bar causes issues for me in some emulators such as fusion because it assigns the first slots to the dolphin bar/Wiimotes n won't allow me to assign controls to my 360 controllers.

So I'm hoping to eventually set it up so that the dolphin bar/ USB port is only turned on when I play Wii games, the added benefit is also so the dolphin bar isn't on all the time n therefore I don't have to worry about the infrared bulbs burning out prematurely from always being on

Link to comment
Share on other sites

It's really simple to do via task scheduler and devcon. Remember though that the Dolphinbar has 2 hardware IDs, one for mouse mode and one for wii mode. You'll need to disable both for a catch-all situation.

 

Also, a very important point to remember is that you cannot disable keyboard devices, which is what the dolphinbar uses for its buttons in mouse mode. Here's a batch I made to simplify everything.

 

ECHO OFF
CLS
:MENU
ECHO What would you like to do?
ECHO 1. Enable DolphinBar
ECHO 2. Disable DolphinBar
ECHO 3. Reinstall DolphinBar
ECHO 4. Tidy device manager
ECHO 5. Exit
SET /P M=Type 1, 2, 3, 4 or 5 then press ENTER:
IF %M%==1 GOTO ENABLE
IF %M%==2 GOTO DISABLE
IF %M%==3 GOTO REINSTALL
IF %M%==4 GOTO TIDY
IF %M%==5 GOTO EOF
:ENABLE
start %~dp0devcon.exe enable "USB\VID_057E&PID_0306"
start %~dp0devcon.exe enable "USB\VID_0079&PID_1802"
start %~dp0devcon.exe updateni c:\windows\inf\keyboard.inf "HID\VID_0079&PID_1802&MI_00"
GOTO MENU
:DISABLE
start %~dp0devcon.exe updateni c:\windows\inf\input.inf "HID\VID_0079&PID_1802&MI_00"
start %~dp0devcon.exe disable "USB\VID_0079&PID_1802"
start %~dp0devcon.exe disable "USB\VID_057E&PID_0306"
GOTO MENU
:REINSTALL
start %~dp0devcon remove "USB\VID_0079&PID_1802"
start %~dp0devcon remove "USB\VID_057E&PID_0306"
TIMEOUT /T 5
start %~dp0devcon rescan
:TIDY
start %~dp0devcon Find ID "*VID_057E&PID_0306*" "*VID_045E&PID_02A1*" > "temp.txt"
FOR /F "tokens=1 delims=: " %%A IN ('start %~dp0devcon FindAll ID "*VID_057E&PID_0306*" "*VID_045E&PID_02A1*"') DO (
       TYPE "temp.txt" | FIND "%%~A" >NUL
      IF ERRORLEVEL 1 %Debug% start %~dp0devcon Remove "@%%~A"
)
del temp.txt

start %~dp0devcon remove "@HID\VID_045E&PID_02A1&IG_00"
TIMEOUT /T 5
start %~dp0devcon rescan
GOTO MENU
:EOF

This will allow you to enable/disable/reinstall dolphinbar as well as clean up unattached devices from device manager. Pop devcon in the same folder for it to work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...