Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: DinoRoger on May 14, 2003, 12:17:15 am
-
When I press a certain key on the keyboard a macro is ran that will emulate keys being pressed. Outide MAME it works without any problems. When I am in a MAME game though the macro launches and runs but the keys are not emulated??? I can press they key for example 5 times and when I exit MAME I can see it actualy ran the macro all 5 times but its like MAME is blocking the keys. from outside progams. Anyone ever tinker with this or know a solution?
-
The AOS doc had a very confusing bit about keyboard remapping and the difficulties. I wonder if it would be relevant to what you are experiencing?
Just a shot in the dark on my part.
BobA
-
Mame uses direct input.... in other words other programs can see the keys, but it's extremely difficult (practically impossible) to send keys to mame. Sorry man but your out of luck.
-
If you're using win mame (or mame32), mame looks at the keyboard input through directX. Not through the normal win32, event based, method.
Do you know if the macro outputs the keypresses as a simulated keyboard device (directX should see this), or does it output them as "windows events" (ie: inserted after directX in the input data stream, so mame wouldn't see them). My guess is it's the latter.
-
1) Modify \src\windows\input.c
Have your external app call a modified function in MAME that inserts the keystrokes directly into MAME's keyboard handler. i.e. win_poll_input() , keyboard_state[]
Best Way Better than the previous way
2) Code a wrapper for directX.
Mame calls directX.directInput but is actually talking to your app. All calls are passed on, except when you want to insert some keypresses of your own.