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. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Attached to this message is the beta version of a simple wrapper I have made for launching emulators. The documentation that I will paste to this message discusses its features and how to use it.

I hope some people will find it useful. Feel free to send me feedback here or at [email protected]. Full C# source is included for anyone that wants to improve it (for source code licensing information, refer to the license text in the source code). As I mention in the documentation, as this is the intial release please consider it to be an unproven beta.

Have fun,

Cory

------------------------------

GameExLaunchWrapper

version 0.0.1 (06/12/2008)

Summary:

GameExLaunchWrapper (GELW) is a program designed to be a middle-man between GameEx and your emulators.

GELW can perform the following tasks:

* Uncompress your game images to a temporary directory

* If your archives contain more than one file, GELW can identify which file to launch in your emulator based on file extension. If there are multiple matches, GELW will choose the first alphabetic matching file. Thus, if your filenames include notations such as (Disk 1) or (Disk 1 of 2) or (Side A), etc., GELW will choose the first disk.

* Mounting image files in Daemon tools

* Launch your emulator, passing any command line options needed including the name of the game file to launch

* Cleanup the temporary directory after the emulator has closed.

Disclaimer:

This is the first version of GELW. Consider it a beta and use as your own risk. Full C# source code is included. Please send feedback to [email protected]

Installation:

GELW requires the Microsoft .NET Framework 3.5, downloadable from http://www.microsoft.com/downloads/details...;displaylang=en

GELW itself does not require any fancy installation. Just copy the GameExLaunchWrapper.exe executable to a directory (eg: C:\Program Files\GameExLaunchWrapper\)

Usage:

To use GELW, you first need to create a script which will instruct GELW on the steps it should be performing. The script is a text file that you can create in notepad or any other text editor. Each line of the text file should contain an instruction as documented below:

Script keywords (in alphabetical order):

CLEANUP

This keyword will delete any temporary directory created by GELW.

Example: CLEANUP

COMMENT <comment>

This keyword is ignored. You can use it to add comments to your script

Example: COMMENT This script is for the NeoGeo Nebula emulator

IDENTIFY <space delimited extension list>

This keyword instructs GELW to search the temporary directory for files that match the extensions you specified. The extensions should be listed in priority as the first matching file will be selected. If multiple files have the same matching extension, GELW will sort the files alphabetically and choose the first one.

Example: IDENTIFY ISO CUE

LAUNCH <program name> <arguments>

