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

Script that automatically unpack t7z files and mount them in Daemon Tools


Recommended Posts

Posted

Hi,

I have just started to test gameex front-end and so far I'm impressed. I'd like to use it to play my redump.org PSX games that are packed with t7z. Unfortunately I'm not good at writing the command line scripts (nah, to be perfectly honest I have completely no idea how to do it...). I'd like to ask for help to write a custom script that would resolve all my problems with compressed PSX games.

The script should do the following:

1. Send "unmount" command to Daemon Tools.

2. Extract .7z file that contains a game, using t7z.exe (eg.: t7z.exe e "Cool Boarders 4 (USA).7z") to start the process of unpacking (it should unpack the .7z archive selected in gameex to TEMP folder).

3. Show the message that the files are extracting.

4. Send the command to daemon tools to mount the extracted CUE file.

5. Start epsxe by the command line (epsxe default cd-rom drive is Daemon tools one so the game should automaticly load up).

6. After closing the epsxe send "unmount" command to Daemon Tools and delete extracted files from TEMP folder.

Thanks in advance for your help!

Posted

GameEx already supports 7zip natively (for registered users). I would think you could simply use the correct command line or launch before/also command to mount the image for you. I'm not sure a script is required in this case. You might try searching for this procedure as I recall it being covered a number of times already.

Posted

I'm pretty sure that without some additional script registered version of gameex would not allow me to automatically extract archive with game (selected in front-end) with torrent7z (external program that can extract previously created with this tool .7z archives faster than normal version of 7z) to TEMP folder, mount CUE file to Daemon Tools (again, external program), write custom message, open up epsxe, and in the end delete files automatically. I've searched the board for this kind of scripts and I found something like this for packiso archives but without basic knowledge about command line I can't adjust it to my needs. Before donating for a full version I'd like to be sure that gameex will be my main frontend and without functionality described above I will probably be forced to look for other alternatives (or learn about command line so I could figure out how to write this script on my own). I really hope that some more experienced gameex user would be kind enough to help me with it :(

Posted

I missed where you said torrent7z (haven't heard of it before). No, GameEx won't natively support that archive format. There are some scripts on the forum that will do basically what you want for different archive formats and image mounting tools. What you want to do is not exotic by any stretch (and, like I said, has been done and documented here). I don't have a link to a thread off the top of my head since I don't have any systems that use images loaded on my cab.

You might be interested in using the built in image mounting tool that GameEx includes. I believe it's VirtualDrive based, but since I don't use it, that could be wrong. Basically, you tell GameEx to mount the file and it takes care of mounting, drive letter assignment, and unmounting. You would then need to use a loader to extract the file to your destination and delete it upon exit.

Like I said, all of this is possible, but it requires a bit of effort on your part to make it nice and smooth. Although it is not exactly built in to GameEx (no toggle you can click labelled "make it work"), this isn't a difficult request that someone wouldn't offer to help with typically. Hopefully one of the regulars can help with a loader (TEMPEST...WHERE ARE YOU?!).

FWIW, no other FE will do exactly what you want out of the box either. But, if you can perform the task manually from a command line, GameEx can do it natively. If you can do it with command line or key presses, you can use AHK or AI to make a loader to get it working in GameEx. ANYTHING can be done with a little scripting!!! B)

Posted

Yes, can be easily done. bkenobi mentioned Tempest's name as he's one of the few that have made one specific to a user. BrianHoffman is another. We have many scriptors here in the forums, myself included. I personally like to see a user put in some time and I don't mind helping with the code. But will take some interest on your part. If not then I would ask very nicely to just have it done for you. I'm not volunteering any of mentioned users as they would have to create something specific to only one user. And as mentioned, no other FE will do this. It will always take some work to get it done.

Posted

Good point frequency. I wasn't volunteering Tempest, but he did create a thread where he was looking to create loaders upon request, so... ;)

Posted
You might be interested in using the built in image mounting tool that GameEx includes. I believe it's VirtualDrive based, but since I don't use it, that could be wrong. Basically, you tell GameEx to mount the file and it takes care of mounting, drive letter assignment, and unmounting.

The mounting tool that is included with gameex seems to be not compatible with my PSX images (almost every game contains one .cue file that should be loaded in virtual drive and multiple .bin files with music tracks) - that's why I'd like to use Daemon Tools Lite which supports loading redump.org CUE files.

I personally like to see a user put in some time and I don't mind helping with the code.

I've read some basic tutorials about command line and tried to write this script based on other useful information that I have found on this board but still I can’t complete this script without help… So far I can run some basic commands that will probably be part of this script:

- create temp directory and move to it

mkdir %temp%\PSX_TEMP
cd %temp%\PSX_TEMP

- copy torrent7z program to TEMP folder

copy ..\torrent7z_0.9.1_win32bin\*.* %temp%\PSX_TEMP

- extract file with t7z.exe (in this case, the file should be choosen in gameex so the command will probably look different. Unfortunately I can't simply use "*.7z" because there are several archives in ROMS folder)

t7z.exe e "Cool Boarders 4 (USA).7z"

- mount and unmount images in daemon tools

"c:\Program Files\Daemon Tools\daemon.exe" -unmount 0
"c:\Program Files\Daemon Tools\daemon.exe" –mount 0,"%temp%\PSX_TEMP\*.cue"

- start emulator

start "C:\Emulators\epsxe\epsxe.exe" -nogui -analog

- delete unnecessary files

del "*.bin"
del "*.cue"

Unfortunately these are just basic commands that won’t work as intended without adding other commands that I can’t write on my own without learning more complex language used in command line. I can’t find a “noob friendly” tutorial that could help me finish this script. I would like to kindly ask more experienced scripter to help me out :)

So what’s left? I have no idea how to point in command line specific file in ROMS folder that is selected from gameex GUI and then unpack it automatically from ROM folder to TEMP folder without copying the whole archive to TEMP before extracting (coping the file first would be too time consuming). Also I'm not sure what is the correct order for all the functions and how to merge them to work as intended. I will be very grateful if someone post a complete finished script :wub:

Thanks in advance. Please excuse my poor grammar & spelling.

Posted

After reading the posts, all this can be done with a registered version of GameEx. No need to script anything. 7-zip will extract the files just fine. I do this currently with my NDS roms that are torrent 7-zipped. This can all be done the hard way but given that these are things that can be done with a registered version then I can not support doin this. That would basically be avoiding registering. Register! You won't be disappointed and it's the only front-end that will give you the results you're after natively. ;)

Posted

You are asking the right questions. Until someone can come in and help more, I'd suggest checking out some of the loaders that have been written for other systems. I bet at least one of them is pretty damn close to what you need and would only require a slight modification using the code you've listed above. Off the top of my head, I know Brian Hoffman wrote a Naomi system loader that was pretty slick. I recall someone posting a script/loader that would extract images, load them, run the emu, and delete the tmp files at some point. There was a lot of discussion about it's necessity, but a working version was provided. If I remember correctly, every time this has come up in the past, the user ended up just extracting the files and using MAP files since there was such a large delay due to the time it takes to extract a disc image.

Posted

First of all, 'torrent7z', is just a special (torrent friedly) incarnation of 7zip, just like torrentzip is for zip, but with better compression. It is 100% compatible with standard 7zip, therefor the reg. version should handle it just fine.

For the automation part, there's no really a need for a script. This can be done with the 'run before' and 'run after' option.

Currently I don't have access to my gameex machine, but if you need some more advice, I could check my setup at the weekend.

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