Advertisement
djvj

Untitled

Dec 30th, 2015
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. MEmu = Yabause
  2. MEmuV = 0.9.14
  3. MURL = http://yabause.org/
  4. MAuthor = djvj,brolly
  5. MVersion = 2.0.2
  6. MCRC = A34291F5
  7. iCRC = 955B1840
  8. MID = 635038268937782092
  9. MSystem = "Sega Saturn"
  10. ;------------------------------------------------------------------------
  11. ; Notes:
  12. ; SSF is still far superior, I suggest using that emu instead
  13. ; If yabause.ini does not exist, change a setting in the emu's options and exit, it will be created.
  14. ; Only tested working with DTLite, not DTPro. Not tested on any other virtual drive apps.
  15. ; Make sure your Virtual_Drive_Path in RocketLauncherUI is correct
  16. ; Rom_Extension should include cue and iso
  17. ; Make a bios subfolder with your emulator and place your bios files there, then set the bios you want to use in the emu at File->Settings->General->Bios ROM File
  18. ; You can also set the bios in RocketLauncherUI Yabause module settings
  19. ; Ini files are stored at %LOCALAPPDATA%\yabause (on Win7/8 and XP) or alternatively in %USERPROFILE%\Local Settings\Application Data\yabause (on WinXP only)
  20. ;------------------------------------------------------------------------
  21. StartModule()
  22. BezelGUI()
  23. FadeInStart()
  24.  
  25. settingsFile := modulePath . "\" . moduleName . ".ini"
  26. Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
  27. IniFolderSearchType := IniReadCheck(settingsFile, "Settings", "IniFolderSearchType","1",,1)
  28. HideBars := IniReadCheck(settingsFile, "Settings", "HideBars","true",,1) ; If true, will hide both the menubar and toolbar in the emu
  29. customBios := IniReadCheck(settingsFile, "Settings", "CustomBios","",,1)
  30. customBios := GetFullName(customBios)
  31.  
  32. If IniFolderSearchType = 1
  33. IniPath := GetCommonPath("LOCAL_APPDATA")
  34. Else {
  35. EnvGet, IniPath, USERPROFILE
  36. IniPath := IniPath . "\Local Settings\Application Data"
  37. }
  38.  
  39. yabauseINI := CheckFile(IniPath . "\yabause\yabause.ini")
  40.  
  41. If !customBios {
  42. IniRead, satBios, %yabauseINI%, 0.9.11, General\Bios
  43. If (satBios = "" || satBios = "ERROR")
  44. ScriptError("Please make sure to set the BIOS you want to use in " . MEmu . " or set a CustomBios in " . MEmu . " module settings in RocketLauncherUI first.")
  45. } Else
  46. CheckFile(customBios, "Could not locate the CustomBios you have set for " . MEmu . ": " . customBios)
  47.  
  48. If (vdEnabled = "true")
  49. { VirtualDrive("get") ; populates the vdDriveLetter variable with the drive letter to your scsi or dt virtual drive
  50. usedVD := 1
  51. }
  52.  
  53. If (bezelEnabled = "true")
  54. hideBars := "true" ; must hide bars for bezels to look nice
  55.  
  56. yabauseAHKClass := If InStr(emuFullPath,"Devmiyax") ? "Qt5QWindowIcon" : "QWidget"
  57. hideEmuObj := Object("Yabause ahk_class " . yabauseAHKClass,1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  58. 7z(romPath, romName, romExtension, 7zExtractPath)
  59. BezelStart()
  60.  
  61. gameImage := If usedVD ? " -c " . vdDriveLetter . ":/" : " -i """ . romPath . "\" . romName . romExtension . """"
  62. hideMenubar := If (hideBars = "true" ) ? 2 : 0
  63. hideToolbar := If (hideBars = "true" ) ? 2 : 0
  64. customBios := If customBios ? " -b """ . customBios . """" : ""
  65.  
  66. IniWrite, true, %yabauseINI%, 0.9.11, autostart
  67. IniWrite, %hideMenubar%, %yabauseINI%, 0.9.11, View\Menubar
  68. IniWrite, %hideToolbar%, %yabauseINI%, 0.9.11, View\Toolbar
  69. IniWrite, %Fullscreen%, %yabauseINI%, 0.9.11, Video\Fullscreen
  70.  
  71. If usedVD
  72. VirtualDrive("mount",romPath . "\" . romName . romExtension)
  73.  
  74. HideEmuStart()
  75. Run(executable . customBios . gameImage,emuPath)
  76.  
  77. WinWait("Yabause ahk_class " . yabauseAHKClass)
  78. WinWaitActive("Yabause ahk_class " . yabauseAHKClass)
  79.  
  80. BezelDraw()
  81. HideEmuEnd()
  82. FadeInExit()
  83. Process("WaitClose", executable)
  84.  
  85. If usedVD
  86. VirtualDrive("unmount")
  87.  
  88. BezelExit()
  89. 7zCleanUp()
  90. FadeOutExit()
  91. ExitModule()
  92.  
  93.  
  94. GetCommonPath(csidl) {
  95. Static init
  96. If !init
  97. {
  98. CSIDL_APPDATA =0x001A ; Application Data, new for NT4
  99. CSIDL_COMMON_APPDATA =0x0023 ; All Users\Application Data
  100. CSIDL_COMMON_DOCUMENTS =0x002e ; All Users\Documents
  101. CSIDL_DESKTOP =0x0010 ; C:\Documents and Settings\username\Desktop
  102. CSIDL_FONTS =0x0014 ; C:\Windows\Fonts
  103. CSIDL_LOCAL_APPDATA =0x001C ; non roaming, user\Local Settings\Application Data
  104. CSIDL_MYMUSIC =0x000d ; "My Music" folder
  105. CSIDL_MYPICTURES =0x0027 ; My Pictures, new for Win2K
  106. CSIDL_PERSONAL =0x0005 ; My Documents
  107. CSIDL_PROGRAM_FILES_COMMON =0x002b ; C:\Program Files\Common
  108. CSIDL_PROGRAM_FILES =0x0026 ; C:\Program Files
  109. CSIDL_PROGRAMS =0x0002 ; C:\Documents and Settings\username\Start Menu\Programs
  110. CSIDL_RESOURCES =0x0038 ; %windir%\Resources\, For theme and other windows resources.
  111. CSIDL_STARTMENU =0x000b ; C:\Documents and Settings\username\Start Menu
  112. CSIDL_STARTUP =0x0007 ; C:\Documents and Settings\username\Start Menu\Programs\Startup.
  113. CSIDL_SYSTEM =0x0025 ; GetSystemDirectory()
  114. CSIDL_WINDOWS =0x0024 ; GetWindowsDirectory()
  115. }
  116. val = % CSIDL_%csidl%
  117. VarSetCapacity(fpath, 256)
  118. DllCall("shell32\SHGetFolderPathA", "uint", 0, "int", val, "uint", 0, "int", 0, "str", fpath)
  119. Return %fpath%
  120. }
  121.  
  122. CloseProcess:
  123. FadeOutStart()
  124. WinClose("Yabause ahk_class " . yabauseAHKClass)
  125. ;WinKill, Yabause ahk_class QWidget,,3 ; sometimes the emu didn't close, this assures it does
  126. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement