HL 2.13
module:
;------------------------------------------------------------------------
; Sega Saturn
; SSF v0.12 beta R3 (12/25/2011)
; by djvj
; 1.4
;
; Notes:
; This only works with DTLite, not DTPro
; Make sure your Path_To_Daemontools in Settings\settings.ini is correct
; romExtension should be mds,cue,iso,cdi,nrg
; Make sure you have your CDDrive set to whatever number you use for your games. 0 may be your hardware drive, while 1 may be your virtual drive (depending on how many you have). If you get a black screen, try different numbers starting from 0.
; If you keep getting the CD Player BIOS screen, you have the CDDrive variable set wrong below
; If you keep getting the CD Player screen with the message "Game disc unsuitable for this system", you have the incorrect bios set for the region game you are playing and or region is set wrong in the emu options. Or you can just turn off the BIOS below
; Set fullscreen mode via the variable below
; SSF forces 1024x768 in fullscreen mode and cannot be changed as far as I can tell
; If you are getting clipping, set the vSync variable to true below
; For faster MultiGame switching, keep the BIOS off, otherwise you have to "play" the disc each time you switch discs
;------------------------------------------------------------------------
Fullscreen = true
ShowBIOS = false
BilinearFiltering = true
vSync = true
WideScreen = false
Stretch = false
CDDrive = 1
UseSCSI = false ; If you prefer SCSI virtual drives, set this to true, otherwise Daemon Tools will use a DT virtual drive.
AddDrive = true ; If you do not have a scsi or dt drive in daemon tools, it will be created for you. Set this to false to stop auto-creation of the drive.
;------------------------------------------------------------------------
SSFINI := CheckFile(emuPath . "SSF.ini")
GUI_ID := FadeInStart()
7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)
mySW:=A_ScreenWidth, mySH:=A_ScreenHeight
; Now let's update all our keys if they differ in the ini
Fullscreen := (If ( Fullscreen = "true" ) ? ("1") : ("0"))
ShowBIOS := (If ( ShowBIOS = "true" ) ? ("0") : ("1"))
BilinearFiltering := (If ( BilinearFiltering = "true" ) ? ("1") : ("0"))
vSync := (If ( vSync = "true" ) ? ("1") : ("0"))
WideScreen := (If ( WideScreen = "true" ) ? ("1") : ("0"))
Stretch := (If ( Stretch = "true" ) ? ("1") : ("0"))
UseSCSI := (If UseSCSI = "true" ? ("scsi") : ("dt"))
iniLookup =
( ltrim c
Screen, FullSize, "%Fullscreen%"
Screen, BilinearFiltering, "%BilinearFiltering%"
Screen, VSynchWaitFullscreen, "%vSync%"
Screen, WideScreen, "%WideScreen%"
Screen, StretchScreen, "%Stretch%"
Screen, EnforceAspectRatioFullscreen, "1"
Peripheral, CDDrive, "%CDDrive%"
Program4, NoBIOS, "%ShowBIOS%"
Other, ScreenMode, "%Fullscreen%"
)
Loop, Parse, iniLookup, `n
{
StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
IniRead, tempVar, %SSFINI%, %split1%, %split2%
If ( tempVar != split3 )
IniWrite, % split3, %SSFINI%, %split1%, %split2%
}
DaemonTools("mount",UseSCSI,0,AddDrive,romPath . romName . romExtension)
Run, %executable%, %emuPath%,,ssfPID
WinWait, SSF
WinWaitActive, SSF
Sleep, 1000 ; SSF flashes in real fast before going fullscreen if this is not here
GUI_ID2 := FadeInExit()
; WinMove,SSF,,0,0 ; uncomment me if you turned off fullscreen mode and cannot see the emu, but hear it in the background
Process, WaitClose, %executable%
DaemonTools("unmount",UseSCSI,0)
7z2 := 7zCleanUp()
GUI_ID4 := FadeOutExit()
WinActivate, Hyperspin
ExitApp
PreMultiGame:
If Fullscreen = 1 ; only have to take the emu out of fullscreen we are using it
{ ; SSF cannot swap discs in fullscreen mode, so we have to go windowed first, swap, and restore fullscreen
WinGet, ssfID, ID, A
WinGetPos,,,ssfW,ssfH,ahk_id %ssfID%
SetKeyDelay,,10
Send !{Enter}
WinSet, Transparent, 0, ahk_id %ssfID%
If (mySW != ssfW || mySH != ssfH) { ; if our screen not the same size as SSF uses for it's fullscreen, we can detect when it changes
While % ssfH = ssfHn
{
WinGetPos,,,,ssfHn,ahk_id %ssfID%
Sleep, 100
}
} Else ; if our screen is the same size as SSF uses for it's fullscreen, use a sleep instead
Sleep, 3000 ; increase me if MG GUI is showing tiny instead of the full screen size
tempgui()
}
Return
MultiGame:
If !mgCancel {
WinMenuSelectItem,ahk_id %ssfID%,,Hardware,CD Open
DaemonTools("unmount",UseSCSI,0)
DaemonTools("mount",UseSCSI,0,AddDrive,selectedRom)
WinMenuSelectItem,ahk_id %ssfID%,,Hardware,CD Close
If Fullscreen = 1
{
Loop { ; looping until SSF is done loading the new disc
Sleep, 200
WinGetTitle, winTitle, ahk_id %ssfID%
StringSplit, T, winTitle, %A_Space%:
; ToolTip, %A_Index%`nT10=%T10%,0,0
If !oldT10 ; get the current T10 as soon as it exists and store it
oldT10:=T10
If (T10 oldT10) ; If T10 starts incrementing, we know SSF has a game loaded and can continue the script
Break
}
WinActivate, ahk_id %ssfID%
SetKeyDelay,,10
Send !{Enter}
Sleep, 500 ; give SSF a moment to go fullscreen and not show Hyperspin
Gui, 69: Destroy
WinSet, Transparent, 255, ahk_id %ssfID%
WinSet, Transparent, Off, ahk_id %ssfID%
}
}
Return
CloseProcess:
GUI_ID3 := FadeOutStart()
WinClose, SSF
Return
tempgui(){
Gui, 69:Color, 000000
Gui, 69:-Caption +ToolWindow
Gui, 69:Show, x0 y0 W%A_ScreenWidth% H%A_ScreenHeight%, BlackScreen
}

D avance merci