Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[APP] SwitchDisc 1.0.4


nullPointer

Recommended Posts

Well I suppose I could look into virtual drives, but honestly I'd like to keep it clean. Are you using virtual drives? Maybe you could point me toward a tutorial for what I should use. Oh, I forgot to mention that GameEX regainf focus just after SD completes the disc change operation. So we still have a few kinks to work out.

I’m not currently using a virtual drive for nullDC, but it’s more a matter of just getting it working than it is of any real conscious decision on my part. TBH I sometimes prefer a virtual drive because they are typically more robust about handling various disc image formats. It’s not necessarily better or worse than running the disc image natively within the emulator, just a different way of doing things. If you plan to use a virtual drive you’ll want to grab Daemon Tools Lite, since GameEx has native support for it (Ever wonder what was going on with those [VIRTUALDRIVE] parameters appearing in some of the default Emulator commands in GameEx? Now you know. ;))

As far as the focus issue goes, it looks like you’ll want to use an Advanced Emulator Config for nullDC with SwitchDisc set as an additional watched process (at least that’s my first thought).

For the better for sure, might slow down the dev. process but it gives you a chance to get user feedback and not alienate them from SD.

Ah, I alienate people all the time. I’m pretty used to it. (See what I mean? That was my attempt at "humor") :lol::rolleyes:

Yes, I can use all other mouse functions except that button.

Ready to have your mind blown (or maybe it’s just me)? I said earlier that the code for collecting the mouse click and the mouse move functions was basically the same. That wasn’t right. It’s exactly the same (well except for the one variable). To wit:

private void BtnKeysMouseClick_Click(object sender, EventArgs e){     this.isMouseClick = true;     activateMouseOps();  }private void BtnKeysMouseMove_Click(object sender, EventArgs e){     this.isMouseMove = true;     activateMouseOps();} 

The other weird part is that I explicitly created an error in the MouseMove method to see what would happen. The Configurator crashed (as expected), but it did generate an error message like so:

SD_Error_Msg.png

I went ahead and put together a quick configurator build that utilizes error trapping specific to the Mouse Move button. If that method throws an error it will be caught ... but TBH now I’m not so sure it’s going to behave any differently for you. Please replace your current version of the Configurator tool with the one attached. This one will generate an error message if something goes wrong when you click the Mouse Move button, but I'm starting to wonder if something else is happening (what that might be, I have no idea)

SwitchDiscConfigurator-1.0.4.1.7z

Thanks man, hopefully we’ll get to the bottom of it.

Link to comment
Share on other sites

SD_Error_Msg.png

See now, that was funny :lol: .

I'll have a look at that modified configurator later, hopefully it sheds some light in that dark crag our new ninja gremlin :ph34r: is hiding! Man thoes things reproduce like crazy...better give that samurai new orders emperor nullPointer. I'll edit back this evening.

EDIT:

Ok, strange. Now I can't use any of the mouse functions, well in the GUI. First the clicks worked, but not the mouse move. Now none of the mouse functions work. I replaced the configurator with the modified one and it crashed just like before, no error. I then removed it and replaced it with the old one, and it doesn't recognise the mouse clicks either. Now that could mean that the modified one is still affecting it somehow, or more likly that the mouse clicks initially worked when I was messing around and then stopped due to the same issue that caused the mouse move never to.

You could make a check sequence for the configurer or any other SD operation that requires a minimum .NET build. See here http://support.microsoft.com/kb/315291 If the host machine does not have the required registry keys then have SD throw an exception, "Switch Disk requires .NET version 4.0. Please download .NET 4.0 or above to use this program". Or you could deploy SD with the framework:http://msdn.microsoft.com/en-us/library/6hbb4k3e.aspx Not sure about the usage rights and agreements though.

Here is a pic of my registry if it helps. You'll notice there is 3.0 and 4.0 but not 3.5. You mentioned earlier that your test machines have 3.5 installed. I'm woundering if that contained something critical and if I can still download 3.5 even though I have 4.0:

post-10261-0-55039100-1359148337_thumb.j

Link to comment
Share on other sites

I have been also using this advanced config for nullDC:

# This is an advanced emulator configuration file. It does things such as allow keyboard only emulators to be operated by a gamepad, wait for additional processes to exit and map keys. If this file is used it overrides the MAPKeys setting for the emulator.[GENERAL]# Enabled. Use this. Enabled=True#Make MCE Back button and X-ARCADE Escape and SlikStik Escape to close emulator process MapBack=True#Make Escape key close emulator process MapEscape=True#When exiting an emulator via the above mappings, you can specify keys in the send keys format to send instead of having GameEx close the process to cleanly exit the emulator. Such as the Q Key or ALT F4 which is %{F4} KeysToSendOnExit=#Wait for keys to be processed by the emulatorEmuWaitForKeys=True#Additional processes to wait to exit or close on exit. Dont include the .exe. Leave blank not to use. Process1=nullDC_Win32_Release-NoTrace Process2=switchdisc Process3= Process4=[JOYMAPPING]# For mapping a GamePad to keys# Specify a virtual key code to send when the specific joystick control is pressed. Look at vkcodes.htm for codes. JoymappingEnabled=FALSE Left= up= Right= Down= Button1= Button2= Button3= Button4= Button5= Button6= Button7= Button8= Button9= Button10= Button11= Button12=[GAMEPADEXIT]#MAP Gamepad controls to exit and make controls exit process MapGamePadExit=True#Flag the controls that exit a game by placing True next to each control. To not use the control as part of the combination use a 0 Left=True Down= Right= Up=True Button1= Button2= Button3= Button4=True Button5=True Button6=True Button7= Button8= Button9= Button10= Button11= Button12=[MOUSEMAPPING]# For registered users, the ability to control the mouse with a gamepad and/or directional keys.# For example for PC strategy games.# Apparantly this functionality is similar to the software Pinnacle profiler. Remember you can setup an emulator# as one PC game. Specify enabled, and mousespeed 0-20. 20 Being fastest. This setting overrides the directional# mapping for the above and buttons 1 and 2 Button 1/CTRL becomes left mouse. Button 2/ALT Right mouse MouseMappingEnabled=False        MouseSpeed=0[BLOCKKEYS]# Use this section to disable and block key presses and mouse clicks.# To disable the mouse clicks use code 1 for left mouse button,# 2 for right button and 4 for middle buttonEnabled=FalseBlockKey_1=1BlockKey_2=2BlockKey_3=4BlockKey_4=BlockKey_5=[KEYBOARDREMAP]# Remap Keys for the emulator. Specify from the from key, which is the key you wish to replace the to key# This should be good enough for real time gaming. Registered version feature. Look at VKCodes.htm for codes.Enabled=FalseRemap_1_From_VK=Remap_1_To_VK=Remap_2_From_VK=Remap_2_To_VK=Remap_3_From_VK=Remap_3_To_VK=Remap_4_From_VK=Remap_4_To_VK=Remap_5_From_VK=Remap_5_To_VK=

I added Switchdisc to the aditional processes to watch but that doesn't seen to make a difference. Just when Switchdisc completes the switchdisc operation sequence and nulldc reloads the next disc, GameEX regains focus.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry, to tripple post. However I just got "bumped" from my position at work by another employee who was laid off. So she gets my job and I get laid off! I am working on my resume, exit considerations, etc. So basicly I will not be able to contribute much to the project for a while. Thanks, I'll drop in from time to time as I get a chance.

Link to comment
Share on other sites

I'm extremely sorry to hear that Felix. I don't know you in person, but I can tell from collaborating with you on SwitchDisc that you're someone with a fine eye for detail and a high level of dedication. I'm rather convinced that in time you'll be able to look back and know that this is your employers loss. Keep at it man, and don't let the bastards get you down. Thanks for all the work you've put into testing SwitchDisc, and please know you've been a very valuable asset.

I haven't been able to put much time into the project lately either. I'm in something of a battle to keep the position I have at my job. I'm hoping I can win that battle, but it's meant a lot of travel and putting in 60 or more hours per week.

Please keep us posted on how things are going for you. One of the aspects I've always appreciated about our community is exactly that. We're more than just an emulation forum, we're a community, and we've got each others back through good times and bad. We're kinda like Cheers that way.

Prayers to you and yours man.

Link to comment
Share on other sites

Sorry, to tripple post. However I just got "bumped" from my position at work by another employee who was laid off. So she gets my job and I get laid off! I am working on my resume, exit considerations, etc. So basicly I will not be able to contribute much to the project for a while. Thanks, I'll drop in from time to time as I get a chance.

Sorry to hear about that buddy, let's hope something good becomes of your situation.

Link to comment
Share on other sites

  • 2 weeks later...

I just wanted to say hey and give a little update.

The person who exercised her right to bump my position was just a few years from retiring and probably needs the full social security benifits. I'm young and it would be easier for me to find work than her, given unfortunately abundant age discrimination. She was offered a full time position, but chose my half time job. I guess it would be the lesser of two evils to bump the person who stands to loose the least. Frankly, I would be angry if they were laying me off to raid my pathetic 10,000 per year just to ease their "fiscal responsibility". If they did that I would be glad to go, abandon ship while it's still afloat! I took this job to gain experience, build a social network (the old school way), and to keep my foot in the door.

Actually this situation sounds like it will lead to a better opportunity. I have two options on the table and both of them pay much better. The change will be difficult but I think this will be the next logical step in my career. I still have a few suprises left in my bag of tricks... tenacity is the better part of stubbornness. Don't count Felix out just yet!





  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Ok, guys I'm back and ready to kick the ninja gremlin's butt.

So, I moved my old rig to the arcade cabinet, a nice step up for it. As for my main rig, I decided to build an APU based (A10-5800K) Mini ITX with UEFI. I moved everything over on a fresh install of windows 7 and got things working just like before. This is now my main HTPC rig, nice and compact, and looks good in the entertainment center. The reason I mention this is because now the issue with the mouse functions in the configurator have disappeared! Although I'm a little perturbed we could not sort it out for the other rig, I'm glad it went away for the HTPC; it's the intended rig for switchdisk anyway. I'll post my config after I set up NullDC correctly.

5/13/2013 2:15:13 PM SwitchDisc logging initialized
5/13/2013 2:15:13 PM SwitchDisc Version: 1.0.4.0
5/13/2013 2:15:13 PM Processing SwitchDisc command options...
5/13/2013 2:15:13 PM Command options parsed successfully:
5/13/2013 2:15:13 PM DiscID =
5/13/2013 2:15:13 PM DiscFile = Resident Evil CODE Veronica (Disc 1).cdi
5/13/2013 2:15:13 PM EmulatorID =
5/13/2013 2:15:13 PM WorkingPath = E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Emulator\Emulators\nullDC_104_r136
5/13/2013 2:15:13 PM ArtPath =
5/13/2013 2:15:13 PM FullScreen = False
5/13/2013 2:15:13 PM NoGUI = False
5/13/2013 2:15:13 PM Exit = False
5/13/2013 2:15:13 PM Parsing SwitchDisc configuration from file
5/13/2013 2:15:13 PM Registering SwitchDisc HotKey
5/13/2013 2:15:13 PM Registering SwitchDisc Interface Keys
5/13/2013 2:15:13 PM Found matching emulators[1] via working path (E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Emulator\Emulators\nullDC_104_r136)
5/13/2013 2:15:13 PM Searching for matching Multi-Disc Set via Disc File (Resident Evil CODE Veronica (Disc 1).cdi)
5/13/2013 2:15:13 PM Found matching Multi-Disc Set via Disc File (Resident Evil CODE Veronica (Disc 1).cdi)
5/13/2013 2:15:13 PM Total matching Multi-Disc Sets = 1
5/13/2013 2:15:45 PM Initializing SwitchDisc GUI
5/13/2013 2:15:45 PM Initializing SwitchDisc Target Window: nullDC v1.0.4 (built Aug 21 2011@04:07:01)
5/13/2013 2:15:45 PM Invoking Send Keys Before GUI
5/13/2013 2:15:45 PM Initializing SwitchDisc Target Window: nullDC v1.0.4 (built Aug 21 2011@04:07:01)
5/13/2013 2:15:45 PM SwitchDisc GUI: Initializing default artwork path: E:\Michael\GAMES\My Games\All Games (Files)\PSone\ePSXe Emulator\ePSXecutor frontend\SwitchDisc-1.0.3\SwitchDisc-1.0.3\images\DefaultDiscImg.png
5/13/2013 2:15:45 PM SwitchDisc GUI: Initializing NullDC 1.0.4 r136 artwork path: E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Artwork\Cartridge
5/13/2013 2:15:45 PM SwitchDisc GUI: Initializing currently loaded disc
5/13/2013 2:15:45 PM SwitchDisc GUI: Found currently loaded disc. Updating GUI.
5/13/2013 2:15:45 PM SwitchDisc GUI initialized sucessfully
5/13/2013 2:15:48 PM Invoking SwitchDisc
5/13/2013 2:15:48 PM Setting target window as foreground window: nullDC v1.0.4 (built Aug 21 2011@04:07:01)
5/13/2013 2:15:48 PM Invoking Send Keys Before Disc Switch
5/13/2013 2:15:48 PM Invoking special operation: Mouse Move
5/13/2013 2:15:48 PM Invoking special operation: Mouse Move
5/13/2013 2:15:49 PM Simulating modified key stroke: [MENU, VK_F]
5/13/2013 2:15:49 PM Pausing thread: 500ms
5/13/2013 2:15:49 PM Simulating single key stroke: RIGHT
5/13/2013 2:15:49 PM Pausing thread: 500ms
5/13/2013 2:15:50 PM Simulating single key stroke: RIGHT
5/13/2013 2:15:50 PM Pausing thread: 500ms
5/13/2013 2:15:50 PM Simulating single key stroke: DOWN
5/13/2013 2:15:50 PM Pausing thread: 500ms
5/13/2013 2:15:51 PM Simulating single key stroke: DOWN
5/13/2013 2:15:51 PM Pausing thread: 500ms
5/13/2013 2:15:51 PM Simulating single key stroke: DOWN
5/13/2013 2:15:51 PM Pausing thread: 500ms
5/13/2013 2:15:52 PM Simulating single key stroke: RIGHT
5/13/2013 2:15:52 PM Pausing thread: 500ms
5/13/2013 2:15:52 PM Simulating single key stroke: RETURN
5/13/2013 2:15:52 PM Pausing thread: 500ms
5/13/2013 2:15:53 PM Simulating single key stroke: TAB
5/13/2013 2:15:53 PM Pausing thread: 1000ms
5/13/2013 2:15:54 PM Simulating single key stroke: RETURN
5/13/2013 2:15:54 PM Pausing thread: 500ms
5/13/2013 2:15:54 PM Invoking special operation: Open File Dialog
5/13/2013 2:15:55 PM Program Terminated Unexpectedly
5/13/2013 2:15:55 PM Error:Sequence contains no elements
5/13/2013 2:16:43 PM Processing SwitchDisc command options...
5/13/2013 2:16:43 PM Command options parsed successfully:
5/13/2013 2:16:43 PM DiscID =
5/13/2013 2:16:43 PM DiscFile =
5/13/2013 2:16:43 PM EmulatorID =
5/13/2013 2:16:43 PM WorkingPath =
5/13/2013 2:16:43 PM ArtPath =
5/13/2013 2:16:43 PM FullScreen = False
5/13/2013 2:16:43 PM NoGUI = False
5/13/2013 2:16:43 PM Exit = True
5/13/2013 2:16:43 PM Cleaning up image cache
5/13/2013 2:16:43 PM Exiting SwitchDisc ... Bye
5/13/2013 2:16:43 PM Program Terminated Unexpectedly
5/13/2013 2:16:43 PM Error:Object reference not set to an instance of an object.

There is an issue with the change disk operation. It fails before the change is attempted. I'm not sure what is happening but I tried to manually navigate to the change disk operation in nullDC r50. The screen goes to the home dreamcast screen where you would see your memory cards. Then the program becomes unresponsive and crashes. This occurs whether I use switchdisk or manually navigate to the built in operation. What is that about? EDIT: I have installed r136 since and the crash does not occur but the disc swap operation does not occur either. The screen just sits on the dreamcast home screen. Actually if you navigate to the disc swap function again the dreamcast asks you to insert a disc. I don't know what to do after that screen is up. I tried to load an image but it just sits there waiting for me to insert a disc.

Update on the job search:

I have been working hourly to keep my foot in the door since the lay off in march. However most of that hourly work will evaporate on me this summer and practically completely by fall. The major opportunity I thought might be a possibility turned out to be just beyond my reach. I hate how a piece of paper mean everything, even trumping experience in the exact job for which you are applying. Stupid world we live in. So I'm going back to school this fall to finish my degree and hopefully that will increase my opportunities.

Link to comment
Share on other sites

Welcome back to the fold Felix! I’m extremely sorry to hear that your job may slowly evaporate from underneath you. I don’t know the nature of your work, but I do know that you’re extremely dedicated and hard working when push comes to shove. If your employer fails to see that it truly is their loss. The flip side of that equation is that you’re using the opportunity to go back to school. That’s awesome! I’m glad to hear that you’re seizing the opportunity.

So it’s high time that I provide you with an update on the status of SwitchDisc (as well as anyone else who may have some interest in the project). By all appearances I’ve been letting SwithDisc languish, but it’s not entirely true. I’ve got an updated build of SwitchDisc sitting on my hard drive at home which addresses many of the functional and visual enhancements you and I have discussed from time to time. But that’s where the content of your previous post becomes very topical to what exactly the holdup has been.

In order to properly change discs via SwitchDisc in nullDC you need to use the special Open File Dialog operation (even if you're using a virtaul drive as near as I can tell). But the nullDC Open File Dialog uses a slightly special button for the purposes of … uh ... opening files which is not just a button, but a dropdown list as well (known as a SplitButton)

Standard Button:

post-7172-0-95185400-1368483773_thumb.pn

Split Button:

post-7172-0-34683200-1368483781.png

So what’s the big deal with this split button? Well it all boils down to my choice of APIs. The Open File Dialog was something of an experimental feature for SwitchDisc in that it was an opportunity to play around with some simple UI Automation tools. (Dirty secret: SwitchDisc itself was my excuse to refresh some of my meager skills in .NET, WPF, and other MS framework stuff since I’m much more of a Java dude IRL :ph34r:). So I went with White UI Automation API since it seemed like a slick API that was both easily accessible and easy to use. For the most part it’s been awesome, except … try as I might, be it through force, finesse, or begging I can’t get the White API to recognize that damned split button as a valid control (It doesn't 'see' it at all). So changing discs in nullDC becomes extremely problematic as the open file dialog seems to be the ‘gate-keeper’ of the process as it were.

So what’s the hold-up? Well I need to back the White framework out of the project and utilize a different API for the Open File Dialog operation. Luckily that’s the only portion of SwitchDisc that utilizes the White API, but it still requires a bit of extraction. But more than that, I need to learn the ropes of the alternate API before I can effectively apply the necessary changes (I’m fairly certain I’m running with bog standard Windows UI Automation at this point) ... and that’s where I’ve stalled for the moment. Work has been brutally demanding lately and I just haven’t had a good opportunity to extract the White framework and learn the ropes of the new one enough to accomplish what needs to happen. I’ll get there, it’s just a WIP at the moment.

I think I have some suggestions on manually changing discs in nullDC though, since there are a couple of ways that seem right. I’ve only had any degree of reliable success in doing so following a certain order of steps. I’m away from my emulation rig at the moment, but I can likely provide more details after I have an opportunity to double check my memory. (Based on the contents of your edit, it seems like you may have already nailed this part?)

Link to comment
Share on other sites

Well, when you navigate to "options -> GDRom -> swap discs", it will go back to the Dreamcast home screen. You can press play to restart the game or check you memory card data, and etc. From here If you do the same as before it should ask you to insert a disc. However, when and how you do it seems to make a difference whether it will work or not. It works when parsed by switchdisk but not reliably by mouse or keyboard. I don't know exactly why, but timing seems to be important to make it work. # buggy.

<KeysBeforeSwitch><MOUSE_MOVE 6,368>, <MOUSE_MOVE 1318,408>, [MENU, VK_F], |200|, RIGHT, |200|, RIGHT, |200|, DOWN, |200|, DOWN, |200|, DOWN, |200|, RIGHT, |200|, RETURN, |1000|, [MENU, VK_F], |200|, RIGHT, |200|, RIGHT, |200|, DOWN, |200|, DOWN, |200|, DOWN, |200|, RIGHT, |200|, RETURN</KeysBeforeSwitch>

This will let you get to the "insert disc" dialog in the emulator. However, you have to wait until the game has fully loaded and is running its intro video. I tested on RE: Code Veronica. Interesting note: If you run switchdisc again after the insert disc dialog is running it will reload the game. Something interesting is hapining here I just don't know if it's useful.

Link to comment
Share on other sites

Here's all the news that's fit to print regarding my current nullDC setup for SwitchDisc.

GameEx Emulator Confg:


[Emulator]
Enabled=True
System=Sega Dreamcast
Category=Console
Emulator=nullDC
Version=1.0.4
Rating=8.1
DownloadUrl=http://www.gamesdbase.com/setupwizard/emulators/download/nullDC.7z
RequiredFiles=dc_boot.bin, dc_flash.bin, d3d9.dll, d3dx9_42.dll, msvcr100.dll
Website=http://code.google.com/p/nulldc/
Info=Sega Dreamcast emulator
TitleText=Sega Dreamcast
StartPageName=[Console] Sega Dreamcast (nullDC)
StartPageLogo=Sega Dreamcast
Command=nullDC_Win32_Release-NoTrace.exe -config ImageReader:DefaultImage="[ROMPATH]\[ROMFILE]"
RomFilter=*.gdi;*.cdi
Database=[Console] Sega Dreamcast
ConfigFile=[Mapping On] Exit nullDC (Process Close)
MapFile=
RomPath=E:\Emulation\Roms\Sega_Dreamcast[TO]
SnapPath=E:\Emulation\Assets\Sega_Dreamcast\Snap
TitlePath=
BoxPath=E:\Emulation\Assets\Sega_Dreamcast\Box
CartPath=
ManualPath=E:\Emulation\Assets\Sega_Dreamcast\Manual
ControlPanelPath=
WorkingPath=E:\Emulation\Emulators\nullDC_104_r136
MapKeys=True
WaitBeforeKeys=
SendKeys=
ReplaceDash=False
ReplaceUnder=True
Capitals=False
RemoveBrackets=True
ShowDesktop=True
Debug=False
AlsoLaunch=
OLDatZip=
LaunchBefore=start "" "E:\Visual_Studio_2010\Projects\Build\SwitchDisc\SwitchDisc.exe" -w "[WORKINGPATH]" -f "[ROMFILE]"
LaunchAfter=start "" "E:\Visual_Studio_2010\Projects\Build\SwitchDisc\SwitchDisc.exe" -q
ExcludedFiles=
CustomBackground=
PlayMusic=False
DontShowInfo=
PlaySelectionMusic=False
SelectionMusicFolder=
PCGame=False
GamesIn7Zips=False
PlayInScreenSaver=False
ShowMostPlayed=True
RandomMostPlayed=True
CDCheck=False
CDCheckFile=
VideoSnapPath=E:\Emulation\Assets\Sega_Dreamcast\Video_MP4
UseDbName=True
RomsInFolders=True
TVAdPath=E:\Emulation\Assets\Sega_Dreamcast\Video_Advert_MP4
MergeSets=True
CustomArtName1=Disc
CustomArtPath1=E:\Emulation\Assets\Sega_Dreamcast\CD
CustomArtName2=Print Advert
CustomArtPath2=E:\Emulation\Assets\Sega_Dreamcast\Advert
imagenotfound=E:\Emulation\Assets\no_img.png
lastgame=


SwitchDisc nullDC Config (Disc Sets Ommitted):


<Emulator z:Id="i12" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<ItemID xmlns="http://schemas.datacontract.org/2004/07/">emu-4</ItemID>
<EmulatorName>nullDC_104_r136</EmulatorName>
<WorkingPath>E:\Emulation\Emulators\nullDC_104_r136</WorkingPath>
<ArtworkPath>E:\Emulation\Assets\Sega_Dreamcast\Box</ArtworkPath>
<RomPath>E:\Emulation\Roms\Sega_Dreamcast[TO]</RomPath>
<RomsInSubDir>true</RomsInSubDir>
<SwitchDiscCmd></SwitchDiscCmd>
<KeysBeforeGUI></KeysBeforeGUI>
<KeysBeforeSwitch><MOUSE_MOVE 6,368>, <MOUSE_MOVE 1318,408>, [MENU, VK_F], RIGHT, |1000|, RIGHT, |1000|, DOWN, |1000|, DOWN, |1000|, DOWN, |1000|, RIGHT, |1000|, DOWN, |1000|, DOWN, |1000|, RETURN, |1000|, TAB, |1000|, RETURN, |1000|, <OPEN_FILE>, |1000|, <MOUSE_MOVE 60,345>, <MOUSE_MOVE 1300,427>, [MENU, VK_F], |1000|, RIGHT, RIGHT, |1000|, DOWN, DOWN, DOWN, |1000|, RIGHT, RETURN</KeysBeforeSwitch>
<KeysAfterSwitch></KeysAfterSwitch>
<UseVirtualDrive>false</UseVirtualDrive>
<VirtualDrive i:nil="true" />
<Wrapper i:nil="true" />
<MultiDiscSets>
</MultiDiscSets>
</Emulator>


And last but not least my
nullDC Configuration:


;; nullDC config file;;
[nullDC]
Dynarec.Enabled=1
Dynarec.DoConstantPropagation=1
Dynarec.SafeMode=1
Dynarec.UnderclockFpu=0
Dreamcast.Cable=3
Dreamcast.RTC=1989547838
Dreamcast.Region=3
Dreamcast.Broadcast=0
Emulator.AutoStart=1
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=drkMapleDevices_Win32.dll:0
Current_maple0_0=drkMapleDevices_Win32.dll:2
Current_maple0_1=NULL
Current_maple1_5=NULL
Current_maple2_5=NULL
Current_maple3_5=NULL

[nullDC_GUI]
AutoHideMenu=1
Fullscreen=0
AlwaysOnTop=0

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

[imageReader]
PatchRegion=0
LoadDefaultImage=1
DefaultImage=E:\Emulation\Roms\Sega_Dreamcast[TO]\Jet Grind Radio v1.005 (2000)(Sega)(NTSC)(US)[!]\Jet Grind Radio v1.005 (2000)(Sega)(NTSC)(US)[!].gdi
LastImage=E:\Emulation\Roms\Sega_Dreamcast[TO]\Skies of Arcadia v1.002 (2000)(Sega)(NTSC)(US)(Disc 1 of 2)[!]\Skies of Arcadia v1.002 (2000)(Sega)(NTSC)(US)(Disc 1 of 2)[!].gdi

[nullAica]
BufferSize=2048
LimitFPS=1
HW_mixing=0
SoundRenderer=1
GlobalFocus=1
BufferCount=1
CDDAMute=0
GlobalMute=0
DSPEnabled=0
Volume=90

[nullExtDev]
mode=0
adapter=0

[ndc_hookjoy]
PortA_CONT_C=66
PortA_CONT_B=88
PortA_CONT_A=86
PortA_CONT_START=16
PortA_CONT_DPAD_UP=38
PortA_CONT_DPAD_DOWN=40
PortA_CONT_DPAD_LEFT=37
PortA_CONT_DPAD_RIGHT=39
PortA_CONT_Z=77
PortA_CONT_Y=90
PortA_CONT_X=67
PortA_CONT_DPAD2_UP=0
PortA_CONT_DPAD2_DOWN=0
PortA_CONT_DPAD2_LEFT=0
PortA_CONT_DPAD2_RIGHT=0
PortA_CONT_ANALOG_UP=73
PortA_CONT_ANALOG_DOWN=75
PortA_CONT_ANALOG_LEFT=74
PortA_CONT_ANALOG_RIGHT=76
PortA_CONT_LSLIDER=65
PortA_CONT_RSLIDER=83
PortB_CONT_C=66
PortB_CONT_B=88
PortB_CONT_A=86
PortB_CONT_START=16
PortB_CONT_DPAD_UP=38
PortB_CONT_DPAD_DOWN=40
PortB_CONT_DPAD_LEFT=37
PortB_CONT_DPAD_RIGHT=39
PortB_CONT_Z=77
PortB_CONT_Y=90
PortB_CONT_X=67
PortB_CONT_DPAD2_UP=0
PortB_CONT_DPAD2_DOWN=0
PortB_CONT_DPAD2_LEFT=0
PortB_CONT_DPAD2_RIGHT=0
PortB_CONT_ANALOG_UP=73
PortB_CONT_ANALOG_DOWN=75
PortB_CONT_ANALOG_LEFT=74
PortB_CONT_ANALOG_RIGHT=76
PortB_CONT_LSLIDER=65
PortB_CONT_RSLIDER=83
PortC_CONT_C=66
PortC_CONT_B=88
PortC_CONT_A=86
PortC_CONT_START=16
PortC_CONT_DPAD_UP=38
PortC_CONT_DPAD_DOWN=40
PortC_CONT_DPAD_LEFT=37
PortC_CONT_DPAD_RIGHT=39
PortC_CONT_Z=77
PortC_CONT_Y=90
PortC_CONT_X=67
PortC_CONT_DPAD2_UP=0
PortC_CONT_DPAD2_DOWN=0
PortC_CONT_DPAD2_LEFT=0
PortC_CONT_DPAD2_RIGHT=0
PortC_CONT_ANALOG_UP=73
PortC_CONT_ANALOG_DOWN=75
PortC_CONT_ANALOG_LEFT=74
PortC_CONT_ANALOG_RIGHT=76
PortC_CONT_LSLIDER=65
PortC_CONT_RSLIDER=83
PortD_CONT_C=66
PortD_CONT_B=88
PortD_CONT_A=86
PortD_CONT_START=16
PortD_CONT_DPAD_UP=38
PortD_CONT_DPAD_DOWN=40
PortD_CONT_DPAD_LEFT=37
PortD_CONT_DPAD_RIGHT=39
PortD_CONT_Z=77
PortD_CONT_Y=90
PortD_CONT_X=67
PortD_CONT_DPAD2_UP=0
PortD_CONT_DPAD2_DOWN=0
PortD_CONT_DPAD2_LEFT=0
PortD_CONT_DPAD2_RIGHT=0
PortD_CONT_ANALOG_UP=73
PortD_CONT_ANALOG_DOWN=75
PortD_CONT_ANALOG_LEFT=74
PortD_CONT_ANALOG_RIGHT=76
PortD_CONT_LSLIDER=65
PortD_CONT_RSLIDER=83
local_port=0
server_addr=192.168.1.33
server_port=11122

[drkMaple]
VMU.Show=1
Mouse.Sensitivity=100

[PuruPuru_Pad_1]
l_shoulder=-1
r_shoulder=-1
a_button=-1
b_button=-1
x_button=-1
y_button=-1
start_button=-1
dpad_up=-1
dpad_down=-1
dpad_left=-1
dpad_right=-1
main_x_left=-1
main_x_right=-1
main_y_up=-1
main_y_down=-1
halfpress=-1
deadzone=24
pakku_intensity=100
pakku_length=175
keyboard=0
joy_id=0
controllertype=0

[PuruPuru_Pad_2]
l_shoulder=-1
r_shoulder=-1
a_button=-1
b_button=-1
x_button=-1
y_button=-1
start_button=-1
dpad_up=-1
dpad_down=-1
dpad_left=-1
dpad_right=-1
main_x_left=-1
main_x_right=-1
main_y_up=-1
main_y_down=-1
halfpress=-1
deadzone=24
pakku_intensity=100
pakku_length=175
keyboard=0
joy_id=0
controllertype=0

[PuruPuru_Pad_3]
l_shoulder=-1
r_shoulder=-1
a_button=-1
b_button=-1
x_button=-1
y_button=-1
start_button=-1
dpad_up=-1
dpad_down=-1
dpad_left=-1
dpad_right=-1
main_x_left=-1
main_x_right=-1
main_y_up=-1
main_y_down=-1
halfpress=-1
deadzone=24
pakku_intensity=100
pakku_length=175
keyboard=0
joy_id=0
controllertype=0

[PuruPuru_Pad_4]
l_shoulder=-1
r_shoulder=-1
a_button=-1
b_button=-1
x_button=-1
y_button=-1
start_button=-1
dpad_up=-1
dpad_down=-1
dpad_left=-1
dpad_right=-1
main_x_left=-1
main_x_right=-1
main_y_up=-1
main_y_down=-1
halfpress=-1
deadzone=24
pakku_intensity=100
pakku_length=175
keyboard=0
joy_id=0
controllertype=0

[Xmaple]
Controller.DeadZone=25
PuruPuru.UseRealFrequency=1
PuruPuru.Length=175
PuruPuru.Intensity=100


So there are a couple of noteworthy items here (and some of this may be retreading what you already know). In order to run nullDC from the command line you need to set nullDC up to leverage the Default Image. So in your nullDC config (the one in the same directory as the emulator) you need the following (excerpt)

...
Emulator.AutoStart=1
...
LoadDefaultImage=1

That way your command line for GameEx just swaps out the default image upon loading:

Command=nullDC_Win32_Release-NoTrace.exe -config ImageReader:DefaultImage="[ROMPATH]\[ROMFILE]"

... But that means that SwitchDisc needs to swap out the default image upon changing discs. The above SwitchDisc command should work (it works if you follow the same steps in a manual fashion), but as I mentioned the UI Automation API I selected doesn't seem to up to the task of managing that split button appearing on the nullDC Open File dialog window. So that's bad news. Improvements are on the way though.

<KeysBeforeSwitch><MOUSE_MOVE 6,368>, <MOUSE_MOVE 1318,408>, [MENU, VK_F], RIGHT, |1000|, RIGHT, |1000|, DOWN, |1000|, DOWN, |1000|, DOWN, |1000|, RIGHT, |1000|, DOWN, |1000|, DOWN, |1000|, RETURN, |1000|, TAB, |1000|, RETURN, |1000|, <OPEN_FILE>, |1000|, <MOUSE_MOVE 60,345>, <MOUSE_MOVE 1300,427>, [MENU, VK_F], |1000|, RIGHT, RIGHT, |1000|, DOWN, DOWN, DOWN, |1000|, RIGHT, RETURN</KeysBeforeSwitch>

The SwitchDisc command I'm using here may be using more slots than the current release build of SwitchDisc allows. That's one of the minor enhancements in the new build. It's very likely that you could reduce the number of pauses and have it work just fine (all except for the Open File Dialog operation).

Link to comment
Share on other sites

Have you modified your advanced config file to watch more processes? When I tried your exact settings, GameEx regained focus just after the open file window appears and SD attempts to input the ROMPATH\ROMFILE.

I used this:

# This is an advanced emulator configuration file. It does things such as allow keyboard only emulators to be operated by a gamepad, wait for additional processes to exit and map keys. If this file is used it overrides the MAPKeys setting for the emulator.

[GENERAL]

# Enabled. Use this.

Enabled=True

#Make MCE Back button and X-ARCADE Escape and SlikStik Escape to close emulator process

MapBack=True

#Make Escape key close emulator process

MapEscape=True

#When exiting an emulator via the above mappings, you can specify keys in the send keys format to send instead of having GameEx close the process to cleanly exit the emulator. Such as the Q Key or ALT F4 which is %{F4}

KeysToSendOnExit=

#Wait for keys to be processed by the emulator

EmuWaitForKeys=True

#Additional processes to wait to exit or close on exit. Dont include the .exe. Leave blank not to use.

Process1=nullDC_Win32_Release-NoTrace
Process2=switchdisc
Process3=
Process4=

[JOYMAPPING]

# For mapping a GamePad to keys
# Specify a virtual key code to send when the specific joystick control is pressed. Look at vkcodes.htm for codes.

JoymappingEnabled=FALSE

Left=
up=
Right=
Down=
Button1=
Button2=
Button3=
Button4=
Button5=
Button6=
Button7=
Button8=
Button9=
Button10=
Button11=
Button12=

[GAMEPADEXIT]

#MAP Gamepad controls to exit and make controls exit process

MapGamePadExit=True

#Flag the controls that exit a game by placing True next to each control. To not use the control as part of the combination use a 0

Left=True
Down=
Right=
Up=True
Button1=
Button2=
Button3=
Button4=True
Button5=True
Button6=True
Button7=
Button8=
Button9=
Button10=
Button11=
Button12=

[MOUSEMAPPING]

# For registered users, the ability to control the mouse with a gamepad and/or directional keys.
# For example for PC strategy games.
# Apparantly this functionality is similar to the software Pinnacle profiler. Remember you can setup an emulator
# as one PC game. Specify enabled, and mousespeed 0-20. 20 Being fastest. This setting overrides the directional
# mapping for the above and buttons 1 and 2 Button 1/CTRL becomes left mouse. Button 2/ALT Right mouse

MouseMappingEnabled=False
MouseSpeed=0

[bLOCKKEYS]

# Use this section to disable and block key presses and mouse clicks.
# To disable the mouse clicks use code 1 for left mouse button,
# 2 for right button and 4 for middle button

Enabled=False

BlockKey_1=1
BlockKey_2=2
BlockKey_3=4
BlockKey_4=
BlockKey_5=

[KEYBOARDREMAP]

# Remap Keys for the emulator. Specify from the from key, which is the key you wish to replace the to key
# This should be good enough for real time gaming. Registered version feature. Look at VKCodes.htm for codes.

Enabled=False

Remap_1_From_VK=
Remap_1_To_VK=

Remap_2_From_VK=
Remap_2_To_VK=

Remap_3_From_VK=
Remap_3_To_VK=

Remap_4_From_VK=
Remap_4_To_VK=

Remap_5_From_VK=
Remap_5_To_VK=

It looked like it was about to work until GameEX regained focus. The window closed and the mouse move function made the options menu appear then gameex came into focus and interrupted the process. It appeared as if the open file process completed and moved on to the next part of the process where it would navigate to the switchdisc operation before gameex regained focus. But I have tried multiple times since and could not replicate this. GameEx comes back just as the openfile operation is typing in the romname.

I was tinkering with the idea of using ctrl + V to paste the romname into the open dialog box. I thought I remembered you saying that SD copies your selection to the clipboard. If it does, apparently you can't use the control + v command to pass it into the box. When I tried it pasted "[CONTROL , VK_V]" instead. Afterward it kept that stuck in the clipboard, even after I tried to copy something else it would just keep pasting [CONTROL , VK_V]". Took a reboot to clear it. The select rom window is pointed at your roms directory anyway, and by default the cursor in the text box. So the only thing that needs to be done here is to paste the romname into the box and send RETURN. If there were a "paste romname" button in SD this would work great, would that be difficult to code?

Link to comment
Share on other sites

Regarding the Advanced Config, I'm just using the standard nullDC advanced config included with GameEx. No changes. Are you running with the nullDC console enabled? I've always run it with the console visible, so maybe that's what's keeping the process running for me? It's certainly a possibility.

Emulator.NoConsole=0


[CONTROL, VK_V] should work OK for pasting the contents of the clipboard. That's actually how I used to manage the Open File dialog. Turns out that Windows can be a bit finicky about relinquishing control of the clipboard via programmatic means, which is why I went with full-on UI Automation instead. The problem wan't pasting from the clipboard though, it was programmatically copying to the clipboard that turned out to be a bit buggy. I notice you've got a space between CONTROL and the comma in the key combo above. That might cause an issue, but I'd have to double check as to whether I'm trimming commands before running (it's entirely likely that I'm not, since I'm really shooting for performance during that step and String operations are notoriously inefficient, and it's assumed that send key operations are built using the Send Keys builder).

At any rate I'm hoping with the implementation of a new UI automation library it will be less of an issue to begin with.

Link to comment
Share on other sites

Regarding the Advanced Config, I'm just using the standard nullDC advanced config included with GameEx. No changes. Are you running with the nullDC console enabled? I've always run it with the console visible, so maybe that's what's keeping the process running for me? It's certainly a possibility.

No I was using the same config. I had the auto hide turned on. I tried turning it off and it still gave up focus to gameex at the same point. Besides I don't want that thing visible all the time anyway.

As for the space, it was just a typo. The config was parsed from the key builder. So when it pasted the [CONTROL, VK_V], it wasn't due to the space.

Ok, I guess we are kind of stuck until that update then. Unless you can think of a way around it until then.

Link to comment
Share on other sites

I'd definitely be happy to take a look at your log and your config to see if I can find a bug related to GameEx regaining focus and/or Ctrl+V not working as expected. I can say with some certainty that I've not made any changes that would effect either of those aspects in the newest build (actually I think the focus thing could be resolved using the next build but only insofar as applying additional functionality rather than any changes to existing functionality). So in other words if those things are causing issues right now, it's likely that they will be there in the next build too.

But as far as getting nullDC switching discs, I don't see it happening with the current build. Sorry about that. Even when I manually change discs I've only found one method of changing discs that works for reliably for nullDC due to the necessity of utilizing the Default Image from the nullDC config. All of that will be fixed for the next build though.

Link to comment
Share on other sites

  • 3 months later...

Breakthrough! Check out this SD log:

9/2/2013 10:16:41 PM SwitchDisc logging initialized
9/2/2013 10:16:41 PM SwitchDisc Version: 1.0.4.0
9/2/2013 10:16:41 PM Processing SwitchDisc command options...
9/2/2013 10:16:41 PM Command options parsed successfully:
9/2/2013 10:16:41 PM DiscID =
9/2/2013 10:16:41 PM DiscFile = Resident Evil CODE Veronica (Disc 1).cdi
9/2/2013 10:16:41 PM EmulatorID =
9/2/2013 10:16:41 PM WorkingPath = E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Emulator\Emulators\nullDC_104_r136
9/2/2013 10:16:41 PM ArtPath =
9/2/2013 10:16:41 PM FullScreen = False
9/2/2013 10:16:41 PM NoGUI = False
9/2/2013 10:16:41 PM Exit = False
9/2/2013 10:16:41 PM Parsing SwitchDisc configuration from file
9/2/2013 10:16:41 PM Registering SwitchDisc HotKey
9/2/2013 10:16:41 PM Registering SwitchDisc Interface Keys
9/2/2013 10:16:41 PM Found matching emulators[1] via working path (E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Emulator\Emulators\nullDC_104_r136)
9/2/2013 10:16:41 PM Searching for matching Multi-Disc Set via Disc File (Resident Evil CODE Veronica (Disc 1).cdi)
9/2/2013 10:16:41 PM Found matching Multi-Disc Set via Disc File (Resident Evil CODE Veronica (Disc 1).cdi)
9/2/2013 10:16:41 PM Total matching Multi-Disc Sets = 1
9/2/2013 10:16:46 PM Initializing SwitchDisc GUI
9/2/2013 10:16:46 PM Initializing SwitchDisc Target Window: nullDC v1.0.4 (built Aug 21 2011@04:07:01)
9/2/2013 10:16:46 PM Invoking Send Keys Before GUI
9/2/2013 10:16:46 PM Initializing SwitchDisc Target Window: nullDC v1.0.4 (built Aug 21 2011@04:07:01)
9/2/2013 10:16:46 PM SwitchDisc GUI: Initializing default artwork path: E:\Michael\GAMES\My Games\All Games (Files)\PSone\ePSXe Emulator\ePSXecutor frontend\SwitchDisc-1.0.3\SwitchDisc-1.0.3\images\DefaultDiscImg.png
9/2/2013 10:16:46 PM SwitchDisc GUI: Initializing NullDC 1.0.4 r136 artwork path: E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Artwork\Cartridge
9/2/2013 10:16:46 PM SwitchDisc GUI: Initializing currently loaded disc
9/2/2013 10:16:46 PM SwitchDisc GUI: Found currently loaded disc. Updating GUI.
9/2/2013 10:16:47 PM SwitchDisc GUI initialized sucessfully
9/2/2013 10:16:48 PM Invoking SwitchDisc
9/2/2013 10:16:48 PM Setting target window as foreground window: nullDC v1.0.4 (built Aug 21 2011@04:07:01)
9/2/2013 10:16:48 PM Invoking Send Keys Before Disc Switch
9/2/2013 10:16:48 PM Invoking special operation: Mouse Move
9/2/2013 10:16:49 PM Invoking special operation: Mouse Move
9/2/2013 10:16:49 PM Simulating modified key stroke: [MENU, VK_F]
9/2/2013 10:16:49 PM Simulating single key stroke: RIGHT
9/2/2013 10:16:49 PM Pausing thread: 1000ms
9/2/2013 10:16:50 PM Simulating single key stroke: RIGHT
9/2/2013 10:16:50 PM Pausing thread: 1000ms
9/2/2013 10:16:51 PM Simulating single key stroke: DOWN
9/2/2013 10:16:52 PM Pausing thread: 1000ms
9/2/2013 10:16:53 PM Simulating single key stroke: DOWN
9/2/2013 10:16:53 PM Pausing thread: 1000ms
9/2/2013 10:16:54 PM Simulating single key stroke: DOWN
9/2/2013 10:16:54 PM Pausing thread: 1000ms
9/2/2013 10:16:55 PM Simulating single key stroke: RIGHT
9/2/2013 10:16:55 PM Pausing thread: 1000ms
9/2/2013 10:16:56 PM Simulating single key stroke: DOWN
9/2/2013 10:16:56 PM Pausing thread: 1000ms
9/2/2013 10:16:57 PM Simulating single key stroke: DOWN
9/2/2013 10:16:57 PM Pausing thread: 1000ms
9/2/2013 10:16:58 PM Simulating single key stroke: RETURN
9/2/2013 10:16:58 PM Pausing thread: 1000ms
9/2/2013 10:16:59 PM Simulating single key stroke: TAB
9/2/2013 10:16:59 PM Pausing thread: 1000ms
9/2/2013 10:17:00 PM Simulating single key stroke: RETURN
9/2/2013 10:17:00 PM Pausing thread: 1000ms
9/2/2013 10:17:01 PM Invoking special operation: Open File Dialog
9/2/2013 10:17:01 PM Invoking Open File Dialog Operation: E:\Michael\GAMES\My Games\All Games (Files)\Sega Dreamcast\Roms
9/2/2013 10:17:03 PM Simulating single key stroke: RETURN
9/2/2013 10:17:03 PM Invoking Open File Dialog Operation: Resident Evil CODE Veronica (Disc 2).cdi
9/2/2013 10:17:05 PM Simulating single key stroke: RETURN
9/2/2013 10:17:05 PM Pausing thread: 1000ms
9/2/2013 10:17:06 PM Invoking special operation: Mouse Move
9/2/2013 10:17:06 PM Invoking special operation: Mouse Move
9/2/2013 10:17:07 PM Simulating modified key stroke: [MENU, VK_F]
9/2/2013 10:17:07 PM Pausing thread: 1000ms
9/2/2013 10:17:08 PM Simulating single key stroke: RIGHT
9/2/2013 10:17:08 PM Simulating single key stroke: RIGHT
9/2/2013 10:17:08 PM Pausing thread: 1000ms
9/2/2013 10:17:09 PM Simulating single key stroke: DOWN
9/2/2013 10:17:09 PM Simulating single key stroke: DOWN
9/2/2013 10:17:09 PM Simulating single key stroke: DOWN
9/2/2013 10:17:09 PM Pausing thread: 1000ms
9/2/2013 10:17:10 PM Simulating single key stroke: RIGHT
9/2/2013 10:17:10 PM Simulating single key stroke: RETURN
9/2/2013 10:17:10 PM Parsing SwitchDisc command
9/2/2013 10:17:10 PM Console command parsed successfully:
9/2/2013 10:17:10 PM Invoking native SwitchDisc command:
9/2/2013 10:17:10 PM Invoking Send Keys After Disc Switch
9/2/2013 10:17:10 PM Invoking special operation: Mouse Click
9/2/2013 10:17:10 PM Invoking Left Click operation
9/2/2013 10:17:10 PM SwitchDisc GUI: Closing GUI
9/2/2013 10:17:22 PM Processing SwitchDisc command options...
9/2/2013 10:17:22 PM Command options parsed successfully:
9/2/2013 10:17:22 PM DiscID =
9/2/2013 10:17:22 PM DiscFile =
9/2/2013 10:17:22 PM EmulatorID =
9/2/2013 10:17:22 PM WorkingPath =
9/2/2013 10:17:22 PM ArtPath =
9/2/2013 10:17:22 PM FullScreen = False
9/2/2013 10:17:22 PM NoGUI = False
9/2/2013 10:17:22 PM Exit = True
9/2/2013 10:17:22 PM Cleaning up image cache
9/2/2013 10:17:22 PM Exiting SwitchDisc ... Bye

I finally got it to go all the way through and by using the built in nulldc disc changing interface. The Key was your post from http://www.gameex.info/forums/topic/13402-using-a-ps3-controller-trouble/. The Better DS3 allowed me to retire my DS3tool_enabeler.exe and free up the launch before command. I set up the Launch before and after commands the same as ePSXe in GameEX:

Launch Before = start "" "C:\GameEx\CONFIG\Switchdisc\SwitchDisc-1.0.4\SwitchDisc-1.0.4\SwitchDisc.exe" -w "[WORKINGPATH]" -f "[ROMFILE]"

Launch After = start "" "C:\GameEx\CONFIG\Switchdisc\SwitchDisc-1.0.4\SwitchDisc-1.0.4\SwitchDisc.exe" -q

I used the default nulldc Advance config:

# This is an advanced emulator configuration file. It does things such as allow keyboard only emulators to be operated by a gamepad, wait for additional processes to exit and map keys. If this file is used it overrides the MAPKeys setting for the emulator.

[GENERAL]

# Enabled. Use this.

Enabled=True

#Make MCE Back button and X-ARCADE Escape and SlikStik Escape to close emulator process

MapBack=True

#Make Escape key close emulator process

MapEscape=True

#When exiting an emulator via the above mappings, you can specify keys in the send keys format to send instead of having GameEx close the process to cleanly exit the emulator. Such as the Q Key or ALT F4 which is %{F4}

KeysToSendOnExit=

#Wait for keys to be processed by the emulator

EmuWaitForKeys=True

#Additional processes to wait to exit or close on exit. Dont include the .exe. Leave blank not to use.

Process1=
Process2=
Process3=
Process4=

[JOYMAPPING]

# For mapping a GamePad to keys
# Specify a virtual key code to send when the specific joystick control is pressed. Look at vkcodes.htm for codes.

JoymappingEnabled=FALSE

Left=
up=
Right=
Down=
Button1=
Button2=
Button3=
Button4=
Button5=
Button6=
Button7=
Button8=
Button9=
Button10=
Button11=
Button12=

[GAMEPADEXIT]

#MAP Gamepad controls to exit and make controls exit process

MapGamePadExit=True

#Flag the controls that exit a game by placing True next to each control. To not use the control as part of the combination use a 0

Left=True
Down=
Right=
Up=True
Button1=
Button2=
Button3=
Button4=True
Button5=True
Button6=True
Button7=
Button8=
Button9=
Button10=
Button11=
Button12=

[MOUSEMAPPING]

# For registered users, the ability to control the mouse with a gamepad and/or directional keys.
# For example for PC strategy games.
# Apparantly this functionality is similar to the software Pinnacle profiler. Remember you can setup an emulator
# as one PC game. Specify enabled, and mousespeed 0-20. 20 Being fastest. This setting overrides the directional
# mapping for the above and buttons 1 and 2 Button 1/CTRL becomes left mouse. Button 2/ALT Right mouse

MouseMappingEnabled=False
MouseSpeed=0

[bLOCKKEYS]

# Use this section to disable and block key presses and mouse clicks.
# To disable the mouse clicks use code 1 for left mouse button,
# 2 for right button and 4 for middle button

Enabled=False

BlockKey_1=1
BlockKey_2=2
BlockKey_3=4
BlockKey_4=
BlockKey_5=

[KEYBOARDREMAP]

# Remap Keys for the emulator. Specify from the from key, which is the key you wish to replace the to key
# This should be good enough for real time gaming. Registered version feature. Look at VKCodes.htm for codes.

Enabled=False

Remap_1_From_VK=
Remap_1_To_VK=

Remap_2_From_VK=
Remap_2_To_VK=

Remap_3_From_VK=
Remap_3_To_VK=

Remap_4_From_VK=
Remap_4_To_VK=

Remap_5_From_VK=
Remap_5_To_VK=

I think the problem was that SD has to be launched before and not also. For whatever reason launching also screws up the process and causes GameEX to regain focus midway through the disk switch process. Thank god I found the better DS3, that solved not only a peeve I had with the PS3 controller pairing process but allowed me to free up the launch before option in all my emulators. Everything loads without motioninjoy popping up first and fixed the NullDC-switchdisk problem too.

Here is the SD send keys I'm using:

<KeysBeforeSwitch><MOUSE_MOVE 6,368>, <MOUSE_MOVE 1318,408>, [MENU, VK_F], RIGHT, RIGHT, DOWN, DOWN, DOWN, RIGHT, DOWN, DOWN, RETURN, TAB, RETURN, |500|, <OPEN_FILE>, |100|, <MOUSE_MOVE 60,345>, <MOUSE_MOVE 1300,427>, [MENU, VK_F], |100|, RIGHT, RIGHT, |100|, DOWN, DOWN, DOWN, |100|, RIGHT, RETURN</KeysBeforeSwitch>

Null I think we got it buddy!

Link to comment
Share on other sites

It's actually the same as post #161. I just adjusted the pauses to make the process faster.

There were 2 problems with my setup before:

  1. I needed to add (start "") before the filepath in both the launch before/after commands (eg. start "" "E:).
  2. The launch also command can't be used. SD needs to load before NullDC in order to finish the disc swap. It would always loose focus during the open file dialog.

I wonder if a SD plugin for GameEX would best be approached as a ground up wizard based project. We would use SD as a template, maybe salvage some code, but otherwise take what we've learned from SD and tailor it to GameEX's unique needs. Honestly though, I think there is one more thing that would take the standalone SD over the top and it would need to be part of the plugin. Here are a couple Ideas I've come up with:

  1. Emulator Profiles:

    I envision a drop down box that has ePSXe, ePSXecutor, NullDC, and any others. We should have a working setup to start from that could be used as a template to write up a config. Selecting a profile would auto-fill the "working path", "ROM path" and "Artwork Path" in SD's "emulator basic settings" from the GameEx config (I use the cartage path for artwork). I think we can assume that the user will have gone through the GameEx wizard first. It might be a good idea to prompt them to if no config settings are found. It would also auto-fill the "emulator name", "Send Keys Before Disc Switch" and "Send Keys After Disc Switch" from the template config we made. Also from our config, it would auto-fill the Launch Before and after commands in GameEX. Lastly, it would auto detect the roms in the rompath and create the individual disc settings. This last part might be tricky depending on the user's nomenclature. We could use a database to auto-fill the "Disc Display Name" but this might end up being more work than it's worth.

  2. Emulator Wizard:

    It might be easier/better to make a wizard that takes them through the whole process customized for and initiated by the profile selection. The wizard then would auto-fill the appropriate fields based on user selections. It could also prompt the user to enter the GameEx wizard and make appropriate changes manually as necessary, if they can't be made automatically by the wizard itself.

Link to comment
Share on other sites

BETA Test Notes for Switchdisc-1.0.5b

  • I like the increase from 25 key builder entries to 40.
  • The mouse hide function doesn't seem to work completly. When triggered without an emu running it seems to appear after moving the arrows keys, then time out and disappear again.

NullDC 1.0.4r136:
Canges do not break function from working config (Post #161). The auto hide mouse cursor function appears not to work here. :o

ePSXe using the ePSXeCutor_wrapper method:
It Works great. New changes seem to have removed the need for the [MENU, RETURN] command in the keys before GUI field. Mouse cursor does not appear no matter how much I navigate around, unless I move the mouse of course. It stays hidden like it should. I like this version best so far for ePSXe. :D

Link to comment
Share on other sites

  • 10 months later...
  • 1 year later...

EDIT

i finaly got what i wanted to do

i created this bat file (needs to be in the SwitchDisc (and maybe the working) directory)

clipboardpaste.bat

echo|set/p=%~1|clip

here is my SwitchDisc config for ePSXe

      <EmulatorName>ePSXe</EmulatorName>      <WorkingPath>C:\Emulators\ePSXe</WorkingPath>      <ArtworkPath></ArtworkPath>      <RomPath>C:\Roms\Sony Playstation\Roms\working</RomPath>      <RomsInSubDir>false</RomsInSubDir>      <SwitchDiscCmd>clipboardpaste.bat "[ROMFILE]"</SwitchDiscCmd>      <KeysBeforeGUI><EPSXE_ESCAPE>, |500|</KeysBeforeGUI>      <KeysBeforeSwitch></KeysBeforeSwitch>      <KeysAfterSwitch>|1000|, [MENU, VK_F], DOWN, DOWN, DOWN, DOWN, RIGHT, DOWN, RETURN, |500|, [CONTROL, VK_V], RETURN</KeysAfterSwitch>      <UseVirtualDrive>false</UseVirtualDrive>      <VirtualDrive i:nil="true" />

this only works if your game files are in the same folder as your rom path

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Having some trouble with the Open_file box option.

What I'm trying to do:

- Set up multidisc gamecube resident evil in switchdisc, EMU is Dolphin (v4.0-2826).

The Problem:

- Althought the log sucessfully parses the correct rompath, it doesn't it paste into the open file dialog box prompt. It just sits there waiting for me to make a selection. How can I get it to paste the rompath of the disc I want to change it to into the open file dialog box and hit ok so it will finish the disc change?

Config:

<?xml version="1.0" encoding="utf-8"?><SwitchDisc xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:SwitchDisc">  <SwitchDiscVersion i:nil="true" />  <ApplicationSettings>    <SwitchDiscKeys>F9</SwitchDiscKeys>    <PrevDiscKeys>Left</PrevDiscKeys>    <NextDiscKeys>Right</NextDiscKeys>    <SelectDiscKeys>Enter</SelectDiscKeys>    <CancelKeys>Back</CancelKeys>    <FullScreen>true</FullScreen>    <ScreenNumber>0</ScreenNumber>    <XWinRes>800</XWinRes>    <YWinRes>600</YWinRes>    <NoGUI>false</NoGUI>    <DefaultArtworkPath>C:\GameEx\CONFIG\Switchdisc\SwitchDisc-1.0.5b\SwitchDisc-1.0.5b\images\DefaultDiscImg.png</DefaultArtworkPath>    <VirtualDrives i:nil="true" />  </ApplicationSettings>  <Emulators>      <EmulatorName>Nintendo Gamegube (Dolphin)</EmulatorName>      <WorkingPath>E:\GAMES\My Games\All Games (Files)\Nintendo Gamecube, Wii\Emulator\Dolphin 4.0-2826</WorkingPath>      <ArtworkPath>E:\GAMES\My Games\All Games (Files)\Artwork (emumovies)\Nintendo_GameCube\cart</ArtworkPath>      <RomPath>E:\GAMES\My Games\All Games (Files)\Nintendo Gamecube, Wii\Roms</RomPath>      <RomsInSubDir>false</RomsInSubDir>      <SwitchDiscCmd>[DISCPATH]\[DISCFILE]</SwitchDiscCmd>      <KeysBeforeGUI></KeysBeforeGUI>      <KeysBeforeSwitch>F10, |500|, MENU, |1000|, <OPEN_FILE></KeysBeforeSwitch>      <KeysAfterSwitch></KeysAfterSwitch>      <UseVirtualDrive>false</UseVirtualDrive>      <VirtualDrive i:nil="true" />      <Wrapper i:nil="true" />      <MultiDiscSets>        <MultiDiscSet z:Id="i38">          <ItemID xmlns="http://schemas.datacontract.org/2004/07/">set-11</ItemID>          <Emulator z:Ref="i37" />          <SetName>Resident Evil</SetName>          <Discs>            <Disc z:Id="i39">              <ItemID xmlns="http://schemas.datacontract.org/2004/07/">dsc-30</ItemID>              <MultiDiscSet z:Ref="i38" />              <DisplayName>Resident Evil (USA) (Disc 1)</DisplayName>              <FileName>Resident Evil (USA) (Disc 1).iso</FileName>              <DiscNumber>1</DiscNumber>            </Disc>            <Disc z:Id="i40">              <ItemID xmlns="http://schemas.datacontract.org/2004/07/">dsc-31</ItemID>              <MultiDiscSet z:Ref="i38" />              <DisplayName>Resident Evil (USA) (Disc 2)</DisplayName>              <FileName>Resident Evil (USA) (Disc 2).iso</FileName>              <DiscNumber>2</DiscNumber>            </Disc>          </Discs>        </MultiDiscSet>      </MultiDiscSets>    </Emulator>  </Emulators></SwitchDisc>

LOG:

9/3/2015 7:54:13 PM Invoking SwitchDisc9/3/2015 7:54:13 PM Setting target window as foreground window: Dolphin 4.0-2826 | JIT64 DC | OpenGL | HLE | FPS: 30 - VPS: 60 - 100%9/3/2015 7:54:13 PM Invoking Send Keys Before Disc Switch9/3/2015 7:54:13 PM Simulating single key stroke: F109/3/2015 7:54:13 PM Pausing thread: 500ms9/3/2015 7:54:14 PM Simulating single key stroke: MENU9/3/2015 7:54:14 PM Pausing thread: 1000ms9/3/2015 7:54:15 PM Invoking special operation: Open File Dialog9/3/2015 7:54:15 PM Invoking Open File Dialog Operation: FilePath = E:\Correct Path\Roms FileName = Resident Evil (USA) (Disc 2).iso9/3/2015 7:54:15 PM Open File dialog failed to execute successfully9/3/2015 7:54:15 PM ERROR: Sequence contains no elements9/3/2015 7:54:15 PM Parsing SwitchDisc command9/3/2015 7:54:15 PM Console command parsed successfully: E:\Correct Path\Roms\Resident Evil (USA) (Disc 2).iso9/3/2015 7:54:15 PM Invoking native SwitchDisc command: E:\Correct Path\Roms\Resident Evil (USA) (Disc 2).iso9/3/2015 7:54:15 PM Invoking Send Keys After Disc Switch9/3/2015 7:54:15 PM SwitchDisc GUI: Closing GUI 
Link to comment
Share on other sites

Having some trouble with the Open_file box option.

What I'm trying to do:

- Set up multidisc gamecube resident evil in switchdisc, EMU is Dolphin (v4.0-2826).

The Problem:

- Althought the log sucessfully parses the correct rompath, it doesn't it paste into the open file dialog box prompt. It just sits there waiting for me to make a selection. How can I get it to paste the rompath of the disc I want to change it to into the open file dialog box and hit ok so it will finish the disc change?

......

thats why i had to do it the way i did

this sends the whole file location to the clipboard so it can be pasted to the typed input in the file selection screen

example: c:\somthing\thisthing\a.rom

config :

<EmulatorName>ePSXe</EmulatorName>

<WorkingPath>C:\Emulators\ePSXe</WorkingPath>

<ArtworkPath>C:\Assets\Sony Playstation\CD</ArtworkPath>

<RomPath>C:\Users\..name..\AppData\Local\Temp\Unzipped7-Zip</RomPath>

<RomsInSubDir>false</RomsInSubDir>

<SwitchDiscCmd>clipboardpaste.bat "[ROMPATH]\[ROMFILE]"</SwitchDiscCmd>

<KeysBeforeGUI><EPSXE_ESCAPE>, |500|</KeysBeforeGUI>

<KeysBeforeSwitch></KeysBeforeSwitch>

<KeysAfterSwitch>|500|, [MENU, VK_F], DOWN, DOWN, DOWN, DOWN, RIGHT, DOWN, RETURN, |300|, [CONTROL, VK_V], RETURN</KeysAfterSwitch>

<UseVirtualDrive>false</UseVirtualDrive>

<VirtualDrive i:nil="true" />

clipboardpaste.bat:

echo|set/p=%~1|clip

i also had to tell switch disk to use C:\Users\..name..\AppData\Local\Temp\Unzipped7-Zip as this is ware gameex extracts roms to

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...