Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Using CD's in a cabinet... ePSX  (Read 2855 times)

0 Members and 1 Guest are viewing this topic.

Dazz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1246
  • Last login:January 11, 2025, 07:43:39 am
  • HyperSpin Team
    • VPUniverse
Using CD's in a cabinet... ePSX
« 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?



Dazz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1246
  • Last login:January 11, 2025, 07:43:39 am
  • HyperSpin Team
    • VPUniverse
Re: Using CD's in a cabinet... ePSX
« Reply #1 on: May 29, 2008, 03:52:36 pm »
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

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



SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Using CD's in a cabinet... ePSX
« Reply #2 on: May 29, 2008, 04:48:47 pm »
I assume you do not want to put in a 300 GB hard drive and just load the images off of it?

Dazz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1246
  • Last login:January 11, 2025, 07:43:39 am
  • HyperSpin Team
    • VPUniverse
Re: Using CD's in a cabinet... ePSX
« Reply #3 on: May 29, 2008, 05:57:27 pm »
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. 



gonzo90017

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:June 23, 2019, 02:41:07 pm
  • I'm a llama!
Re: Using CD's in a cabinet... ePSX
« Reply #4 on: May 29, 2008, 07:20:49 pm »
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:
Code: [Select]
### 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.
« Last Edit: May 29, 2008, 07:23:23 pm by gonzo90017 »

NickG

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 586
  • Last login:September 26, 2022, 05:25:23 am
  • Dig.
    • My Projects Page
Re: Using CD's in a cabinet... ePSX
« Reply #5 on: May 29, 2008, 08:30:27 pm »
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?

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Using CD's in a cabinet... ePSX
« Reply #6 on: May 29, 2008, 09:57:04 pm »
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.

Nologic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:November 21, 2008, 03:22:57 pm
Re: Using CD's in a cabinet... ePSX
« Reply #7 on: May 31, 2008, 03:01:09 am »
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.
"Pinky, you've left the lens cap of your mind on again." - The Brain

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Using CD's in a cabinet... ePSX
« Reply #8 on: May 31, 2008, 10:55:33 pm »
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

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: Using CD's in a cabinet... ePSX
« Reply #9 on: June 01, 2008, 01:39:17 am »
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.

Dazz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1246
  • Last login:January 11, 2025, 07:43:39 am
  • HyperSpin Team
    • VPUniverse
Re: Using CD's in a cabinet... ePSX
« Reply #10 on: June 02, 2008, 08:12:34 am »
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.



Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Using CD's in a cabinet... ePSX
« Reply #11 on: June 02, 2008, 09:53:21 am »
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):

Code: [Select]
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.
« Last Edit: June 02, 2008, 10:01:27 am by Space Fractal »
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

BadBoyBill

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 56
  • Last login:October 07, 2010, 06:34:53 pm
Re: Using CD's in a cabinet... ePSX
« Reply #12 on: June 02, 2008, 11:25:07 am »
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. 

Dazz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1246
  • Last login:January 11, 2025, 07:43:39 am
  • HyperSpin Team
    • VPUniverse
Re: Using CD's in a cabinet... ePSX
« Reply #13 on: June 02, 2008, 02:47:25 pm »
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):

Code: [Select]
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.



Dazz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1246
  • Last login:January 11, 2025, 07:43:39 am
  • HyperSpin Team
    • VPUniverse
Re: Using CD's in a cabinet... ePSX
« Reply #14 on: June 02, 2008, 03:30:01 pm »
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.
« Last Edit: June 02, 2008, 03:38:35 pm by Dazz »



Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Using CD's in a cabinet... ePSX
« Reply #15 on: June 02, 2008, 04:38:40 pm »
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.


Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.