Advertisement
djvj

Untitled

May 21st, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.84 KB | None | 0 0
  1. MEmu = FS-UAE
  2. MEmuV = v2.4.1
  3. MURL = http://fs-uae.net/
  4. MAuthor = djvj,faahrev
  5. MVersion = 2.0.3
  6. MCRC = 25A280CB
  7. iCRC = 381AA8E
  8. mId = 635637153627970100
  9. MSystem = "Commodore Amiga","Commodore Amiga CD32","Commodore CDTV"
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Command Line Options - http://fs-uae.net/options
  13. ;
  14. ; Fade-, Bezel- and MultiGame supported.
  15. ; Be sure to set the paths to the BIOS roms in the Global Module Settings in RocketLauncherUI.
  16. ;
  17. ; Extensions for Amiga are .adf, .hdf or .zip
  18. ; Extension for AmigaCD32 and CDTV is cue
  19. ;
  20. ; .hdf and .zip are not MultiGame compatible
  21. ;
  22. ; If a rom consists of multiple discs,
  23. ; the discs will be automatically added to the swap list in FS-UAE (ingame F12)
  24. ; plus:
  25. ; If the media is floppies (adf) up to 4 discs will be inserted in the drives.
  26. ; Don't forget to set MultiGame to true in RocketLauncherUI for each system you wish to use it.
  27. ;
  28. ; By pressing F12 in the game any disc can be inserted in any drive
  29. ; and savestates can be saved and loaded.
  30. ; These are saved in emu\config\save states.
  31. ;
  32. ; Be sure to use the correct format for naming the discs
  33. ;
  34. ; By default the EmuDir\config.fs-uae file will be used for setting options
  35. ; If it doesn't exist, it will be created.
  36. ;
  37. ; Note: please be patient when loading floppy games.
  38. ; Floppies are loaded in real-time for best results.
  39. ;----------------------------------------------------------------------------
  40. StartModule()
  41. BezelGUI()
  42. FadeInStart()
  43.  
  44. ; This object controls how the module reacts to different systems. FS-UAE can play a lot of systems, but needs to know what system you want to run, so this module has to adapt.
  45. mType := Object("Commodore Amiga","A1200","Commodore Amiga CD32","CD32/FMV","Commodore CDTV","CDTV")
  46. ident := mType[systemName] ; search object for the systemName identifier FS-UAE uses
  47. If !ident
  48. ScriptError("Your systemName is: " . systemName . "`nIt is not one of the known supported systems for this " . MEmu . " module: " . moduleName)
  49.  
  50. settingsFile := modulePath . "\" . moduleName . ".ini"
  51. configFile := emuPath . "\config.fs-uae"
  52. baseDir := emuPath . "\conf"
  53. fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
  54. fullscreenRes := IniReadCheck(settingsFile, "Settings", "FullscreenResolution",,,1)
  55. windowedRes := IniReadCheck(settingsFile, "Settings", "WindowedResolution",,,1)
  56. a1200Rom := IniReadCheck(settingsFile, "Settings", "A1200_Rom",,,1)
  57. cd32Rom := IniReadCheck(settingsFile, "Settings", "CD32_Rom",,,1)
  58. cd32ExtRom := IniReadCheck(settingsFile, "Settings", "CD32_Ext_Rom",,,1)
  59. cdTVRom := IniReadCheck(settingsFile, "Settings", "CDTV_Rom",,,1)
  60. cdTVExtRom := IniReadCheck(settingsFile, "Settings", "CDTV_Ext_Rom",,,1)
  61. whdBootPath := IniReadCheck(settingsFile, "Settings", "WHDBootPath", emuPath . "\Hard Disks\WHDLoad\Boot",,1)
  62. whdBootPath := AbsoluteFromRelative(emuPath, whdBootPath)
  63. shader := IniReadCheck(settingsFile, "Settings", "Shader",,,1)
  64. floppySounds := IniReadCheck(settingsFile, "Settings", "FloppySounds","on",,1)
  65. ; amigaModel := IniReadCheck(settingsFile, "Settings", "AmigaModel","A1200",,1) ; possible choices are A500+,A600,A1000,A1200,A1200/020,A3000,A4000/040,CD32,CDTV
  66. ; autoResume := IniReadCheck(settingsFile, "Settings", "autoResume","true",,1) ; if true, will automatically save your game's state on exit and reload it on the next launch of the same game.
  67.  
  68. ;clearing all settings in config for floppy, hard and cdrom, drive and image
  69. LoopString := "floppy|hard|cdrom"
  70. Log("Module - Started checking all drive and image values are nulled out in " . MEmu . "'s config")
  71. Loop, 4
  72. { driveNumber := A_Index - 1
  73. ; msgbox A_Index: %A_Index%`ndriveNumber: %driveNumber%
  74. Loop, parse, LoopString, |
  75. {
  76. IniRead, driveValue, %configFile%, fs-uae, %A_LoopField%_drive_%driveNumber%
  77. If (driveValue != "" && driveValue != "ERROR") {
  78. ; IniWrite, %A_Space%, %configFile%, fs-uae, %A_LoopField%_drive_%driveNumber%
  79. Log("Module - Setting " . A_LoopField . "_drive_" . driveNumber . " to NULL")
  80. }
  81. Loop, 9
  82. {
  83. imageNumber := A_Index - 1
  84. IniRead, imageValue, %configFile%, fs-uae, %A_LoopField%_image_%imageNumber%
  85. If (imageValue != "" && imageValue != "ERROR") {
  86. ; IniWrite, %A_Space%, %configFile%, fs-uae, %A_LoopField%_image_%imageNumber%
  87. Log("Module - Setting " . A_LoopField . "_image_" . imageNumber . " to NULL")
  88. }
  89. ; msgbox A_Index: %A_Index%`nimageNumber: %imageNumber%
  90. }
  91. }
  92. }
  93. Log("Module - Finished checking all drive and image values")
  94.  
  95. BezelStart()
  96.  
  97. If ident = A1200
  98. { a1200Rom := CheckFile(GetFullName(a1200Rom), "Could not find your A1200_Rom. " . systemName . " first requires the ""A1200_Rom"" to be set in RocketLauncherUI's module settings for " . MEmu . ".")
  99. kickstartBios := "" . a1200Rom . ""
  100. ; fastmem := " --fast_memory=8192"
  101. IniWrite, 8192, %configFile%, fs-uae, fastmem ; write fastmem size
  102. }Else if ident = CD32/FMV
  103. { cd32Rom := CheckFile(GetFullName(cd32Rom), "Could not find your CD32_Rom. " . systemName . " first requires the ""CD32_Rom"" to be set in RocketLauncherUI's module settings for " . MEmu . ".")
  104. cd32ExtRom := CheckFile(GetFullName(cd32ExtRom), "Could not find your CD32_Ext_Rom. " . systemName . " first requires the ""CD32_Ext_Rom"" to be set in RocketLauncherUI's module settings for " . MEmu . ".")
  105. kickstartBios := "" . cd32Rom . ""
  106. kickstartExtBios := "" . cd32ExtRom . ""
  107. }Else if Ident = CDTV
  108. { cdTVRom := CheckFile(GetFullName(cdTVRom), "Could not find your CDTV_Rom. " . systemName . " first requires the ""CDTV_Rom"" to be set in RocketLauncherUI's module settings for " . MEmu . ".")
  109. cdTVExtRom := CheckFile(GetFullName(cdTVExtRom), "Could not find your CDTV_Ext_Rom. " . systemName . " first requires the ""CDTV_Ext_Rom"" to be set in RocketLauncherUI's module settings for " . MEmu . ".")
  110. kickstartBios := "" . cdTVRom . ""
  111. kickstartExtBios := "" . cdTVExtRom . ""
  112. }
  113. ;amigaModel := " --amiga_model=" . ident
  114. ;fullscreen := " --fullscreen=" . (If Fullscreen = "true" ? 1 : 0)
  115. ;fullscreenMode := " --fullscreen_mode=fullscreen-window" ; sets fullscreen windowed rather than true fullscreen
  116.  
  117. fullscreen := (If Fullscreen = "true" ? 1 : 0)
  118. IniWrite, %fullscreen%, %configFile%, fs-uae, fullscreen
  119. IniWrite, fullscreen-window, %configFile%, fs-uae, fullscreen_mode ; sets fullscreen windowed rather than true fullscreen
  120. If (fullscreen = "true" && fullscreenRes != "") {
  121. Loop, Parse, fullscreenRes, x
  122. If A_index = 1
  123. fsuaeW := A_LoopField
  124. Else
  125. fsuaeH := A_LoopField
  126. IniWrite, %fsuaeW%, %configFile%, fs-uae, fullscreen_width
  127. IniWrite, %fsuaeH%, %configFile%, fs-uae, fullscreen_height
  128. } Else If (fullscreen != "true" && windowedRes != "") {
  129. Loop, Parse, windowedRes, x
  130. If A_index = 1
  131. fsuaeW := A_LoopField
  132. Else
  133. fsuaeH := A_LoopField
  134. IniWrite, %fsuaeW%, %configFile%, fs-uae, window_width
  135. IniWrite, %fsuaeH%, %configFile%, fs-uae, window_height
  136. }
  137.  
  138. hideEmuObj := Object(ident,1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  139. 7z(romPath, romName, romExtension, 7zExtractPath)
  140.  
  141. ; stateName := emuPath . "\states\" . romName . ".uss"
  142.  
  143. If romExtension in .adf,.zip
  144. gamePathMethod := "floppy_"
  145. Else If romExtension = .hdf
  146. gamePathMethod := "hard_"
  147. Else If romExtension = .whd
  148. gamePathMethod := "hard_drive_0=""" . WHDBootPath . """ --hard_drive_1"
  149. Else if romExtension = .cue
  150. gamePathMethod := "cdrom_"
  151. Else
  152. ScriptError("Unsupported extension supplied: """ . romExtension . """.") ; iso is not supported or mounting will not work
  153.  
  154. gamePath := " --" . gamePathMethod . "drive_0" . "=""" . romPath . "\" . romName . romExtension . """"
  155.  
  156. ;injecting other variables in config file
  157. IniWrite, %baseDir%, %configFile%, fs-uae, base_dir
  158. IniWrite, %ident%, %configFile%, fs-uae, amiga_model ; write model to fs-uae
  159. IniWrite, %kickstartBios%, %configFile%, fs-uae, kickstart_file ; write rom to fs-uae
  160. IniWrite, %kickstartExtBios%, %configFile%, fs-uae, kickstart_ext_file ; write extended rom to fs-uae
  161. IniWrite, %kickstartExtBios%, %configFile%, fs-uae, kickstart_ext_file ; write extended rom to fs-uae
  162. IniWrite, %shader%, %configFile%, config, shader ; write shader to fs-uae
  163. IniWrite, %floppySounds%, %configFile%, config, floppy_drive_0_sounds ; write floppy_drive_0_sounds to fs-uae
  164.  
  165. Log("Loop - romName = " . romName,5)
  166.  
  167. If romTable[1,6] contains Disk,Disc
  168. { ;StringTrimRight, romNameNoDisc, romName, 9 ; gets gamename
  169. gamePath := ""
  170. Loop, 9
  171. If (romTable[A_Index,1] != "")
  172. {
  173. If A_Index <= 4
  174. gamePath .= " --" . gamePathMethod . "drive_" . A_Index-1 . "=""" . romTable[A_Index,1] . """" ; drives are loaded on runtime into floppy drives
  175. gamePath .= " --" . gamePathMethod . "image_" . A_Index-1 . "=""" . romTable[A_Index,1] . """" ; images are for the swap list
  176. }
  177. }
  178.  
  179. HideEmuStart()
  180. Run(executable . " " . gamePath . " " . configFile, emuPath)
  181.  
  182. /*
  183. If (FileExist(stateName) and autoResume="true") {
  184. clipboard = %stateName%
  185. WinWait("ahk_class AmigaPowah")
  186. Send {F7} ; open load state window
  187. WinWait("Restore a WinUAE snapshot file")
  188. Send ^v
  189. Send {Enter}
  190. }
  191. */
  192.  
  193. WinWait("FS-UAE ahk_class SDL_app")
  194. WinWaitActive("FS-UAE ahk_class SDL_app")
  195.  
  196. BezelDraw()
  197. HideEmuEnd()
  198. FadeInExit()
  199. Process("WaitClose", executable)
  200. 7zCleanUp()
  201. BezelExit()
  202. FadeOutExit()
  203.  
  204. /*
  205. GroupAdd,DIE,DIEmWin
  206. GroupClose, DIE, A
  207. */
  208.  
  209. ExitModule()
  210.  
  211.  
  212. CloseProcess:
  213. ; If (FileExist(stateName) and autoResume="true")
  214. ; Send {F5} ; open save state window
  215. FadeOutStart()
  216. ; If (FileExist(stateName) and autoResume="true") {
  217. ; clipboard = %stateName% ; just in case something happened to clipboard in between start of module to now
  218. ; WinWait("Save a WinUAE snapshot file")
  219. ; Send ^v
  220. ; Send {Enter}
  221. ; Sleep, 50 ; always give time for a file operation to occur before closing an app
  222. ; }
  223. WinClose("FS-UAE ahk_class SDL_app")
  224. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement