2012-12-15, 05:25
(2012-12-15, 05:13)harSon Wrote: I think this may be my second to last question (I truly appreciate your guys' help, this is a lot more difficult than I was expecting!):
Is it possible to have a single batch do more than one thing? I am attempting to use SSF Emulator (Sega Saturn), which requires the game/iso to be mounted. So a script/batch that mounts and unmounts an iso upon starting is needed, which I founded on this forum:
Code:"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount 0,%1
ssf.exe
"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount 0
But I also need help constructing a batch file that will also A) Suspend XBMC and B) Launch SSF in fullscreen:
Code:pssuspend "XBMC.exe"
cd "C:\Program Files (x86)\XBMC\Video Game Emulators\Sega Saturn Emulator\"
SSF.exe %1
pssuspend -r "XBMC.exe"
Can I create a single batch files that does both?
I also found an Autoit script on these forums for the mounting/unmounting of an image for SSF:
Code:If $CmdLine[0] == 1 Then
RunWait('"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount 0,"' & $CmdLine[1] & '"')
RunWait('"C:\Program Files (x86)\XBMC\Video Game Emulators\Sega Saturn Emulators\SSF.exe"')
RunWait('"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount 0')
EndIf
Exit 0
Is there anything I can add to this to make it suspend XBMC and launch the emulator in fullscreen?
And I can't seem to get Mupen64 0.5.1 to work. I start it up and XBMC freezes up until I minimize and close Mupen 64.
This is the batch code I am using:
Code:pssuspend "XBMC.exe"
cd "C:\Program Files (x86)\XBMC\Video Game Emulators\Nintendo 64 Emulator\"
mupen64.exe --noosd --fullscreen --resolution 1920x1080 %1
pssuspend -r "XBMC.exe"
And here is my XBMC Log: http://xbmclogs.com/show.php?id=21219
This is what my program RoM-Jacket generates for saturn:
Code:
CHCP 1252
MODE CON: COLS=15 LINES=1
TITLE LAUNCHER
pushd "%~dp0"
SET EMUL=C:\Emulators\SSF
SET EMUZ=SSF
SET XPADDER=C:\Emulators\Xpadder\Xpadder.exe
SET DAMVAR=C:\Program Files (x86)\DAEMON Tools Lite\DTlite.exe
SET GAMNAM=%~dpn0
SET GAMDIR=%CD%
SET EMUDIR=%EMUL:~0,2%
for /f "tokens=3 delims= " %%a in ('reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer /v NoDriveTypeAutoRun') do SET NDAR=%%a
copy /Y "*.ini" "%EMUL%"
copy /Y ".Mem\*.bin" "%EMUL%"
copy /Y ".sstates\*" "%EMUL%\SaveState"
REM [DSP]displayswitch /internal
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer" /v "NoDriveTypeAutorun" /t REG_DWORD /d 0x20 /f
cmd /c "%DAMVAR%" -unmount scsi, 0
for /f "tokens=* delims=" %%a in ('dir /B /A-D "*.mdf"') do (
set ROM=%%~na
CALL :RUN
)
:RUN
"%DAMVAR%" -mount scsi, 0,"%GAMDIR%\%ROM%.mdf"
"%XPADDER%" /m "%GAMNAM%1.xpadderprofile" "%GAMNAM%2.xpadderprofile"
%EMUDIR%
pushd "%EMUL%"
start /wait "" "%EMUL%\%EMUZ%.exe"
copy /Y "%EMUL%\*.ini" "%ROMDIR%"
copy /Y "%EMUL%\SaveState\*" "%ROMDIR%\.sstates"
copy /Y "%EMUL%\Snapshot\*" "%ROMDIR%\.snaps"
copy /Y "%EMUL%\*Backup*.bin" "%ROMDIR%\.Mem"
cmd /c "%DAMVAR%" -unmount scsi, 0
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer" /v "NoDriveTypeAutorun" /t REG_DWORD /d %NDAR% /f
REM [DSP]displayswitch /extend
"%XPADDER%" /m MediaCenter1 nolayout2
taskkill /F /IM cmd.exe
The frontend uses a custom ahk executable that minimizes and suspends the fe until the launcher exits.