Advertisement
djvj

Untitled

Feb 15th, 2012
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. ;----------------------------------------------------------------------------
  2. ; Daphne
  3. ; Daphne v1.0.12
  4. ; by djvj
  5. ; 1.6
  6. ;
  7. ; Notes:
  8. ; Executable should be Daphne.exe NOT Daphneloader.exe
  9. ; You need my Settings.ini from my user dir on the FTP @ /Upload Here/djvj/Daphne/
  10. ;----------------------------------------------------------------------------
  11.  
  12.  
  13. FadeInStart()
  14.  
  15. settingsFile := CheckFile(A_Scriptdir . "\Modules\" . systemName . "\Settings.ini")
  16.  
  17. IniRead, globalParams, %settingsFile%, settings, globalParams
  18. IniRead, min_seek_delay, %settingsFile%, %romName%, min_seek_delay, %A_Space%
  19. IniRead, seek_frames_per_ms, %settingsFile%, %romName%, seek_frames_per_ms, %A_Space%
  20. IniRead, homedir, %settingsFile%, %romName%, homedir, %A_Space%
  21. IniRead, bank0, %settingsFile%, %romName%, bank0, %A_Space%
  22. IniRead, bank1, %settingsFile%, %romName%, bank1, %A_Space%
  23. IniRead, bank2, %settingsFile%, %romName%, bank2, %A_Space%
  24. IniRead, bank3, %settingsFile%, %romName%, bank3, %A_Space%
  25. IniRead, sound_buffer, %settingsFile%, %romName%, sound_buffer, %A_Space%
  26. frameFile = %romName% ; storing parent romName to send as the framefile name so we don't send wrong name when using an alternate version of a game
  27.  
  28. ; Emptying variables if they are not set
  29. min_seek_delay := (min_seek_delay ? ("-min_seek_delay " . min_seek_delay) : (""))
  30. seek_frames_per_ms := (seek_frames_per_ms ? ("-seek_frames_per_ms " . seek_frames_per_ms) : (""))
  31. homedir := (homedir ? ("-homedir " . homedir) : (""))
  32. bank0 := (bank0 ? ("-bank 0 " . bank0) : (""))
  33. bank1 := (bank1 ? ("-bank 1 " . bank1) : (""))
  34. bank2 := (bank2 ? ("-bank 2 " . bank2) : (""))
  35. bank3 := (bank3 ? ("-bank 3 " . bank3) : (""))
  36. sound_buffer := (sound_buffer ? ("-sound_buffer " . sound_buffer) : (""))
  37.  
  38. 7z(romPath, romName, romExtension, 7zExtractDir)
  39.  
  40. ; If launched game is an alternate version of a parent, this will send the parent's name to daphne.
  41. If ( romName in ace_hd )
  42. romName = ace
  43. Else If ( romName in badlands-r )
  44. romName = badlands
  45. Else If ( romName in cliff-r,cliff2009 )
  46. romName = cliff
  47. Else If ( romName in galaxy-r )
  48. romName = galaxy
  49. Else If ( romName in lair_hd,dle21 )
  50. romName = lair
  51. Else If ( romName in mach3-r )
  52. romName = mach3
  53. Else If ( romName in sdq-r,sdq121901 )
  54. romName = sdq
  55.  
  56. ; This allows us to send variables, that when empty, are not sent to the Run command
  57. RunEmu(executable, romName, globalParams, min_seek_delay, seek_frames_per_ms, homedir, bank0, bank1, bank2, bank3, sound_buffer, "-framefile """ . romPath . frameFile . romExtension . "", emuPath) ;, "Min")
  58.  
  59. WinWait, ahk_class SDL_app
  60. WinWaitActive, ahk_class SDL_app
  61.  
  62. FadeInExit()
  63.  
  64. Process, WaitClose, %executable%
  65.  
  66. 7zCleanUp()
  67.  
  68. FadeOutExit()
  69.  
  70. WinActivate, Hyperspin
  71.  
  72. ExitApp
  73.  
  74.  
  75. RunEmu(exe,rom,param1=0,param2=0,param3=0,param4=0,param5=0,param6=0,param7=0,param8=0,param9=0,framefile=0,relativepath=0, option=0) {
  76. Run, %exe% %rom% %param1% %param2% %param3% %param4% %param5% %param6% %param7% %param8% %param9% %framefile%, %relativepath%, %option%
  77. }
  78.  
  79. CloseProcess:
  80. FadeOutStart()
  81. WinClose, ahk_class SDL_app
  82. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement