Page 1 of 1

I need Pro Demul

Posted: Mon Jul 08, 2013 8:46 pm
by Aeliss
Hi, i know i m a little masochist but I have tried this emulator.
For me ATM :

1 - the gpuDx plugin dx10 and dx11 are totally bugged on seven x64with version 0.5.7.
2 - the version 0.5.8 version works with DX10 and DX11 pluggin but it s too much crappy.
3 - the version 0.5.8 don't work with old plugins.

So ATM I work with version 0.5.7 and gpuDXv3 pluggin, Now the problems

1 - All games don't have same configurations
2 - Fullscreen don't work on atomicswave system (flickering)
3 - All game don't use same bios, and AutoSelect don't work.

I have started an autoit script to solve theses bug but I can't find somes functions like remove the Demul Toolbat, If someone have an idea.

Code: Select all

  <System>
    <Name>Naomi</Name>
    <AppPath>F:\emulateur\arcade\Demul\DemulAutoit.exe</AppPath>
    <RomPath>F:\emulateur\arcade\Demul\Roms naomi</RomPath>
    <SnapPath>F:\emulateur\Mgalaxy\snapsemul\arcade</SnapPath>
    <VidPath />
    <Emu selected="0">
      <Cmd id="0" name="Naomi (AutoIt)" value="Naomi %file" />
    </Emu>
    <Ext selected="0">
      <Suf id="0" value=".zip" />
    </Ext>
    <Active>True</Active>
  </System>
  <System>
    <Name>Atomiswave</Name>
    <AppPath>F:\emulateur\arcade\Demul\DemulAutoit.exe</AppPath>
    <RomPath>F:\emulateur\arcade\Demul\Roms Atomiswave</RomPath>
    <SnapPath>F:\emulateur\Mgalaxy\snapsemul\arcade</SnapPath>
    <VidPath />
    <Emu selected="0">
      <Cmd id="0" name="Atomiswave (AutoIt)" value="Atomiswave %file" />
    </Emu>
    <Ext selected="0">
      <Suf id="0" value=".zip" />
    </Ext>
    <Active>True</Active>
  </System>

Code: Select all

#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Misc.au3>

If $CmdLine[0] == 0 Then exit
   
HotKeySet("{ESC}", "Terminate")

Opt("WinTitleMatchMode", 1)

local $file = $CmdLine[2]
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($CmdLine[1],"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"
   else If $file = "hotd2" then
	   $bios2 = 19
   else If $file = "alpildx" then
	   $bios2 = 21
   else
	  $bios2 = 10
   Endif
   If $bios1 <> $bios2 then Iniwrite("demul.ini", "main", "naomiBios", $bios2)
;for atomiswave rom	  
elseif stringInStr($CmdLine[1],"Atomiswave") then
   $type = ' -run=atomiswave -rom="'
   $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

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
If someone have already tried makaron or NullDc (naomi version), i Will be happy to have their impressions. Demul work really well but he is awfull to use, and I havent look for controler configuration yet.

Re: I need Pro Demul

Posted: Mon Jul 08, 2013 9:01 pm
by Stefan
Can you say me, whats the diff. between Demul and NullDC ?
I use only NullDC ... and ok, some games not run.
I remember, Demul do not run at me ...  :o Whatever: Sonic run  :D

Re: I need Pro Demul

Posted: Tue Jul 09, 2013 5:08 pm
by Aeliss
There is 2 version of NullDC, one for dreamcast and one for naomi rom (remember your bios problems with NullDC).
Demul can run Dreamcast rom too but NullDC is better, look for your games in compatibility list, Really few games don't work on NullDC.

Demul is more powerfull than NullDC but more greedy, and more instable (And NullDC is already hard enought to configure to have stable system too).

Demul is usefull for Arcade rom http://www.gametronik.com/site/emulation/DEMUL/, to make short Naomi = Dreamcast arcade version.

Re: I need Pro Demul

Posted: Thu Jul 11, 2013 12:12 pm
by Stefan
ok, thanks, then i will stay at NullDC, i just want to play some "arcades" ... Sonic, ...
Maybe there is a "must have game" at the other emu, but i dont know.
atm. i search only Pacman CE DX  ;)

Re: I need Pro Demul

Posted: Thu Jul 11, 2013 4:37 pm
by Aeliss
Demul is only for arcade. To play Dreamcast NullDc is really better.

Somes games working on Demul

Atomiswave
Image
Image
Image
Image

Naomi 1/2
Image
Image
Image
Image
Image

ATM the version 0.5.8 works without bug, so with a 10 lines autoitscript it s ok. But I don't think the last version is better (and compatible, DX11 obligatory).
The version 0.5.7 Works with this autoit script to correct bugs but I need to modifiy the script at every new games.

Re: I need Pro Demul

Posted: Sun Jul 14, 2013 1:22 pm
by Aeliss
I haven't made many tries (my playing machine is out of order for 10 15 days) but I think I m ok with Demul.

I use the last version (0.5.8) http://demul.emulation64.com/downloads/ less faster, less compatible, with more sound/graphic glitch, but less headache. No Fullscreen problem, no bios problems, ect ..

But this version NEED DX11 so don't work on XP

ATM the autoit allows a configuration by game (obligatory for somes games), works for naomi and atomiswave system. It can work for hikaru system too, but this system isn't totallly finished yet.

Code: Select all

#include <Misc.au3>

If $CmdLine[0] == 0 Then exit
   
HotKeySet("{ESC}", "Terminate")

local $file = $CmdLine[2]

;*************************************************
;                   Special config
;**************************************************

;defaut config
local $AutoSort1 = 1
local $OModifier1 = 1
local $TModifier1 = 1

;actual config
local $AutoSort2 = IniRead("gpuDX10.ini","main","AutoSort", "")
local $OModifier2 = IniRead("gpuDX10.ini","main","OModifier", "")
local $TModifier2 = IniRead("gpuDX10.ini","main","TModifier", "")

;for naomi rom
if stringInStr($CmdLine[1],"naomi") then
   $type = ' -run=naomi -rom="'
   ;special config for house of dead 2
   if $file = "hotd2" then $AutoSort1 = 0
;for atomiswave rom	  
elseif stringInStr($CmdLine[1],"Atomiswave") then
   $type = ' -run=atomiswave -rom="'
   ;special config for demolition first
   if $file = "demofist" then $AutoSort1 = 1
;bug
Else
   Exit 0
Endif

;Modify options if needed
If $AutoSort1 <> $AutoSort2 then Iniwrite("gpuDX10.ini","main","AutoSort", $AutoSort1)
If $OModifier1 <> $OModifier2 then Iniwrite("gpuDX10.ini","main","OModifier", $OModifier1)
If $TModifier1 <> $TModifier2 then Iniwrite("gpuDX10.ini","main","TModifier", $TModifier1)
   
$PID = Run("demul.exe" & $type & $file & '"')

;Remove mouse pointer
sleep(500)
_MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight)

ProcessWaitClose($PID)

Exit 0



Func Terminate()
  While ProcessExists ( $PID )
      ProcessClose ( $PID )
  WEnd
  
  Exit 0
EndFunc
No problem for configuration, only 1 pluggin usable every time.
You need to modify the gpuDX10.ini file like this (IDK why !)

Code: Select all

[bug]


[main]
Vsync = 1
AutoSort = 1
OModifier = 1

......

If it s starts directly whith [main] you will have problem with autoconfiguration.