On 2009/10/3 Francis Devereux <[email protected]> wrote: > On 3 Oct 2009, at 17:53, Timothy Coltman wrote: > > On 2009/9/29 Francis Devereux <[email protected]> wrote: >> >> >> Note that it is still very much a work in progress and has plenty of known >> bugs. For example, it crashes every time you quit it! Also, it does not >> work on Snow Leopard 10.6.1 - it runs but mouse input is ignored. >> > > I can confirm the lack of mouse input on 10.6.1, at least with my Microsoft > one, which I use with USB Overdrive (as the Microsoft driver doesn't get on > very well with VMWare Fusion). This is down to the way that Allegro detects > mice. It enumerates USB devices, looking for usage (whatever that is) > 0001:0002. If it finds one of these, it enables mouse input. My MS mouse > comes back as 000C:0001, so no mouse input for me. If you change the > src/macosx/hidman.m file within the Allegro source, you can get MS mice to > work - I'm not sure whether this means that "normal" mice like Apple's > Mighty Mouse will then stop working. > > > Thanks for the tip, I'll look into this. Do you know what I need to change > in hidman.m? I'm using a basic Logitech mouse and I haven't installed any > drivers for it. > > First, use the HID Explorer thing that I linked in my previous message (run the application in HID_Explorer/build/Release once you've unzipped it) and choose your mouse from the "Select Device" list. You'll then see a pair of hex values to the right of "Usage". My MS mouse says:
Usage: 000C:0001 - Consumer Consumer Control. You'll then need to look up these two values (in my case, 000C and 0001) in the usage tables header in IOKit. Open the file System/Library/Frameworks/IOKit.framework/Versions/A/Headers/hid/IOHIDUsageTables.h. You'll notice a couple of enumerations at the top of the file, with comments above them. The ones you're after are "Usage Pages" and "GenericDesktop Page". Look in these enumerations for the values that match the numbers you got from HID Explorer. The first number goes with "Usage Pages" and the second with "GenericDesktop Page". In my case: 000C = kHIDPage_Consumer 0001 = kHIDUsage_GD_Pointer Next, open hidman.m and do a search for HID_MOUSE. You are interested in the third match, which should be "case HID_MOUSE:" in function "osx_hid_scan" (around line 357). The line following the match should read: usage = kHIDUsage_GD_Mouse; Replace this with the second value that you got from the IOKit header. For my mouse, I changed it to: usage = KHIDUsage_GD_Pointer; Below this, add a new line that reads: usage_page = kHIDPage_Consumer; Obviously, change the bit after the = as appropriate for your mouse. Save and recompile. Hopefully, your mouse will now work! Cheers Tim
_______________________________________________ Rpcemu mailing list [email protected] http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu
