Author Topic: Is it possible to automount cd images into a virtual drive?  (Read 33 times)

Aeliss

  • Hero Member
  • *****
  • Posts: 861
Re: Is it possible to automount cd images into a virtual drive?
« Reply #2 on: June 30, 2020, 01:40:57 AM »
Ha ? There isn't script for it ?
I don't remember the reason.

A thing you can try
- Install DeamonTool, add a SCSI drive (not working with DT)
- Take a look in "mGalaxy\Data\Scripts"
- Copy paste the file "SSF [Script + DTlite].au3"
- Rename it "MagicEngine.au3"

edit the file

Code: AutoIt
  1. ;----------========== Parsing (common to every scripts) ==========----------
  2. ;
  3. ; There has been a call from mGalaxy to AutoIt and a commandline has been passed to it:
  4. ; Structure:/AutoIt3ExecuteScript "Path_to_script(between quotes)" Path_to_emu Emu_parameters(including a "Path_to_rom"(between quotes))
  5. ; Example:/AutoIt3ExecuteScript "C:\...\MESS [Script].au3" C:\...\mess64.exe a800 -flop1 "C:\...\Boulder_Dash.zip" -skip_gameinfo -nowindow
  6. ;
  7. ; 1. We don't need the part related to AutoiIt anymore [/AutoIt3ExecuteScript "Path to script (between quotes)"], the rest is assigned to '$commandline'
  8. ; 2. '$commandline' is then split in two: [Path_to_emu] goes to '$app', [parameters(including a "Path to rom" (between quotes))] goes to '$command'
  9. ; 3. Some apps (MESS for instance, when it searchs for a system Bios) need to know the path to their 'Working Directory'. We do 'extract' it from the full app path
  10. ;
  11. ; 1
  12. Local $count = StringInStr($CmdLineRaw, '.au3"', 0 , 1, 1)
  13. Local $commandline = StringTrimLeft( $CmdLineRaw, $count + 5 )
  14. ; 2
  15. Local $count2 = StringInStr($commandline, '.exe', 0 , 1, 1)
  16. local $app = StringLeft ($commandline, $count2 + 3 )
  17. local $command = StringTrimLeft($commandline, $count2 + 4 )
  18. if not $command then exit 0
  19. ; 3
  20. Local $workingDir = StringRegExpReplace($app, "\\[^\\]*$", "")
  21. FileChangeDir($workingDir)
  22. ;---------------------------------------------------------------------------
  23.  
  24. Local $openingCMD
  25. Local $closingCMD
  26.  
  27. ;Check path to DTLite.exe (way to detect and use DaemonTools v5)
  28. Local $pathdaemon = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\DTLite.exe", "")
  29. If not $pathdaemon Then
  30.         ;Check path to DTAgent.exe (way to detect and use DaemonTools v10)
  31.         $pathdaemon = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "DAEMON Tools Lite Automount")
  32.         If not $pathdaemon Then
  33.                 MsgBox(4096, "Search error", "DAEMON Tools Lite not found. Please install it!")
  34.                 exit 0
  35.         Endif
  36.         $pathdaemon = StringTrimRight ( $pathdaemon, 9 )
  37.         $openingCMD = $pathdaemon & ' -mount dt,0,' & $command
  38.         $closingCMD = $pathdaemon & ' -unmount dt,0'
  39.         $pathdaemon = '"' & $pathdaemon & '"'
  40.         $openingCMD = $pathdaemon & ' -mount scsi, 0,' & $command
  41.         $closingCMD = $pathdaemon & ' -unmount 0'
  42.  
  43. RunWait($openingCMD)
  44. ;RunWait('"' & $app & '-cd"')
  45. $PID = Run( '"' & $app & '" -cd' )
  46.  
  47.       Sleep(500)
  48.  
  49. RunWait($closingCMD)
  50.  
  51.  
  52.  
  53. ;Functions
  54.  Func Terminate()
  55.      While ProcessExists ( $PID )
  56.          ProcessClose ( $PID )
  57.      WEnd
  58.      RunWait($closingCMD)
  59.      Exit 0
  60.  


This is for test, if it work you need to make a clean system just for this machine and change the script file according to it, else this script will be used for all game used by this emul, even the roms.

And this script is basic it don't work for both DT versions.

« Last Edit: June 30, 2020, 01:42:40 AM by Aeliss »

appollo147

  • Newbie
  • *
  • Posts: 9
Is it possible to automount cd images into a virtual drive?
« Reply #1 on: June 29, 2020, 06:05:27 AM »
Like the topic title says I need to auto load cd images into alcohol 120%. I use Magic Engine for TG-16 and TG-CD games and it requires the image to be mounted, or a CD in the physical drive to run CD games. And before anyone says anything I know their are newer emulators, but I still like magic engine the best. Could someone please tell me if it is possible for mgalaxy to auto mount an image? And if so please give me instructions on how to do it. Any help with this would be greatly appreciated.