Announcement

Collapse
No announcement yet.

Osculator and Dirt2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Osculator and Dirt2

    Just wondering if anyone else has tried to use Osculator with the Dirt 2 racing game?

    Dirt 2 simply crashes if the "Perfect Pairing" HID kernel extension is loaded when the game is launched.

    I am using Lion, so I am also using the beta version of Osculator.

    Does anyone know of any workarounds? I would love to be able to use my Wiimote and Nunchuck to play Dirt 2!

    Thanks for any help or advice!

  • #2
    Hi Eidola,

    I would love to help you run Dirt 2 with OSCulator, could you please care to send me a copy of the crash log to camille at osculator dot net? When the game crashes you should see a window with lots of information. This would be very helpful.


    Best,
    Cam

    Comment


    • #3
      I will forward the crash logs to the address you provided.

      I do have technical knowledge so you can ask for specific information that you may require.

      Thank you very much for your assistance, I hope we are able to fix this bug as trying to drive with a keyboard is impossible!

      Comment


      • #4
        Thank you for sending the crash report.
        Unfortunately it did not contained enough information, but I have been able to get some more by running the demo on my machine.

        Code:
        Thread 7 Crashed:
        0   com.apple.CoreFoundation          0x959b5d50 CFNumberGetValue + 128
        1   ...feralinteractive.dirt2.demo    0x00d44768 0x1000 + 13907816
        2   ...feralinteractive.dirt2.demo    0x00d44822 0x1000 + 13908002
        3   com.apple.framework.IOKit         0x93f7424d __IOHIDManagerDeviceApplier + 190
        4   com.apple.CoreFoundation          0x959cfc99 __CFSetApplyFunction_block_invoke_1 + 25
        5   com.apple.CoreFoundation          0x959b4a3a CFBasicHashApply + 202
        6   com.apple.CoreFoundation          0x959cfc61 CFSetApplyFunction + 177
        7   com.apple.framework.IOKit         0x93f74ad5 __IOHIDManagerInitialEnumCallback + 69
        8   com.apple.CoreFoundation          0x959ce42b __CFRunLoopDoSources0 + 1563
        9   com.apple.CoreFoundation          0x959cbeef __CFRunLoopRun + 1071
        10  com.apple.CoreFoundation          0x959cb3c4 CFRunLoopRunSpecific + 452
        11  com.apple.CoreFoundation          0x959d1304 CFRunLoopRun + 84
        12  ...feralinteractive.dirt2.demo    0x00d41ca5 0x1000 + 13896869
        13  ...feralinteractive.dirt2.demo    0x00d3a400 0x1000 + 13865984
        14  libSystem.B.dylib                 0x97bb6259 _pthread_start + 345
        15  libSystem.B.dylib                 0x97bb60de thread_start + 34
        As you can see, from bottom to top, the call sequence goes from the game developper's code (frames 2 and 1) into CoreFoundation (Apple, frame 0) where the crash occurs. One plausible reason of why it should happen is an invalid argument given to CFNumberGetValue. Frames 7 and 3 tells you that HID devices are being enumerated, so it is most probable that the game developer tries to retrieve a number-like property from the device — by using IOHIDDeviceGetProperty — but because that property does not exist (and because the developper does not care to check return values), the game crashes in CFNumberGetValue.

        By comparing my kernel extension information to other, I've noticed that I have not set a vendor id and a product id (because I don't have one), and it turned out that adding these bits of information with dummy values solved the issue.

        I will include that in the next release of OSCulator, if you want to try early, please let me know by email and I'll send you something that fixes the problem.


        Best Regard,
        Cam

        Comment


        • #5
          Cam,

          Thank you very much for your assistance!

          I have replied to your email directly, DiRT 2 no longer crashes, but something is still not quite right.

          I can assign the Wiimote sticks/buttons to functions in DiRT 2, however, they don't seem to be working correctly as I can't control menus or cars once I leave the Options screen.

          Does using the Wiimote to actually race work for you?

          -Eidola

          Comment


          • #6
            I just tried to play the game with a Wiimote, which I did not have at hand earlier today.
            I loaded the "Wiimote Arrows as HID Joystick" file in OSCulator. After that I have been able to map the controls, which shows Dirt2 receives the HID messages, but like you I have been unable to play the game, it is just unresponsive ; that is weird.

            Not as nifty, I will try a keyboard (Keycode event) based approach since the HID seems broken ...

            Comment


            • #7
              ok so the keyboard works better, I used the file "Nestopia Wiimote" on which I changed the buttons to map them to Space and Return (use the Keycode helper to find the keycode number, Command-K).

              Comment


              • #8
                One last try:
                I made it finally work in HID mode with the "Wiimote Arrows as HID Joystick" mapping.

                The trick is to press escape at the beginning of the game, go to the control options and reassign the mappings. It seems the game loses track of the HID controls when the race starts ... which looks like a bug to me!

                Comment


                • #9
                  I do know the game works using an XBox360 controller, so HID joysticks do work. Unfortunately, the controller was a friends so I had to give it back!

                  With the XBox360 controller connected I could press the joystick buttons at the splash screens to skip past them, and the joystick and buttons work for navigating the menus and then playing the game.

                  I do thank you for taking the time to research and debug this issue!

                  Also, where would I find the "Wiimote Arrows as HID Joystick" configuration?

                  Comment


                  • #10
                    You can find it in the Samples Library, under the Wiimote folder.
                    The Samples Library is located in the OSCulator ƒ folder.

                    Comment


                    • #11
                      *smackhead*

                      Next time I should look harder!

                      Thanks!

                      Edit: When you said you got it working, did that include actual racing?
                      Last edited by Eidola; 11-10-2011, 01:08 AM.

                      Comment


                      • #12
                        I have tried to press Escape at the start of the race, picked Options, then Controls...

                        All the controls look like they should, but I went through and reassigned them anyways, which detected the emulated joystick and buttons correctly.

                        However, still no ability to actually race, either with the Nunchuck or the Plus Pad.

                        Comment


                        • #13
                          I have not heard anything from you for a few days... are you done with trying to resolve the issue with DiRT 2?

                          I have tested an XBox360 controller with a HID compliant driver that I borrowed from a friend and it works perfectly.

                          This would lead me to conclude that there is probably some sort of issue with your HID emulation that works 99% of the time, but for some reason DiRT 2 is being more picky.

                          If you can find and fix the issue with DiRT 2, you will probably fix other unknown issues with other applications as well!

                          Comment


                          • #14
                            Hi Eidola,

                            I know that the HID driver works with a lot of application. It is not perfect but it is compliant with the HID protocol. Besides, it simulates a device on its own, not an existing device.

                            The reason why Dirt2 works well with the Xbox or Sony game pads is because the game has been ported on these platforms. I have been able to play with the game once, but it did not store the settings correctly, which leads me to the conclusion that Dirt2's implementation is flawed on Mac OS X.

                            I will keep an eye open and watch for other solutions. In the meantime, I would suggest that you try the keycode based solution that worked flawlessly for me as described in a previous post.

                            Best,
                            Cam

                            Comment


                            • #15
                              Thank you for your attempts at fixing the issue, I wish we could have fixed the problem!

                              As for the game working so well with other controllers... it has no idea I am using an XBox controller. I am simply using a driver created by someone else which converts the XBox or XBox 360 controller protocol to HID compatible protocol.

                              The game itself has no idea what type of controller I am using as I still have to go in and manually map the buttons and sticks just like I do for OSCulator.

                              The keycode solution is pretty much the same as playing via keyboard, not anywhere near as nice as actual analog inputs!

                              One last question... did you create your own Wiimote library for OSCulator, or are you using an existing one?

                              Comment

                              Working...
                              X