PDA

View Full Version : PSXfin.exe and DaemonTools



vincelatello
06-01-2010, 09:07 AM
Does anyone have a script for this to work?

I tried using it with the build in script but im getting an error on some games that says. "cd not usable: Failed to open file." Same thing happens if I just try it on the emulator.

If I mount it in daemon tools first though, it works no problem.

I am not sure why this is happening, but maybe someone has some insight?

vincelatello
06-01-2010, 12:25 PM
Small update, this seems to happen to games that have multiple bin files. Single bin and cue files work fine. Any idea what the solution is for this?

garwil
06-01-2010, 01:36 PM
I'm not on my PC at the moment but I have this working in PSX and ePSXe. If you use the cue file rather than the bin file as your rom it'll stop happening. Hope that helps

vincelatello
06-01-2010, 05:25 PM
Is there any chance you can post your script and other various settings when you get a chance. I was trying epsxe today but was also having issues.

vincelatello
06-02-2010, 06:13 AM
Another update. I tried epsxe like garwil mentioned. While it works I run into the same type of issue as psxfin. If I have a cue that has multiple bin files. (two examples I have are, Castlevania and destruction derby) I get an error from epsxe that says it cant read the iso file. There is no iso file involved so I am stumped.

Here is an example of my Castlevanie .cue file.

FILE "Castlevania - Symphony of the Night (USA) (Track 1).bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
FILE "Castlevania - Symphony of the Night (USA) (Track 2).bin" BINARY
TRACK 02 AUDIO
INDEX 00 00:00:00
INDEX 01 00:02:00


The file names of the bin files are correct. The cue is called Castlevania - Symphony of the Night (USA).cue


Also it works fine if I mount the games in daemon tools first. Just not if I run the cue directly. So anyone that can offer any help would be appreciated, even a script that has it mounting in daemon tools would be perfect.

volumetric
06-02-2010, 06:28 AM
i believe sega saturn hyperlaunch has the code to run daemon tools, you could copy and paste the relevant lines between the saturn and playstation ank's. Also if you can mount the image, you could probably convert it using something like magic iso. (im not sure if nero supports standard iso files) psxfin is compatible with standard iso, cloneCD image format (.img) alcohol and a bunch of others so you should be able to convert to a format that works.
If your using epsxe, you could also try a different cdrom plugin, im using a moby plugin and it seems to run everything fine

garwil
06-02-2010, 06:38 AM
IIRC neither emulator supports multi-bin cd images, but if you do what volumetric says about the AHK script above they'll load the mounted images fine. I'll post my script when I get a chance.

vincelatello
06-02-2010, 07:23 AM
Ok I made some progress

This is my current script.

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
Runwait, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
Sleep, 3000
epsxeParams = -nogui
Runwait, %Executable% %epsxeParams% "%romPath%%romName%%romExtension%", %EmuPath%, Hide UseErrorLevel
DetectHiddenWindows, on
Run, %DAEMONTOOLS% -unmount 0,UseErrorLevel

}

These are my ini setting as well

[exe info]
path=D:\HyperSpin 1.0\HyperSpin Install 1.0 Final\Emulators\Sony Playstation 1\
rompath=D:\HyperSpin 1.0\HyperSpin Install 1.0 Final\Roms\Sony Playstation\
userompath=true
exe=ePSXe.exe
romextension=cue
parameters=
searchsubfolders=true
pcgame=false
winstate=HIDDEN
hyperlaunch=true

it seems like I am having an issue loading epsxe in -nogui mode.

When I run epsxe.exe -nogui from a command prompt with the image loaded in daemon tools, it works perfectly. I just need help translating that into the script. I would think my use of epsxeparams is incorrect but I am not sure how to fix it.

I tried to remove the line ""%romPath%%romName%%romExtension%", %EmuPath%, Hide UseErrorLevel" so it would seem to only run epsxe and no gui, but it just returns an error.

vincelatello
06-02-2010, 11:37 AM
I have made some headway and I am able to get the emulator to run 1 game. Once you quit that game the screen stays black and I have to ctrl alt del, to kill hyperspin and hyperlaunch and espxe if it is still running.

This is my script that allows it to work.

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
Run, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
Hotkey, %exitEmulatorKey%, CloseProcess
Sleep, 3000
epsxeParams = -nogui
Run, %Executable% %epsxeParams%, %EmuPath%
DetectHiddenWindows, on

}


I am trying to add in unloading of the iso at exit and somehow come up with a way for the espxe process to def be closed and the main hyperspin window to be brought back to the front.

I made this script to do that.

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
Run, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
Hotkey, %exitEmulatorKey%, CloseProcess
Sleep, 3000
epsxeParams = -nogui
Run, %Executable% %epsxeParams%, %EmuPath%
DetectHiddenWindows, on
Run, %DAEMONTOOLS% -unmount 0,UseErrorLevel
WinWait ahk_class epsxe
hideDesktop()
WinWaitClose, ahk_class epsxe

}

I am not sure at all about those "Winwait" lines those could be completely wrong, but even with out them and only having in that unmout daemon tools line the script no longer plays any games at all.

Hopefully I am one step closer to mastering this one. Thanks!

Also perhaps this all stems to how I implemented the -nogui switch. Once the game is loaded in daemon tools I just need to run the command line espxe.exe -nogui and that will load the game. Nothing else is needed. I am no sure if thats what I accomplished there or not.

volumetric
06-02-2010, 05:23 PM
One thing im noticing with epsxe, sometimes it wont shut down properly, yesterday i was using it to make snap videos, stopped for a minute to check my task manager as my fps were dropping, and low and behold i had six little epsxe's running. This was also causing havok with HS till i shut them all down. Hope this helps

vincelatello
06-03-2010, 05:58 AM
Thanks Volumetric. I noticed that too. Thats why I tried to solve with this part of the script

WinWait ahk_class epsxe
hideDesktop()
WinWaitClose, ahk_class epsxe

I really hope someone with much more script knowledge then me can check this out and point out the error of my ways. Thanks again!

vincelatello
06-22-2010, 10:21 AM
Anyone?

brian_hoffman
06-22-2010, 03:20 PM
Anyone?

Whats the problem exactly?
Are you trying to mount an image in Dtools then launch the emu?
Have you looked at a config for Sega Saturn, it would be very similar.

vincelatello
06-23-2010, 06:33 AM
It lets me run a rom one time. Then when I quit and try to load another rom it just gives me a black screen. Seem like the process doesnt exit properly. So I have been trying to make the script kill the process correctly after you exit the rom. I also have to reboot my system in order to play a new game

This is my current script

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
Run, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
Sleep 3000
Hotkey, %exitEmulatorKey%, CloseProcess
Run, %Executable% -nogui, %EmuPath%
}

chillinwater
06-23-2010, 07:56 AM
This should:
- Load iso (no DaemonTools)
- Close Down "epsxe.exe" cleanly (no TaskManager remnants)

To verify shutdown of "epsxe.exe"
- wait 10 secs after emu\rom loads before exiting)
- Double check TaskManager.
- remove ";" to activate msgbox if needed for testing
(this is to make sure the msgbox PID matches "epsxe.exe" PID)

If the PID, doesnt match:
- try increasing or decreasing the "sleep" command depending on your computers speed\performance. (10000=10secs)
(Doesnt affect the loading speed of the emu\rom)

Add to:
[HyperLaunch.ahk]
save\compile

;********************************Sony
Playstation*******************************
else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
Run, %Executable% -nogui -loadiso "%romPath%%romName%%romExtension%", %
EmuPath%, UseErrorLevel
sleep, 10000
WinGet, NewPID, PID, A
Process, priority, %NewPID%, High
;MsgBox, 1, , The Newly Launched PID is %NewPID%,
WinActivate, %NewPID%
Process, waitClose, %NewPID%
}

vincelatello
06-23-2010, 08:17 AM
I feel dumb but what the heck is PID and NewPID.

Also will this -loadiso will work since I am using bin and cue files? I thought -nogui automaticaly loaded up iso files? I am using version 1.7.0 btw.

Edit:

I simply increased the sleep to 10000 and that totally works and now I can launch multiple roms BUT.. when I press escape hyperlaunch turns the screen stays frozen on the screen. I have to task manager hyperlaunch then I can choose a new game. Any idea why this would happen?

chillinwater
06-23-2010, 09:32 AM
version 1.7.0 here also.


when I press escape hyperlaunch turns the screen stays frozen on the screen. I have to task manager hyperlaunch then I can choose a new game. Any idea why this would happen?

It exits very cleanly for me so if I could re-create your problem I might be able to fix it.

So here is a shot in the dark...
-Double check TaskManager to verify there are no other previous instances of epsxe and kill them if there are.
(they would most likely cause conflicts)
-if you have "sleep, 10000" be sure to wait 10 seconds before exiting
-if you have "sleep, 5000" be sure to wait 5 seconds before exiting but that might not be enough time to get the actual PID of epsxe. (computer speed\performance)

When all else fails reboot then try it again. (I hate when you have to do this but...)

+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++

"-nogui" removes the little gui window and then goes to full screen automatically.

epsxe should load the following with the parameter "-loadiso"
bin,iso,img,cue,ccd,mds ( i only tested with iso though)
make sure you have all those rom formats in your,

\hyperspin\settings\Sony Playstation.ini -file
romextension=bin,iso,img,cue,ccd,mds

Also, to see the list of files supported by the "-loadiso" parameter,
-run epsxe, (outside HyperSpin)
-select \file\run iso\
and youll see the supported files

PID = the process ID, in this case its for epsxe.
TaskManager will list the PID (fingerprint) of everthing running on your computer. no two are alike and evertime you run epsxe it will be different.

NewPID is the newest process started (after selecting your rom and running it in HyperSpin), also in this case for epsxe.
(you could change all references of "NewPID" to "epsxePID" or "whatever" if you wanted its just an arbitrary name I gave it)

all the code after "sleep, 10000" (including "sleep, 10000") could also be added to other systems if needed for better shutdown. (if this works for you)

vincelatello
06-23-2010, 11:06 AM
Thanks for your help with this. Your code def does work properly. I am able to load files no problem. The reason I switched to using daemon tools was because of an error I was receiving with a smilar script to this one. It works great if I have a game that is one bin and one cue file. But for a game like destruction derby or Castlvanie symphony of the night that I have, which contains multiple bin files I get an error that says "error loading isofile destruction derby.iso" which is funny cause it should be destruction derby.bin.

so I am still stuck a bit im afraid.


I feel like if there was a way for me to have the script close the HyperLaunch.exe process when i press exit as well as close the emulator that would fix it all for me.

chillinwater
06-23-2010, 11:24 AM
for shutdown, try adding either,

winactivate, HyperSpin
process, close, HyperLaunch.exe
or
winactivate, HyperSpin
exitapp

or some combination of the above to the bottom of the script (just below)
Process, waitClose, %NewPID%

These are a last resort (hard) shutdowns of Hyperlaunch cuz it bypasses the Hyperlaunch "closeprocess"

vincelatello
06-23-2010, 11:27 AM
Another update I tried working with your code some more.

This is what I have, some tweaks to make multiple bin files run properly.

;********************************Sony Playstation*******************************
else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
Run, %Executable% -nogui, %EmuPath%
sleep, 8000
WinGet, NewPID, PID, A
Process, priority, %NewPID%, High
;MsgBox, 1, , The Newly Launched PID is %NewPID%,
WinActivate, %NewPID%
Process, waitClose, %NewPID%
}


Problem is when I click exit epsxe doesnt unload the game. So when I choose another game it just plays the same game everytime. Even if I close out and come back. Any ides where it is storing that?

vincelatello
06-23-2010, 11:35 AM
I GOT IT!!!!

This is my final code for anyone else who encounters this problem

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
Run, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
Sleep 10000
Hotkey, %exitEmulatorKey%, CloseProcess
Run, %Executable% -nogui, %EmuPath%
winactivate, HyperSpin
process, close, HyperLaunch.exe
}


Adjust the sleep as necessary.


Chillenwater THANK YOU a million times over!!!

chillinwater
06-23-2010, 11:51 AM
:beer::dancing2::beer:
Ahhh, you did it not me!!

SpyderX
07-11-2010, 03:52 PM
Guys this thread is going to make my day, cant wait to get home and get my epsxe emulator working with hyperspin. I also have psx games with multiple bins and they only work with epsxe if I run with daemon tools, I will report back with my results. I will follow the instructions in this thread.

:)

SpyderX
07-13-2010, 09:39 AM
Followed the instructions and everything works with no issues.
Just takes about 10 seconds for daemon tools to mount image with the cue file and for the game to start. IS THAT normal?

How can I speed the mounting of image and for game to load? Do I reduce PID to 5000 instead of 10000?

vincelatello
07-13-2010, 11:04 AM
I am not sure how to speed mounting of the image. You could reduce the PID but thats more for how long the eumlator shoudl wait to load. If you have a fast computer with a fast hard drive, lower the value cant hurt. Worst that would happen is it wont work.

chillinwater
07-13-2010, 04:06 PM
I GOT IT!!!!

This is my final code for anyone else who encounters this problem

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" && executable = "epsxe.exe")
{
Run, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
Sleep 10000
Hotkey, %exitEmulatorKey%, CloseProcess
Run, %Executable% -nogui, %EmuPath%
winactivate, HyperSpin
process, close, HyperLaunch.exe
}


Adjust the sleep as necessary.


Chillenwater THANK YOU a million times over!!!
@SpiderX,
Im not sure which script your using.
The script (a couple posts up) with the "PID" or "NewPid", doesnt use daemon tools and "Sleep, 10000" shouldnt be a factor in speed up or slowdown. It justs polls the newest process started after a 10 sec wait.

but if your using this script above from "vincelatello" (with daemon tools support)
then the iso load time should be quick
and then it runs the emulator after "Sleep, 10000" = (a 10sec delay).

So yes you could play with it and reduce the time to say, "Sleep, 5000", or "Sleep, 1000", (=1sec) and see if it still loads properly for you.

@vincelatello,
just curious, have you had any problems with your script and daemon tools not letting you mount other images since you dont use the "-unmount" command?

Run, %DAEMONTOOLS% -unmount 0,UseErrorLevel

I havent tested so I dont know.

SpyderX
07-14-2010, 02:46 AM
@SpiderX,
Im not sure which script your using.
The script (a couple posts up) with the "PID" or "NewPid", doesnt use daemon tools and "Sleep, 10000" shouldnt be a factor in speed up or slowdown. It justs polls the newest process started after a 10 sec wait.

but if your using this script above from "vincelatello" (with daemon tools support)
then the iso load time should be quick
and then it runs the emulator after "Sleep, 10000" = (a 10sec delay).

So yes you could play with it and reduce the time to say, "Sleep, 5000", or "Sleep, 1000", (=1sec) and see if it still loads properly for you.

@vincelatello,
just curious, have you had any problems with your script and daemon tools not letting you mount other images since you dont use the "-unmount" command?

Run, %DAEMONTOOLS% -unmount 0,UseErrorLevel

I havent tested so I dont know.

chillinwater I will test the script posted without daemon tools but this puzzles me now since like the OP explained, what about if you have games that have multiple tracks?, the point of using daemon tools I thought was it would use the .cue file to associate the tracks.

Is there a better way of doing this? I will try reducing PID like you stated but also I will search for the script without daemon and try that instead.

Will report back when I get home from nightshift, hopefully this is a better script.

Thanks :tee:

chillinwater
07-14-2010, 10:19 AM
Dont know if any of this helps,

I dont believe the script I have on post #15 (without daemon tools) is better, as it seems to only load .iso files with moderate success, even though "epsxe" says that it will load "bin,iso,img,cue,ccd,mds " through the \file\run iso\ -gui dialog and the commandline "-loadiso". (Daemon tools in theory shouldnt be necessary with this script)
but,

vincelatello had problems (see post #18) running other files with that script so he re-wrote it with daemon tools support. (see posts #21, #26)

I guess for now the script you use is going to depend on what file types you have.

"Daemon Tools" supports the mounting of:
mds,b5t,b6t,bwt,ccd,cue,isz,nrg,pdi,cdi,iso -type files
If your files are of this type, use vincelatello's script (with Daemon tools) script on either of these posts, #21, #26 and adjust "sleep, 10000" to your pref. to speed up the emulator load time.

"EPSXE" supports, through the \file\run iso\ -gui dialog and the commandline "-loadiso",
bin,iso,img,cue,ccd,mds -type files
If your files are of this type, you could test the script on this post #15.
(shouldnt have to adjust "sleep, 10000", it doesnt affect emulator load time)
It just waits 10=secs to poll the most recent program started (EPSXE) to make a cleaner shutdown.

So there is a difference between what Daemon Tools can mount and what EPSXE can load through command line "-loadiso" which is:
bin,img,mds -type files (Daemon Tools CANT load these AFAIK)

vincelatello
07-14-2010, 12:50 PM
I'd just like to add in I dont think you even need the loadiso command, if your using single bin file games. I cant recall exactly but on the newer version of epsxe I had if you just ran the (I think) -g (no gui) command it loaded up a bin/iso whatever automatically. Maybe that helps. If you have multiple bin files you need to use daemon tools.