Advertisement
djvj

raine module

Jan 24th, 2016
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. MEmu = Raine
  2. MEmuV = v0.64.10
  3. MURL = http://rainemu.swishparty.co.uk/
  4. MAuthor = brolly
  5. MVersion = 2.0.1
  6. MCRC = B4A737F8
  7. iCRC = 4BF75BC8
  8. MID = 635038268907767111
  9. MSystem = "SNK Neo Geo CD","SNK Neo Geo","SNK Neo Geo MVS","SNK Neo Geo AES"
  10. ;-------------------------------------------------------------------------
  11. ; Notes:
  12. ; First time you run the emu, it will ask you to find the Neocd.bin bios, so place it in the folder with the emulator or a "bios" subfolder.
  13. ; If you get an error "Could not open IPL.TXT", then you have one of the below problems:
  14. ; Not using a real Neo-Geo CD game (which are cd images) that contain an IPL.TXT. Do not use MAME roms otherwise you will get this error.
  15. ;
  16. ; To play MVS/AES games requires a proper rom path. The module will set the first rom path (rom_dir_0) for you automatically.
  17. ; If you want to use multiple rom paths you can do it by editing the config\raine32_sdl.cfg file and adding the paths under the Directories section
  18. ; For example to use 2 different rom paths:
  19. ; rom_dir_0 = E:\Games\SNK Neo Geo\ (DO NOT SET THIS PATH AS IT'S CONTROLLED BY THE MODULE)
  20. ; rom_dir_1 = E:\Emulators\Raine\roms\
  21. ;
  22. ; If you don't add all your roms (both bios and games) to the cfg file then Raine will fail to load the games as it won't be able to find the rom files.
  23. ;
  24. ; The config file raine32_sdl.cfg should be in the config folder. If this file doesn't exist, start Raine change any setting and exit so it will create this file on exit
  25. ;
  26. ; Useful command line switches:
  27. ; raine32.exe -gamelist
  28. ; raine32.exe -listdsw
  29. ; raine32.exe -h
  30. ;-------------------------------------------------------------------------
  31. StartModule()
  32. BezelGUI()
  33. FadeInStart()
  34.  
  35. If FileExist(modulePath . "\" . systemName . ".ini") ; use a custom systemName ini if it exists
  36. settingsFile := modulePath . "\" . systemName . ".ini"
  37. Else
  38. settingsFile := modulePath . "\" . moduleName . ".ini"
  39.  
  40. If RegExMatch(systemName,"i)AES")
  41. DefaultBiosVersion := "22"
  42.  
  43. Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
  44. ScreenWidth := IniReadCheck(settingsFile, "Settings", "ScreenWidth","",,1)
  45. ScreenHeight := IniReadCheck(settingsFile, "Settings", "ScreenHeight","",,1)
  46. BiosVersion := IniReadCheck(settingsFile, "Settings" . "|" . romName, "BiosVersion", DefaultBiosVersion,,1) ;AES should be 22 and 23
  47.  
  48. ; Setting Region
  49. If RegExMatch(romName,"i)\(Japan\)")
  50. DefaultRegion := "0"
  51. Else If RegExMatch(romName,"i)\(Europe\)")
  52. DefaultRegion := "2"
  53. Else If RegExMatch(romName,"i)\(Brazil\)")
  54. DefaultRegion := "3"
  55. Else
  56. DefaultRegion := "1" ; USA
  57.  
  58. Region := IniReadCheck(settingsFile, "settings|" . romName, "Region", DefaultRegion,,1)
  59.  
  60. RaineIni := CheckFile(emuPath . "\config\raine32_sdl.cfg","Cannot find raine32_sdl.cfg. Please run Raine manually and enter options menu, then exit so it is created for you: " . emuPath . "\config\raine32_sdl.cfg")
  61.  
  62. BezelStart()
  63. hideEmuObj := Object("ahk_class SDL_app",1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  64. 7z(romPath, romName, romExtension, SevenZExtractPath)
  65.  
  66. If RegExMatch(romExtension,"i)\.7z|\.rar")
  67. ScriptError("Raine only supports zip archives. Either enable 7z support, or extract your games first.")
  68.  
  69. cliOptions := " -nogui"
  70. If (Fullscreen = "true")
  71. cliOptions .= " -fs 1"
  72. Else
  73. cliOptions .= " -fs 0"
  74.  
  75. If (ScreenWidth)
  76. cliOptions .= " -screenx " . ScreenWidth
  77. If (ScreenHeight)
  78. cliOptions .= " -screeny " . ScreenHeight
  79.  
  80. If RegExMatch(systemName,"i)AES")
  81. cliOptions .= " -cont" ; Enable continuous play
  82.  
  83. If (systemName = "SNK Neo Geo CD")
  84. {
  85. cliOptions .= " -region " . Region
  86. cliOptions .= " """ . romPath . "\" . romName . romExtension . """"
  87. } Else {
  88. cliOptions .= " -g " . romName
  89. IniWrite(romPath . "\", RaineIni, "Directories", "rom_dir_0") ; Set rom path
  90. }
  91.  
  92. If (!RegExMatch(systemName,"i)CD") && BiosVersion)
  93. IniWrite(BiosVersion, RaineIni, "neogeo", "bios")
  94.  
  95. HideEmuStart()
  96.  
  97. Run(executable . cliOptions, emuPath)
  98.  
  99. WinWait("ahk_class SDL_app")
  100. WinWaitActive("ahk_class SDL_app")
  101.  
  102. BezelDraw()
  103. HideEmuEnd()
  104. FadeInExit()
  105. Process("WaitClose", executable)
  106. 7zCleanUp()
  107. FadeOutExit()
  108. FadeOutExit()
  109. ExitModule()
  110.  
  111.  
  112. HaltEmu:
  113. WinGetPos,x,y,w,h,ahk_class SDL_app
  114. Log("RAINE - x:" . x . " y:" . y . " w:" . w . " h:" . h,5)
  115. Return
  116. RestoreEmu:
  117. If (Fullscreen = "true") {
  118. Sleep, 500
  119. Send, {Tab}
  120. Sleep, 200
  121. Send, {Enter}
  122. }
  123. WinGetPos,x,y,w,h,ahk_class SDL_app
  124. Log("RAINE - x:" . x . " y:" . y . " w:" . w . " h:" . h,5)
  125. Return
  126.  
  127. CloseProcess:
  128. FadeOutStart()
  129. WinClose("ahk_class SDL_app")
  130. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement