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: Mamewah - how's this for strange....  (Read 2040 times)

0 Members and 1 Guest are viewing this topic.

mosesmalone

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 27, 2007, 09:25:52 pm
Mamewah - how's this for strange....
« 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:

ppilot

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 140
  • Last login:January 06, 2020, 01:33:27 pm
  • I want to build my own arcade controls!
Re: Mamewah - how's this for strange....
« Reply #1 on: January 17, 2007, 07:39:25 am »
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.

chemame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 107
  • Last login:January 26, 2007, 01:54:05 pm
  • I want to build my own arcade controls!
Re: Mamewah - how's this for strange....
« Reply #2 on: January 17, 2007, 11:20:25 am »
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

mosesmalone

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 27, 2007, 09:25:52 pm
Re: Mamewah - how's this for strange....
« Reply #3 on: January 18, 2007, 12:54:05 am »
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.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Mamewah - how's this for strange....
« Reply #4 on: January 18, 2007, 04:30:19 am »
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)

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Mamewah - how's this for strange....
« Reply #5 on: January 18, 2007, 07:18:51 am »
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.

Code: [Select]
--- 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
« Last Edit: January 18, 2007, 07:20:51 am by headkaze »

mosesmalone

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:January 27, 2007, 09:25:52 pm
Re: Mamewah - how's this for strange....
« Reply #6 on: January 18, 2007, 07:44:39 pm »
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.

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

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Mamewah - how's this for strange....
« Reply #7 on: January 19, 2007, 01:33:32 pm »
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..

Code: [Select]
start virtuatennis.bat
to

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

Zebidee

  • Trade Count: (+9)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3431
  • Last login:Yesterday at 06:03:30 pm
Neater way to use PPjoykey
« Reply #8 on: January 28, 2007, 05:38:08 am »
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.
Check out my completed projects!