Advertisement
djvj

Unz module

Jul 11th, 2016
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. MEmu = UNZ
  2. MEmuV = v0.5L30
  3. MURL = http://townsemu.world.coocan.jp/
  4. MAuthor = djvj
  5. MVersion = 2.0.4
  6. MCRC = 7FE13B92
  7. iCRC = 1E716C97
  8. MID = 635038268929715384
  9. MSystem = "Fujitsu FM Towns"
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Make sure your Virtual_Drive_Path in RocketLauncherUI General Settings is correct as it is required.
  13. ; Run UNZ manually and in Settings->Property->CD-ROM1->Emulation Type->Select drive, set your virtual drive letter
  14. ; There is no way of launching the game automatically from the FM-Towns OS window.
  15. ; To launch the game, double click the game's name once you are in the FM-Towns OS
  16. ; View->Fullscreen to enable fullscreen
  17. ; If a game requires a boot disk or user disk, just put it on the same folder as your game and name it
  18. ; with the rom name with an hdm extension.
  19. ;----------------------------------------------------------------------------
  20. StartModule()
  21. BezelGUI()
  22. FadeInStart()
  23.  
  24. primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object
  25. emuPrimaryWindow := new Window(new WindowTitle("UNZ","Unz")) ; instantiate primary emulator window object
  26. emuOpenWindow := new Window(new WindowTitle("Open diskimage","#32770"))
  27. emuErrorWindow := new Window(new WindowTitle("Unz.exe","#32770"))
  28.  
  29. Fullscreen := moduleIni.Read("Settings", "Fullscreen","true","",1)
  30.  
  31. hideEmuObj := Object(emuOpenWindow,0,emuPrimaryWindow,1)
  32. 7z(romPath, romName, romExtension, sevenZExtractPath)
  33.  
  34. BezelStart("fixResMode")
  35.  
  36. fullscreen := If (Fullscreen = "true")?" -fs":""
  37.  
  38. diskFile := new File(romPath "\" . romName . ".hdm")
  39.  
  40. VirtualDrive("mount",romPath . "\" . romName . romExtension)
  41.  
  42. HideAppStart(hideEmuObj,hideEmu)
  43. primaryExe.Run(fullscreen)
  44.  
  45. emuPrimaryWindow.Wait()
  46. emuPrimaryWindow.WaitActive()
  47.  
  48. If diskFile.Exist()
  49. {
  50. TimerUtils.Sleep(500)
  51. emuPrimaryWindow.PostMessage("0x111",40005)
  52. emuOpenWindow.OpenROM(diskFile)
  53. }
  54.  
  55. BezelDraw()
  56. HideAppEnd(hideEmuObj,hideEmu)
  57. FadeInExit()
  58. primaryExe.Process("WaitClose")
  59. VirtualDrive("unmount")
  60. 7zCleanUp()
  61. BezelExit()
  62. FadeOutExit()
  63. ExitModule()
  64.  
  65.  
  66. HaltEmu:
  67. KeyUtils.Send("{F11}")
  68. TimerUtils.Sleep(200)
  69. Return
  70.  
  71. RestoreEmu:
  72. emuPrimaryWindow.Restore()
  73. If !emuPrimaryWindow.Active()
  74. Loop {
  75. TimerUtils.Sleep(50)
  76. emuPrimaryWindow.Activate()
  77. If emuPrimaryWindow.Active()
  78. Break
  79. }
  80. KeyUtils.Send("{F11}")
  81. Return
  82.  
  83. CloseProcess:
  84. FadeOutStart()
  85. emuPrimaryWindow.Close()
  86. TimerUtils.Sleep(1000)
  87. If emuErrorWindow.Exist()
  88. emuErrorWindow.Close()
  89. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement