Advertisement
djvj

Nuance Module

Jan 15th, 2024
1,874
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MEmu := "Nuance"
  2. MEmuV := "v0.51"
  3. MURL := ["http://www.nuon-dome.com/"]
  4. MAuthor := ["djvj"]
  5. MVersion := "2.0"
  6. MCRC := ""
  7. iCRC := ""
  8. MID := ""
  9. MSystem := ["VM Labs NUON"]
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Emu author died in 2007, so there will be no further updates to this emu
  13. ; Only CLI param supported is the config file for Nuance to use on load
  14. ; Virtual Drive must be used to load TruRip iso dumps of NUON games. The emu does not support reading from the iso directly.
  15. ; Only iso dumps are supported.
  16. ;----------------------------------------------------------------------------
  17. StartModule()
  18. BezelGUI()
  19. FadeInStart()
  20.  
  21. nuanceVideoWindow := "Nuance Video Display ahk_class GLWindow"
  22. nuanceCPWindow := "Nuance Control Panel ahk_class #32770"
  23. nuanceStatusWindow := "Nuance Status Window ahk_class #32770"
  24. nuanceOpenWindow := dialogOpen . " ahk_class #32770"
  25.  
  26. settingsFile := modulePath . "\" . moduleName . ".ini"
  27. customNuanceConfig := IniReadCheck(settingsFile, romName, "Custom_Config",,,1)
  28.  
  29. hideEmuObj := Object(nuanceOpenWindow,0,nuanceCPWindow,0,nuanceStatusWindow,0,nuanceVideoWindow,1)  ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  30. 7z(romPath, romName, romExtension, 7zExtractPath)
  31.  
  32. If (vdEnabled = "false" && romExtension = ".iso")
  33.     ScriptError("Virtual Drive support is disabled and is required to run this game. Please enable Virtual Drive first and try again.")
  34. Else
  35.     VirtualDrive("get") ; populates the vdDriveLetter variable with the drive letter to your scsi or dt virtual drive
  36.  
  37. BezelStart("FixResMode")
  38.  
  39. bizFullscreen := If fullscreen = "true" ? " --fullscreen" : ""
  40. defaultNuanceConfig := emuPath . "\nuance.cfg"
  41. nuanceConfigFile := CheckFile(If customConfig ? customConfig : defaultNuanceConfig)
  42.  
  43. HideEmuStart()
  44. If (vdEnabled = "true")
  45. {   VirtualDrive("mount",romPath . "\" . romName . romExtension)
  46.     usedVD := 1
  47. }
  48.  
  49. Run(executable . " """ . nuanceConfigFile . """", emuPath)
  50.  
  51. WinWait(nuanceStatusWindow)
  52. WinWaitActive(nuanceStatusWindow)
  53.  
  54. ControlClick, button4, %nuanceCPWindow% ; Load File
  55. WinWaitActive(nuanceOpenWindow) ; for some reason windows sometimes thinks Nuance loaded the open window when it did not, this helps prevent that.
  56. OpenROM(nuanceOpenWindow, vdDriveLetter . ":\NUON\nuon.run")
  57. WinWaitActive(nuanceCPWindow)
  58. ControlClick, button2, %nuanceCPWindow% ; Run
  59. WinActivate, %nuanceVideoWindow%
  60.  
  61. BezelDraw()
  62. HideEmuEnd()
  63. FadeInExit()
  64. Process("WaitClose", executable)
  65.  
  66. If usedVD
  67.     VirtualDrive("unmount")
  68.  
  69. 7zCleanUp()
  70. BezelExit()
  71. FadeOutExit()
  72. ExitModule()
  73.  
  74.  
  75. CloseProcess:
  76.     FadeOutStart()
  77.     WinClose(nuanceCPWindow)
  78. Return
  79.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement