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: MaLa stops responding to keystrokes after returning from some MAME games  (Read 11386 times)

0 Members and 1 Guest are viewing this topic.

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
This seems odd to me. After playing some MAME games, when I ESC back to MaLa, it is not responsive to keystrokes (and therefore, my buttons and joysticks are useless). Acts like it's frozen. I have to click the mouse (or right-click) to get its attention and then everything works OK again after that (until I play that game again and ESC back to MaLa). It doesn't happen with all ROMs. It doesn't happen with other emulators (that I have observed). Any ideas what it might be or how to troubleshoot?

WinXP, MAME 0.139, MaLa 1.7.1.0.

Thanks guys...

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #1 on: September 10, 2012, 07:26:01 am »
Try the focus logger plug in.
I had the same problem (all my set up's use XP).
I installed the plug in and it seems to have done the trick.
I actually use it everytime I do a MaLa set up regardless of PC.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #2 on: September 10, 2012, 09:34:02 am »
Something else is running in the background stealing focus from Mala.
My bet would be some kind of annoying "updater" program.
(adobe, java, anti-virus, windows update, etc)

If this is a dedicated setup, turn off automatic updates and disable all unused services.
You can limit which programs automatically launch at start by opening a dialogue box and typing "msconfig"
I always refer to Black Viper's guide in deciding which services to disable:
http://www.blackviper.com/2002/04/17/black-vipers-windows-xp-super-tweaks/

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #3 on: September 10, 2012, 08:23:22 pm »
OK. I'll try both of those things.

FWIW, it's a dedicated cabinet and I use MaLa as my shell (QuickSheller is really simple and saved me some time). It's a thinned-out XP install if I recall right -- and I'm not sure I do. Anyway, I don't think any of the System Tray processes are running because ms-explorer isn't. So it's something else. But now that I know what to look for, I'll be able to find it and kill it.

Thanks for the lead guys.

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #4 on: September 15, 2012, 02:38:10 pm »
So it's something else. But now that I know what to look for, I'll be able to find it and kill it.


Did you find the culprit?
-Banned-

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #5 on: September 22, 2012, 11:43:55 pm »
Did you find the culprit?

No. I installed the focus logger plugin and it initially seemed to solve the problem. I also killed some nVidia video stuff in the taskbar because I don't need any other software anyway. The XP install was otherwise pretty stripped already so I didn't go further looking for trouble-makers. But the problem intermittently returns so I guess I have to dig deeper. I would have posted here with my results, but I'm not done arm-wrestling with Windows yet and have nothing concrete to report. I really hate that operating system.

I'll keep you posted...

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #6 on: September 25, 2012, 03:21:15 pm »
Did you find the culprit?

No. I installed the focus logger plugin and it initially seemed to solve the problem. I also killed some nVidia video stuff in the taskbar because I don't need any other software anyway. The XP install was otherwise pretty stripped already so I didn't go further looking for trouble-makers. But the problem intermittently returns so I guess I have to dig deeper. I would have posted here with my results, but I'm not done arm-wrestling with Windows yet and have nothing concrete to report. I really hate that operating system.

I'll keep you posted...

I haven't kept track, but I wonder whether those having these kinds of issues have been using ultra-stripped XP. I use standard TinyXP on all my machines, and never have had those issues. Unless you *really* know the consequences of the alterations/configuration you make, I find it inherently problematic to go to such lengths to squeeze out such miniscule....likely negligible.....amounts of performance. The number of problems reported here would seem to corroborate this.
-Banned-

TheShaner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 451
  • Last login:December 23, 2017, 10:42:25 pm
  • Shut your noise tube filthy Taco Human!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #7 on: September 26, 2012, 10:57:42 am »
I notice that mine will freeze when I hit the MAME list for the first time or after switching from another emulator's list.  It will free up after about 10 seconds though usually.  I have been told it's a known issue and on the list
to be fixed.  Any similarities in the timing on yours?

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #8 on: September 27, 2012, 09:36:36 am »
I haven't kept track, but I wonder whether those having these kinds of issues have been using ultra-stripped XP. I use standard TinyXP on all my machines, and never have had those issues. Unless you *really* know the consequences of the alterations/configuration you make, I find it inherently problematic to go to such lengths to squeeze out such miniscule....likely negligible.....amounts of performance. The number of problems reported here would seem to corroborate this.

It's not ultra-stripped, but I honestly don't remember exactly what I installed (TinyXP versus XP-Pro versus whatev). I threw the cabinet PC back together after a catastrophic drive failure and I was not being nit-picky about the config. I just wanted it playable at the time and I already knew it had enough horse-power for the games that I wanted to play. Perfect is often the enemy of progress. I can guarantee that I didn't get into any serious registry editing or arcane mods. It's all standard tweaks (hiding welcome screens, etc). Vanilla XP install. Mobo driver packs were installed so there's some extra sound and video stuff on there. I added Firefox and some maintenance applications (7zip et al). No other non-arcade software. I may have had to add some codecs or Media Player somewhere along the line if something insisted on it.

From my experience, it really does feel like a focus issue. But since the FE masks the OS, it's hard to get additional cues to confirm the hunch. Does Focus Logger actually log what's in focus? It'd be cool to get access to that log and see.

I need to do some more controlled testing to validate the behaviour.

Oh.... one other thing that may matter (and probably doesn’t)..... I use Player-2 stick for "alphabet up/down". Sometimes when I go fast with that, it rotates the screen, whacks the resolution, and refuses to take further input for a while (or until I crash it). Very strange. This is remedied by not paging down rapidly. I haven't found an option that enabled that feature by accident.

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #9 on: September 27, 2012, 09:40:22 am »
I notice that mine will freeze when I hit the MAME list for the first time or after switching from another emulator's list.  It will free up after about 10 seconds though usually.  I have been told it's a known issue and on the list
to be fixed.  Any similarities in the timing on yours?

I'll check the timing to be sure. But this behaviour makes itself obvious when returning from a game. Play Donkey Kong, hit ESC, it returns to MaLa, nothing works (frozen screen) until I mouse-click. A right-mouse click immediately pops up the context menu so it's certainly alive. It just ignores keyboard input (buttons or actually keys).

This is using an older PS/2 style IPAC BTW.

wcndave

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 149
  • Last login:June 10, 2021, 03:37:36 am
  • I want to build my own arcade controls!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #10 on: October 04, 2012, 01:38:15 pm »
i was going to post the same thing.. I am getting this too, however there are two versions on my system that behave differently and maybe that will cast some light.

I initially had a bunch of roms from various places, and mostly 0.146.
they did not work with latest mame, however worked with mame32ui, so i made this the executable in mala.

everything works fine.

being a total noob, i was not sure why different versions had issues, however i then got v0.147 both mame and roms, and they all play nicely together.

however i have lots that friends play on the ones that were working, so i set up a new folder.  I have mame0146 and mame0147 with separate executables, roms, mala installations, the lot.

mala in folder 1, everything that runs runs good.

in the folder 2, every time i exit a game i cannot use mala.  it is NOT unresponsive, it is simply not focused, pressing alt+tab always goes to mala and makes it work, however i don't want an alt+tab button on my CP.

they are both set up the same, just 1 is using mame32ui and one is using mame0147.  the rom rolders are different, however all other settings are the same.

i have also noted that there is a lot of stuttering of audio / video in the second installation and none in the first.

does that help to identify the problem?

MTPPC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 26, 2021, 02:25:46 pm
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #11 on: October 05, 2012, 11:39:11 am »
MALA's focus problem has impacted me once to the point of having to switch out to hyperpin. If I had to guess, I'd point my finger at a windows application indexing bug when running dos programs. But again, that is just a guess.
Pinball and Video Arcade Repair in Billings, MT USA
http://pinballmd.com/

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #12 on: October 05, 2012, 11:46:01 am »
Yeah, I've had similar issues from time to time. However, since I starting using a BAT file to launch MAME from mala (and in the bat file I run my ControllerRemap utility, and fire off an LEDBLinky animation, etc), I haven't had any issues.


Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #13 on: October 05, 2012, 11:06:56 pm »
MALA's focus problem has impacted me once to the point of having to switch out to hyperpin. If I had to guess, I'd point my finger at a windows application indexing bug when running dos programs. But again, that is just a guess.

Easy. Stay away from crappy old dos games.
-Banned-

wcndave

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 149
  • Last login:June 10, 2021, 03:37:36 am
  • I want to build my own arcade controls!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #14 on: October 06, 2012, 04:06:30 am »
It cant be windows in that way, thats why i thought my post might help.

I can run one ok, and one not, and for me the only diference is the version of mame....

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #15 on: October 06, 2012, 10:15:42 am »
Well, one thing about windows is that "something" always has the focus.

When Mala starts, it's Mala (usually) and so keystrokes and sticks work for nav.

When you start a game, the game will get focus.

When you quit the game, there are only a few posibilities
1) the game window closes and Mala gets focus as normal
2) the game closes and something else gets focus. That would mean that either
    a) Something else got focus BEFORE the game started, so when the game ended focus returned to that "something else)
     b) the game intentionally set focus to something other than Mala, which is pretty unlikely.
3) The game window might disappear, but the game itself HASN'T closed, which means it's still loaded and it still has focus even if you can't see it/hear it. You can check that via TaskManager.

Unless you're running mame from a BAT file that's launched from Mala, my money would be on 3. That alternate build of Mame might be hanging in memory and not unloading properly.

But it's hard to be sure without playing with the system.

wcndave

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 149
  • Last login:June 10, 2021, 03:37:36 am
  • I want to build my own arcade controls!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #16 on: October 06, 2012, 12:19:41 pm »
ok, I will check task manager next time.  Doing alt+tab takes me back to mala, however there is nothing else in the list of icons there, so the focus is on some mystery object... will report back, however on holiday for a week which means oddly no cab building :-(

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #17 on: October 07, 2012, 11:05:19 am »
Well, one thing about windows is that "something" always has the focus.

I'm using MaLa as my shell so there's no Explorer related software running. I don't understand why a background process would ever be allowed to take focus over a user application anyway. Maybe you are right that there's a MAME process (or related process) getting stuck closing. That might also explain why the Focus Logger Plugin is only partially fixing my issue.

Maybe I try using a batch file too. Are there drawbacks to that approach?

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #18 on: October 07, 2012, 11:15:40 am »
Maybe I try using a batch file too. Are there drawbacks to that approach?

I really haven't run into any.

I'm actually in the process now of converting the BAT file I use to a VBS file (VBScript) so that I can do a lot more custom stuff during the launch process (like launch various emulator games contained in a single Mala Game list).

But VBS scripts work basically the same as BAT files, only a little more programmable.

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #19 on: October 27, 2012, 10:35:54 am »
I worked on this a little more (without great results) and thought I'd post an update.

It now looks like it is not related to any particular ROMs. This happens maybe one in 6 games. It may be random and therefore tricked me into thinking it only happens with certain ROMs. Most of the time a mouse click or alt-tab wakes it back up. The fact that alt-tab works implies a focus issue (especially given the fact that all other keystrokes are ignored). Task Manager, when this is occurring, does not show mame.exe running, but the act of invoking it may clear the issue.

I checked for the timing issue that TheShaner mentioned. It's not that. Once it's stuck, it stays that way until manually unstuck.

The machine is shelled to MaLa, so no Explorer, no Task Bar, and no Task Bar processes (Audio, Video helpers, etc). From what I can tell, nothing is running that doesn't have to (just 15 or so OS processes). No CP mapper or other helper apps. The install is a minimal Windows install. Restore points are enabled, but indexing is not. Nvidia's drivers are loaded at start-up, but otherwise I don't load anything that is not part of Windows already. There are a couple more processes I can go research and maybe kill (like alg.exe for example). Checked msconfig.exe and everything looks right to me. I further disabled desktop effects and other small things just to simplify things. I'm almost out of stuff to look for but I'm not done yet.

So now I'm assuming that it's a problem with MAME closing properly, perhaps occasionally stealing focus, perhaps occasionally crashing. I tried using a batch file to run MAME and it worked, but I didn't pass the ROM name or other parameters so it worked, but wasn't immediately useful. How do I do configure so that a batch file works just like MaLa?

Hmm.... also, my daughter thinks (not sure if this is true) that if you quit a game rapidly (before it finishes fully loading) that it happens more often.

I have time to work on this next weekend or the week after... and will post any findings.

I have a gaggle of teenagers here today and I'm not psyched about them having to open the keyboard tray to fix the thing all the time.
« Last Edit: October 27, 2012, 11:17:27 am by pmc »

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #20 on: October 28, 2012, 09:19:26 am »
I tried using a batch file to run MAME and it worked, but I didn't pass the ROM name or other parameters so it worked, but wasn't immediately useful. How do I do configure so that a batch file works just like MaLa?

If you setup a bat file, you'll need to add argument handling to the bat file.

For instance, with a BAT file named STARTMAME.BAT

setup MAME to run STARTMAME.BAT instead of MAME
(sounds like you've got that part working).

Now, in startmame.bat you might do something like

{path to mame}\Mame.exe %1 %2 %3 %4 %5 %6

those %x are the arguments that MALA normally passes directly to mame. In this case, it's passing them to the STARTMAME.bat file which this has to forward the arguments on when IT calls mame.

Of course, the nice thing about this is that because you now have access to all the arg values, you might use them to call other apps before or after starting mame to do other things (display a marquee, start an animation or whatever).

pmc

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:December 20, 2023, 07:43:02 am
    • website
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #21 on: October 28, 2012, 03:59:12 pm »
{path to mame}\Mame.exe %1 %2 %3 %4 %5 %6

Ah, I get it. I'll give it a spin next weekend when I have a chance to work on this. If it fixes the problem, then I guess we've learned something. Thanks for the help.

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #22 on: October 29, 2012, 07:37:04 am »
I use the plug in every time I do a MaLa install, I feel it's just a good idea.
I had a problem on one of my PC's and the plug in did resolve it.
I did as noted and created a folder called plugin - put the plugin inside and issue resolved.
The odd time if the PC has been off for quite some time and it gets turned on, I do have the issue. I want to try putting the plugin into the main folder also and see if that helps.

None the less awesome plug in ! USE IT !

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #23 on: October 29, 2012, 07:40:59 am »
I must have missed it, but what plugin are you talking about?

mike boss

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2645
  • Last login:October 22, 2021, 01:19:45 pm
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #24 on: October 29, 2012, 08:05:08 am »
The MaLa Foccus Logger

wcndave

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 149
  • Last login:June 10, 2021, 03:37:36 am
  • I want to build my own arcade controls!
Re: MaLa stops responding to keystrokes after returning from some MAME games
« Reply #25 on: November 02, 2012, 12:09:23 pm »
PMC, i think that your comments exactly replicate what I have been trying to say (I guess I am not great at making it clear  :cry: )

If I run Mala and make the mame executable point at mame32ui (old version) there are NO problems
If I run the same Mala and only change the executable to the 0.147 version, then this problem always occurs.

I have now had to make a shifted key combo macro for alt+tab, however for mates using it, they can't know that... until I tell them.

Dave