MSVC workspaces: Added new USB debugger files to gui.vcxproj.

Renamed USB EHCI and USB UHCI folders in plugin workspace files.
Attempt fix plugin version for compiling with Bochs debugger / USB debugger.
FIXME: USB debugger doesn't link yet.
This commit is contained in:
Volker Ruppert 2024-03-22 20:23:38 +01:00
parent 012860f593
commit 542a3f9b6a
8 changed files with 193 additions and 190 deletions

View File

@ -68,24 +68,24 @@
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\obj-debug\usb_ehci\</OutDir>
<IntDir>.\..\obj-debug\usb_ehci\</IntDir>
<OutDir>.\..\obj-debug\bx_usb_ehci\</OutDir>
<IntDir>.\..\obj-debug\bx_usb_ehci\</IntDir>
<LinkIncremental>true</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.\..\obj-debug\usb_ehci\</OutDir>
<IntDir>.\..\obj-debug\usb_ehci\</IntDir>
<OutDir>.\..\obj-debug\bx_usb_ehci\</OutDir>
<IntDir>.\..\obj-debug\bx_usb_ehci\</IntDir>
<LinkIncremental>true</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\obj-release\usb_ehci\</OutDir>
<IntDir>.\..\obj-release\usb_ehci\</IntDir>
<OutDir>.\..\obj-release\bx_usb_ehci\</OutDir>
<IntDir>.\..\obj-release\bx_usb_ehci\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\obj-release\usb_ehci\</OutDir>
<IntDir>.\..\obj-release\usb_ehci\</IntDir>
<OutDir>.\..\obj-release\bx_usb_ehci\</OutDir>
<IntDir>.\..\obj-release\bx_usb_ehci\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<BuildLog>

View File

@ -68,24 +68,24 @@
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\obj-debug\usb_uhci\</OutDir>
<IntDir>.\..\obj-debug\usb_uhci\</IntDir>
<OutDir>.\..\obj-debug\bx_usb_uhci\</OutDir>
<IntDir>.\..\obj-debug\bx_usb_uhci\</IntDir>
<LinkIncremental>true</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.\..\obj-debug\usb_uhci\</OutDir>
<IntDir>.\..\obj-debug\usb_uhci\</IntDir>
<OutDir>.\..\obj-debug\bx_usb_uhci\</OutDir>
<IntDir>.\..\obj-debug\bx_usb_uhci\</IntDir>
<LinkIncremental>true</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\obj-release\usb_uhci\</OutDir>
<IntDir>.\..\obj-release\usb_uhci\</IntDir>
<OutDir>.\..\obj-release\bx_usb_uhci\</OutDir>
<IntDir>.\..\obj-release\bx_usb_uhci\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\obj-release\usb_uhci\</OutDir>
<IntDir>.\..\obj-release\usb_uhci\</IntDir>
<OutDir>.\..\obj-release\bx_usb_uhci\</OutDir>
<IntDir>.\..\obj-release\bx_usb_uhci\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<BuildLog>

View File

@ -215,6 +215,7 @@
<ClInclude Include="..\gui\win32dialog.h" />
<ClInclude Include="..\gui\win32paramdlg.h" />
<ClInclude Include="..\gui\win32res.h" />
<ClInclude Include="..\gui\win32usb.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="bochs.vcxproj">

View File

@ -222,6 +222,7 @@
<ClCompile Include="..\gui\siminterface.cc" />
<ClCompile Include="..\gui\textconfig.cc" />
<ClCompile Include="..\gui\win32_enh_dbg_osdep.cc" />
<ClCompile Include="..\gui\win32usb.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\gui\enh_dbg.h" />
@ -232,7 +233,10 @@
<ClInclude Include="..\gui\wenhdbg_res.h" />
<ClInclude Include="..\gui\win32dialog.h" />
<ClInclude Include="..\gui\win32res.h" />
<ClInclude Include="..\gui\win32usb.h" />
<ClInclude Include="..\gui\win32usbres.h" />
<ClInclude Include="..\iodev\iodev.h" />
<ClInclude Include="..\config.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -228,6 +228,7 @@
<ClCompile Include="..\gui\win32_enh_dbg_osdep.cc" />
<ClCompile Include="..\gui\win32config.cc" />
<ClCompile Include="..\gui\win32paramdlg.cc" />
<ClCompile Include="..\gui\win32usb.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\gui\enh_dbg.h" />
@ -243,6 +244,8 @@
<ClInclude Include="..\gui\win32dialog.h" />
<ClInclude Include="..\gui\win32paramdlg.h" />
<ClInclude Include="..\gui\win32res.h" />
<ClInclude Include="..\gui\win32usb.h" />
<ClInclude Include="..\gui\win32usbres.h" />
<ClInclude Include="..\iodev\iodev.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2016 The Bochs Project
// Copyright (C) 2001-2024 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -38,7 +38,7 @@ Bit32u crc32(const Bit8u *buf, int len);
extern Bit32u dbg_cpu;
void dbg_printf(const char *fmt, ...);
BOCHSAPI_MSVCONLY void dbg_printf(const char *fmt, ...);
typedef enum
{
@ -69,7 +69,7 @@ extern "C" {
};
// register function for 'info device' command
bool bx_dbg_register_debug_info(const char *devname, void *dev);
BOCHSAPI_MSVCONLY bool bx_dbg_register_debug_info(const char *devname, void *dev);
#define EMPTY_ARG (-1)
@ -228,9 +228,9 @@ typedef enum {
#define BX_DBG_PENDING_DMA 1
#define BX_DBG_PENDING_IRQ 2
void bx_debug_break(void);
BOCHSAPI_MSVCONLY void bx_debug_break(void);
void bx_dbg_exit(int code);
BOCHSAPI_MSVCONLY void bx_dbg_exit(int code);
#if BX_DBG_EXTENSIONS
int bx_dbg_extensions(char *command);
#else
@ -344,7 +344,7 @@ extern unsigned num_write_watchpoints;
extern unsigned num_read_watchpoints;
extern bx_watchpoint write_watchpoint[BX_DBG_MAX_WATCHPONTS];
extern bx_watchpoint read_watchpoint[BX_DBG_MAX_WATCHPONTS];
extern bx_guard_t bx_guard;
BOCHSAPI_MSVCONLY extern bx_guard_t bx_guard;
#define IS_CODE_32(code_32_64) ((code_32_64 & 1) != 0)
#define IS_CODE_64(code_32_64) ((code_32_64 & 2) != 0)
@ -368,8 +368,8 @@ typedef struct {
Bit16u limit;
} bx_dbg_global_sreg_t;
void bx_dbg_dma_report(bx_phy_address addr, unsigned len, unsigned what, Bit32u val);
void bx_dbg_iac_report(unsigned vector, unsigned irq);
BOCHSAPI_MSVCONLY void bx_dbg_dma_report(bx_phy_address addr, unsigned len, unsigned what, Bit32u val);
BOCHSAPI_MSVCONLY void bx_dbg_iac_report(unsigned vector, unsigned irq);
void bx_dbg_a20_report(unsigned val);
void bx_dbg_io_report(Bit32u port, unsigned size, unsigned op, Bit32u val);
void bx_dbg_disassemble_current(int which_cpu, int print_time);

View File

@ -19,11 +19,6 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// Define BX_PLUGGABLE in files that can be compiled into plugins. For
// platforms that require a special tag on exported symbols, BX_PLUGGABLE
// is used to know when we are exporting symbols and when we are importing.
#define BX_PLUGGABLE
#include "bochs.h"
#if BX_USE_WIN32USBDEBUG

View File

@ -1,161 +1,161 @@
/////////////////////////////////////////////////////////////////////////
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2023 Benjamin David Lunt
// Copyright (C) 2003-2021 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef BX_WIN32_USB_H
#define BX_WIN32_USB_H
#if BX_USE_WIN32USBDEBUG
#define COMMON_STR_SIZE 128
#define USB_DEBUG_NONE 0
#define USB_DEBUG_UHCI 1
#define USB_DEBUG_OHCI 2
#define USB_DEBUG_EHCI 3
#define USB_DEBUG_XHCI 4
int win32_usb_start(HWND hwnd, int break_type, int wParam, int lParam);
// USB debug break_type
#define USB_DEBUG_FRAME 1
#define USB_DEBUG_COMMAND 2
#define USB_DEBUG_EVENT 3
#define USB_DEBUG_NONEXIST 4
#define USB_DEBUG_RESET 5
#define USB_DEBUG_ENABLE 6
void win32_usb_trigger(int type, int trigger, int wParam, int lParam);
// lParam flags
#define USB_LPARAM_FLAG_BEFORE 0x00000001
#define USB_LPARAM_FLAG_AFTER 0x00000002
struct CALLBACK_PARAMS {
int type;
int break_type;
int wParam;
int lParam;
};
struct DUMP_PARAMS {
char title[COMMON_STR_SIZE];
bx_phy_address address;
int size; // amount to dump (no more than 512)
bool big; // use 64-bit addresses?
};
INT_PTR CALLBACK dump_dialog_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////////////////////////////////////////
// UHCI
//
INT_PTR CALLBACK hc_uhci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void hc_uhci_do_item(Bit32u FrameAddr, Bit32u FrameNum);
int hc_uhci_init(HWND hwnd);
int hc_uhci_save(HWND hwnd);
void uhci_display_td(HWND hwnd);
INT_PTR CALLBACK hc_uhci_callback_queue(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_uhci_callback_td(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////////////////////////////////////////
// OHCI
//
INT_PTR CALLBACK hc_ohci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int hc_ohci_init(HWND hwnd);
///////////////////////////////////////////////////////////////////////////////////////////////
// EHCI
//
INT_PTR CALLBACK hc_ehci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int hc_ehci_init(HWND hwnd);
///////////////////////////////////////////////////////////////////////////////////////////////
// XHCI
//
#define VIEW_TRB_TYPE_NONE 0
#define VIEW_TRB_TYPE_COMMAND 1
#define VIEW_TRB_TYPE_EVENT 2
#define VIEW_TRB_TYPE_TRANSFER 4
struct VIEW_TRB_TYPE {
Bit8u allowed_mask;
char name[22];
};
#define MAX_TRBS_ALLOWED 4096
INT_PTR CALLBACK hc_xhci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int hc_xhci_init(HWND hwnd);
int hc_xhci_save(HWND hwnd);
void hc_xhci_do_ring(const char *ring_str, Bit64u RingPtr, Bit64u dequeue_ptr);
void hc_xhci_do_event_ring(const char *ring_str, int interrupter);
void xhci_display_trb(HWND hwnd, int type_mask);
INT_PTR CALLBACK hc_xhci_callback_trb_normal(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_setup(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_data(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_status(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_link(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_event(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_noop(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_enslot(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_disslot(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_address(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_configep(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_evaluate(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_resetep(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_stopep(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_settrptr(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_resetdev(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_forceevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_setlat(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_getband(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_forcehdr(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_transevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_compcompletion(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_pschange(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_bandrequ(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_doorbell(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_hostevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_devnotevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_necfw(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_necun(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_necfwevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_context(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_str_context(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////////////////////////////////////////
// Attributes
struct S_ATTRIBUTES {
DWORD64 attrb;
DWORD64 mask;
int index;
char str[32];
int groups[10]; // up to 10 items can be grouped. Increase if we need more.
};
void do_attributes(HWND hwnd, DWORD id, const int size, const char *title, const struct S_ATTRIBUTES *attribs);
#endif // BX_USE_WIN32USBDEBUG
#endif // BX_WIN32_USB_H
/////////////////////////////////////////////////////////////////////////
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2023 Benjamin David Lunt
// Copyright (C) 2003-2024 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef BX_WIN32_USB_H
#define BX_WIN32_USB_H
#if BX_USE_WIN32USBDEBUG
#define COMMON_STR_SIZE 128
#define USB_DEBUG_NONE 0
#define USB_DEBUG_UHCI 1
#define USB_DEBUG_OHCI 2
#define USB_DEBUG_EHCI 3
#define USB_DEBUG_XHCI 4
BOCHSAPI_MSVCONLY int win32_usb_start(HWND hwnd, int break_type, int wParam, int lParam);
// USB debug break_type
#define USB_DEBUG_FRAME 1
#define USB_DEBUG_COMMAND 2
#define USB_DEBUG_EVENT 3
#define USB_DEBUG_NONEXIST 4
#define USB_DEBUG_RESET 5
#define USB_DEBUG_ENABLE 6
BOCHSAPI_MSVCONLY void win32_usb_trigger(int type, int trigger, int wParam, int lParam);
// lParam flags
#define USB_LPARAM_FLAG_BEFORE 0x00000001
#define USB_LPARAM_FLAG_AFTER 0x00000002
struct CALLBACK_PARAMS {
int type;
int break_type;
int wParam;
int lParam;
};
struct DUMP_PARAMS {
char title[COMMON_STR_SIZE];
bx_phy_address address;
int size; // amount to dump (no more than 512)
bool big; // use 64-bit addresses?
};
INT_PTR CALLBACK dump_dialog_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////////////////////////////////////////
// UHCI
//
INT_PTR CALLBACK hc_uhci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void hc_uhci_do_item(Bit32u FrameAddr, Bit32u FrameNum);
int hc_uhci_init(HWND hwnd);
int hc_uhci_save(HWND hwnd);
void uhci_display_td(HWND hwnd);
INT_PTR CALLBACK hc_uhci_callback_queue(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_uhci_callback_td(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////////////////////////////////////////
// OHCI
//
INT_PTR CALLBACK hc_ohci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int hc_ohci_init(HWND hwnd);
///////////////////////////////////////////////////////////////////////////////////////////////
// EHCI
//
INT_PTR CALLBACK hc_ehci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int hc_ehci_init(HWND hwnd);
///////////////////////////////////////////////////////////////////////////////////////////////
// XHCI
//
#define VIEW_TRB_TYPE_NONE 0
#define VIEW_TRB_TYPE_COMMAND 1
#define VIEW_TRB_TYPE_EVENT 2
#define VIEW_TRB_TYPE_TRANSFER 4
struct VIEW_TRB_TYPE {
Bit8u allowed_mask;
char name[22];
};
#define MAX_TRBS_ALLOWED 4096
INT_PTR CALLBACK hc_xhci_callback(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int hc_xhci_init(HWND hwnd);
int hc_xhci_save(HWND hwnd);
void hc_xhci_do_ring(const char *ring_str, Bit64u RingPtr, Bit64u dequeue_ptr);
void hc_xhci_do_event_ring(const char *ring_str, int interrupter);
void xhci_display_trb(HWND hwnd, int type_mask);
INT_PTR CALLBACK hc_xhci_callback_trb_normal(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_setup(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_data(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_status(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_link(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_event(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_noop(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_enslot(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_disslot(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_address(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_configep(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_evaluate(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_resetep(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_stopep(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_settrptr(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_resetdev(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_forceevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_setlat(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_getband(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_forcehdr(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_transevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_compcompletion(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_pschange(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_bandrequ(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_doorbell(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_hostevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_devnotevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_necfw(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_necun(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_trb_necfwevent(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_context(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK hc_xhci_callback_str_context(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////////////////////////////////////////
// Attributes
struct S_ATTRIBUTES {
DWORD64 attrb;
DWORD64 mask;
int index;
char str[32];
int groups[10]; // up to 10 items can be grouped. Increase if we need more.
};
void do_attributes(HWND hwnd, DWORD id, const int size, const char *title, const struct S_ATTRIBUTES *attribs);
#endif // BX_USE_WIN32USBDEBUG
#endif // BX_WIN32_USB_H