Guest User

supermodel module

a guest
Feb 17th, 2012
614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. ;----------------------------------------------------------------------------
  2. ; Sega Model 3
  3. ; SuperModel v.2a
  4. ; by djvj & chillin
  5. ; 1.6
  6. ;
  7. ; Notes:
  8. ; Required settings.ini file goes in the folder with this module
  9. ; Set ConfigInputs to true if you want to configure the controls for the emulator. Set to false when you want to play a game
  10. ;----------------------------------------------------------------------------
  11. Fullscreen = true
  12. Widescreen = true ; Expands image across the screen
  13. ConfigInputs = false
  14. Resolution = 1680,1050 ; Width,Height
  15. vertShader = ; Filename of the 3D vertex shader
  16. fragShader = ; Filename of the 3D fragment shader
  17. 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.
  18. 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.
  19. ;----------------------------------------------------------------------------
  20.  
  21. If 0 < 2
  22. { MsgBox,,,Please run this through HyperSpin,2
  23. ExitApp
  24. }Else
  25. Goto, Start
  26.  
  27. Start:
  28.  
  29. SettingsFile := CheckFile(A_Scriptdir . "\Modules\" . systemName . "\Settings.ini")
  30.  
  31. FadeInStart()
  32.  
  33. iniread, frequency, %SettingsFile%, %romName%, frequency
  34. iniread, throttle, %SettingsFile%, %romName%, throttle
  35. freq = -ppc-frequency=%frequency%
  36. throttle := (If throttle = "true" ? ("") : ("-no-throttle"))
  37. fullscreen := (If Fullscreen = "true" ? ("-fullscreen") : (""))
  38. Widescreen := (If Widescreen = "true" ? ("-Widescreen") : (""))
  39. resolution := (If Resolution != "" ? ("-res=" . Resolution) : (""))
  40. vertShader := (If vertShader != "" ? ("-vert-shader=" . vertShader) : (""))
  41. fragShader := (If fragShader != "" ? ("-frag-shader=" . fragShader) : (""))
  42. inputSystem := (If inputSystem != "" ? ("-input-system=" . inputSystem) : (""))
  43. forceFeedback := (If forceFeedback = "true" ? ("-force-feedback") : (""))
  44.  
  45. If ( ConfigInputs = "true" )
  46. RunEmu(executable,, "-config-inputs",,,,,,,, emuPath)
  47. Else
  48. RunEmu(executable, romPath . romName . romExtension, fullscreen,widescreen, resolution, freq, throttle, vertShader, fragShader, inputSystem, forceFeedback, emuPath, "Min")
  49.  
  50. WinWait, Supermodel
  51.  
  52. If ( ConfigInputs = "true" ) {
  53. WinWait, AHK_class ConsoleWindowClass
  54. WinGetPos,,, width,, AHK_class ConsoleWindowClass
  55. x := ( A_ScreenWidth / 2 ) - ( width / 2 )
  56. WinMove, AHK_class ConsoleWindowClass,, %x%, 0,, %A_ScreenHeight%
  57. WinHide, Supermodel
  58. WinActivate, AHK_class ConsoleWindowClass
  59. } Else {
  60. WinWaitActive, Supermodel ahk_class SDL_app
  61. Sleep, 1000
  62. }
  63.  
  64. FadeInExit()
  65.  
  66. Process, WaitClose, %executable%
  67.  
  68. FadeOutExit()
  69.  
  70. WinActivate, Hyperspin
  71.  
  72. ExitApp
  73.  
  74.  
  75. RunEmu(exe,rom=0,param1=0,param2=0,param3=0,param4=0,param5=0,param6=0,param7=0,param8=0,relativepath=0, min=0) {
  76. Run, %exe% "%rom%" %param1% %param2% %param3% %param4% %param5% %param6% %param7% %param8%, %relativepath%, %min%
  77. }
  78.  
  79. CloseProcess:
  80. FadeOutStart()
  81. WinClose, Supermodel ahk_class SDL_app
  82. Return
Advertisement
Add Comment
Please, Sign In to add comment