Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Controlling MAME/MESS with Girder 4.0

  1. #1

    Default Controlling MAME/MESS with Girder 4.0

    Sure, we can close the application by killing the process, but those of use who want to do some unique things like manage save states, CPU throttling and frameskip are still out of luck. Girder sends keystrokes, but the application never receives/interprets them. We were told back in the 3.3 days that this is something that was impossible with the current implementation, but would be resolved in 4.0.

    I just retested with Beta 10, and still no love.

    Can we expect any progress on this?

  2. #2
    Join Date
    Dec 2001
    Posts
    11,560

    Default

    can you provide a few more details?

  3. #3
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,551

    Default

    DirectX applications/games do not accept keys in the 'normal' fashion. We had hoped we would have a low-level keyboard implementation ready for 4.0 but that won't happen in the immediate future.
    Ron
    No support through PM

  4. #4

    Default

    Thanks Ron. I'll get by with only being able to close these apps for now.

  5. #5

    Default

    Quote Originally Posted by Ron
    DirectX applications/games do not accept keys in the 'normal' fashion. We had hoped we would have a low-level keyboard implementation ready for 4.0 but that won't happen in the immediate future.
    Oooh... low-level keyboard implementation.......... You mean like how the Logitech Wingman software adds a "virtual keyboard device driver" -- ? It would be awesome beyond words the day girder does that. Girder is already magic, but after the low-level stuff, we start getting into UN-HOLY SORCERY!!!!!!!! YESSSSSS!!! DOOOO EEEEET!!! MUAHAHAHAHAHAHHAAAAA. *ahem* sorry. er.... darn... caps lock!

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,551

    Default

    exactly like that. If anyone knows a programmer that can make this for us ( i hear it is not that hard once you know how to do win32 drivers ) please send them to us!
    Ron
    No support through PM

  7. #7

    Default

    I probed the subject, mostly through Google.

    I looked for information on VKD(Virtual Keyboard Driver) or VMD (Virtual Mouse Driver). It was VERY difficult to find any samples of virtual keyboard or virtual mouse drivers. Actually, I think the term is rather old and pertains mostly to MS-DOS...

    You'll probably need to get the windows DDK.
    http://www.microsoft.com/whdc/ddk/winddk.mspx

    I managed to er, obtain a copy of the DDK, for research purposes. It includes the source code for the standard Keyboard Driver. I suppose a programmer make a new keyboard driver based off of this one, except he'd have to code some routines that would fool the OS into thinking there's a keyboard plugged in. Then the driver would have to communicate with girder via a plugin DLL in order to make it work.

    Hmm. verrrrry eeeenteresting....

  8. #8
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,551

    Default

    I have been looking into this already, bought some books etc. what needs to be done is to write a filter driver. At SysInternals ( they have some great tools there!) they actually have one of these ready for us.

    http://www.sysinternals.com/Utilities/Ctrl2Cap.html

    However it needs to be tweaked, sadly my knowledge of the DDK is pretty limited at the moment so producing a stable driver would take a lot of hours. But if anyone can code us a driver drop me an email.
    Ron
    No support through PM

  9. #9

    Default

    I just downloaded it. Gonna poke around.

    No promises!

  10. #10

    Default

    I found the guts of this thing. Here is where it intercepts the keyboard codes and substitutes a CTRL scancode for a CAPSLOCK scancode. I'm unsure of how to get communications established between the SYS driver and a Girder Plugin to do the rest.

    I was, on another note, able to successfully build the driver.

    Code:
    // Ctrl2cap.c -- line 402 *snip!*
    
        if( NT_SUCCESS( Irp->IoStatus.Status ) ) {
    
            //
            // Do caps-lock down and caps-lock up. Note that
            // just frobbing the MakeCode handles both the up-key
            // and down-key cases since the up/down information is specified
            // seperately in the Flags field of the keyboard input data 
            // (0 means key-down, 1 means key-up).
            //
            KeyData = Irp->AssociatedIrp.SystemBuffer;
            numKeys = (int) (Irp->IoStatus.Information / sizeof(KEYBOARD_INPUT_DATA));
    
            for&#40; i = 0; i < numKeys; i++ &#41; &#123;
    
                DbgPrint&#40;&#40;"ScanCode&#58; %x ", KeyData&#91;i&#93;.MakeCode &#41;&#41;;
                DbgPrint&#40;&#40;"%s\n", KeyData&#91;i&#93;.Flags ? "Up" &#58; "Down" &#41;&#41;;
    
                if&#40; KeyData&#91;i&#93;.MakeCode == CAPS_LOCK&#41; &#123;
    
                    KeyData&#91;i&#93;.MakeCode = LCONTROL;
                &#125; 
            &#125;
        &#125;

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •