Advertisement
djvj

Untitled

Dec 31st, 2014
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MEmu = M88
  2. MEmuV = v2013/05/14 (unofficial)
  3. MURL = http://illusioncity.net/nec-pc-88-series-emulators-tools-lists/
  4. MAuthor = djvj
  5. MVersion = 2.0.0
  6. MCRC =
  7. iCRC =
  8. mId =
  9. MSystem = "NEC PC-88","NEC PC-8800","NEC PC-8801"
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Make sure msvcr71.dll is installed in your system or it exists in the emu's root folder
  13. ;----------------------------------------------------------------------------
  14. StartModule()
  15. BezelGUI()
  16. FadeInStart()
  17.  
  18. ; settingsFile := modulePath . "\" . moduleName . ".ini"
  19. ; Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
  20.  
  21. m88INI := CheckFile(emuPath . "\M88.ini")
  22. ; Did not work to set fullscreen...need another method
  23. ; IniRead, currentFullScreen , %iniFile%, M88p2 for Windows, FullWindow
  24. ; if (currentFullScreen = 0) and (Fullscreen != "Fullscreen")
  25.     ; IniWrite, 1, %m88INI%, M88p2 for Windows, FullWindow
  26. ; Else If (currentFullScreen = 1) and (Fullscreen = "Fullscreen")
  27.     ; IniWrite, 0, %m88INI%, M88p2 for Windows, FullWindow
  28.  
  29. BezelStart("FixResMode")
  30.  
  31. hideEmuObj := Object("88 ahk_class M88p2 WinUI",1)  ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
  32. 7z(romPath, romName, romExtension, 7zExtractPath)
  33.  
  34.  
  35.  
  36. If (romExtension = ".d88") {
  37.     ; Will also need MultiGame support here
  38.     IniRead, pc88Mode , %iniFile%, M88p2 for Windows, BASICMode ; get current mode set in emu
  39.     ; If (pc88Mode != 113)
  40.         ; IniWrite, 113, %m88INI%, M88p2 for Windows, BASICMode ; set to N88-V2 mode  -  oddly doesn't set the system correctly on next launch, yet this is the only ini setting that changes.
  41.     IniWrite, %romPath%\%romName%%romExtension%, %m88INI%, M88p2 for Windows, d88
  42.     IniWrite, %romPath%\%romName%%romExtension%, %m88INI%, M88p2 for Windows, FD1NAME0
  43.     IniWrite, 0, %m88INI%, M88p2 for Windows, Resume
  44. } Else {
  45.     ; Add other rom extension support here, like t88 and cmt for cassettes, not sure what extensions are CDs
  46.     ; IniWrite, 49, %m88INI%, M88p2 for Windows, BASICMode  ; set to N88-V2(CD) mode
  47.     ScriptError("This is not a supported extension in the module yet")
  48. }
  49.  
  50. HideEmuStart()
  51. Run(executable, emuPath)
  52.  
  53. WinWait("88 ahk_class M88p2 WinUI")
  54. WinWaitActive("88 ahk_class M88p2 WinUI")
  55.  
  56. PostMessage, 0x111, 40400,,,88 ahk_class M88p2 WinUI    ; Select FD1NAME0
  57. PostMessage, 0x111, 40003,,,88 ahk_class M88p2 WinUI    ; Reset system to load rom
  58.  
  59. BezelDraw()
  60. HideEmuEnd()
  61. FadeInExit()
  62. Process("WaitClose", executable)
  63. 7zCleanUp()
  64. BezelExit()
  65. FadeOutExit()
  66. ExitModule()
  67.  
  68.  
  69. CloseProcess:
  70.     FadeOutStart()
  71.     WinClose("88 ahk_class M88p2 WinUI")
  72. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement