Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Dazz on May 29, 2008, 02:56:59 pm
-
Hey Guys,
I have about 400 PlayStation 1 games that I would like to be bale to use on my cabinet. If at all possible via a front end.... Anyone know if there is a way to use ePSXe in combination with another application or a batch file that will do the following:
launch ePSXe
Open CD drive
Wait for close CD drive
Launch game
on exit:
open CD drive
exit epsxe
I've asked on the ePSXe forums if there was a command line that would do the following. However, ePSXe does not interact with the CD rom drive in this manner.
So I'm thinking... can you open the CD rom drive from a batch file? If so I could have the batch open the drive, use command lines for ePSXe to launch and then closemul to exit and hopefully open the CD drive. I really can't think of another way to do this... Any suggestions?
-
Hmmm, I think I have what I need now... I'm just thinking out loud and rambling because I am bored and stuck in the office today. I don't know how to program a batch file, but I am looking into it right now.
With ePSXe I can use the command line switch -nogui. This tells ePSXe to launch the game loaded in the CD drive based on the CD plug-in being used in ePSXe.
Just run across this little command line program that has many cool features including open/close CD/DVD drives. NirCMD (http://www.nirsoft.net/utils/nircmd.html)
So, I'm thinking... run batch file via front end of choice. Launch NirCMD to open CD drive. Insert CD into drive and close. ........... Once drive has been closed launch ePSXe with -nogui switch, play game, use closemul to exit and launch NirCMD to open CD drive.
Need to figure out how to tell the batch file to wait until the drive has been closed before launching ePSXe. Can you have the batch show a window stating "push button to continue" and then go to load/launch ePSXe?
Is anyone here familiar enough with batch files to know if this would be possible to do? Or am I just wishful thinking here? Perhaps a batch file is not what I need here... small custom launcher application is needed?
Again, I'm just thinking out loud... If you have other suggestions that might make this easier, please let me know. I know there must be a way to do this... :(
-
I assume you do not want to put in a 300 GB hard drive and just load the images off of it?
-
I assume you do not want to put in a 300 GB hard drive and just load the images off of it?
I've got 2tb (4x500gb) of drive space currently on my cabinet and 4 other computers with a minimum of 500gb on each. :o So, I have plenty of drive space for the images, the point is that I have roughly 250+ cd's in my collection. I don't want to have to rip from the cd's to the hard drive if I absolutely don't have to.
-
Well what i'm thinking is that use could use Mamewah. Since it has the ability to launch applications before launching the emulator. So you would put it here:
### Execution Settings ###
pre_emulator_app_commandlines C:\yourbatchfile.bat
### Execution Settings ###
pre_emulator_app_commandlines
emulator_commandline C:\juegos\psx\ePSXe.exe -nogui "[rompath]\[name].[romext]" {dosbox}{safelaunch}
post_emulator_app_commandlines
general_app_commandlines
This way it would wait for the application to close before launching the emulator.
You would use Nircmd through a batch file to open then close the cd drive after x amount of seconds using the "sleep" function in bat files. That way the bat would close itself and mamewah would launch the emulator.
-
wow! if you are going to change CDs why don't you just set up the console in your cabinet and have the front-end switch it on and off and switch your controller and a/v lines to it?
-
I don't want to have to rip from the cd's to the hard drive if I absolutely don't have to.
Well you really don't have to, but obviously I cannot elaborate.
-
Why batch scripts? seems rather limiting to me to use them...and while there are a lot of handy app's at NirSoft...I don't see it really being required.
If you wrote the script in AutoIt...you could script from within AutoIt to eject the CD Tray...then poll the CD drive to check to see if its ready (tray closed) and if so...launch the Emu...if not continue polling forever or setup a timeout that exits the script and returns to the FE.
Its probably a fifteen line script give or take.
-
I don't want to have to rip from the cd's to the hard drive if I absolutely don't have to.
Well you really don't have to, but obviously I cannot elaborate.
When you think about it. If you have 250+ discs, how many of those discs are you going to play on a regular basis? And of those, how many of them are going to receive intense game play time? I have a nice collection of console games myself, but out of all of them, I only play a very small percentage of them on a regular basis and of those, only five or so (at any one time) receive intense game time.
I used to keep ALL of my games on display in my old apartment. But when some of my titles started to disappear and not reappear in a timely manner, I finally realized that I could keep about forty or so games out on display and still be satisfied. The rest of the games are stored in another part of the house, safe out of the hands of nosy visitors, exploring toddlers, and my so-called, "mi casa es su casa," friends.
When you look at the problem that way, the equation changes. Rip the discs that you play the most and keep the rest out of the way. The rare times you get the itch to play that game you don't have on the drive, then rip the disc at that time or you can simply drop the disc in the drive and play.
Just a different way to look at the problem. :dunno
-
Nologic, I've always loved that version of Cheshire. I've been dying to get a shirt, poster, anything larger than the small wall paper graphic for years.
-
Why batch scripts? seems rather limiting to me to use them...and while there are a lot of handy app's at NirSoft...I don't see it really being required.
If you wrote the script in AutoIt...you could script from within AutoIt to eject the CD Tray...then poll the CD drive to check to see if its ready (tray closed) and if so...launch the Emu...if not continue polling forever or setup a timeout that exits the script and returns to the FE.
Its probably a fifteen line script give or take.
I am looking to use batch since most front ends will allow batch files to be executed. I currently use HyperSpin and Maximus Arcade and neither allow AutoIt AFIK.
-
But they can run exe's? YOu could invoke autoit scripts from bat file, before running emu.
The best thing is doing a wrapper in Either AutoIt or AutoHotKey to doing the task, you want do doing, example like this (here using AutoHotKey, because its named that today):
Drive, Eject,, E:
Sleep, 2500
WaitUserToClose:
Sleep 100
DriveGet, status, StatusCD
if (status <> "stopped")
{ goto WaitUserToClose
}
Drive, Lock, E:
FileGetSize, size, E:\SYSTEM.CNF
if (ErrorLevel=0)
{
RunWait, C:\Emulator\PSX.EXE "%A_Index%",C:\Emulator\PSX
}
Drive, Eject,, E:
Sleep, 2500
Compile it with AutoHotKey to exe and use this as a wrapper for the emulator. Please note it might NOT work 100% and is rougly made, but you got a idea, why AutoHotKey is very effective for automation and tasks like these (where BAT is so limithed).
And of course All/Most wrappers out here seen to wrote in these applications as well.
-
Hey Dazz, in HS you can runbefore on emu's, I dont think anyone has fully tested it yet, but you should be able to run those scripts. Give the above script a try and let me know if you have any problems, if you run into issues then send me a PM and I'll write the script for you so you can accomplish exactly what your trying to do. I think I have a couple PS games lying around to test also.
-
But they can run exe's? YOu could invoke autoit scripts from bat file, before running emu.
The best thing is doing a wrapper in Either AutoIt or AutoHotKey to doing the task, you want do doing, example like this (here using AutoHotKey, because its named that today):
Drive, Eject,, E:
Sleep, 2500
WaitUserToClose:
Sleep 100
DriveGet, status, StatusCD
if (status <> "stopped")
{ goto WaitUserToClose
}
Drive, Lock, E:
FileGetSize, size, E:\SYSTEM.CNF
if (ErrorLevel=0)
{
RunWait, C:\Emulator\PSX.EXE "%A_Index%",C:\Emulator\PSX
}
Drive, Eject,, E:
Sleep, 2500
Compile it with AutoHotKey to exe and use this as a wrapper for the emulator. Please note it might NOT work 100% and is rougly made, but you got a idea, why AutoHotKey is very effective for automation and tasks like these (where BAT is so limithed).
And of course All/Most wrappers out here seen to wrote in these applications as well.
Thanks SF. It looks promising... I'll give it a try sometime this week and see what happens.
Hey Dazz, in HS you can runbefore on emu's, I dont think anyone has fully tested it yet, but you should be able to run those scripts. Give the above script a try and let me know if you have any problems, if you run into issues then send me a PM and I'll write the script for you so you can accomplish exactly what your trying to do. I think I have a couple PS games lying around to test also.
I'll give it a try in HS and see what happens. The script above looks very promising.
-
The script above seems to open the drive if no disk is preset, runs ePSXe using the -nogui switch forces the CD in the drive to run. So far all is well and looks great...
However, it doesn't appear that the exit and open CD drive routine is working. I have exited epsxe, verified that the process is gone. The CD drive is locked and I cannot get the disk to eject.
-
Drive, Lock, E: lock the drive, so you might unlock the drive (Drive, Unluck, E), before you trying to eject it. SO as I wrote it was rougly made, but try add the unlock command just before the last eject command.
This was just make sure the user dosent unlock the drive while under emulation.