This keywords instructs GELW to launch your emulator. Use double quotes (") to surround the program name or arguments if they contain spaces. In the arguments, you can use the following macros:

%T : Replaced with the path/file of the selected game file.

%[1-9]: Replaced with the corresponding command line argument that GELW was called with.

MOUNT

Mounts an image with Daemon Tools. Daemon Tools is run from C:\Program Files\Daemon Tools Lite\daemon.exe unless the REGISTERDT keyword (See below) is used to specify the Daemon Tools path

PAUSE

Pauses the script. This is not useful unless you are using debug mode with GameEx, because otherwise the GELW window will not be visible.

REGISTER7ZIP <path / filename to 7-zip>

Informs GELW of the path to 7-zip. If this is not specified in your script, "C:\Program Files\7-zip\7z.exe" is assumed

REGISTERDT

Informs GELW of the path to Daemon Tools. If this is not specified in your script, "C:\Program Files\Daemon Tools Lite\daemon.exe" is assumed.

UNMOUNT

Unmounts an image with Daemon Tools. Daemon Tools is run from C:\Program Files\Daemon Tools Lite\daemon.exe unless the REGISTERDT keyword (See below) is used to specify the Daemon Tools path

UNZIP <path/filename to unzip>

Instructs GELW to create a temporary directory and unzip the passed archive. Generally, you will pass %2 as the parameter to this keyword, which will use the archive that is passed to GELW (from GameEx) as the filename.

Example: UNZIP "%T"

WORKINGDIRECTORY

Sets the working directory that GELW will use when executing the LAUNCH keyword.

Example: WORKINGDIRECTORY "C:\Emulators\Nebula\"

Examples:

The following section contains a number of scripts that I am using in my setup. You will likely need to make minor modifications to make them work for you (updating path names mostly) If you want to use one of these, copy and paste the individual script into notepad and save it (For example, save as C:\Program Files\Arcade\Amiga\GameExLaunchScript.txt. Then follow the instructions in the next section to configure GameEx to launch GELW using this script

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Amiga winuae emulator

UNZIP "%2"

IDENTIFY ADF

LAUNCH "C:\Program Files\Arcade\Amiga\Emulator (WinUAE)\winuae.exe" "-f %T"

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Apple II using applewin

UNZIP "%2"

IDENTIFY DSK

LAUNCH "C:\Program Files\Arcade\Apple II\Emulator (AppleWin 1.14.0)\applewin.exe" "-d1 %T"

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Mattel Intellivision emulator using Nostalgia

UNZIP "%2"

IDENTIFY INT

LAUNCH "C:\Program Files\Arcade\Mattel Intellivision\Emulator (Nostalgia 4.2)\NOSTALGIA.EXE" "%T"

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for NeoGeo using Nebula

UNZIP "%2"

IDENTIFY ISO

MOUNT

WORKINGDIRECTORY "C:\Program Files\Arcade\NeoGeo\Emulator (Nebula 2.25b)\"

LAUNCH "nebula.exe" "neocd"

UNMOUNT

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Amiga winuae emulator

UNZIP "%2"

IDENTIFY NDS

LAUNCH "C:\Program Files\Arcade\Nintendo DS\Emulator (NO$GBA)\NO$GBA.exe" "%T"

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Sega CD using the Gens emulator

UNZIP "%2"

IDENTIFY ISO

MOUNT

WORKINGDIRECTORY "C:\Program Files\Arcade\Sega 32X\emulator (Gens 2.14)\"

LAUNCH "gens.exe" "%T"

UNMOUNT

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Sega Dreamcast using nullDC emulator

UNZIP "%2"

IDENTIFY CDI

WORKINGDIRECTORY "C:\Program Files\Arcade\Sega Dreamcast\Emulator (nullDC 1.6)\"

LAUNCH "nullDC_100b1_6.exe" "-config ImageReader:defaultImage=%T"

CLEANUP

------------------------------------------------------------------------------------------------------

COMMENT GELW Script for Sega Saturn (using SSF emulator)

UNZIP "%2"

IDENTIFY BIN ISO

MOUNT

WORKINGDIRECTORY "C:\Program Files\Arcade\Sega Saturn\Emulator (SSF 0.09 Beta R1)\"

LAUNCH "SSF.exe"

UNMOUNT

CLEANUP

------------------------------------------------------------------------------------------------------

Configuring GELW in GameEx:

In your Emulator setup in GameEx, set the following fields:

Working Path: The directory that you installed GELW to

Command Line: Call GameExLaunchWrapper and pass it two parameters: The name of the script to execute, and the name of the game image to process. For example:

GameExLaunchWrapper.exe "C:\Program Files\Arcade\Amiga\GameExLaunchWrapperScript.txt" "[ROMPath]\[RomFile]"

GELW001.zip

  • 1 month later...
Posted

This sounds like a good addition, but I've got a couple of questions before looking at it (I'm still just getting my feet wet with GameEx, and have got a LONG way to go).

First, does this support something other than Daemon Tools? There are other disc-mounting utilities that have command-line support. Just curious; I can always use Daemon, to be sure!

Also, does it support something other than 7-zip, or would that not matter since GameEx (apparently?) does not? I'd rather use RAR to keep my drive images compressed, because 7-zip only gets on average 5% better compression, but takes (at least) twice as long as RAR to extract. Since this is occurring on-the-fly, I'd rather wait 30 seconds than over a minute.

Posted
This sounds like a good addition, but I've got a couple of questions before looking at it (I'm still just getting my feet wet with GameEx, and have got a LONG way to go).

First, does this support something other than Daemon Tools? There are other disc-mounting utilities that have command-line support. Just curious; I can always use Daemon, to be sure!

Also, does it support something other than 7-zip, or would that not matter since GameEx (apparently?) does not? I'd rather use RAR to keep my drive images compressed, because 7-zip only gets on average 5% better compression, but takes (at least) twice as long as RAR to extract. Since this is occurring on-the-fly, I'd rather wait 30 seconds than over a minute.

Thanks for the feedback. DT and 7Zip are all that GELW currently supports. Keep in mind that 7-Zip can extract RAR files as well. If there is some reason why you need to use another tool like WinRAR, let me know and I can look into adding support for it.

If you give me the command line syntaxes for other disc-mounting utilities (both for mounting and unmounting), I can look into adding them to GELW.

Posted
But GameEx does support 7zip if you are registered. Maybe I'm missing something.

Thanks for your reply.

What I asked was if the wrapper supported something other than 7-zip. Specifically RAR. The comment about GameEx was that it (as far as I know?) also does not support something other than 7-zip (well, and ZIP, but let's not dwell in the realm of the obsolete).

7-zip compresses only marginally better than RAR and (in my benchmarks) takes at least twice as long to extract.

I'd rather spend ten extra megs to have a CD-image that extracts in 30 seconds, rather than wait for a minute or more, since it's going to happen on-the-fly.

But, it's pointless to ask this question if GameEx doesn't support RAR-archived ROMs/images.

I would like to ask in what capacity GameEx *does* support 7-zip; wouldn't wrappers like this be unnecessary?

Posted
Thanks for your reply.

What I asked was if the wrapper supported something other than 7-zip. Specifically RAR. The comment about GameEx was that it (as far as I know?) also does not support something other than 7-zip (well, and ZIP, but let's not dwell in the realm of the obsolete).

7-zip compresses only marginally better than RAR and (in my benchmarks) takes at least twice as long to extract.

I'd rather spend ten extra megs to have a CD-image that extracts in 30 seconds, rather than wait for a minute or more, since it's going to happen on-the-fly.

But, it's pointless to ask this question if GameEx doesn't support RAR-archived ROMs/images.

I would like to ask in what capacity GameEx *does* support 7-zip; wouldn't wrappers like this be unnecessary?

Gameex supports 7zip for use with Goodsets mainly... You know you have one zip of chronotrigger and 5000 versions inside it.

Ive never needed a wrapper for anything in gameex that supported command line.. But maybe thats just me.

Posted
Thanks for the feedback. DT and 7Zip are all that GELW currently supports. Keep in mind that 7-Zip can extract RAR files as well.

But GameEx will display "no games found" unless the archives are in a format it supports.

If there is some reason why you need to use another tool like WinRAR, let me know and I can look into adding support for it.

It's twice as fast as 7-zip - and 7-zip only compresses on average less than 5% better. Bottom line, I'd rather spend 20 extra megs to save 30 seconds.

If you give me the command line syntaxes for other disc-mounting utilities (both for mounting and unmounting), I can look into adding them to GELW.

I may do that. So far all I've done is successfully crash GELW.

I've converted one of my .RAR Saturn archives to 7-zip (these are bin/cue) to test.

Near as I can tell, I've got everything configured properly. See anything wrong down there? All the paths are right.

COMMENT SATURN (SSF)

WORKINGDIRECTORY "C:\EMU\Saturn\"

REGISTERDT "C:\Program Files\DAEMON Tools\"

REGISTER7ZIP "C:\Program Files\7-Zip\7z.exe"

UNZIP "%2"

IDENTIFY BIN CUE

MOUNT

LAUNCH "C:\EMU\SATURN\SSF.EXE" "%T"

UNMOUNT

CLEANUP

GameEx displays a progress bar for about 30 to 40 seconds, vanishes, then I get a window regarding GELW crashing. Any ideas? This happens on both the bin and the cue.

Posted
Gameex supports 7zip for use with Goodsets mainly... You know you have one zip of chronotrigger and 5000 versions inside it.

Ive never needed a wrapper for anything in gameex that supported command line.. But maybe thats just me.

But GameEx will unzip it, right? The tool-tip in the setup wizard says something to that effect.

Posted
But GameEx will unzip it, right? The tool-tip in the setup wizard says something to that effect.

Yep gameex will unzip them to a temp directory then upon closing the emu will remove the temp files.

Posted

Do you have the .NET Framework 3.5 installed? (Downloadable URL is included in the first post). If not GELW will crash.

Also, your REGISTERDT line needs to include the executable (eg: "C:\Program Files\DAEMON Tools\daemon.exe". Sorry this was not very clear in the documentation.

Re "no games found": I have my GameEx configured to display all files (*.*) in my ROM folder for a particular emulator, so it happily displays .zip, .rar, and any other files in that directory.

Re "and 7-zip only compresses on average less than 5% better.". I agree, I like RAR files too. But are you saying that WinRAR will uncompress a .RAR faster than 7-zip will uncompress the same .RAR? If so then I would definately look into adding WinRAR support.

But GameEx will display "no games found" unless the archives are in a format it supports.

It's twice as fast as 7-zip - and 7-zip only compresses on average less than 5% better. Bottom line, I'd rather spend 20 extra megs to save 30 seconds.

I may do that. So far all I've done is successfully crash GELW.

I've converted one of my .RAR Saturn archives to 7-zip (these are bin/cue) to test.

Near as I can tell, I've got everything configured properly. See anything wrong down there? All the paths are right.

COMMENT SATURN (SSF)

WORKINGDIRECTORY "C:\EMU\Saturn\"

REGISTERDT "C:\Program Files\DAEMON Tools\"

REGISTER7ZIP "C:\Program Files\7-Zip\7z.exe"

UNZIP "%2"

IDENTIFY BIN CUE

MOUNT

LAUNCH "C:\EMU\SATURN\SSF.EXE" "%T"

UNMOUNT

CLEANUP

GameEx displays a progress bar for about 30 to 40 seconds, vanishes, then I get a window regarding GELW crashing. Any ideas? This happens on both the bin and the cue.

Posted

It should work with any emulator that accepts the required arguments (eg: the ROM to launch) on a command line.

Will this work with the Demul emulator? I'm wanting to set up Demul for Sega's Naomi. Sorry for high jacking the thread.
Posted
Do you have the .NET Framework 3.5 installed? (Downloadable URL is included in the first post). If not GELW will crash.

I'm not entirely sure how I forgot that basic requirement that you listed quite clearly in your post. I guess I'm getting old ;)

I'm leery of installing .net 3.5. I remember once installing .net 2.0 and having it hose most of what I had that used 1.1.

Also, your REGISTERDT line needs to include the executable (eg: "C:\Program Files\DAEMON Tools\daemon.exe". Sorry this was not very clear in the documentation.

Noted, thanks. I'll make the changes when I get home.

Re "and 7-zip only compresses on average less than 5% better.". I agree, I like RAR files too. But are you saying that WinRAR will uncompress a .RAR faster than 7-zip will uncompress the same .RAR?

No. WinRAR uncompresses a RAR containing file X at least twice as fast as 7-zip uncompresses a 7Z containing file X. I didn't try using 7-zip to decompress RAR files. It's all command-line anyways so that could probably just be an .ini addition.

Posted
Yep gameex will unzip them to a temp directory then upon closing the emu will remove the temp files.

Sweet.

To where does GameEx unzip the file(s)? Is it configurable?

Since this is the case then GELW can skip this step and just mount it from where GameEx puts it, saving a step and giving the user at least a GameEx progress meter to look at, rather than a DOS prompt or... blank screen [shrug] for 30+ seconds.

Posted
Sweet.

To where does GameEx unzip the file(s)? Is it configurable?

Since this is the case then GELW can skip this step and just mount it from where GameEx puts it, saving a step and giving the user at least a GameEx progress meter to look at, rather than a DOS prompt or... blank screen [shrug] for 30+ seconds.

GameEx unzips into the unzip folder of your rom directory. This is not configurable unless you use other means.

Posted
I'm not entirely sure how I forgot that basic requirement that you listed quite clearly in your post. I guess I'm getting old ;)

I'm leery of installing .net 3.5. I remember once installing .net 2.0 and having it hose most of what I had that used 1.1.

Noted, thanks. I'll make the changes when I get home.

No. WinRAR uncompresses a RAR containing file X at least twice as fast as 7-zip uncompresses a 7Z containing file X. I didn't try using 7-zip to decompress RAR files. It's all command-line anyways so that could probably just be an .ini addition.

I suspect (although I could be wrong) that 7z will unextract RAR files nearly as fast as WinRAR. However, I am working on a new command in GELW called "REGISTEREXTENSION" that will allow you to specify any program and command-line options to unextract a particular extension. eg:

REGISTEREXTENSION .ZIP "C:\Program Files\7-zip\7z.exe" "e -o%D %T"

REGISTEREXTENSION .RAR "C:\Program Files\WinRAR\WinRAR.exe" <command line options>

(I don't have GELW in front of me so the above example might not be completely accurate, but it's close)

I have never tried having GameEX extract the zip for me, but in that case you should be able to have a GELW INI that does not run the UNZIP command. You'll lose out on being able to use the IDENTIFY option however, and I don't think that GameEX has a similar option. You'll also lose out on the CLEANUP option, but I *assume* that GameEX will delete the files that were extracted after the emulator is run?

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...