Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;----------------------------------------------------------------------------
- ; Sega Model 3
- ; SuperModel v.2a
- ; by djvj & chillin
- ; 1.6
- ;
- ; Notes:
- ; Required settings.ini file goes in the folder with this module
- ; Set ConfigInputs to true if you want to configure the controls for the emulator. Set to false when you want to play a game
- ;----------------------------------------------------------------------------
- Fullscreen = true
- Widescreen = true ; Expands image across the screen
- ConfigInputs = false
- Resolution = 1680,1050 ; Width,Height
- vertShader = ; Filename of the 3D vertex shader
- fragShader = ; Filename of the 3D fragment shader
- inputSystem = ; Choices are dinput (default), xinput, & rawinput. Use dinput for most setups. Use xinput if you use XBox 360 controllers. Use rawinput for multiple mice or keyboard support.
- forceFeedback = true ; Turns on force feedback if you have a controller that supports it. Scud Race' (including 'Scud Race Plus'), 'Daytona USA 2' (both editions), and 'Sega Rally 2' are the only games that support it.
- ;----------------------------------------------------------------------------
- If 0 < 2
- { MsgBox,,,Please run this through HyperSpin,2
- ExitApp
- }Else
- Goto, Start
- Start:
- SettingsFile := CheckFile(A_Scriptdir . "\Modules\" . systemName . "\Settings.ini")
- FadeInStart()
- iniread, frequency, %SettingsFile%, %romName%, frequency
- iniread, throttle, %SettingsFile%, %romName%, throttle
- freq = -ppc-frequency=%frequency%
- throttle := (If throttle = "true" ? ("") : ("-no-throttle"))
- fullscreen := (If Fullscreen = "true" ? ("-fullscreen") : (""))
- Widescreen := (If Widescreen = "true" ? ("-Widescreen") : (""))
- resolution := (If Resolution != "" ? ("-res=" . Resolution) : (""))
- vertShader := (If vertShader != "" ? ("-vert-shader=" . vertShader) : (""))
- fragShader := (If fragShader != "" ? ("-frag-shader=" . fragShader) : (""))
- inputSystem := (If inputSystem != "" ? ("-input-system=" . inputSystem) : (""))
- forceFeedback := (If forceFeedback = "true" ? ("-force-feedback") : (""))
- If ( ConfigInputs = "true" )
- RunEmu(executable,, "-config-inputs",,,,,,,, emuPath)
- Else
- RunEmu(executable, romPath . romName . romExtension, fullscreen,widescreen, resolution, freq, throttle, vertShader, fragShader, inputSystem, forceFeedback, emuPath, "Min")
- WinWait, Supermodel
- If ( ConfigInputs = "true" ) {
- WinWait, AHK_class ConsoleWindowClass
- WinGetPos,,, width,, AHK_class ConsoleWindowClass
- x := ( A_ScreenWidth / 2 ) - ( width / 2 )
- WinMove, AHK_class ConsoleWindowClass,, %x%, 0,, %A_ScreenHeight%
- WinHide, Supermodel
- WinActivate, AHK_class ConsoleWindowClass
- } Else {
- WinWaitActive, Supermodel ahk_class SDL_app
- Sleep, 1000
- }
- FadeInExit()
- Process, WaitClose, %executable%
- FadeOutExit()
- WinActivate, Hyperspin
- ExitApp
- RunEmu(exe,rom=0,param1=0,param2=0,param3=0,param4=0,param5=0,param6=0,param7=0,param8=0,relativepath=0, min=0) {
- Run, %exe% "%rom%" %param1% %param2% %param3% %param4% %param5% %param6% %param7% %param8%, %relativepath%, %min%
- }
- CloseProcess:
- FadeOutStart()
- WinClose, Supermodel ahk_class SDL_app
- Return
Advertisement
Add Comment
Please, Sign In to add comment