Launch nullDC from batch plus commandline options

Discussion in 'nullDC Discussion' started by yeshuachrist, Aug 16, 2010.

  1. yeshuachrist

    yeshuachrist New Member

    Messages:
    146
    Likes Received:
    4
    This will teach you to immediately open nullDC and load a IMAGE at the same time. All from the commandline using a batch file. I will also give all the commandline switches for nullDC the latest version nullDC 104 r50. This will also be very helpful for some of you troubleshooting a specific problem. The information available on the internet doesn't even work with nullDC 104 r50, but I managed to get all the commandline options working along with function batch files for the program. I did a similar thread for EPSXE in that section of the forum, and i haven't decided if i wanted to look at another emulator.

    INCORRECT EXAMPLE FROM GOOGLE
    nullDC_Win32_Release-NoTrace.exe -config ImageReader:DefaultImage="[ROMPATH]\[ROMFILE]"

    The above commandline to call nullDC and the rom will not work, because its missing some variables the program needs, the above will prompt you for an input, BELOW is a corrected commandline to launch the program nullDC and load a specific game at the same time.

    echo on

    nullDC_Win32_Release-NoTrace.exe ^
    -config nullDC:Emulator.Autostart=1 ^
    -config ImageReader:LoadDefaultImage=1 ^
    -config ImageReader:DefaultImage="C:\Documents and Settings\Christian\Desktop\Dreamcast\Games\NTSC-US\Power Stone v1.000 (1999)(EIDOS)(PAL)[!].gdi"

    PAUSE


    In the above example. nullDC is using 3 switches, nullDC needs 3 switches to load a game at startup from the commandline, save the above to a .bat file. Note for each switch you must use the "-config" command before entering the "section" separated by a colon and the "key" and its "value". (-config [section:key=value]) For example.

    The above batch is using a single line, do not press the enter key in your batch file. Below is an example, It is using these commands.

    -config nullDC:Emulator.Autostart=1
    -config ImageReader:LoadDefaultImage=1
    -config ImageReader:DefaultImage=" " <--where the patch to your image file

    You need at least these three commands present for nullDC 104 r50 to load a game on startup from batch. You can be very creative with nullDC commandline options, so here are a few of them. NOTE* the commandline options you use with nullDC will take priority over whats already set in the .cfg file for nullDC. NULLDC still reads your .cfg file but gives priority to the commandline options you select.
    Last edited: Aug 17, 2010
  2. NGEmu.com Advertisement

  3. yeshuachrist

    yeshuachrist New Member

    Messages:
    146
    Likes Received:
    4
    nullDC config file contents CONTROLLERS OMMITED FOR CLARITY

    ;; nullDC config file;;
    [nullDC]
    Dynarec.Enabled=1
    Dynarec.DoConstantPropagation=1
    Dynarec.UnderclockFpu=0
    Dreamcast.Cable=2
    Dreamcast.RTC=1545879921
    Dreamcast.Region=1
    Dreamcast.Broadcast=0
    Emulator.AutoStart=0
    Emulator.NoConsole=0

    [nullDC_plugins]
    GUI=nullDC_GUI_Win32.dll
    Current_PVR=drkPvr_Win32.dll
    Current_GDR=ImgReader_Win32.dll
    Current_AICA=nullAICA_Win32.dll
    Current_ARM=vbaARM_Win32.dll
    Current_ExtDevice=nullExtDev_Win32.dll
    Current_maple0_5=PuruPuru_Win32.dll:0
    Current_maple0_0=XMaple_Win32.dll:3
    Current_maple0_1=NULL
    Current_maple1_5=NULL
    Current_maple2_5=NULL
    Current_maple3_5=NULL
    Current_maple0_2=NULL
    Current_maple0_3=NULL
    Current_maple0_4=NULL
    Current_maple1_0=NULL
    Current_maple1_1=NULL
    Current_maple1_2=NULL
    Current_maple1_3=NULL
    Current_maple1_4=NULL
    Current_maple2_0=NULL
    Current_maple2_1=NULL
    Current_maple2_2=NULL
    Current_maple2_3=NULL
    Current_maple2_4=NULL
    Current_maple3_0=NULL
    Current_maple3_1=NULL
    Current_maple3_2=NULL
    Current_maple3_3=NULL
    Current_maple3_4=NULL

    [nullDC_GUI]
    AutoHideMenu=1
    Fullscreen=0

    [drkpvr]
    Emulation.AlphaSortMode=1
    Emulation.PaletteMode=3
    Emulation.ModVolMode=2
    Emulation.ZBufferMode=0
    Emulation.TexCacheMode=1
    OSD.ShowFPS=0
    OSD.ShowStats=0
    Video.ResolutionMode=3
    Video.VSync=0
    Enhancements.MultiSampleCount=0
    Enhancements.MultiSampleQuality=0
    Enhancements.AspectRatioMode=1

    [ImageReader]
    PatchRegion=1
    LoadDefaultImage=0
    DefaultImage=0
    LastImage=C:\Documents and Settings\Christian\Desktop\Dreamcast\Games\NTSC-US\Power Stone v1.000 (1999)(EIDOS)(PAL)[!].gdi

    [nullAica]
    BufferSize=1024
    LimitFPS=1
    HW_mixing=0
    SoundRenderer=1
    GlobalFocus=1
    BufferCount=1
    CDDAMute=0
    GlobalMute=0
    DSPEnabled=1

    [nullExtDev]
    mode=0
    adapter=0

    A PARTIAL LIST OF nullDC switches, a complete list will be much bigger
    This is the first section in the .cfg file expressed as a switch for commandline. *NOTE you are able to changed the values from 0 to 1 to enable them.

    -config nullDC:Dynarec.Enabled=1
    -config nullDC:Dynarec.DoConstantPropagation=1
    -config nullDC:Dynarec.UnderclockFpu=0
    -config nullDC:Dreamcast.Cable=2
    -config nullDC:Dreamcast.RTC=1545879921
    -config nullDC:Dreamcast.Region=1
    -config nullDC:Dreamcast.Broadcast=0
    -config nullDC:Emulator.AutoStart=0
    -config nullDC:Emulator.NoConsole=0 NICE this option diables command box

    Below section titled [nullDC_plugins] *NOTE you can change the values behind the "=" sign.

    -config nullDC_plugins:GUI=nullDC_GUI_Win32.dll
    -config nullDC_plugins:Current_PVR=drkPvr_Win32.dll
    -config nullDC_plugins:Current_GDR=ImgReader_Win32.dll
    -config nullDC_plugins:Current_AICA=nullAICA_Win32.dll
    -config nullDC_plugins:Current_ARM=vbaARM_Win32.dll
    -config nullDC_plugins:Current_ExtDevice=nullExtDev_Win32.dll
    -config nullDC_plugins:Current_ExtDevice=nullExtDev_Win32.dll
    -config nullDC_plugins:Current_maple0_0=XMaple_Win32.dll:3

    Ok i didn't do them all but you get the message. This is the commandline value set which is edited from the .cfg file nullDC, in this format (-config [section:key=value])

    Using the commandline to run switches, or making a .batch file COULD solve some controller problems. When I come back actually, I'll go ahead and give a layout for the batch file.

    [EXECUTABLE PATH] [SWITCHES]

    That was simple right, you need to have the 3 minimum options enabled to launch a game on startup from the commandline in the first post. I'll come back and make some more batch files you can use yourself, and i'll try to make a controller problem to sove using the commandline, but ugh not sure about that one though.
    Last edited: Aug 17, 2010
  4. KrossX

    KrossX クロスエクス

    Messages:
    4,664
    Likes Received:
    125
    Edit your posts and check "Disable smilies in text".
  5. Pretender86

    Pretender86 New Member

    Messages:
    50
    Likes Received:
    0
    KrossX is right, you should disable smilies in your text, although understandable it would be much better :D
  6. yeshuachrist

    yeshuachrist New Member

    Messages:
    146
    Likes Received:
    4
    OK I DID IT, FIXED A COMMON CONTROLLER DEVICE PROBLEM USING BATCH


    I'm going to create another thread, to discuss this problem/solution. This is what i found out.

    Dreamcast.RTC=1543277538

    This entry in the .cfg file is routinely modified and sometimes it can cause nullDC to crash or not load games, if you modify the .cfg file and stop nullDC from modifying the file. Preventing modification to the .cfg file and the use of non-standard values. Sometimes it is also normal for nullDC to forget the VMU or PURU PURU causing controller problems game crashes.

    http://forums.ngemu.com/nulldc-discussion/137784-fixed-controller-error-using-batch.html -see thread. Works great.
    Last edited: Aug 17, 2010
  7. neckilljo

    neckilljo Nomad User

    Messages:
    115
    Likes Received:
    0
    is there a way to break long command lines into 2 or more lines in windows cmd? i do it in linux using backslash "\"
    -- EDITED

    ok... i'm stupid... i always ask and go research right after then... the "^" char is used to break into multiple lines a single command

    nullDC_Win32_Release-NoTrace.exe ^
    -config nullDC:Emulator.Autostart=1 ^
    -config ImageReader:LoadDefaultImage=1 ^
    -config ImageReader:DefaultImage=".gdi"


    respect the space between the last valid char and the "^", since the "^" will be supressed, you'll need the space to keep "-config" separated from ".exe"
    Last edited: Aug 17, 2010
  8. yeshuachrist

    yeshuachrist New Member

    Messages:
    146
    Likes Received:
    4
    THANKS

    It simply has longer commandline options than epsxe, i was using the "word wrap" in notepad, and metapad to view/edit the .cfg. I'll try to add that language though next time, it does make things simpler...ok I edited my first post, with the correction.
    Last edited: Aug 17, 2010

Share This Page