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. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

I'm in the process of converting ALL my emus / games over to GameEX from MAMEWah and I'm hitting a couple of road blocks.

Here's my current layout.

GameEX App

C:\Arcade\Apps\GameEX\

Pre-Game Launcher (Batch Files, used for iPAC configurations and DaemonTools)

C:\Arcade\Launcher\

.lnk locations (Link files for games to launch.)

C:\Arcade\Emus\PC\

Games Directory (Where the game actually resides)

D:\Arcade\PC Games\

____________________________________________________________________

My issues.

Some games load, oddly enough others don't. Here's one example of a game that does not load.

Bubblerain

Inside GameEX my "Load before Game" reads

C:\Arcade\Launcher\[ROM].bat

That in turn loads

C:\Arcade\Launcher\Bubblerain.bat

@ECHO OFF
ECHo Converting Controls...
ECHO ----------------------
C:\Arcade\Apps\winipac\winipac.exe "C:\Arcade\Apps\winipac\profiles\BalloonRain.ipc"
ECHO Complete
ECHO Complete
ECHO ----------------------
ECHO Mounting CD image...
ECHO ----------------------
C:\Arcade\Apps\DAEMON\daemon.exe -mount 0,"D:\Arcade\PC Games\MGP1.23.iso"
ECHO Complete
ECHO ----------------------

I do see Daemon tools load, thus so far so good.

Yet when it goes to launch, I get dumped back to the GameEX menu.

So I tried launching the game directly from the lnk file I created (keep in mind it launches fine in Mamewah from the .lnk file)

Link file properties.

Target "D:\arcade\PC Games\BALLOONrain\Balloon.exe"

Start in "D:\arcade\PC Games\BALLOONrain\"

If I run the .lnk file directly, it works (of course) if I load it via MAMEWah it works. Yet... if I try and launch the game from a command prompt it fails, UNLESS I'm in the working directory D:\arcade\PC Games\BALLOONrain\

Once I launch the game from the working directory I'm fine.

I read thru the GameEX log and see

cmd.exe /c D:\ D:\Arcade\PC Games\BALLOONrain\Balloon.exe

Thus making me think it's parsing out data from the link and just running the game itself. And possibly it's setting only D:\ as the current/working directory?

Other games that do not require to be launched/ran from their install directory function fine and load. (i.e. Touhou 7 - Perfect Cherry Blossom)

Yet.... on the flip side.

Touhou 7 - Perfect Cherry Blossom... (it gets better folks)

Same layout for launcher files etc...

Pre Game Launch

@ECHO OFF
ECHo Converting Controls...
ECHO ----------------------
C:\Arcade\Apps\winipac\winipac.exe "C:\Arcade\Apps\winipac\profiles\TH7.ipc"
ECHO Complete

Perfect Cherry Blossom loads, yet the controls aren't mapped correctly. As if the batch file above is never ran.

I've verified I can manually run the batch file, my iPac is reprogrammed, then I launch the game from it's link file and everything is great, likewise when loading via MAMEWah, iPac is configured, game loads, everything is happy.

But when performing these steps via GameEX, the controls never load =/

Also I've noticed it doesn't appear the post game and pre game commands aren't logged? or atleast not that I found, maybe I over looked them?

Ideas?

Let me know if you need more information!

Posted

Rockin, I'll give that a try, I'm also adding a pause string in my launcher batch files that load keyboard settings etc pre-game load.

I wasn't sure if batch file launching of PC games would work as it spawns a second process to run the game, thus Game EX hides upon launch of the batch file, the batch file executes, spawning the game, then closes. Yet gameex sees the batch file close and returns focus to itself.

I'll give it a try now =)

btw srry bout callin ya Ben ;)

Thanks Bob (if thats correct?)

Posted

lol, I'll just call ya B for short ;)

And lets say, the plot thickens..

Any time the Launcher batch files run (pre game batch files to load iPac controls and if needed mount ISOs via Daemon tools), Daemon tools loads and the CD mounts (great!) yet, not once have the controls for the iPac been loaded, if I manually run the batch files thats being called pre-game it configs the panel as need be.

I've also added a pause to the pre-game batch file for Touhou 7, yet I'm never prompted in the dos window to press a key (is pre-game apps spawned in the back ground? rather than interactively with the desktop?)

Now also.

I've created a Balloonrain.bat, placed the commands to change directory and then launch balloon.exe.

This fails and drops me back to GameEX, yet... I renamed Balloonrain.lnk to Balloonrain.old.lnk

When I launched this from GameEX (Balloonrain.old.lnk) the game loads.

Since the batch file did not work, I deleted it, and renamed Balloonrain.old.lnk back to strictly Balloonrain.lnk

Loading back into GameEX and launching Balloonrain.lnk, the game fails and drops me right back into GameEX...

Ok... so lets try this, pick some random PC games in my list

Motoroma, this game exhibited the same failures are Balloonrain when launching from GameEX

(I actually went ahead and renamed ALL .lnk files to .old.lnk)

Launching the Motoroma game with just Motoroma.lnk, and the game fails to load and returns me to GameEX

Launching the Motoroma game with Motoroma.old.lnk and the game loads and plays

reviewing the log for gameEX only shows the same basic information

16:01:53.7 10/30/2008: Running: cmd.exe /c D: D:\Arcade\PC Games\Motorama\motorama.exe

for both launching motoroma.lnk and motoroma.old.lnk

Yet again, if I rename it back to motoroma.lnk, the game fails to launch and return focus to GameEX

Is it safe to assume that the log does not show pre and post game applications launch commands as well?

Additional information

Game EX emulator config

Command Line: "[ROMPath]\[RomFile]"

Launch Before : C:\Arcade\Launcher\[ROM].bat

Launch After : C:\Arcade\Apps\winipac\winipac.exe "C:\Arcade\Apps\winipac\profiles\Default.ipc"

Posted

ok, couple of items, I turned on game debug mode. And here's my outputs

First we'll use the Touhou 7 - Perfect Cherry Blossom example.

In this example the Pre-Game script fails to load [ C:\Arcade\Launcher[ROM].bat ]

C:\Arcade\Apps\GameEx>D:

D:\>CD "D:\arcade\PC Games\Touhou 7 - Perfect Cherry Blossom"

c:\arcade\launcher\Touhou 7 - Perfect Cherry Blossom.bat


C:\Arcade\Emus\PC\Touhou 7 - Perfect Cherry Blossom.lnk

c:\arcade\apps\winipac\winipac.exe "c:\arcade\apps\winipac\profiles\default.ipc"



D:\arcade\PC Games\Touhou 7 - Perfect Cherry Blossom>PAUSE
Press any key to continue . . .

D:\arcade\PC Games\Touhou 7 - Perfect Cherry Blossom>c:\arcade\launcher\Touhou 7 - Perfect Cherry Blossom.bat
'c:\arcade\launcher\Touhou' is not recognized as an internal or external command
,
operable program or batch file.

D:\arcade\PC Games\Touhou 7 - Perfect Cherry Blossom>"D:\arcade\PC Games\Touhou
7 - Perfect Cherry Blossom\Th07.exe"

As you can see, GameEX does not wrap my Pre-Game command with double quotes (shucks) causing the batch file to fail to run.

Just for sh*ts and giggles I wrapped the pre-game command in the gameex, thus looks like this "C:\arcade\launcher\[ROM].bat"

Of course, doing this causes GameEX to freeze when loading ANY game lol

Sadly the way I designed the launching of my games is dependent on this configuration working, and several of my PC games have spaces in the name, thus when [ROM].bat is called via Pre-Game commands, every one of those games will fail to load their controls and or mount the CD.

Ok, next... Balloonrain

Balloonrain.lnk

D:
CD "D:\arcade\PC Games\BALLOONrain\"
@echo.
@echo c:\arcade\launcher\BalloonRain.bat
@echo.
@echo.
@echo C:\Arcade\Emus\PC\BalloonRain.lnk
@echo.
@echo c:\arcade\apps\winipac\winipac.exe "c:\arcade\apps\winipac\profiles\default.ipc"
@echo.
PAUSE
c:\arcade\launcher\BalloonRain.bat
"D:\arcade\PC Games\BALLOONrain\Balloon.exe"
c:\arcade\apps\winipac\winipac.exe "c:\arcade\apps\winipac\profiles\default.ipc"

Balloonrain.old.lnk

D:
CD "D:\arcade\PC Games\BALLOONrain\"
@echo.
@echo c:\arcade\launcher\BalloonRain.old.bat
@echo.
@echo.
@echo C:\Arcade\Emus\PC\BalloonRain.old.lnk
@echo.
@echo c:\arcade\apps\winipac\winipac.exe "c:\arcade\apps\winipac\profiles\default.ipc"
@echo.
PAUSE
c:\arcade\launcher\BalloonRain.old.bat
"D:\arcade\PC Games\BALLOONrain\Balloon.exe"
c:\arcade\apps\winipac\winipac.exe "c:\arcade\apps\winipac\profiles\default.ipc"

The only difference in the 2 launch files is the fact that the Pre-Game launch script is looking for Balloonrain.old.bat now (of course this does not exist)

@ECHO OFF
ECHo Converting Controls...
ECHO ----------------------
C:\Arcade\Apps\winipac\winipac.exe "C:\Arcade\Apps\winipac\profiles\BalloonRain.ipc"
ECHO Complete
ECHO Complete
ECHO ----------------------
ECHO Mounting CD image...
ECHO ----------------------
C:\Arcade\Apps\DAEMON\daemon.exe -mount 0,"D:\Arcade\PC Games\MGP1.23.iso"
ECHO Complete
ECHO ----------------------

Again is my Balloonrain.bat that is launched Pre-Game.

The ONLY thing I can think of in this case is....

Some how the active directory is changed once either the Controls are mapped via

C:\Arcade\Apps\winipac\winipac.exe "C:\Arcade\Apps\winipac\profiles\BalloonRain.ipc"

OR

When the CD is mounted via Daemon tools and

C:\Arcade\Apps\DAEMON\daemon.exe -mount 0,"D:\Arcade\PC Games\MGP1.23.iso"

(Going to test these now from a dos box.)

What are fixes?

For game names with spaces, I guess if I really wanted, I could rename all the files with spaces and replace the spaces with underscores, then allow GameEX to strip the underscores out of the name as it displays the game. (Kinda sucks as I have 41 PC games currently, that means 41 link files to update and 41 batch files that go along with the link files.)

Would it be possible to request in a future version of GameEX that the Pre and Post-Game launch scripts can utilize double quotes? ;)

Next correcting the Balloonrain mystery...

As stated the only thing I can thing of, is upon Pre-Game script launch one of the 2 commands is changing the current directory, and since Game EX calls the games launch directory first

D:
CD "D:\arcade\PC Games\BALLOONrain\"

Then executes the Pre-Game scripts, THEN launches the game command...

Either another "feature request" for a new version of Game EX would be, change to the games directory after Pre-Game launch right before the game is called

Or... Modify all 41 current batch files to change directories to the games base directory as it's last step, and see if that fixes the issue.

I'll give these both a test and report back =)

Posted

Ok, Ok.... I'm making progress (for those that are following my boring thread lol)

Replacing my link files and batch files with underscore filled file names, I am now getting the pre-game scripts to all launch and run correctly.

But that leads me to the actual root of the problem I was having with other games such as Balloonrain and Motoroma.

It's not technically a case of the runitgame.bat performing the directory command prior to the pre-launch command (though in some setups I can see how this would cause an issue).

it's a situation of, how gameex launches games, as well as how I have them configured.

Since it generates runitgame.bat to launch the game, and I'm using batch files to run my joystick mappings and ISO loads, it trys to run Runitgame.bat that in turn passes control to [ROM].bat, [ROM].bat executes and exits, never passing control back to runitgame.bat to execute the games command line to launch.

I'm rusty on batch files, isn't there a return command used to embed a batch file in a batch file and continue thru the parent batch proccessing once the child job executes?

I'mm be diggin around google for the answer, less someoen has it handy =)

Posted

Ok... Ok...

Looks like I worked all the kinks out =)

modifying the Pre-Game script to say

CALL C:\Arcade\Launcher\[ROM].bat

rather than

C:\Arcade\Launcher\[ROM].bat

allows the runitgame.bat to "call" and run [ROM].bat as a child process and then continue executing runitgame.bat upon it's completion.

What have we learned kiddies?

1. research and test and try EVERYTHING before you post (such as myself)

2. use debug mode and read the output on the logs, as well as review runitgame.bat loading from the GameEX/data folder

3. if you use spaces in your game name and u are launching something based off that game name as a pre-game script such as myself, replace spaces with underscores and then have Game EX strip them from the dispaly name

4. if you are calling a batch file for your pregame load, append CALL prior to the command string, allowing the game launch script to return focus and finish launching.

5. GameEX rocks

6. Trouble shoot trouble shoot trouble shoot.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...