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 donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Hi all,

I have written a simple wrapper for GameEx to assist in the launch of emulators through GameEx.

In short, when configuring an emulator in GameEx, you point the command line to my wrapper instead of to the emulator. On the command line of the wrapper, you include the rom path/filename, the emulator path/filename, and a comma delimited list of file name extensions that identify the rom.

When the wrapper is called with GameEx, it will determine if the rom is archived (rar, zip, and 7z presently supported). If it is, it will extract it to a temporary directory.

The wrapper will then locate the rom to use from the extracted file(s) based on the extensions you passed to the wrapper. So if you archive contained a bunch of files, it will be able to determine which one is the rom. This is useful for archives that might contain more than a single file (eg: a cue, img/iso/bin, and mp3 all in one archive).

Once the rom is found, it will then launch the emulator and pass the correct path/filename of the rom.

Anyway, I've found it pretty useful for complex emulator setups, and for emulators that don't support reading archived files directly, and I've seen several posts in this forum that indicates that something like this might be useful to others. Since I wrote it for myself, I would need to do some cleanup to make it useful to the general public, so I wanted to gauge the interest before taking that project on. I'd be glad to include the source as well (currently VB6, but I will likely convert to C# if I end up modifying it for general use).

If I'm reinventing the wheel because something more powerful already exists, please let me know :)

Cory

Posted

Gameex will work with 7zips its a registerd feature so to use your wrapper may detour people from registering if they only wanted that feature.

Other thatn that post it here and we will see how it goes...

Thanks

Posted

Thanks. I am a registered GameEx user myself, and wouldn't want to do something to cause grief to Tom, so I'll wait for some more feedback before making any decisions.

It's really not a complex program, but could be useful to those without experience in creating batch files or making simple programs to handle some tricky emulator setups.

Gameex will work with 7zips its a registerd feature so to use your wrapper may detour people from registering if they only wanted that feature.

Other thatn that post it here and we will see how it goes...

Thanks

Posted

Sounds like a worthwhile project. afaik the 7zip support is mostly for goodmerged sets, but all my DC, saturn, etc iso's are torrentzipped and not all emulators support zips (ssf and nulldc come to the top of my head). So it's a very useful tool wrapper :)

Posted

The timing is a coincidence as I was planning on adding unzipping support for emulators shortly. Im just still pondering on how to do it exactly.

As said the 7-zip support is really meant for goodmerge support currently, so dont sweat over anything, and thanks for contributing :)

So another question is would people prefer to see a wrapper, or have unzipping support in GameEx itself?

Posted
The timing is a coincidence as I was planning on adding unzipping support for emulators shortly. Im just still pondering on how to do it exactly.

As said the 7-zip support is really meant for goodmerge support currently, so dont sweat over anything, and thanks for contributing :)

So another question is would people prefer to see a wrapper, or have unzipping support in GameEx itself?

I personally would prefer it to be incorporated into GameEx. We have enough users that have a hard time setting up emulators as it is. I think a wrapper would just make things harder for them to set up. Also for those programs that require a wrapper already, would just have a wrapper for a wrapper. Just my opinion though. I think GameEx would really stand out above the rest if this was incorporated. Only know of one other frontend that does it and is not near the quality of GameEx.

Posted
The timing is a coincidence as I was planning on adding unzipping support for emulators shortly. Im just still pondering on how to do it exactly.

As said the 7-zip support is really meant for goodmerge support currently, so dont sweat over anything, and thanks for contributing :)

So another question is would people prefer to see a wrapper, or have unzipping support in GameEx itself?

Quite easy to do Tom. First thing is to get a Zip library. I recommend the ICSharpCode.SharpZipLib.dll.

According to it's doc's it's licence allows you to use it even in commercial products. From their website...

Bottom line In plain English this means you can use this library in commercial closed-source applications.

Code for extracting zip files is included in that source code I sent you for the bezel attract creator.

Simplest way to do it.

1. Extract the archive to a sub folder in the users temp folder (System.IO.Path.GetTempPath())

2. The UnZip source I gave you accepts a source file and destination path. It will return an array of full paths to each file extracted.

3. Search the archive for extentions that are accepted for the emulator profile (comparing to Path.GetFileExtension())

4. Launch the emulator pointing the [ROM] and [ROMPATH] variables to the file found in the archive array (String.Replace() and Path.GetFileName() etc)

5. When the program has finished, delete the subfolder in the users temp folder and return back to GameEx

I've done a similar thing with Pleasure Extractor and it works fine doing this. Actually it's pretty basic stuff ;)

Posted
The timing is a coincidence as I was planning on adding unzipping support for emulators shortly. Im just still pondering on how to do it exactly.

As said the 7-zip support is really meant for goodmerge support currently, so dont sweat over anything, and thanks for contributing :)

So another question is would people prefer to see a wrapper, or have unzipping support in GameEx itself?

I personally would love to see zip support within GameEx itself. It is handy in many respects. As you know, I have spent many hours adding zip support to the Commodore emulation suite. One of the knock on effects is that if the zipped files contain multiple disk images, then the temporary directory will contain them. This makes disk swapping (i.e. c64) a breeze. All the needed files are alone and in one simple place. Conditional unzipping would also work wonders. The ability to add a host of conditions to the unzip and execute command. It could work as a unzip command in each emu config to enable the mounting of multiple disks. Not quite sure how that could be implimented as too early in the morning for me to think straight :) But to reiterate - Gameex zip support would be a great help (regestered feature)

Also, well done to Benjam47 for his work. Wonderful things could only come from it!

Posted

What I am trying out now is expanding the existing 7zip support to also handle zip files. I think this "might" be the best way to handle this and it only required a couple of small changes to GameEx. Thoughts?

Posted
What I am trying out now is expanding the existing 7zip support to also handle zip files. I think this "might" be the best way to handle this and it only required a couple of small changes to GameEx. Thoughts?

Sounds good Tom! Will it also delete the file and directory after it's exited? Cuz I noticed that it doesn't currently do that with the current setup. Or does it? Cuz I notice a Unzipped7-Zip folder with the roms that were extracted.

Posted
Sounds good Tom! Will it also delete the file and directory after it's exited? Cuz I noticed that it doesn't currently do that with the current setup. Or does it? Cuz I notice a Unzipped7-Zip folder with the roms that were extracted.

What it does currently (or should) is delete the contents everytime before it unzips something else. So you will see something in the folder after you exit gameex, but the contents wont build up. At least they shouldnt.

Posted

Thanks for the feedback everyone.. I think for the moment I'm going to let Tom take it from here.. I'm just glad I got an interesting discussion going :)

If there is interest in having a wrapper do anything fancier than what GameEx ultimately ends up supporting (games with multiple disks, locating the correct rom from a compressed file with multiple file types inside, etc...) I'd be glad to revisit working on a wrapper to handle those complexities.

Posted
Thanks for the feedback everyone.. I think for the moment I'm going to let Tom take it from here.. I'm just glad I got an interesting discussion going :)

If there is interest in having a wrapper do anything fancier than what GameEx ultimately ends up supporting (games with multiple disks, locating the correct rom from a compressed file with multiple file types inside, etc...) I'd be glad to revisit working on a wrapper to handle those complexities.

No, thank you, and I hope I did not steel your thunder here.

Posted
What it does currently (or should) is delete the contents everytime before it unzips something else. So you will see something in the folder after you exit gameex, but the contents wont build up. At least they shouldnt.

Can you test that please? Cuz I have roms in that folder that were extracted. Not too big of a deal as I only use a few goodsets. Only use the goodsets that no-intro doesn't support. Like Atari 2600 & 7800. So not really much space being taken up there. ;). Thanks Tom!

Posted
Can you test that please? Cuz I have roms in that folder that were extracted. Not too big of a deal as I only use a few goodsets. Only use the goodsets that no-intro doesn't support. Like Atari 2600 & 7800. So not really much space being taken up there. ;). Thanks Tom!

Seems to be working to me. Like I said it may keep the last extract in there, but it wont build up.

I did find a small problem. I've been testing with Future Pinball, and the current support only lists game in the root extracted folder. With FP sometimes the game is in a version number folder within that.

Posted
Seems to be working to me. Like I said it may keep the last extract in there, but it wont build up.

I did find a small problem. I've been testing with Future Pinball, and the current support only lists game in the root extracted folder. With FP sometimes the game is in a version number folder within that.

Yeah I had that problem with a wrapper I was scripting as well. I could get it work just fine except for that issue. I could get it to run the table just fine but had problems with the libraries needed to run that table. So gave up at that point! I guess I could of figured something out if I had really thought about it. I don't know how you would go about programming it but I did it with an array and it ran the last table in the list since it was probably the highest version.

Posted
Yeah I had that problem with a wrapper I was scripting as well. I could get it work just fine except for that issue. I could get it to run the table just fine but had problems with the libraries needed to run that table. So gave up at that point! I guess I could of figured something out if I had really thought about it. I don't know how you would go about programming it but I did it with an array and it ran the last table in the list since it was probably the highest version.

What Ive done to fix is set it not to extract paths (ie it just extracts all sub folders to the root folder). Works great with future pinball, and I dont think it will break anything.

Posted
What Ive done to fix is set it not to extract paths (ie it just extracts all sub folders to the root folder). Works great with future pinball, and I dont think it will break anything.

Nice! Way to go Tom! :D

Guest
This topic is now closed to further replies.
×
×
  • Create New...