Author Topic: Demul  (Read 24156 times)

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #22 on: September 29, 2015, 05:26:09 PM »
About NullDC being better than Demul, it depend of the game. Shenmue have problems with NullDC (save is often erased), when I managed to complete the game without any problems on Demul.

I also think a joypad configuration shouldn't slow down the emulator.

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Demul
« Reply #21 on: September 29, 2015, 10:39:12 AM »
It's a little bit complicated
Demul =< 0.5.7 work with directX9 but the autoit script is realy complicated and instable (lot of bug inside demul)
Demul >= 0.5.8 work only with directX 10 (so your video card nee support it) , but the autoit script is simple, it's this one from script part on this forum

NullDC work fine with directX 9 and 10 but not Win8, no problem on Win 7

NullDC is normally better than Demul, a little more complicated to configure, but if it works on stand alone mode, it will work on mGalaxy.
There is no reasons for NullDC be slow after a joypad configuration, I realy think there is something bad in the configuration.
« Last Edit: September 30, 2015, 12:58:49 AM by Aeliss »

Stal8080

  • Newbie
  • *
  • Posts: 20
Re: Demul
« Reply #20 on: September 29, 2015, 09:28:09 AM »
In the emulator settings, I use the "gpuDX11" plugin for the video, "gdrImage" for the GD-ROM, "spuDemul" for the sound and "padDemul" for the controller (but if your graphic card is not DX11 compatible, it should also work with the "DX10" plugin).

In the "gpuDX11" settings, the resolution is set to my desktop resolution, internal resolution is set to "1" and the boxs "Start in fullscreen" and "Vsynch" are checked (Aspect ratio is set to "4:3").

With those settings, fullscreen is working fine (contrary to the old Demul 0.5.x version) and I can quit the emulator with the "ESC" key (in fact, I use the "Guide" button of my XBOX 360 controller but it's the same, I use a program called "Pinacle Game Profiler" to bind the "ESC" key to the "Guide" button, which allow me to quit all emulators without the need of the keyboard).

I hope it'll also work for you :)

Thanks for that.  I have been testing all my configs on my work laptop (at work) and basically transferring them to my Windows 7 machine at home.  So this morning when I was configuring DEMUL at home, I got a gpuDX Error?.  So I investigated my video card and it looks like it got swapped at some point because its a Gforce 7300 and only compatible with DirectX 9.0.   Which leads me to believe this might be my issue with NullDC as well when in Full Screen Mode.  So my only option I'm guessing with Demul is use the gpuDX11ng option from the Video Plugin drop down???  or upgrade video card?

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #19 on: September 28, 2015, 09:07:01 PM »
I think it's the same from the website but just to be sure, here's the Mgalaxy_script.exe file I use : https://mega.nz/#!t4RCELZQ!2cld-FDKZAC2lWea0fKPmHD6xovMqan3xDdjXFM2m3I (of course, the box "use script is available" should be checked in "mGalaxy_Runway").

Here's the demul build I use : http://demul.emulation64.com/files/demul07a_31715.7z (0.7 alpha, July 31).

And the command line :

Code: [Select]
<Cmd id="0" name="Demul (AutoIt)" value="-run=dc -image=&quot;%path\%file%ext&quot;" />
In the emulator settings, I use the "gpuDX11" plugin for the video, "gdrImage" for the GD-ROM, "spuDemul" for the sound and "padDemul" for the controller (but if your graphic card is not DX11 compatible, it should also work with the "DX10" plugin).

In the "gpuDX11" settings, the resolution is set to my desktop resolution, internal resolution is set to "1" and the boxs "Start in fullscreen" and "Vsynch" are checked (Aspect ratio is set to "4:3").

With those settings, fullscreen is working fine (contrary to the old Demul 0.5.x version) and I can quit the emulator with the "ESC" key (in fact, I use the "Guide" button of my XBOX 360 controller but it's the same, I use a program called "Pinacle Game Profiler" to bind the "ESC" key to the "Guide" button, which allow me to quit all emulators without the need of the keyboard).

I hope it'll also work for you :)
« Last Edit: September 28, 2015, 09:10:23 PM by davhuit »

Stal8080

  • Newbie
  • *
  • Posts: 20
Re: Demul
« Reply #18 on: September 28, 2015, 11:52:49 AM »
Have you tried with my file for NullDc, with joypad changement ?

Edit: I have tried your command file, it works for cdi and gdi file (I have a gdi file that don't work on demul, but an other is ok), the update is for atomiswave system not dreamcast.

Try with disabling the option "use script file" to make a try.

Have not tried file for NullDC yet.


As far as Demul, disabled script and bingo it worked!!!!   However I can't exit the emulator with esc key, so I'll have to use mouse or figure something out there.  That isn't ideal for my joystick situation.

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Demul
« Reply #17 on: September 28, 2015, 11:33:15 AM »
Have you tried with my file for NullDc, with joypad changement ?

Edit: I have tried your command file, it works for cdi and gdi file (I have a gdi file that don't work on demul, but an other is ok), the update is for atomiswave system not dreamcast.

Try with disabling the option "use script file" to make a try.
« Last Edit: September 28, 2015, 11:39:02 AM by Aeliss »

Stal8080

  • Newbie
  • *
  • Posts: 20
Re: Demul
« Reply #16 on: September 28, 2015, 10:51:47 AM »
After the troubles with NullDC I wanted to give DEMUL a shot.   When I configured my joysticks with NullDC it slowed everything way down to a point where not playable.  So I wanted to give DEMUL a try.  Out of mGalaxy everything configured and works great.  My questions now is when I map mgalaxy to demul via runway When it goes to launch a game mgalaxy just gives my the spinning cursor and nothing happens.  Was reading over this posts and I think I need to update my systems.xml file but not exactly sure to what.  Here is what I have now:

<System Type="Console">
    <Name>Sega Dreamcast</Name>
    <AppPath>G:\emulators\Demul\demul.exe</AppPath>
    <RomPath>G:\emulators\Demul\roms</RomPath>
    <SnapPath>G:\emulators\Dreamcast\Snaps</SnapPath>
    <VidPath>G:\emulators\Dreamcast\Intros</VidPath>
    <Emu selected="0">
      <Cmd id="0" name="DEmul [Script]" value="-run=dc -image=&quot;%path\%file%ext&quot;" />
      <Cmd id="1" name="NullDC [Script]" value="-config nullDC:Emulator.Autostart=1 -config ImageReader:LoadDefaultImage=1 -config ImageReader:DefaultImage=&quot;%path\%file%ext&quot;" />
    </Emu>
    <Extensions>.cdi,.chd,.gdi</Extensions>
    <Active>True</Active>
    <Script>True</Script>
    <Database>False</Database>

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #15 on: September 09, 2015, 08:33:48 PM »
No problem :)

And for those who are interested by the info, another emulator which doesn't like Teamviewer is Epsxe. The emulator will crash once a game is a loaded if Teamviewer is running.

mgalaxy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1165
    • Email
Re: Demul
« Reply #14 on: September 08, 2015, 12:15:53 PM »
Thanks for the tip davhuit!! I add it immediately!

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #13 on: September 08, 2015, 09:10:09 AM »
Bumping this old topic because I don't really know where to put it but I just updated my Demul version (DEmul x86 v0.7 Alpha BUILD 310715) and wanted to say the emulator now use the parameter "awave" for atomiswave (old versions were using the parameter "atomiswave")

I changed the command line in systems.xml manually and it's now working fine, so you might want to add a new command line in the next Mgalaxy.

Actual command line :

<Cmd id="0" name="DEmul [Script]" value="-run=atomiswave -rom=%file"/>

So it would need to be be something like :

<Cmd id="0" name="DEmul 0.5.8.2 or lower [Script]" value="-run=atomiswave -rom=%file"/>
<Cmd id="1" name="DEmul 0.7 or higher [Script]" value="-run=awave -rom=%file"/>

What is nice is that, contrary to older versions, this last one works fine in fullscreen (no more flickering).

Note : Teamviewer prevent the emulator to use fullscreen so if it seems the fullscreen doesn't work and you have teamviewer running on your computer, close it and then it'll work.

« Last Edit: September 08, 2015, 09:37:24 AM by davhuit »

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #12 on: May 04, 2014, 10:18:22 AM »
My bad, the xml had an old command-line, I dunno why :/

It had this one :

Code: [Select]
<Cmd id="0" name="Demul (AutoIt)" value="-run=dc -image=%file" />
And with this one, it's working :

Code: [Select]
<Cmd id="0" name="Demul (AutoIt)" value="-run=dc -image=&quot;%path\%file%ext&quot;" />
Thanks a lot :)

You're right about the fullscreen, I  should have mixed some versions by error because even with the "ALT+ENTER", it flicker.

But I don't really care about the fullscreen, as long as I can launch the version from mGalaxy so it's okay.

About Shenmue, I just remembered why I don't play it on "NullDC", my brother remembered me of the problem. In "NullDC", after a while, the savefile get corrupted so when you reload the game, you have a probability of not being able to reload your previous savefile.

But now, I'll be able to replay Shenmue (and some others games that might have some problems in "NullDC" directly from mGalaxy so thanks a lot to you :))



« Last Edit: May 05, 2014, 10:44:16 PM by davhuit »

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Demul
« Reply #11 on: May 04, 2014, 03:58:12 AM »
Quote
Ok, so now, I have to find how to add the dc isos launching without breaking everything. An idea about about to do that?

IDK, what is the problem ? Demul don't work with gdi in command line ?

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #10 on: May 03, 2014, 01:53:17 PM »
It's the same that the one on mGalaxy script, right?

Anyway, just tested it and it don't work, the emulator (v057) is not loaded with that script (contrary to the previous script I posted upper).

Edit : Ah, weird, I retried by renaming it "mGalaxy_Script.exe" and this time, the emulator launched, though the script from the website wouldn't want to work with my earlier tries o_o. Thanks a lot!

Ok, so now, I have to find how to add the dc isos launching without breaking everything. An idea about about to do that?
« Last Edit: May 03, 2014, 03:30:30 PM by davhuit »

Aeliss

  • Hero Member
  • *****
  • Posts: 900
Re: Demul
« Reply #9 on: May 03, 2014, 12:00:18 PM »
Code: (autoit) [Select]

   #include <Misc.au3>
    Opt("WinTitleMatchMode", 1)
     
    ;Parsing
    Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
    local $app = StringLeft ( $CmdLineRaw, $count + 4 )
    local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
    if not $command then exit 0
       
    HotKeySet("{ESC}", "Terminate")
     
    $PID = Run ('"' & $app & '" ' & $command)
     
    ;wait for emul start to hide cursor
    WinWaitActive ( "gpu" )

Send("!{ENTER}")

    _MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight)
     
    While ProcessExists ( $PID )
       sleep(500)
    WEnd
     
    Exit 0
     
    ;functions
    Func Terminate()
        While ProcessExists ( $PID )
              ProcessClose ( $PID )
        WEnd
           
        Exit 0
    EndFunc

davhuit

  • Full Member
  • ***
  • Posts: 173
Re: Demul
« Reply #8 on: May 03, 2014, 10:50:51 AM »
I'm not sure if I'm really clear about what I say, so I'm talking about this script for a "lite" version :

Code: (autoit) [Select]
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Misc.au3>

__myTaskHS(True)

Opt("WinTitleMatchMode", 1)

;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
   
HotKeySet("{ESC}", "Terminate")

$count = StringInStr($command, "-rom=", 0 , 1, 1)
local $file = StringTrimLeft( $command, $count + 4 )

local $fullscreenmode = 0 ; 0 = normal fullscreen 1 = special Fullscreen

; here you can use different configuration by game
local $option2 = "false"
local $option1 = IniRead("gpuDXv3.ini","main","transformZ", "")

;for naomi rom
if stringInStr($command,"naomi") then
   $type = ' -run=naomi -rom="'
   local $bios2 = 0
   Local $bios1 = IniRead("demul.ini", "main", "naomiBios", "")
   ;Special config for house of dead 2
   if $file = "hotd2" then
  $bios2 = 17
  $option2 = "true"
   elseIf $file = "kurucham" then
   $bios2 = 27
   elseIf $file = "alpildx" then
   $bios2 = 21
   elseIf $file = "lupinsho" then
   $bios2 = 21
   elseIf $file = "takoron" then
   $bios2 = 4
   else
  $bios2 = 10
   Endif
   If $bios1 <> $bios2 then Iniwrite("demul.ini", "main", "naomiBios", $bios2)
;for atomiswave rom     
elseif stringInStr($command,"Atomiswave") then
   $type = ' -run=atomiswave -rom="'
   $fullscreenmode = 1
;for Dreamcast rom     
elseif stringInStr($command,"DC") then
   $type = ' -run=dc -image="'
   $fullscreenmode = 1
;bug
Else
   Exit 0
Endif

;Set differents options by game
If $option1 <> $option2 then
   Iniwrite("gpuDXv3.ini","main","transformZ", $option2)
Endif

$PID = Run("demul.exe" & $type & $file & '"')
Local $hWnd = WinWaitActive ( "gpu" )

if $fullscreenmode = 1 then
   Local $winX = 0
   Local $winY = 0
   Local $winWidth = @DesktopWidth
   Local $winHeight = @DesktopHeight+20
   
   WinSetStyle($hWnd,$WS_POPUP)
   WinMove("gpu", "", $winX, $winY, $winWidth, $winHeight)
   Send("!{F3}")
   
   _MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight)

   __myTaskHS(True)
