Advertisement
djvj

Untitled

Jan 10th, 2016
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. MEmu = PicoDrive
  2. MEmuV = v1.45a
  3. MURL = http://notaz.gp2x.de/pico.php
  4. MAuthor = bleasby
  5. MVersion = 2.0.4
  6. MCRC =
  7. iCRC =
  8. mId =
  9. MSystem = "Sega Pico"
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Sega Pico games have three windows: the game window, the storywave and the drawing pad. For better gameplay please enable the RocketLauncher bezel feature.
  13. ; The bezel overlay feature is not supported for the three screens mode.
  14. ; If you use the provided bezel images in resolutions lower then 1360x768, some parts of the game window could be clipped out of the screen. For better gameplay experience resize the bezel image to fill your screen resolution and update the pixel positions at the bezel.ini file or set the option ChangeRes to true. This cannot be done automatically by RocketLauncher because this emulator does not allow to resize the storywave and the drawing pad. You should keep their sizes at the provided pixel dimensions and just resize the main game screen.
  15. ; The ChangeRes option will change your monitor screen resolution before creating the bezel image and restore it after.
  16. ; To use use different Game Pad images, create a folder in your emulator folder\pico\GamePads and save the image as romName.png - with romName being the name of the game you are using it for
  17. ;----------------------------------------------------------------------------
  18. StartModule()
  19. BezelGUI()
  20. FadeInStart()
  21.  
  22. settingsFile := modulePath . "\" . moduleName . ".ini"
  23. ChangeRes := IniReadCheck(settingsFile, "Settings", "ChangeRes","false",,1) ; Resize your monitor resolution to the bezel image size.
  24. ; desiredScreenRes := IniReadCheck(settingsFile, "Settings", "ScreenRes","",,1) ; Desired Monitor Screen resolution restore after the gameplay
  25. bezelTopOffsetScreen1 := IniReadCheck(settingsFile, "Settings", "Bezel_Top_Offset_Screen_1","29",,1)
  26. storywarePageUPKey := IniReadCheck(settingsFile, "Settings", "Storyware_Page_UP_Key","M",,1)
  27. picoStorywarePageDown := IniReadCheck(settingsFile, "Settings", "Storyware_Page_Down_Key","N",,1)
  28.  
  29. hideEmuObj := Object("Drawing Pad ahk_class PicoPadWnd",1,"Storyware ahk_class PicoSwWnd",1,"ahk_class PicoMainFrame",1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  30. 7z(romPath, romName, romExtension, sevenZExtractPath)
  31.  
  32. BezelStart(3)
  33.  
  34. If bezelPath
  35. { If (ChangeRes = "true")
  36. {
  37. ; ScreenResToBeRestored := desiredScreenRes ? ConvertToMonitorObject(bezelMonitor . "|" . desiredScreenRes) : ConvertToMonitorObject(bezelMonitor . "|" . MonitorTable[bezelMonitor].Width . "|" . MonitorTable[bezelMonitor].Height . "|" . MonitorTable[bezelMonitor].BitDepth . "|" . MonitorTable[bezelMonitor].Frequency)
  38. ; ScreenResToBeRestored := CheckForNearestSupportedRes(bezelMonitor, ScreenResToBeRestored )
  39. bezelRes := ConvertToMonitorObject(bezelMonitor . "|" . origbezelImageW . "|" . origbezelImageH . "|" . monitorTable[bezelMonitor].BitDepth . "|" . monitorTable[bezelMonitor].Frequency )
  40. bezelRes := CheckForNearestSupportedRes(bezelMonitor, bezelRes)
  41. Log("Changing monitor " . bezelMonitor . " to resolution width: " . bezelRes[bezelMonitor].Width . ", height: " . bezelRes[bezelMonitor].Height . ", bit depth: " . bezelRes[bezelMonitor].BitDepth . ", frequency: " . bezelRes[bezelMonitor].Frequency,1)
  42. SetDisplaySettings(bezelRes)
  43. }
  44. }
  45.  
  46. picoStorywareCurrentPage := 0
  47. XHotKeywrapper(storywarePageUPKey,"picoStorywarePageUP")
  48. XHotKeywrapper(picoStorywarePageDown,"picoStorywarePageDown")
  49.  
  50. HideEmuStart() ; This fully ensures windows are completely hidden even faster than winwait
  51.  
  52. Run(executable . " """ . romPath . "\" . romName . romExtension . """", emuPath)
  53.  
  54. WinWait("ahk_class PicoMainFrame")
  55. WinWaitActive("ahk_class PicoMainFrame")
  56.  
  57. If bezelPath
  58. { Screen1class := "ahk_class PicoMainFrame"
  59. Screen2class := "Storyware ahk_class PicoSwWnd"
  60. Screen2class := "Drawing Pad ahk_class PicoPadWnd"
  61. Screen1ID := WinExist(Screen1class)
  62. Screen2ID := WinExist("Storyware")
  63. Screen3ID := WinExist("Drawing")
  64. }
  65.  
  66. BezelDraw()
  67. HideEmuEnd()
  68. FadeInExit()
  69.  
  70. Process("WaitClose", executable)
  71. 7zCleanUp()
  72. BezelExit()
  73. FadeOutExit()
  74.  
  75. If bezelPath
  76. { If (ChangeRes = "true"){
  77. Log("Module - Restoring monitor " . bezelMonitor . " to resolution width: " . ScreenResToBeRestored[bezelMonitor].Width . ", height: " . ScreenResToBeRestored[bezelMonitor].Height . ", bit depth: " . ScreenResToBeRestored[bezelMonitor].BitDepth . ", frequency: " . ScreenResToBeRestored[bezelMonitor].Frequency,1)
  78. ; SetDisplaySettings(ScreenResToBeRestored)
  79. SetDisplaySettings(monitorTable) ; change res back to original
  80. }
  81. }
  82.  
  83. ExitModule()
  84.  
  85.  
  86. BezelLabel:
  87. disableHideToggleMenuScreen1 := true
  88. disableHideToggleMenuScreen2 := true
  89. disableHideToggleMenuScreen3 := true
  90. Return
  91.  
  92. PicoStorywarePageUP:
  93. Loop
  94. { picoStorywareCurrentPage++
  95. If picoStorywareCurrentPage
  96. WinMenuSelectItem, ahk_class PicoMainFrame, , Pico, Page %picoStorywareCurrentPage%
  97. If !ErrorLevel
  98. Break
  99. Else
  100. picoStorywareCurrentPage := picoStorywareCurrentPage-1
  101. }
  102. Return
  103.  
  104. PicoStorywarePageDown:
  105. picoStorywareCurrentPage--
  106. If (picoStorywareCurrentPage < 0)
  107. picoStorywareCurrentPage := 0
  108. If picoStorywareCurrentPage
  109. WinMenuSelectItem, ahk_class PicoMainFrame, , Pico, Page %picoStorywareCurrentPage%
  110. Else
  111. WinMenuSelectItem, ahk_class PicoMainFrame, , Pico, Title
  112. Return
  113.  
  114. CloseProcess:
  115. FadeOutStart()
  116. WinClose("Open ahk_class #32770")
  117. WinClose("Error ahk_class #32770")
  118. WinClose("ahk_class PicoMainFrame")
  119. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement