Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: mosesmalone on January 17, 2007, 07:22:05 am
-
For some really weird reason, when I run Virtua Tennis from Mamewah, it works fine, except any buttons I press in the game are also picked up by Mamewah underneath the game.
I'm running VT via a batch file which loads up PPJoyStick for player 2.
So for example, if I press 'START' in the game (which is the '1' KEY) in the game, it works but unfortunately Mamewah also responds as if I've pressed the '1' KEY and tries to load another window of VT.
I hope I'm making sense. I'm really confused about this though. I've mucked around with different commandline tags and stuff, but it's the same no matter what. :timebomb:
-
Are you SURE this is what's happening? I seem to remember that one of the parameters (autodosbox?) can cause two instances of the program to start running.
-
Are you SURE this is what's happening? I seem to remember that one of the parameters (autodosbox?) can cause two instances of the program to start running.
While we're on the topic of "are you SURE this is what's happening?"... :)
For the past few weeks, with increasing frequency, when I would load ZSNES games from Mamewah, sometimes I'd hear the windows "DING!" immediately, and ZSNES would load but not respond to any keys, and the only option was Task Manager to kill off ZSNES, then everything would be normal. Load the same game again and it'd be fine. It was MADDENING, I tell you.
Then I started noticing (sometimes) the same "DING!" with Mame stuff, only it wouldn't lock up -- just an annoying ding. I tell you, I was THIS CLOSE (missing visual) to reinstalling my OS out of desperation.
Then I discovered Shuffleshot. Shuffleshot's game selection uses the 1 player start button through all screens. Sometimes it would work fine, and sometimes it would mysteriously skip an entire screen.
The next "DING!" was inside my head. My microswitch for my 1 player start button was going bad. Rated at 100,000 presses, my behind. If it was the FIRE button I'd say "sure, it got that many presses in 3 years, if not more". But 100,000 presses of my 1 player start? I don't believe it for a second.
Anyway. Obviously this is not what's likely happening to mosesmalone. I only mention it because (a) I think it's funny and (b) it's an example of a problem with game starts looking like one thing, but being something else entirely.
Che
-
Are you SURE this is what's happening? I seem to remember that one of the parameters (autodosbox?) can cause two instances of the program to start running.
Well I'm not sure of much, but there aren't two instances...at least not at first. What happens is the game will load and any buttons I press not only affect the game but also Mamewah behind. So for example if I press 'UP' a few times in the game (which works), and then leave the game, the chosen game in Mamewah will be moved up a few places. If I press '2' and then leave the game, the Options window will be open in Mamewah. And similarly, when I press '1' in the game, Mamewah also responds and tries to load it again.
It's bizarre.
-
I think I know the solution here. You say you are running VT from a batch file. A batch file will do whatever the instructions inside it tell it to do before quitting...and it will not wait until the instructions are completed before moving to the next, or finishing - unless you use the 'Start /wait' command. Mamewah 'thinks' VT is quit because the batch file has completed it's job and finished, so Mamewah starts to accept input again.
Short answer is launch VT from the batch file like this:
start /wait c:\vtennis\vtennis.exe (or whatever the exe file is)
-
Minwah could be right there. From memory PPJoyKey needs to be in it's own batch file so you can run it before VT. But you need another to launch VT and a third to launch them both.
This is how it works for me anyway.
--- vtennis.bat (the batch file you run from your FE) ---
@ECHO OFF
start ppjoykey.bat
start virtuatennis.bat
EXIT
--- ppjoykey.bat ---
@ECHO OFF
ppjoykey.exe .\vt.ini
EXIT
--- virtuatennis.bat ---
@ECHO OFF
VIRTUA_TENNIS_PC.exe
taskkill.exe /F /IM ppjoykey.exe
EXIT
-
Minwah could be right there. From memory PPJoyKey needs to be in it's own batch file so you can run it before VT. But you need another to launch VT and a third to launch them both.
This is how it works for me anyway.
--- vtennis.bat (the batch file you run from your FE) ---
@ECHO OFF
start ppjoykey.bat
start virtuatennis.bat
EXIT
--- ppjoykey.bat ---
@ECHO OFF
ppjoykey.exe .\vt.ini
EXIT
--- virtuatennis.bat ---
@ECHO OFF
VIRTUA_TENNIS_PC.exe
taskkill.exe /F /IM ppjoykey.exe
EXIT
This is what I was already running thanks to one of your previous posts.
I think Minwah's right though - that would explain it. What I'm wondering now is why it's not happening to Headkaze since the batch file that he's running from the FE would complete once it ran ppjoykey.bat and virtuatennis.bat.....right?
-
I have no idea to be honest with you! It seems it should exit back to the FE in GameEx also, but it dosn't. What you could try is changing..
start virtuatennis.bat
to
virtuatennis.bat
That should stop it from running it in a separate process, and hopefully stop it exiting the batch file until virtuatennis.bat completes.
-
Why not solve all of this with a shortcut? Shortcuts allow you to run an executable with a number of parameters, and allow you to automatically minimise the application.
Why have I bothered with this? Because I've just had to face a similar problem with using PPjoykey in MameWAH, but with a twist. I am using it to run flight simulators on my arcade cabinet. Games like Aces of the Pacific need to run inside a DosBox shell, and Dosbox doesn't seem to like being called from batch files, especially at the same time as apps (I tried the ways mentioned above, no luck). This meant that I needed a new solution.
The real problem is that PPjoykey doesn't minimise automatically - this means that MameWAH has a problem moving onto the next command (because PPjoykey hasn't finished yet), BAT files will stop executing later commands without brute force, and games run under MameWAH are prone to lose focus because your desktop has an active window.
Solution?
- Create a *shortcut* for PPjoykey
- right-click the shortcut and edit the properties -> shortcut ->target, so as to load the right .ini file.
The target should look like the command line executable
eg "c:\ppjoy\ppjoykey.exe c:\ppjoy\aces.ini"
- while editing the shortcut's properties, make sure that you move down to "run" and
select to run the program in a *minimised window*
- Wrap this shortcut into a batch file, such as
PPJOYKEY.BAT
------------------------------
@ECHO OFF
d:\mame\mamewah\config\flysims\ppjoykey.LNK
EXIT
------------------------------
- Call ppjoykey.bat as a pre-emulator command line in your games' .ini
file for MameWAH (MameWAH doesn't recognise .lnk as executable,
so it must be wrapped in a batch file).
- then call your games' executable in the usual place
- Finally, create a new bat file to close ppjoykey, just like "headkaze" has done. I called mine close.bat
call close.bat as a post-emulator command line in your games' .ini file for MameWAH.
CLOSE.BAT
-----------------------------
@ECHO OFF
TASKKILL.EXE /F /IM PPJOYKEY.EXE
EXIT
-----------------------------
Here is the whole lot put together into the flight simulator "emulator" .ini file for MameWAH - just focus on the execution settings:
-----------------------------------------------
### FlySims.ini (mamewah v1.62) ###
emulator_title Flight Sims
### List Generation Settings ###
rom_path d:\flysims\roms
rom_extension txt
dat_file d:\mame\mamewah\config\flysims\aces.dat
nms_file
catver_ini_file
list_generation_method rom_folder_vs_dat_file
### Execution Settings ###
pre_emulator_app_commandlines d:\mame\mamewah\config\flysims\ppjoykey.bat;c:\program files\winipac\winipac.exe aces.ipc
emulator_commandline c:\dosbox\dosbox.exe -conf c:\dosbox\[name].conf{nodosbox}{safelaunch}
post_emulator_app_commandlines d:\Mame\MameWAH\config\FlySims\close.bat;c:\program files\winipac\winipac.exe mame.ipc
general_app_commandlines
### Artwork Settings ###
artwork_image_paths d:\flysims\snap
movie_preview_path d:\flysims\previews
movie_artwork_no 1
enable_fuzzy_search 0
### Screen-Saver Settings ###
enable_music_in_screensaver 1
select_random_game 0
saver_type gamelist_slideshow
movie_path
movie_fullscreen 1
quit_delay 0
saver_commandline
### Additional Settings ###
music_path
lcd_display_file_path
### Settings used by MAMEWAH ###
current_list 0
---------------------------------------------------
Hope this helps!
BTW - If you use PPjoykey, consider sending the guy that wrote it a postcard - it's a very handy tool that he wrote for nix.