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. Thank you for your support. Tom Speirs

Patreon

[RESOLVED] Creating batch files for emulators: "ePSXe" and "PCSX2"


Alan Ribas

Recommended Posts

Through internet research I found the ability to create batch files to Start scan specific functions depending on the type of game you play on the emulator. Although read about it, I could not learn how to create them.


What I need is very specific and I will explain. The default setting of both the epsxe and pcsx2 for me is great. But such emulators have the multitap function. Those who work with them know that when a set of up to 2 players starts the multitap function can not be active. And when a game more than 2 players starts the multitap function necessarily need to be active so that the controls can function.


In short, I wanted to learn two things:


1) Could someone explain me how to create a batch file to enable or disable the function of the multitap on both emulators through GameEx? :huh:


2) When a game starts in epsxe you must press the "F5" and "F6" to enable the analog control of all controls. What command should use the batch file for that !? :huh:



Many thanks in advance to all who can help me. ^_^

GameEx.ini

PLAYSTATION.ini

PLAYSTATION 2.ini

Link to comment
Share on other sites

The point is that the drive of these keys (F5 and F6) can only be made in some games, because they enable them in some cases that the game does not support analog, control simply stops working. So I would add this command in batch files

Link to comment
Share on other sites

I'm not an expert on bat files and the reason is somewhat intentional ^_^ I've dabbled in the past but ultimately found that this is masochism (self torture). I'm sure Stigzler above will agree with that hehehe

There are however 3rd party apps/frontends that will do all this for you. The one i prefer for PCSX2 is PCSXBonus - it will let you configure all plugins and settings (even unique mem cards!) on a per game basis, and then export these settings to an .exe. You can then use these exes in GameEx and it's very effective and simple.

I don't actually emulate ePSXe so can't honestly give you an approach on this - but may be there is something similar to aid you. I would look into it.

Either which way you choose, these systems take a lot of dedication to work flawlessly (if there is such a thing), and currently there is no "vanilla" solution to them.

I would personally avoid getting into the mentality of batch files though, because they will become hard work and tedious in the end.

/my2c

  • Like 2
Link to comment
Share on other sites

You'd be better off with an AHK script. If you knew the games you wanted these keys sent on, you could use Quicklaunch to pass the game name to an AHK script via command line, then check the gamename against an array. If it matches - wait for a period (to allow the emulator to start up) then send the keys.

Just one idea - it'd be a doddle for a AHK scirpter to knock together - and potentially easy for you to learn. Failing the latter - join the AHK forum and ask nicely.... see if anyone will help.

Good luck fella.

EDIT: You've got it bang on, Dazzle! Why didn't you tell me that 9 months ago! :P

If yer setting out - I wouldn't bother going for batch or AHK. I'd go straight for Visual Basic - free editor + sooo much easier in the long run.

  • Like 1
Link to comment
Share on other sites

There are however 3rd party apps/frontends that will do all this for you. The one i prefer for PCSX2 is PCSXBonus - it will let you configure all plugins and settings (even unique mem cards!) on a per game basis, and then export these settings to an .exe. You can then use these exes in GameEx and it's very effective and simple.

I don't actually emulate ePSXe so can't honestly give you an approach on this - but may be there is something similar to aid you. I would look into it.

I've been meaning to respond to this thread, but have been gettin g absolutely destroyed at work. At any rate, I would absolutely endorse this approach as well. Furthermore, ePSXeCutor is a frontend for ePSXe that does the same thing that PCSXBonus does for PCSX2 (if you follow me). I highly recommend it. You can check out this thread for some additional details.

  • Like 2
Link to comment
Share on other sites

I downloaded these two programs, "ePSXeCutor" and "PCSX2Bonus", and they look great! And simple messing. I did some individual settings in some games, but for lack of time do not really tested to see if everything is working. But you could tell me one more thing.

After configured the games, a new command line is required for emulators PCSX2 and ePSXe? If the answer is yes, could you tell me what these command lines !?


Thank you guys !!!

Link to comment
Share on other sites

We'll start with ePSXecutor first. there's a bit more too it than just using the proper command line, but not much.

In ePSXecutor you'll want to be sure that you create a config for each of your games. I recommend only creating only one or two for testing purposes before you go to far. The command you enter in the ePSXecutor config should look something like this:

-loadbin "rompath\romname.bin" -slowboot -nogui (where rompath/romname are the actual directory and file name of your disc image)

Next in the ePSXecutor GUI you'll want to create shortcuts to each of your game configurations. Name each shortcut according to how you'd like the game names to appear in GameEx (I usually just name them identically to the disc image. ReDump naming will work great). Store all the shortcuts in the same directory, since that's going to become your ROM directory. Before you create a bunch of shortcuts, it would be wise to test one or two of them to verify that they launch the proper game through ePSXe.

Once you've done that, open up the Setup Wizard and go to your emulator config for ePSXecutor (or create a new one for it). Your Working Path will be the location of ePSXecutor. Your ROM Path will point to the directory with all your shortcuts. Your ROM filter will be *.lnk. Your command line will simply be "[ROMPATH]\[ROMFILE]" (making sure the "" are left in place). You're 90% of the way there. Exit the Setup Wizard for the time being.

You'll also need to create an Advanced Emulator Config. We can get into why this is, or you can just trust me. ;) Let us know if you have questions on this. Open up notepad and paste the following contents into it. Save the file as ePSXecutor.ini (or whatever you like)


# This is an advanced emulator configuration file. It does things such as allow keyboard only emulators to be operated by a gamepad, wait for additional processes to exit and map keys. If this file is used it overrides the MAPKeys setting for the emulator.

[GENERAL]

# Enabled. Use this.

Enabled=True

#Make MCE Back button and X-ARCADE Escape and SlikStik Escape to close emulator process

MapBack=False

#Make Escape key close emulator process

MapEscape=False

#When exiting an emulator via the above mappings, you can specify keys in the send keys format to send instead of having GameEx close the process to cleanly exit the emulator. Such as the Q Key or ALT F4 which is %{F4}

KeysToSendOnExit=

#Wait for keys to be processed by the emulator

EmuWaitForKeys=True

#Additional processes to wait to exit or close on exit. Dont include the .exe. Leave blank not to use.

Process1=ePSXe
Process2=
Process3=
Process4=

[JOYMAPPING]

# For mapping a GamePad to keys
# Specify a virtual key code to send when the specific joystick control is pressed. Look at vkcodes.htm for codes.

JoymappingEnabled=False

Left=
up=
Right=
Down=
Button1=
Button2=
Button3=
Button4=
Button5=
Button6=
Button7=
Button8=
Button9=
Button10=
Button11=
Button12=
Button13=
Button14=
Button15=
Button16=

[GAMEPADEXIT]

#MAP Gamepad controls to exit and make controls exit process

MapGamePadExit=False

#Flag the controls that exit a game by placing True next to each control. To not use the control as part of the combination use a 0

Left=True
Down=
Right=
Up=True
Button1=
Button2=
Button3=
Button4=True
Button5=True
Button6=True
Button7=
Button8=
Button9=
Button10=
Button11=
Button12=
Button13=
Button14=
Button15=
Button16=

[MOUSEMAPPING]

# For registered users, the ability to control the mouse with a gamepad and/or directional keys.
# For example for PC strategy games.
# Apparantly this functionality is similar to the software Pinnacle profiler. Remember you can setup an emulator
# as one PC game. Specify enabled, and mousespeed 0-20. 20 Being fastest. This setting overrides the directional
# mapping for the above and buttons 1 and 2 Button 1/CTRL becomes left mouse. Button 2/ALT Right mouse

MouseMappingEnabled=False
MouseSpeed=0

[bLOCKKEYS]

# Use this section to disable and block key presses and mouse clicks.
# To disable the mouse clicks use code 1 for left mouse button,
# 2 for right button and 4 for middle button

Enabled=False

BlockKey_1=1
BlockKey_2=2
BlockKey_3=4
BlockKey_4=
BlockKey_5=

[KEYBOARDREMAP]

# Remap Keys for the emulator. Specify from the from key, which is the key you wish to replace the to key
# This should be good enough for real time gaming. Registered version feature. Look at VKCodes.htm for codes.

Enabled=False

Remap_1_From_VK=
Remap_1_To_VK=

Remap_2_From_VK=
Remap_2_To_VK=

Remap_3_From_VK=
Remap_3_To_VK=

Remap_4_From_VK=
Remap_4_To_VK=

Remap_5_From_VK=
Remap_5_To_VK=
Remap_6_From_VK=
Remap_6_To_VK=
Remap_7_From_VK=
Remap_7_To_VK=
Remap_8_From_VK=
Remap_8_To_VK=
Remap_9_From_VK=
Remap_9_To_VK=
Remap_10_From_VK=
Remap_10_To_VK=
Remap_11_From_VK=
Remap_11_To_VK=
Remap_12_From_VK=
Remap_12_To_VK=
Remap_13_From_VK=
Remap_13_To_VK=
Remap_14_From_VK=
Remap_14_To_VK=
Remap_15_From_VK=
Remap_15_To_VK=
Remap_16_From_VK=
Remap_16_To_VK=
Remap_17_From_VK=
Remap_17_To_VK=
Remap_18_From_VK=
Remap_18_To_VK=
Remap_19_From_VK=
Remap_19_To_VK=
Remap_20_From_VK=
Remap_20_To_VK=
Remap_21_From_VK=
Remap_21_To_VK=
Remap_22_From_VK=
Remap_22_To_VK=
Remap_23_From_VK=
Remap_23_To_VK=
Remap_24_From_VK=
Remap_24_To_VK=
Remap_25_From_VK=
Remap_25_To_VK=
Remap_26_From_VK=
Remap_26_To_VK=
Remap_27_From_VK=
Remap_27_To_VK=
Remap_28_From_VK=
Remap_28_To_VK=
Remap_29_From_VK=
Remap_29_To_VK=
Remap_30_From_VK=
Remap_30_To_VK=
Remap_31_From_VK=
Remap_31_To_VK=
Remap_32_From_VK=
Remap_32_To_VK=



Put that file in the following directory:
...\GameEx\CONFIG\EMULATORS

Now open up the Setup Wizard again and navigate to the Advanced Emulator Setup screen for your ePSXecutor config. On that screen you'll see a field called Advanced Config. Your new advanced emulator config should appear in that dropdown list. Select your new config and exit the Setup Wizard. Give that a shot and see if it works for you.

  • Like 1
Link to comment
Share on other sites

Thank you very much for your help NullPointer!!!! I understood what you said:


In relation to PCSXBonus, I could set it up easily, creating the executables files.


But in relation to "ePSXeCutor", managed to create the specific settings, as you can see in the picture below. But still did not understand how to link this specific configuration to a specific game !!!

Can you please tell me how to do this !? I have a set configuration but can not connect it to a specific game.



post-27643-0-32997900-1428116768_thumb.p

Link to comment
Share on other sites

In your screenshot for example you would:

Right Click Jogos de 4 Players

Select Quick Configure

Go to the Options tab

Find the Cmd Line field

Here you would enter -loadbin "D:\Jogos\EMULADORES\Playstation\Roms (PS1)\2 Xtreme.iso" -slowboot -nogui

Click OK

Right Click Jogos de 4 Players again

Select Change

Enter 2 Xtreme as the Name of configuration

Click OK

Double click your config to make sure it works as expected!

All good? Awesome! Let's move on

Exit ePSXecutor (this is not strictly necessary, but makes it easier to explain)

Right click ePSXecutor.exe

Select Create Shortcut

Rename the shortcut to 2 Xtreme

Right Click the shortcut and select Properties

Enter "2 Xtreme" after ePSXecutor.exe (This refers to the name of the config you entered in ePSXecutor)

Properties should look like this now (as an example): E:\Emulation\Emulators\ePSXe190\ePSXeCutor.exe "2 Xtreme", but make sure it points to where ePSXecutor is located

Obviously this can be a time consuming process, but once it's configured it's relatively east to maintain. Also note that once you've created your shortcut you can continue to modify the config, and everything will still work.

Good luck man!

  • Like 1
Link to comment
Share on other sites

Thank NullPointer !!!
I followed all your steps and I did. The specific settings for each game work perfectly.
But two problems arose.
Problem 1: All my PS1 games are compressed. I use the decompression option iso playstation in the system. However, with the current setting, to make everything work, I had to unpack the games, but apparently the command line is executed before the GameEx can unpack the game, conclusion: If the game is compressed will not work even if you use the option to unpacking.
Problem 2: A picture is worth a thousand words. I took a picture of the screen. When the game starts, the Gamex is in windowed mode, it will stay in front of the screen. And when the game starts and the GameEx this full screen only can hear the game's sound (the option to show the desktop is enabled). Another detail is that the game screen is bigger than my monitor screen, the images go beyond the limits of the monitor.
note: I do not know why the image exceeds the monitor limits, but this emulator always behaved this way on my computer. When I start a game in ePSXe emulator itself through this sort of thing happens. But when I start the system through GameEx, the game is fully within the monitor limits (this when the command line envolviar the epsxe.exe)
Below you can see I took two screen shots. One shows the emulator in windowed mode, with the normal picture. The other shows the emulator in full screen. Look how the image exceeds the display limit. I tried several different video settings here and nothing changes that.
Is there any solution to these problems !?

post-27643-0-58335600-1428194284_thumb.p

post-27643-0-18651500-1428194929_thumb.p

post-27643-0-09639900-1428195025_thumb.p

Link to comment
Share on other sites

This is kind of a quick post being that I don't have much time. It sounds like you may be having some issues with the video plugin you're using for ePSXe. The window resolution problem is almost certainly related to your plugin settings, and your window focus issues might be related to your plugin as well. Please see this post for one possible solution regarding the window focus issue.

  • Like 1
Link to comment
Share on other sites

I had a great idea to solve my problem. B)

Instead of using the "epsxecutor" to create specific settings, I'll just make this: I create two different folders epsxe emulator. In one of them I enable multitap and the other does not. Then I created two different folders for isos files (a folder for game 2 players and another folder for 4-player games), and in the end, joined the two systems in GameEx by choosing the option "emulator Group".

Ready !!!!


Anyway, thank you for your help NullPointer, and also thank you to everyone who helped me in this topic !!! :D

Now my PS1 and PS2 emulators are fully configured !!!



ps..And finally after almost three years setting the GameEx to leave it the way I wanted to, I could!! Is 100% set !! Much of this I must To the explanations of this forum and the help of this nice people here !!


Thank you guys !!! :D

  • Like 2
Link to comment
Share on other sites

Instead of using the "epsxecutor" to create specific settings, I'll just make this: I create two different folders epsxe emulator. In one of them I enable multitap and the other does not. Then I created two different folders for isos files (a folder for game 2 players and another folder for 4-player games), and in the end, joined the two systems in GameEx by choosing the option "emulator Group".

Ready !!!!

You have discovered GameEx Groups feature! Congrats ;) It's awesome correct?

Glad you found a solution in the end Alan. We can mark "Resolved"?

Link to comment
Share on other sites

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