else
   Send("!{ENTER}")
endif


ProcessWaitClose("demul.exe")

if $fullscreenmode = 1 then __myTaskHS(False)
   
Exit 0


;functions
Func Terminate()
  While ProcessExists ( $PID )
      ProcessClose ( $PID )
  WEnd
  if $fullscreenmode = 1 then __myTaskHS(False)
  Exit 0
EndFunc


Func WinSetStyle($hWnd, $Style = -1, $ExStyle = 0)
    Local Const $GWL_STYLE = -16
    Local Const $GWL_EXSTYLE = -20
    Local Const $SWP_NOMOVE = 0x2
    Local Const $SWP_NOSIZE = 0x1
    Local Const $SWP_SHOWWINDOW = 0x40
    Local Const $SWP_NOZORDER = 0x4
    Local $iFlags = BitOR($SWP_SHOWWINDOW, $SWP_NOSIZE, $SWP_NOMOVE, $SWP_NOZORDER)
    If $Style = -1 Then $Style = $WS_MINIMIZEBOX + $WS_CAPTION + $WS_POPUP + $WS_SYSMENU
    DllCall("User32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE, "int", $Style)
    DllCall("User32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_EXSTYLE, "int", $ExStyle)
    DllCall("User32.dll", "int", "SetWindowPos", "hwnd", $hWnd, "hwnd", 0, "int", 0, "int", 0, _
            "int", 0, "int", 0, "int", $iFlags)
EndFunc


Func __myTaskHS($f_hide = False)
    Local $h_task = WinGetHandle("[CLASS:Shell_TrayWnd]")
    If Not $h_task Then Return SetError(1, 0, 0)

    Local $h_start = 0
    Local $a_wlist = WinList("[CLASS:Button]")
    If Not IsArray($a_wlist) Then Return SetError(2, 0, 0)

    For $iwin = 1 To $a_wlist[0][0]
        If _WinAPI_GetParent($a_wlist[$iwin][1]) = $h_task Then
            $h_start = $a_wlist[$iwin][1]
            ExitLoop
        EndIf
    Next

    If Not $h_start Then Return SetError(3, 0, 0)

    If $f_hide Then
        _WinAPI_ShowWindow($h_start, @SW_HIDE)
        _WinAPI_ShowWindow($h_task, @SW_HIDE)
    Else
        _WinAPI_ShowWindow($h_start, @SW_SHOW)
        _WinAPI_ShowWindow($h_task, @SW_SHOW)
    EndIf
EndFunc

This script manage to load the emulator withing mGalaxy so that's a great thing but it make the emulator crash/freeze on my pc for an unknow reason (rather than freezing, it seems it's loading the game but don't manage to run it).

What I would need is the same script but with all the optional lines removed (the ones about the fullscreen and such), so just to keep the lines which are required to load the emulator for the dc (I don't need atomiswave/naomi which already works fine with the last emulator version).

That's way, I should be able to run the emulator from mGalaxy without freeze/crash. Then, from that script, I'll see how to deal with the iso loading, if required, then with the "ALT+Screen" thing and it'll be ready :)
« Last Edit: May 03, 2014, 01:49:29 PM by davhuit »