Skip to content

Commit

Permalink
Ready for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Nov 16, 2023
1 parent f44cd05 commit c05c721
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/device/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* TODO: Add the Genius bus- and serial mouse.
* Remove the '3-button' flag from mouse types.
* Investigate USB mouse issues and re-enable it after fixing them.
*
*
*
Expand Down Expand Up @@ -94,7 +95,9 @@ static mouse_t mouse_devices[] = {
{ &mouse_msserial_device },
{ &mouse_ltserial_device },
{ &mouse_ps2_device },
#ifdef USE_USB_MOUSE
{ &mouse_usb_device },
#endif
#ifdef USE_WACOM
{ &mouse_wacom_device },
{ &mouse_wacom_artpad_device },
Expand Down
2 changes: 2 additions & 0 deletions src/include/86box/mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ extern const device_t mouse_ltserial_device;
extern const device_t mouse_ps2_device;
extern const device_t mouse_wacom_device;
extern const device_t mouse_wacom_artpad_device;
#ifdef USE_USB_MOUSE
extern const device_t mouse_usb_device;
#endif
#endif

extern void mouse_clear_x(void);
extern void mouse_clear_y(void);
Expand Down
9 changes: 7 additions & 2 deletions src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*
* This file is part of the 86Box distribution.
*
* Universal Serial Bus emulation (currently dummy UHCI and
* OHCI).
* Universal Serial Bus emulation (currently dummy OHCI).
*
*
*
Expand Down Expand Up @@ -309,6 +308,8 @@ ohci_update_mem_mapping(usb_t *dev, uint8_t base1, uint8_t base2, uint8_t base3,
uint8_t
usb_parse_control_endpoint(usb_device_t* usb_device, uint8_t* data, uint32_t *len, uint8_t pid_token, uint8_t endpoint, uint8_t underrun_not_allowed)
{
/* FIXME: This needs to be redone. */
#if 0
usb_desc_setup_t* setup_packet = (usb_desc_setup_t*)data;
uint8_t ret = USB_ERROR_STALL;

Expand Down Expand Up @@ -490,6 +491,9 @@ usb_parse_control_endpoint(usb_device_t* usb_device, uint8_t* data, uint32_t *le
}
}
return ret;
#else
return USB_ERROR_STALL;
#endif
}

static void
Expand Down Expand Up @@ -523,6 +527,7 @@ usb_close(void *priv)

extern void uhci_attach(UHCIState *s, usb_device_t* device, int index);

/* FIXME: This needs a rewrite (with the detach counterpart) to support more than 2 ports. */
uint16_t usb_attach_device(usb_device_t* device, uint8_t bus_type)
{
if (!usb_device_inst[0])
Expand Down
26 changes: 26 additions & 0 deletions src/usb_uhci_new.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Universal Host Controller Interface (UHCI) implementation.
*
*
*
* Authors: Fabrice Bellard
* Max Krasnyansky
* Cacodemon345
*
* Copyright (c) 2005 Fabrice Bellard.
* Copyright (c) 2008 Max Krasnyansky
* Copyright (c) 2023 Cacodemon345
*/

/* TODO
1. Implement proper wakeup support.
2. Implement hardware part of KBC emulation.
*/

#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
Expand Down

0 comments on commit c05c721

Please sign in to comment.