Thread Rating:
  • 6 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qemu USB plugin (formerly known as USBqemu-wheel)
#41
I get a crash happening in this function when trying to reboot the game, even with all DINPUT functions disabled. (only port attached)

breakpoint happens here: ohci_read_ed(ohci, cur, &ed)
error: 0xC0000005: Access violation reading location 0x23ffffff.

Code:
/* Service an endpoint list.  Returns nonzero if active TD were found.  */
static int ohci_service_ed_list(OHCIState *ohci, uint32_t head, int completion)
{
    struct ohci_ed ed;
    uint32_t next_ed;
    uint32_t cur;
    int active;

    active = 0;

    if (head == 0)
        return 0;

    for (cur = head; cur; cur = next_ed) {
        if (!ohci_read_ed(ohci, cur, &ed)) {
            fprintf(stderr, "usb-ohci: ED read error at %x\n", cur);
            return 0;
        }

        next_ed = ed.next & OHCI_DPTR_MASK;

        if ((ed.head & OHCI_ED_H) || (ed.flags & OHCI_ED_K)) {
            uint32_t addr;
            /* Cancel pending packets for ED that have been paused.  */
            addr = ed.head & OHCI_DPTR_MASK;
            if (ohci->async_td && addr == ohci->async_td) {
                usb_cancel_packet(&ohci->usb_packet);
                ohci->async_td = 0;
            }
            continue;
        }

        while ((ed.head & OHCI_DPTR_MASK) != ed.tail) {
#ifdef DEBUG_PACKET
            DPRINTF("ED @ 0x%.8x fa=%u en=%u d=%u s=%u k=%u f=%u mps=%u "
                    "h=%u c=%u\n  head=0x%.8x tailp=0x%.8x next=0x%.8x\n", cur,
                    OHCI_BM(ed.flags, ED_FA), OHCI_BM(ed.flags, ED_EN),
                    OHCI_BM(ed.flags, ED_D), (ed.flags & OHCI_ED_S)!= 0,
                    (ed.flags & OHCI_ED_K) != 0, (ed.flags & OHCI_ED_F) != 0,
                    OHCI_BM(ed.flags, ED_MPS), (ed.head & OHCI_ED_H) != 0,
                    (ed.head & OHCI_ED_C) != 0, ed.head & OHCI_DPTR_MASK,
                    ed.tail & OHCI_DPTR_MASK, ed.next & OHCI_DPTR_MASK);
#endif
            active = 1;

            if ((ed.flags & OHCI_ED_F) == 0) {
                if (ohci_service_td(ohci, &ed))
                    break;
            } else {
                /* Handle isochronous endpoints */
                if (ohci_service_iso_td(ohci, &ed, completion))
                    break;
            }
        }

        ohci_put_ed(ohci, cur, &ed);
    }

    return active;
}

my guess is the descriptor has an error in it somewhere but i could be wrong..

the descriptors jackun included look a bit jumbled and a mixed. Particularly Device Descriptor/Config Descriptor.


maybe this is just an inherent bug of qemu? it still does it even with the latest version.

I will try using this info to fix the descriptor
http://lkml.indiana.edu/hypermail/linux/...00843.html

EDIT:

Fixed above error by moving all USBinit/USBshutdown calls into USBopen/USBclose. Strange this was in there. Probably new instance of ohci being created without closing last one.

I've updated the binary at the original link. https://drive.google.com/file/d/0B4lfqq0...sp=sharing
Also readme is included.

I will check GT3 when i get a chance.
Reply

Sponsored links

#42
But you lose input from wheel when you resume instead of reboot?
And it always crashes after 872 usb fames Tongue
Reply
#43
(12-26-2013, 07:03 AM)Racer_S Wrote: I will try using this info to fix the descriptor
http://lkml.indiana.edu/hypermail/linux/...00843.html

Seen that, but most useful bit is:
Code:
Report Descriptors:
** UNAVAILABLE **

Sad


Also the plugin should probably detect if the game is trying to set DFP etc to 'native' mode and change the PID then?
http://git.kernel.org/cgit/linux/kernel/...ff.c?#n401
Reply
#44
That fix solved all crash problems for me, I've been running the same instance of PCSX2 for a few hours now with plugin running without issue..


I've moved on to a new problem, the black vertical lines in enthusia (and other games) when setting internal resolution > 1260x1260.

It looks like an scaling problem that needs a Fix(), digging through GSdx sources.. but to stay on topic..

Simply changing the Device Descriptor ID to DFP changes the packets to the DFP ones and the game just sets to native mode. The first 4-5 tokenout packets are the most important ones (toggle the dfp hardstop from 270* to 900*), the rest is just normal constantforce data (on track). Not sure if thats what they mean by native mode.

Only GT4 toggles native mode on startup if i remember correctly. Enthusia was locked at 270.
Reply
#45
Racer_s, thanks for the update Smile

Few things at the Filter/Test box:
- I suggest to rename it to filter, since "test" makes it look as if it won't have an affect, or maybe put the "test" title only above the graph itself.
- The top dropdown (steer left, steer right, throttle, break) has a extra last item which is garbled. List size should be N-1?
- At the bottom "Defaults" dropdown with the degrees, whatever I choose, it resets to empty immediately. What does that box do?
- Will you release the sources?
[i7-3630qm/gt650m-2G/Win-7] [i7-4500u/R.HD8850m/Win-8.1] [2010-MBA/OSX-10.9.x]. Scroll smoothly with SmoothWheel for Firefox.
Reply
#46
(12-25-2013, 12:06 PM)jackun Wrote: If you can, try thet bitfieldtest app and log it file. http://forums.pcsx2.net/Thread-Qemu-USB-...#pid335246

I tried it. At some stage it moves the wheel left and right few times, and then outputs some errors:

Code:
Device 14 : VID 046D PID C29A
Wheel found !!!
OutputReportByteLength: 8
InputReportByteLength: 10
NumberInputValueCaps: 5
NumberInputDataIndices: 28
NumberLinkCollectionNodes: 1
HidP_MaxDataListLength: 35
LinkUsagePage: 1
Buttons: 21
Read : 0
Buttons:
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0
Min/max 0/7    Hat: 00
Min/max 0/16383    X: 0
Min/max 0/255    Y: 0
Min/max 0/255    Rz: 0
Min/max 0/255    Z: 0

Writing logitech FFB commands...
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997 res:0
Written: 0, ret:0 err:997
Read: 0, ret:0 err:1784, 00 00 00 00
press <enter>...
[i7-3630qm/gt650m-2G/Win-7] [i7-4500u/R.HD8850m/Win-8.1] [2010-MBA/OSX-10.9.x]. Scroll smoothly with SmoothWheel for Firefox.
Reply
#47
Axes stay at zero all the time even with pedals pressed? Also 21 buttons...
Well, atleast FFB works Laugh
Reply
#48
(12-27-2013, 01:28 AM)jackun Wrote: Axes stay at zero all the time even with pedals pressed? Also 21 buttons...
Well, atleast FFB works Laugh

You never mentioned pressing the pedals before Smile

Tell me exactly how to use this logger and I'll try it tomorrow.
[i7-3630qm/gt650m-2G/Win-7] [i7-4500u/R.HD8850m/Win-8.1] [2010-MBA/OSX-10.9.x]. Scroll smoothly with SmoothWheel for Firefox.
Reply
#49
Just press stuff and see if X,Y,Z etc register any activity.
But it should have printed 0xFF for unpressed axes anyway, hmm.
So it is DF GT?
Reply
#50
Yes, Driving Force GT.

what do you mean press stuff? it runs and after few seconds it shows "Press enter", so "press stuff" before or after the press enter message?
[i7-3630qm/gt650m-2G/Win-7] [i7-4500u/R.HD8850m/Win-8.1] [2010-MBA/OSX-10.9.x]. Scroll smoothly with SmoothWheel for Firefox.
Reply




Users browsing this thread: 3 Guest(s)