diff --git a/hw/xbox/nv2a/nv2a_pgraph.c b/hw/xbox/nv2a/nv2a_pgraph.c index dd7ffb91db..9c19318dcf 100644 --- a/hw/xbox/nv2a/nv2a_pgraph.c +++ b/hw/xbox/nv2a/nv2a_pgraph.c @@ -1795,7 +1795,7 @@ static void pgraph_method(NV2AState *d, } else { NV2A_GL_DPRINTF(true, "EMPTY NV097_SET_BEGIN_END"); - assert(false); +// assert(false); } /* End of visibility testing */ diff --git a/hw/xbox/nv2a/nv2a_psh.c b/hw/xbox/nv2a/nv2a_psh.c index 4c39748310..d976a401f7 100644 --- a/hw/xbox/nv2a/nv2a_psh.c +++ b/hw/xbox/nv2a/nv2a_psh.c @@ -643,7 +643,7 @@ static QString* psh_convert(struct PixelShader *ps) case PS_TEXTUREMODES_DOT_RFLCT_SPEC: qstring_append_fmt(vars, "vec4 t%d = vec4(0.0); /* PS_TEXTUREMODES_DOT_RFLCT_SPEC */\n", i); - assert(false); /* Unimplemented */ + //assert(false); /* Unimplemented */ break; case PS_TEXTUREMODES_DOT_STR_3D: qstring_append_fmt(vars, "vec4 t%d = vec4(0.0); /* PS_TEXTUREMODES_DOT_STR_3D */\n", diff --git a/hw/xbox/xid.c b/hw/xbox/xid.c index d87d77a1e9..36e77f9525 100644 --- a/hw/xbox/xid.c +++ b/hw/xbox/xid.c @@ -25,7 +25,7 @@ #include "hw/usb/desc.h" #include "ui/input.h" -// #define DEBUG_XID +#define DEBUG_XID #ifdef DEBUG_XID #define DPRINTF printf #else @@ -112,7 +112,7 @@ static const USBDescIface desc_iface_xbox_gamepad = { .bInterfaceProtocol = 0x00, .eps = (USBDescEndpoint[]) { { - .bEndpointAddress = USB_DIR_IN | 0x02, + .bEndpointAddress = USB_DIR_IN | 0x01, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = 0x20, .bInterval = 4, @@ -347,10 +347,10 @@ static void usb_xid_handle_control(USBDevice *dev, USBPacket *p, DPRINTF("Set rumble power to 0x%x, 0x%x\n", s->out_state.left_actuator_strength, s->out_state.right_actuator_strength); - p->actual_length = s->out_state.length; } else { assert(false); } + //p->status = USB_RET_STALL; break; /* XID requests */ case VendorInterfaceRequest | USB_REQ_GET_DESCRIPTOR: @@ -364,9 +364,9 @@ static void usb_xid_handle_control(USBDevice *dev, USBPacket *p, } break; case VendorInterfaceRequest | XID_GET_CAPABILITIES: - DPRINTF("xid XID_GET_CAPABILITIES 0x%x\n", value); + DPRINTF("xid 0x%X XID_GET_CAPABILITIES 0x%x\n", request, VendorInterfaceRequest); /* FIXME: ! */ - p->status = USB_RET_STALL; +// p->status = USB_RET_STALL; //assert(false); break; case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_DEVICE) << 8) @@ -399,23 +399,30 @@ static void usb_xid_handle_data(USBDevice *dev, USBPacket *p) { USBXIDState *s = (USBXIDState *)dev; - DPRINTF("xid handle_data 0x%x %d 0x%zx\n", p->pid, p->ep->nr, p->iov.size); + if ((p->pid != 0x69) || (p->ep->nr != 1) || (p->iov.size != 0x20)) { + DPRINTF("xid handle_data 0x%x %d 0x%zx\n", p->pid, p->ep->nr, p->iov.size); + } switch (p->pid) { case USB_TOKEN_IN: - if (p->ep->nr == 2) { + if (p->ep->nr == 1) { if (s->in_dirty) { usb_packet_copy(p, &s->in_state, s->in_state.bLength); s->in_dirty = false; } else { - p->status = USB_RET_NAK; + //p->status = USB_RET_NAK; } } else { assert(false); } break; case USB_TOKEN_OUT: - p->status = USB_RET_STALL; + if (p->ep->nr == 2) { + assert(false); + } else { + p->status = USB_RET_STALL; + assert(false); + } break; default: p->status = USB_RET_STALL;