Advertisement
djvj

dj daphne

Feb 15th, 2012
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 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. IniRead, noissues, %settingsFile%, %romName%, noissues, %A_Space%
  27. IniRead, fastboot, %settingsFile%, %romName%, fastboot, %A_Space%
  28. 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
  29.  
  30. ; Emptying variables if they are not set
  31. min_seek_delay := (min_seek_delay ? ("-min_seek_delay " . min_seek_delay) : (""))
  32. seek_frames_per_ms := (seek_frames_per_ms ? ("-seek_frames_per_ms " . seek_frames_per_ms) : (""))
  33. homedir := (homedir ? ("-homedir " . homedir) : (""))
  34. bank0 := (bank0 ? ("-bank 0 " . bank0) : (""))
  35. bank1 := (bank1 ? ("-bank 1 " . bank1) : (""))
  36. bank2 := (bank2 ? ("-bank 2 " . bank2) : (""))
  37. bank3 := (bank3 ? ("-bank 3 " . bank3) : (""))
  38. sound_buffer := (sound_buffer ? ("-sound_buffer " . sound_buffer) : (""))
  39. noissues := (If noissues = "true" ? ("-noissues") : (""))
  40. fastboot := (If fastboot = "true" ? ("-fastboot") : (""))
  41.  
  42. 7z(romPath, romName, romExtension, 7zExtractDir)
  43.  
  44. ; If launched game is an alternate version of a parent, this will send the parent's name to daphne.
  45. If ( romName in ace_hd )
  46. romName = ace
  47. Else If ( romName in badlands-r )
  48. romName = badlands
  49. Else If ( romName in cliff-r,cliff2009 )
  50. romName = cliff
  51. Else If ( romName in galaxy-r )
  52. romName = galaxy
  53. Else If ( romName in lair_hd,dle21 )
  54. romName = lair
  55. Else If ( romName in mach3-r )
  56. romName = mach3
  57. Else If ( romName in sdq-r,sdq121901 )
  58. romName = sdq
  59.  
  60. ; This allows us to send variables, that when empty, are not sent to the Run command
  61. RunEmu(executable, romName, globalParams, min_seek_delay, seek_frames_per_ms, homedir, bank0, bank1, bank2, bank3, sound_buffer, noissues, fastboot, "-framefile """ . romPath . frameFile . romExtension . "", emuPath) ;, "Min")
  62.  
  63. WinWait, ahk_class SDL_app
  64. WinWaitActive, ahk_class SDL_app
  65.  
  66. FadeInExit()
  67.  
  68. Process, WaitClose, %executable%
  69.  
  70. 7zCleanUp()
  71.  
  72. FadeOutExit()
  73.  
  74. WinActivate, Hyperspin
  75.  
  76. ExitApp
  77.  
  78.  
  79. RunEmu(exe,rom,param1=0,param2=0,param3=0,param4=0,param5=0,param6=0,param7=0,param8=0,param9=0,param10=0,param11=0,framefile=0,relativepath=0, option=0) {
  80. Run, %exe% %rom% %param1% %param2% %param3% %param4% %param5% %param6% %param7% %param8% %param9% %param10% %param11% %param12% %framefile%, %relativepath%, %option%
  81. }
  82.  
  83. CloseProcess:
  84. FadeOutStart()
  85. WinClose, ahk_class SDL_app
  86. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement