Main > Main Forum

Driving Games

<< < (4/5) > >>

Frobozz:

--- Quote ---All I know is win9x lets HID mice be seen as separate mice in addition to the system mouse, but not win2000/XP.
--- End quote ---


Right, and that's a big problem.  Because all mice and mouse-like devices announce to Windows "Hey!  I'm a mouse!".

Now, can you take a device that acts like a mouse and tell it to announce itself as "device" (rather than a "mouse"), then write a driver to tell DirectX that this new "Device" has mouse-type data and to pass it to DIDEVTYPE_DEVICE?  And thus to MAME?  And now the biggest question:  Will it work with Windows 2000 / XP?

If it's driver doesn't define it as a "mouse", but as a generic HID device, then it should, correct?

If so, THIS is the avenue we need to explore.  

Also, as I mentioned, a standard needs to be devised for the future.  If this is to be done, I feel it must be done right.  What happens if someone comes out with a "device" with a driver that passes 4 sets of mouse-type data to DirectX at once (like a USB OptiPac)?

How would MAME handle it?  Could a "standard" be written to make it flexible enough to allow people to make all-sorts of input devices and have MAME just simplly pick them up from DirectX?   That's the key I believe to opening a whole new door in PC controls ;)



--- Quote ---Know anything about writing windows drivers?   Know anyone else who can?
--- End quote ---


Kinda at Andy's request (because I brought up the idea of a USB OptiPac), I did recently take a look at the Microsoft DDK (Driver Development Kit) and severely hurt my brains.  Now, I also found out some "quick driver development kits" on the web.  I'm going to explore this further, because the amount of resources needed to write a driver from scratch seems hideous.  

Also, Andy recently posted that he's talking to a person who REALLY knows drivers.  So I'm anxious to hear what happens from that.  

u_rebelscum:

--- Quote ---Right, and that's a big problem.  Because all mice and mouse-like devices announce to Windows "Hey!  I'm a mouse!".

Now, can you take a device that acts like a mouse and tell it to announce itself as "device" (rather than a "mouse"), then write a driver to tell DirectX that this new "Device" has mouse-type data and to pass it to DIDEVTYPE_DEVICE?
--- End quote ---

I could be wrong, but I think the devices annouce "Hey! my ID is '3423er23erf3'" (or some garbage like that), then  windows looks at it's .inf files and finds that ID.  If the ID matches a mouse or mouse-like device, then windows treats it like a mouse .... So either the devices need to send a new ID, or erase the (old mouse's) ID from the .inf file and repleace the ID's driver data with the reference to the new driver.


--- Quote ---And thus to MAME?  And now the biggest question:  Will it work with Windows 2000 / XP?  If it's driver doesn't define it as a "mouse", but as a generic HID device, then it should, correct?

If so, THIS is the avenue we need to explore.
--- End quote ---

I think so, I think so, I think so, and yes.


--- Quote ---Also, as I mentioned, a standard needs to be devised for the future.  If this is to be done, I feel it must be done right.  What happens if someone comes out with a "device" with a driver that passes 4 sets of mouse-type data to DirectX at once (like a USB OptiPac)?
--- End quote ---

Usually in cases like this, the .inf should indentify the single device as four mouse-like "device-type" virtual devices; the directX mouse data format is still used in four virtually different devices, instead of needing to come up with and pushing a new standard.  Of course, while this makes it easier on mame, it might make writing the driver harder. :(

Current day example, some keyboards that include a touch pad are seen as 2 devices by the applications: a keyboard and a mouse; and not a single device that has keyboard and mouse data.  So, following this method, Andy's 4 mouse device would been seen as 4 "device-type" mouse-like devices, instead of one device with 4 sets of mouse-like data.

Am I making sense. ???


--- Quote ---How would MAME handle it?  Could a "standard" be written to make it flexible enough to allow people to make all-sorts of input devices and have MAME just simplly pick them up from DirectX?   That's the key I believe to opening a whole new door in PC controls ;)
--- End quote ---

Unless it absolutely can't be done with directX mouse, joystick, or keyboard data formats, I think sticking with these is the way to go.  I don't think we need a new "standard", umm, besides the "device-type", mouse-like driver.  IMHO, let the drivers divide the input device into X number of "device-type" mouse data formatted obejects, and Y number of joystick type objects, as needed, that mame sees and uses as before; with mame getting only two changes: the "device-type" support, and absolute mouse data support (for lightguns).


--- Quote ---Kinda at Andy's request (because I brought up the idea of a USB OptiPac), I did recently take a look at the Microsoft DDK (Driver Development Kit) and severely hurt my brains. [snip]

Also, Andy recently posted that he's talking to a person who REALLY knows drivers.  So I'm anxious to hear what happens from that.
--- End quote ---

I hope Andy wasn't taking about me. ;D
Seriously, I talked to Andy a little while back about some of this also. But I couldn't get an example he ref'ed to to work on my computer, and then I took a peak at MS's DDK <shutter>.  I also heard about Andy's driver acquaintance and I sorta' put researching the driver part on the "backburner"  (ie: gave up for now trying to write one myself).  I would like to know how this go with this pursuit, too.  Again, I think I can edit mame to use "device-type" drivers, if help is needed.

Frobozz:
Well, looks like you know just about everything I do about the subject.  Yea, I know how devices report to windows ("I'm 92235F43A"... look up number in .inf...).  Was just being simplistic. :)

I also know about how devices can report "multiple" logical devices to windows (one unit reporting 4 mouse-like devices).  

If DirectX can handle the mouse-like inputs for all versions of Windows, then this is definatly a time-saver.  With all my assumptions with windows programming, I always assume the API is dumb.  If the API turns out it can handle things smarter than I assume, then, it's always a bonus.

If Andy can get a driver written for something like a USB Optipac, then it looks like it would be a simple conversion to MAME to get it to work (heck, might just need to be recompiled under DX8, though a routine to scan the DX API for any "mouse-like" devices and pass them on to MAME might also be required.)

In my spare time, I'm going to examine how HID mouse devices work, and even try to "rebuild" a driver for my mouse as a test.

From what I've seen, even something reporting 4 mice wouldn't be any harder to program up than a single device.  Just has more data pipes.  Process is the same.

StephenH:
I suggest getting Analog pedals, and an analog wheel.  Since MAME at this time does not support Force Feedback, it is not nessecary to have force feedback.

For most games, 2 pedals is enough.  However, there are a few games that need 3.  

u_rebelscum:

--- Quote ---[snip]
If Andy can get a driver written for something like a USB Optipac, then it looks like it would be a simple conversion to MAME to get it to work (heck, might just need to be recompiled under DX8, though a routine to scan the DX API for any "mouse-like" devices and pass them on to MAME might also be required.)
--- End quote ---

I don't think DX8 alone will do it, as the MS DX8 help file states that XP/2000/NT will only find the system mouse.  But DX5 (or DX8 ), a cut-and-paste, and a few simple edits will work with the generic device type mouse-like driver.


--- Quote ---
In my spare time, I'm going to examine how HID mouse devices work, and even try to "rebuild" a driver for my mouse as a test.

From what I've seen, even something reporting 4 mice wouldn't be any harder to program up than a single device.  Just has more data pipes.  Process is the same.
--- End quote ---


Thanks for researching mouse drivers.  And for all the information already.  I can almost smell the day when mame works with two or more trackballs!   Hope you or Andy's driver source come up with a way to fix this, ahh, weakspot in MS and mame.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version