Next Generation Emulation banner

Go into Gamelist instead of the main gui?

4K views 24 replies 4 participants last post by  ofernandofilo 
#1 ·
Hi all

If I was able to go immediately into Gamelist instead of the main GUI (that must be hidden) I would be able to stream the games through steam to my cheap laptop connected to my HDTV. Any way I can accomplish this?
 
#2 ·
you can use the -nogui command line switch, but you have to also set a disk image... so really you'd have to make a shortcut for each game use -nogiu -loadbin and your disk cue or bin file location (like -loadbin c:\psx\crash 3.bin)

so alltogether as my example your shortcut would be for example c:\epsxe\epsxe.exe -nogui -loadbin c:\psx\crash 3.bin
that would load the crash 3.bin and boot straight to the game...if you did that for all your games you could add each shortcut (Named the game) to steam individually..
 
#3 ·
I am aware of this variant and afraid it would quickly become unbearable to add tons of game specific entries in an already rich library. Streamed entries doesn't seem to retain its tags from the main computer either so they end up shuffled into regular steam titles.
 
#6 · (Edited)
ok, the example in the list is for a little something different BUT it is quite possible to do by modifying it.. I was able to successfully select a game and boot it using this format
@Echo off
echo chrono cross
echo crash bandicoot 3
echo finale fantasy Viii

set /p answer=enter choice ?
goto :%answer%

:chrono cross
SET GAME="n:\epsxe\isos\chrono cross d1.cue"
GOTO START

:crash bandicoot 3
SET GAME="n:\epsxe\isos\crash bandicoot 3.cue"
GOTO START

:finale fantasy Viii
SET GAME="n:\epsxe\isos\finale fantasy viii D1.cue"
GOTO START



:START


cd n:\ePSXe\
start epsxe.exe -loadbin %GAME% -nogui

I can start any of the three in the example by just typing their name. you could theoretically add as many to the list as you want. you could even do it alphbetically by breaking the lists up...use the prompt to enter the letter , that then displays the games in that list just have to gave goto's for them like
:a
echo a games list
goto begin

you'd just have to label the set /p thing :begin
Pretty simple stuff
 
#7 · (Edited)
Better this:
Code:
@@echo off
title ePSXe batch runner...
cls
set pemu=N:\ePSXe
set prom=F:\games\roms\PSX
:o1
cls
set /p aw= ^ Game to run?:
set gm=
pushd "%prom%"
if errorlevel 1  set rr="%prom%"& goto err
for /f "tokens=*" %%a in ('dir *%aw%* /on /b 2^>^&1') do set gm=%%a>nul
if exist "%gm%" goto o2
goto o1
:o2
pushd "%pemu%"
if errorlevel 1  set rr="%pemu%"& goto err
start epsxe.exe -loadbin "%gm%" -nogui
exit
:err
title ERROR!
color 4f
cls
echo.
echo %rr% was not found.
echo.
pause
exit
This code only need the route to ePSXe (pemu) and an partial route to game images (prom).
You can use partial names for run any existing game file, Example:

If the file name is "[PSX] Metal Gear Solid - CD1.cue", I can use "met*ge*cd1.cue", "m*g*s*1.cue", "tal*ar*lid*1.cue", "metal*d1.cue", etc.
In short, infinite possibilities.

Edit:
Ops... corrected code, I missed inverted commas (start epsxe.exe -loadbin "%gm%" -nogui)
 
#8 ·
Better this:
Code:
@@echo off
title ePSXe batch runner...
cls
set pemu=N:\ePSXe
set prom=F:\games\roms\PSX
:o1
cls
set /p aw= ^ Game to run?:
set gm=
pushd "%prom%"
if errorlevel 1  set rr="%prom%"& goto err
for /f "tokens=*" %%a in ('dir *%aw%* /on /b 2^>^&1') do set gm=%%a>nul
if exist "%gm%" goto o2
goto o1
:o2
pushd "%pemu%"
if errorlevel 1  set rr="%pemu%"& goto err
start epsxe.exe -loadbin %gm% -nogui
exit
:err
title ERROR!
color 4f
cls
echo.
echo %rr% was not found.
echo.
pause
exit
This code only need the route to ePSXe (pemu) and an partial route to game images (prom).
You can use partial names for run any existing game file, Example:

If the file name is "[PSX] Metal Gear Solid - CD1.cue", I can use "met*ge*cd1.cue", "m*g*s*1.cue", "tal*ar*lid*1.cue", "metal*d1.cue", etc.
In short, infinite possibilities.

Nice.. I don't know enough about the batch commands to come up with that... lol...I know it's much like the old standard basic but didnt' know the command list other than a few I have dealt with...
 
#10 ·
ok fixed it... instead of start epsxe.exe -loadbin "%gm%" -nogui it SHOULD be
Start epsxe.exe -loadbin "%prom%\%gm%" -nogui
I am on win10 BTW, might not work the same way as 7 or 8 or earlier

when you pushd back to the epsxe directory, a simple %gm% can't find the path unless it is in the same directory as the epsxe exe
 
#12 ·
Ops... again ^^u
Sorry, I use *nix, so... I can't test everything in the VM =P
This ...I missed an "/s"... -.-u

Try this:
Code:
@@echo off
title ePSXe batch runner...
cls
set pemu=N:\ePSXe
set prom=F:\games\roms\PSX
:o1
cls
set /p aw= ^ Game to run?:
set gm=
pushd "%prom%"
if errorlevel 1  set rr="%prom%"& goto err
for /f "tokens=*" %%a in ('dir *%aw%* /on /b /s 2^>^&1') do set gm=%%a>nul
if exist "%gm%" goto o2
goto o1
:o2
pushd "%pemu%"
if errorlevel 1  set rr="%pemu%"& goto err
start epsxe.exe -loadbin "%gm%" -nogui
exit
:err
title ERROR!
color 4f
cls
echo.
echo %rr% was not found.
echo.
pause
exit
 
#14 · (Edited)
Another version, with less syntax and dead code, fix possible bugs too:
Code:
@@echo off
title ePSXe batch runner...
cls
set emu=X:\ePSXe\epsxe.exe
set prom=X:\games\roms\PSX
if not exist "%emu%" set rr=%emu%& goto err
pushd "%prom%"
if errorlevel 1  set rr=%prom%& goto err
:o1
cls
set /p aw= ^ Game to run?:
for /f "tokens=*" %%a in ('dir *%aw%* /b /s 2^>^&1') do set gm=%%~sa>nul
if exist "%gm%" goto o2
goto o1
:o2
start "" "%emu%" -loadbin "%gm%" -nogui
exit
:err
title ERROR!
color 4f
cls
echo.
echo "%rr%" was not found.
echo.
pause
exit
 
#15 · (Edited)
ok gotta question.. running into a small issue... if you have, for example crash bandicoot and crash bandicoot 2 (and 3) it seems to always return the LAST one in the list (3) same for wild arms and wild arms 2 if you put wild as the search it always returns wild arms 2. Is there a way to make it automatically pick the FIRST one it comes to that contains all the characters instead of the last?

**EDIT**
actually thought I found a solution (Adding /o:-n) witch reverses the sort order BUT found that typing wild*2* doesn't work in that case it still loads plain wild arms


**EDIT#2**
found a work around, if I enter wild*2*.c it works correctly leave the .c off and it loads plain wild arms... so the wild card isn't working exactly like it should. I shouldn't care whats after the 2, or thats what I thought..it should have only been concerned with making sure it contained what was typed


**EDIT#3**
found if I change the bat file and changed *%aw%* to *%aw%.?* it fixes it.. uses the placeholder for c or I if it is ISO. Now a simple wild*2 loads wild arms 2, wild loads wild arms.
Learned MUCH from this!!
 
#16 ·
ok one last thing I discovered...no need to enter anything.. just hit tab until you find the game you want then hit the enter key!!
I am uploading the exe version of
u3L05 vh9jV's code with minor changes as follows 1) just place it in your epsxe directory, it expects all games to be in the isos directory inside epsxe. It is drive/location independent(used %cd% to get location rather than hard coded which is why it expects games in the epsxe/ISOS folder) 2) changed prompt to Enter game to load or hit tab to scroll through list 3) displays game and path before loading.
.bat has been converted to exe format (bat to exe V2.4.5) so you can add it to steam if you wish. Original bat is also included
 

Attachments

#18 · (Edited)
ok one last thing I discovered...no need to enter anything.. just hit tab until you find the game you want then hit the enter key!!
That are quick-search feature in CMD/Terminal... it work that way because you have the bare ISO's in the current path (%prom%), but if you have many other things, is troublesome.

I want indicate certain things in your code (and mine too).

First:
Not need double "@", I put it for avoid "auto call" an username.

Second:
You used %cd% for call the location of the BAT file?
If is the case, it's wrong. Use "%~dp0" or "%~dps0" instead. Example: set emu=%~dp0epsxe.exe
In XP to Win8 that only work if %cd% = %userprofile%, but is wrong anyway.
I don't knew as it works in Win10 or with the "EXE conversion", maybe is doing an auto pushd "%~dp0". Whatever.

Third:
This command: dir *%aw%.?* /o:-n /b /s
The ".?" part is imposing a search of an element with a point (.) followed a character(only one). But the "*" after that destroy the "a character" imposition and extend to infinite (dir *%aw%.*).
The "/o:-n" surprisingly work... the norm is "/o-n" (dir *%aw%.* /o-n /b /s).
In this form, you can't specific the file extension anymore, only file names.

I wonder if it is possible to limit the script so it only includes specific filetypes to tab through such as .cue or .iso?
Yeah, this do the trick (the tab part not):
Code:
for /f "tokens=*" %%a in ('dir *%aw%*.cue *%aw%*.ccd *%aw%*.bin *%aw%*.img *%aw%*.iso /b /s 2^>^&1') do set gm=%%~sa>nul
Other way is using "find", but can't use "*" in the syntax, it have less functionality. I will put it only as example:
Code:
for /f "tokens=*" %%a in ('dir *.cue *.ccd *.bin *.img *.iso /b /s ^| find /i "%aw%" 2^>^&1') do set gm=%%~sa>nul
 
#17 ·
That is amazing and confirmed to work great with Steam-Stream... And it would potentially be possible to do the same for PCSX2 as well! I wonder if it is possible to limit the script so it only includes specific filetypes to tab through such as .cue or .iso?
 
#20 ·
you "Could" edit the cue files.. put all the bins in a subfolder called bin, then edit the cue with notepad and add the path to the bin... so crash bandicoot.bin would become x:\path\bin\crash bandicoot.bin
you'd haved to do that for all the cue files, but then you'd only be left with cue,iso and any other formats you use..cue/bin are by far the most common though
 
#19 · (Edited)
yea the @@ I just left in since it didn't seem to make any difference.. in windows, from everything I could find %cd% returns the current directory, I verified before I posted by copying epsxe to another folder, running the bat from that new folder, it returned the new folder. Thats why I specified that the bat be placed in the epsxe folder, I'm not searching out for epsxe, I am simply returning the current directory, I do understand your point though.. your method would allow the bat to be located anywhere... also in windows o:-n is the correct format, it is the sort order... instead of sorting a-z it sorts z-a. http://ss64.com/nt/dir.html
the added .? was the only way I could get a simple name2* search to work, otherwise it would always ignore the 2 and load name.cue instead of name2.cue (or without /o:-n it would always load name2.cue even if the search was just name*)
so I dunno.. it works as intended with the small changes I made (on win 10 of course)
 
#21 · (Edited)
Hmm... the syntax "o:-n" is older, it's supported for retro compatibility. This not appear with "help dir" or "dir /?".

In short: "dir *%aw%.?* /o:-n /b /s" == "dir *%aw%.* /o-n /b /s"
Let's explain what "dir" does inside "for" command.
If you put "wild*arms" and you want this structure:

Wild Arms\Wild Arms.cue
Wild Arms 2\Wild Arms 2 - CD1.cue
Wild Arms 2\Wild Arms 2 - CD2.cue

The dir command execute "dir *wild*arms* /b /s" and show this:

%prom%\Wild Arms
%prom%\Wild Arms 2
%prom%\Wild Arms\Wild Arms.bin
%prom%\Wild Arms\Wild Arms.cue
%prom%\Wild Arms 2\Wild Arms 2 - CD1.bin
%prom%\Wild Arms 2\Wild Arms 2 - CD1.cue
%prom%\Wild Arms 2\Wild Arms 2 - CD2.bin
%prom%\Wild Arms 2\Wild Arms 2 - CD2.cue

If the for command don't have an break condition, it always end saving the last one value in %gm%.
gm=%prom%\Wild Arms 2\Wild Arms 2 - CD2.cue

In your case execute "dir *wild*arms* /o-n /b /s" and show this:

%prom%\Wild Arms 2
%prom%\Wild Arms
%prom%\Wild Arms\Wild Arms.cue
%prom%\Wild Arms\Wild Arms.bin
%prom%\Wild Arms 2\Wild Arms 2 - CD2.cue
%prom%\Wild Arms 2\Wild Arms 2 - CD2.bin
%prom%\Wild Arms 2\Wild Arms 2 - CD1.cue
%prom%\Wild Arms 2\Wild Arms 2 - CD1.bin

And save gm=%prom%\Wild Arms 2\Wild Arms 2 - CD1.bin

If you use "dir *%aw%*.c?? /o-n /b /s" instead. It execute "dir *wild*arms*.c?? /o-n /b /s" and show this:

%prom%\Wild Arms\Wild Arms.cue
%prom%\Wild Arms 2\Wild Arms 2 - CD2.cue
%prom%\Wild Arms 2\Wild Arms 2 - CD1.cue

In this case you lost the capability for save "Wild Arms.cue".
If you put "wild*arms*2", for command save "Wild Arms 2 - CD1.cue", not "Wild Arms 2 - CD2.cue". You need put "wild*arms*2*2" for save "Wild Arms 2 - CD2.cue".
For fix that you use "dir *%aw%.c?? /o-n /b /s" instead, but now you always need specific an end string.
If I put "wild*arms" now, the for command always save "Wild Arms.cue" in %gm%.
For save "Wild Arms 2 - CD1.cue", put "wild*arms*1", "wild*d1", "wild*1", "arms*1", etc.
For save "Wild Arms 2 - CD2.cue", put "wild*ar*2", "wi*ar*2", "arms*2", etc.

Best learn while playing with dir command.

If want use TAB exclusively, this batch file is better. Only fix the routes who best fit.
 

Attachments

#22 ·
so basically, through batch, the BEST scenario is to only have bin/iso/ccd images in the folder (Epsxe doesn't need a cue file) so the extension would be irrelevant . Then you could name the image something more fitting for the batch dir search.. like wild arms 21 / wild arms 22 or bandicoot / bandicoot2 / bandicoot3. If you had a large collection that might take a bit of time (but so would the other option of editing all the cue files to add a path to the bins in another folder). Which brings another though, is it possible through batch to read the cue file and append a path (x:\path\) to the bin location for all the cues in a folder and resave them? if so, don't give me code, just commands to research.. I wan't to learn to do this stuff (I use to be pretty good at some 8 bit assembly programming and have been out of it a loooong time and this little stuff has got my interest on it reved back up)
 
#23 ·
With Linux commands is possible find an chain of text and replace it in multiple existing files. But in Windows not exist native commands who can do the same thing.
Programs like GNU Emacs or WinHex can do that in Windows... but exist easier ways to achieve with same result.

You can create symbolic link instead of creating new CUE's. See mklink /D.
 
#24 ·
I actually got it working by using Auto Hotkey.

Code:
Run ePSXe.exe, R:\-=Emulatorer=-\Sony Playstation\+ (Favorite) ePSXe
while !winExist("ahk_exe ePSXe.exe")
    sleep 100
WinActivate, ahk_exe ePSXe.exe
Send, !f
Send, {Down 4}
Send, {Enter}
WinHide, ahk_exe ePSXe.exe
ESC::
{
Process, Close, ePSXe.exe
ExitApp
}
You need to fix the path and rightclick compile the code, then use it with Steam. what it does is to open the gamelist and hide the main window, then when you push ESC it kills both the emulator and the AHK script.
 
#25 · (Edited)
Necro? Of course! But I finished the third version of my script that calls EPSXE, MEDNAFFEN, PCSXR-PGXP, or XEBRA, :D I had to share!

open-psx-classic-nogui-dev-31.cmd :
Code:
@echo off
mode con cols=120 lines=70
SETLOCAL EnableDelayedExpansion
:: see: https://ss64.com/nt/delayedexpansion.html
REM Enable edgbla's Interface Plugin
IF EXIST ePSXe.exe set "path=%~dp0plugins\_libs;%path%"
IF EXIST pcsxr-pgxp.exe set "path=%~dp0plugins\_libs;%path%"
:loopchoice
IF NOT EXIST logs mkdir logs
IF NOT EXIST logs\listofgamescue.txt (
echo.Creating list of ROMS :D wait...
REM Create list of games for ePSXe, pcsxr-pgxp, and Mednaffen!
dir /b /s ..\ROMS\*.cue ..\ROMS\*.pbp | sort > logs\listofgamescue.txt
REM X00-Create list of games for XEBRA. Pretty Heavy Stuff!
REM X01-Create a zero byte file!
echo. 2>logs\listofgamesbin.txt
REM X02-Fill the file with root games
for %%F in (..\ROMS\*~1.bin) do ( echo.%%F>> logs\listofgamesbin.txt )
REM X03-We will fill the file with subfolder games, wait for it!
for /D %%D in (..\ROMS\*) do (
REM X04-Create a temp file to read only the first line later!
dir /b "..\ROMS\%%D\*.bin" | sort > logs\listofgamestmp.txt 2> nul
REM X05-Append only valid archives
set "firstline=null"
set /p firstline=<logs\listofgamestmp.txt
if not !firstline!==null echo.%%D\!firstline!>> logs\listofgamesbin.txt
) 2> nul
type logs\listofgamesbin.txt | sort > logs\listofgamesxbr.txt
echo. 2>logs\listofgamesbin.txt
for /F "tokens=*" %%T in (logs\listofgamesxbr.txt) do (
set "tocorrect=%%T"
REM Correct the file name to be the same as .cue files
REM set "tocorrect=!tocorrect:~3,-2!"
set "tocorrect=!tocorrect:~3!"
set "tocorrect=!tocorrect:.bin  =.bin!"
set "tocorrect=!tocorrect:.bin =.bin!"
echo.E:\Lan\Games\PSX\!tocorrect!>> logs\listofgamesbin.txt
)
REM END-IF
)
REM List the Games
cls
echo.Dynamic Game List: [enter 00 to exit] [enter 01 to scan]
echo.0 - open emulator
set /A "count=0"
set "emulatortype=logs\listofgamescue.txt"
IF EXIST xebra.exe set "emulatortype=logs\listofgamesbin.txt"
for /F "tokens=*" %%C in (%emulatortype%) do (
set /A "count=count+1"
set "name=%%C"
set "name=!name:~22!"
echo.!count! - !name! [!count!]
)
set "userchoice=0"
set "thegame=null"
set /P userchoice=Choose your destiny:
IF "%userchoice%"=="00" GOTO :finishhim
IF "%userchoice%"=="01" (
IF EXIST logs\listofgamescue.txt (del /Q logs\listofgamescue.txt)
GOTO :loopchoice
)
:: see: https://ss64.com/nt/if.html
IF "%userchoice%"=="0" (
  IF EXIST mednaffe.exe start "" mednaffe.exe
  IF EXIST xebra.exe start "" xebra.exe
  IF EXIST ePSXe.exe start "" ePSXe.exe
  IF EXIST pcsxr-pgxp.exe start "" pcsxr-pgxp.exe
  goto :loopchoice
)
:: see: https://ss64.com/nt/if.html
IF %userchoice% LSS 1 (
echo invalid destination, too low: loop!
timeout /T 3 /NOBREAK > nul
goto :loopchoice
)
IF %userchoice% GTR %count% (
echo invalid destination, too high: loop!
timeout /T 3 /NOBREAK > nul
goto :loopchoice
)
:: Ready to Play!
set /A "count=0"
for /F "tokens=*" %%C in (%emulatortype%) do (
set /A "count=count+1"
IF "%userchoice%"=="!count!" set "thegame=%%C"
)
IF "%thegame%"=="null" goto loopchoice
REM pause
::ePSXe.exe -analog -nogui -loadiso "%thegame%"
IF EXIST pcsxr-pgxp.exe (
  start "" pcsxr-pgxp.exe -nogui -cdfile "%thegame%"
)
IF EXIST ePSXe.exe (
  start "" ePSXe.exe -nogui -loadiso "%thegame%"
)
IF EXIST mednafen.exe (
  cmd.exe /c start "" mednafen.exe "%thegame%"
)
:: start "" xebra.exe -SYNC -IMAGE "%thegame%" -RUN2
IF EXIST xebra.exe (
  start "" xebra.exe -IMAGE "%thegame%" -RUN2
)
goto loopchoice
:finishhim
ENDLOCAL
timeout /T 2 /NOBREAK
exit /b
Believe me, it works. But it only works in the folder organization I use. It needs to be converted to be used on other machines.

Make good use!

Text Font Technology Photography Electronic device
cheers!
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top