Advertisement
djvj

Untitled

Jan 17th, 2016
1,056
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. MEmu = WinKawaks
  2. MEmuV = v1.62
  3. MURL = http://www.kawaks.net/
  4. MAuthor = djvj
  5. MVersion = 2.0.2
  6. MCRC = EE0EA110
  7. iCRC = 84C72842
  8. MID = 635038268935109871
  9. MSystem = "SNK Neo Geo","SNK Neo Geo AES","SNK Neo Geo MVS"
  10. ;----------------------------------------------------------------------------
  11. ; SNK Neo Geo, CPS1, CPS2
  12.  
  13. ; Notes:
  14. ; Rom path is set automatically by the module, no need to set that path in the emu
  15. ; All your roms should be zipped. Bios zips should be placed in the same dir as the games they are for. (ex. neogeo.zip should be with the neogeo roms)
  16. ; Load a game and set your controls at Game->Redefine keys->Player1 and 2. Then click Game->save key settings as default. Now they will be mapped for every game.
  17. ; Set your Region to USA by going to Game->NeoGeo settings->USA. If you don't want to use coins, select Game->NeoGeo settings->Console
  18. ; Set Sound->Sound frequency->44 KHz (or 48 KHz)
  19.  
  20. ; The larger games take a long time to load, be patient.
  21. ;----------------------------------------------------------------------------
  22. StartModule()
  23. FadeInStart()
  24.  
  25. settingsFile := modulePath . "\" . moduleName . ".ini"
  26. fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
  27. freeplay := IniReadCheck(settingsFile, "Settings", "Freeplay","0",,1) ; 0=off, 1=on
  28. country := IniReadCheck(settingsFile, "Settings", "Country","1",,1) ; 0 = Japan, 1 = USA, 2 = Europe
  29. hardware := IniReadCheck(settingsFile, "Settings", "Hardware","1",,1) ; 0 = Console, 1 = Arcade
  30. hotkeys := IniReadCheck(settingsFile, "Settings", "Hotkeys","1",,1) ; Set to 0 to disable menu shortcuts (handy for Hotrod players)
  31.  
  32. 7z(romPath, romName, romExtension, sevenZExtractPath)
  33.  
  34. wkINI := CheckFile(emuPath . "\WinKawaks.ini")
  35.  
  36. ; Compare existing settings and if different than desired, write them to the emulator's ini
  37. IniWrite(freeplay, wkINI, "NeoGeo", "NeoGeoFreeplay", 1)
  38. IniWrite(country, wkINI, "NeoGeo", "NeoGeoCountry", 1)
  39. IniWrite(hardware, wkINI, "NeoGeo", "NeoGeoSystem", 1)
  40. IniWrite(hotkeys, wkINI, "Misc", "EnableHotKeys", 1)
  41. IniWrite(romPath, wkINI, "Path", "RomPath1")
  42.  
  43. ; fullscreen := If fullscreen = "true" ? " -fullscreen" : ""
  44.  
  45. Run(executable . " " . romName, emuPath)
  46.  
  47. WinWait("Kawaks")
  48. WinWaitActive("Kawaks")
  49.  
  50. Loop { ; looping until WinKawaks is done loading game
  51. Sleep, 200
  52. WinGetTitle, winTitle, Kawaks 1.62 ahk_class Afx:400000:0 ; excluding the title of the GUI window so we can read the title of the game window instead
  53. StringSplit, T, winTitle, %A_Space%
  54. If (T4 != "Initializing" && T4 != "Lost" && T4 != "") {
  55. Sleep, 500 ; need a bit longer so we don't see the winkawaks window
  56. Break
  57. }
  58. }
  59.  
  60. ; Sometimes the border and titlebar appear and flash rapidly, this gets rid of them
  61. If (fullscreen = "true") {
  62. ; WinSet, Style, -0xC00000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the TitleBar
  63. ; WinSet, Style, -0x40000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the border of the game window
  64. MaximizeWindow("Kawaks 1.62 ahk_class Afx:400000:0")
  65. }
  66.  
  67. FadeInExit()
  68. Process("WaitClose",executable)
  69. 7zCleanUp()
  70. FadeOutExit()
  71. ExitModule()
  72.  
  73. CloseProcess:
  74. FadeOutStart()
  75. ; SetKeyDelay(50)
  76. PostMessage, 0x111, 32775,,, Kawaks ahk_class Afx:400000:0 ; Pause emu
  77. Sleep, 1000 ; increase this if winkawaks is not closing and only going into windowed mode
  78. PostMessage, 0x111, 32808,,, Kawaks ahk_class Afx:400000:0 ; Reset emu
  79. ; PostMessage, 0x111, 32847,,, Kawaks ahk_class Afx:400000:0 ; Toggle Fullscreen
  80. ; Send, {ENTER} ; pause emu
  81. Sleep, 1000 ; increase this if winkawaks is not closing and only going into windowed mode
  82. ; WinClose("Kawaks 1.62 ahk_class Afx:400000:0")
  83. PostMessage, 0x111, 57665,,, Kawaks ahk_class Afx:400000:0 ; Exit
  84. ; Sleep, 500
  85. ; If WinExist("Kawaks 1.62 ahk_class Afx:400000:0")
  86. ; { WinActivate ; use the window found above
  87. ; Send, {Alt}FX
  88. ; }
  89. ; alternate closing method
  90. ; errorLvl := Process("Exist", executable)
  91. ; If errorLvl
  92. ; Process("Close", executable) ; sometimes the process doesn't close when using the GUI, this makes sure it closes (eeprom still saves with previous line)
  93. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement