mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
Merge remote-tracking branch 'upstream/master' into feature/ich2
This commit is contained in:
@@ -165,7 +165,7 @@ typedef struct cdrom {
|
||||
char *image_history[CD_IMAGE_HISTORY];
|
||||
|
||||
uint32_t sound_on, cdrom_capacity,
|
||||
early, seek_pos,
|
||||
seek_pos,
|
||||
seek_diff, cd_end, type;
|
||||
|
||||
int host_drive, prev_host_drive,
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#define NET_TYPE_NONE 0 /* networking disabled */
|
||||
#define NET_TYPE_SLIRP 1 /* use the SLiRP port forwarder */
|
||||
#define NET_TYPE_PCAP 2 /* use the (Win)Pcap API */
|
||||
#define NET_TYPE_VDE 3 /* use the VDE plug API */
|
||||
|
||||
#define NET_MAX_FRAME 1518
|
||||
/* Queue size must be a power of 2 */
|
||||
@@ -123,6 +124,7 @@ typedef struct netdrv_t {
|
||||
|
||||
extern const netdrv_t net_pcap_drv;
|
||||
extern const netdrv_t net_slirp_drv;
|
||||
extern const netdrv_t net_vde_drv;
|
||||
|
||||
struct _netcard_t {
|
||||
const device_t *device;
|
||||
@@ -147,15 +149,27 @@ typedef struct {
|
||||
char description[128];
|
||||
} netdev_t;
|
||||
|
||||
typedef struct {
|
||||
int has_slirp: 1;
|
||||
int has_pcap: 1;
|
||||
int has_vde: 1;
|
||||
} network_devmap_t;
|
||||
|
||||
|
||||
#define HAS_NOSLIRP_NET(x) (x.has_pcap || x.has_vde)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Global variables. */
|
||||
extern int nic_do_log; /* config */
|
||||
extern int network_ndev;
|
||||
extern network_devmap_t network_devmap;
|
||||
extern int network_ndev; // Number of pcap devices
|
||||
extern network_devmap_t network_devmap; // Bitmap of available network types
|
||||
extern netdev_t network_devs[NET_HOST_INTF_MAX];
|
||||
|
||||
|
||||
/* Function prototypes. */
|
||||
extern void network_init(void);
|
||||
extern netcard_t *network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_link_state);
|
||||
@@ -166,6 +180,8 @@ extern int network_available(void);
|
||||
extern void network_tx(netcard_t *card, uint8_t *, int);
|
||||
|
||||
extern int net_pcap_prepare(netdev_t *);
|
||||
extern int net_vde_prepare(void);
|
||||
|
||||
|
||||
extern void network_connect(int id, int connect);
|
||||
extern int network_is_connected(int id);
|
||||
|
||||
@@ -142,26 +142,27 @@
|
||||
#define IDT_CD_LUN 1766 /* LUN: */
|
||||
#define IDT_CD_CHANNEL 1767 /* Channel: */
|
||||
#define IDT_CD_SPEED 1768 /* Speed: */
|
||||
#define IDT_CD_TYPE 1769 /* Type: */
|
||||
|
||||
/* DLG_CFG_OTHER_REMOVABLE_DEVICES */
|
||||
#define IDT_MO_DRIVES 1769 /* MO drives: */
|
||||
#define IDT_MO_BUS 1770 /* Bus: */
|
||||
#define IDT_MO_ID 1771 /* ID: */
|
||||
#define IDT_MO_CHANNEL 1772 /* Channel */
|
||||
#define IDT_MO_TYPE 1773 /* Type: */
|
||||
#define IDT_MO_DRIVES 1770 /* MO drives: */
|
||||
#define IDT_MO_BUS 1771 /* Bus: */
|
||||
#define IDT_MO_ID 1772 /* ID: */
|
||||
#define IDT_MO_CHANNEL 1773 /* Channel */
|
||||
#define IDT_MO_TYPE 1774 /* Type: */
|
||||
|
||||
#define IDT_ZIP_DRIVES 1774 /* ZIP drives: */
|
||||
#define IDT_ZIP_BUS 1775 /* Bus: */
|
||||
#define IDT_ZIP_ID 1776 /* ID: */
|
||||
#define IDT_ZIP_LUN 1777 /* LUN: */
|
||||
#define IDT_ZIP_CHANNEL 1778 /* Channel: */
|
||||
#define IDT_ZIP_DRIVES 1775 /* ZIP drives: */
|
||||
#define IDT_ZIP_BUS 1776 /* Bus: */
|
||||
#define IDT_ZIP_ID 1777 /* ID: */
|
||||
#define IDT_ZIP_LUN 1778 /* LUN: */
|
||||
#define IDT_ZIP_CHANNEL 1779 /* Channel: */
|
||||
|
||||
/* DLG_CFG_PERIPHERALS */
|
||||
#define IDT_ISARTC 1779 /* ISA RTC: */
|
||||
#define IDT_ISAMEM_1 1780 /* ISAMEM Board #1: */
|
||||
#define IDT_ISAMEM_2 1781 /* ISAMEM Board #2: */
|
||||
#define IDT_ISAMEM_3 1782 /* ISAMEM Board #3: */
|
||||
#define IDT_ISAMEM_4 1783 /* ISAMEM Board #4: */
|
||||
#define IDT_ISARTC 1780 /* ISA RTC: */
|
||||
#define IDT_ISAMEM_1 1781 /* ISAMEM Board #1: */
|
||||
#define IDT_ISAMEM_2 1782 /* ISAMEM Board #2: */
|
||||
#define IDT_ISAMEM_3 1783 /* ISAMEM Board #3: */
|
||||
#define IDT_ISAMEM_4 1784 /* ISAMEM Board #4: */
|
||||
|
||||
/*
|
||||
* To try to keep these organized, we now group the
|
||||
@@ -302,7 +303,7 @@
|
||||
#define IDC_COMBO_CD_ID 1157
|
||||
#define IDC_COMBO_CD_LUN 1158
|
||||
#define IDC_COMBO_CD_CHANNEL_IDE 1159
|
||||
#define IDC_CHECKEARLY 1160
|
||||
#define IDC_COMBO_CD_TYPE 1160
|
||||
|
||||
#define IDC_LIST_ZIP_DRIVES 1170 /* other removable devices config */
|
||||
#define IDC_COMBO_ZIP_BUS 1171
|
||||
|
||||
@@ -27,37 +27,92 @@ typedef struct usb_t usb_t;
|
||||
/* USB device creation parameters struct */
|
||||
typedef struct
|
||||
{
|
||||
void (*raise_interrupt)(usb_t*, void*);
|
||||
void (*update_interrupt)(usb_t*, void*);
|
||||
/* Handle (but do not raise) SMI. Returns 1 if SMI can be raised, 0 otherwise. */
|
||||
uint8_t (*smi_handle)(usb_t*, void*);
|
||||
void* parent_priv;
|
||||
} usb_params_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
uint32_t l;
|
||||
uint16_t w[2];
|
||||
uint8_t b[4];
|
||||
} ohci_mmio_t;
|
||||
|
||||
/* USB Host Controller device struct */
|
||||
typedef struct usb_t
|
||||
{
|
||||
uint8_t uhci_io[32], ohci_mmio[4096];
|
||||
uint8_t uhci_io[32];
|
||||
ohci_mmio_t ohci_mmio[1024];
|
||||
uint16_t uhci_io_base;
|
||||
int uhci_enable, ohci_enable;
|
||||
uint32_t ohci_mem_base;
|
||||
uint32_t ohci_mem_base, irq_level;
|
||||
mem_mapping_t ohci_mmio_mapping;
|
||||
pc_timer_t ohci_frame_timer;
|
||||
pc_timer_t ohci_port_reset_timer[2];
|
||||
uint8_t ohci_interrupt_counter : 3;
|
||||
|
||||
usb_params_t* usb_params;
|
||||
} usb_t;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
/* Base USB descriptor struct. */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
} usb_desc_base_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
usb_desc_base_t base;
|
||||
|
||||
uint16_t wTotalLength;
|
||||
uint8_t bNumInterfaces;
|
||||
uint8_t bConfigurationValue;
|
||||
uint8_t iConfiguration;
|
||||
uint8_t bmAttributes;
|
||||
uint8_t bMaxPower;
|
||||
} usb_desc_conf_t;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
/* USB endpoint device struct. Incomplete and unused. */
|
||||
typedef struct
|
||||
{
|
||||
uint16_t vendor_id;
|
||||
uint16_t device_id;
|
||||
|
||||
/* Reads from endpoint. Non-zero value indicates error. */
|
||||
uint8_t (*device_in)(void* priv, uint8_t* data, uint32_t len);
|
||||
/* Writes to endpoint. Non-zero value indicates error. */
|
||||
uint8_t (*device_out)(void* priv, uint8_t* data, uint32_t len);
|
||||
/* Process setup packets. */
|
||||
uint8_t (*device_setup)(void* priv, uint8_t* data);
|
||||
/* Device reset */
|
||||
void (*device_reset)(void* priv);
|
||||
|
||||
void* priv;
|
||||
} usb_device_t;
|
||||
|
||||
enum usb_bus_types
|
||||
{
|
||||
USB_BUS_OHCI = 0,
|
||||
USB_BUS_UHCI = 1
|
||||
};
|
||||
|
||||
/* Global variables. */
|
||||
extern const device_t usb_device;
|
||||
|
||||
/* Functions. */
|
||||
extern void uhci_update_io_mapping(usb_t *dev, uint8_t base_l, uint8_t base_h, int enable);
|
||||
extern void ohci_update_mem_mapping(usb_t *dev, uint8_t base1, uint8_t base2, uint8_t base3, int enable);
|
||||
/* Attach USB device to a port of a USB bus. Returns the port to which it got attached to. */
|
||||
extern uint8_t usb_attach_device(usb_t *dev, usb_device_t* device, uint8_t bus_type);
|
||||
/* Detach USB device from a port. */
|
||||
extern void usb_detach_device(usb_t *dev, uint8_t port, uint8_t bus_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ typedef struct ibm8514_t {
|
||||
} accel;
|
||||
|
||||
uint16_t test;
|
||||
int ibm_mode;
|
||||
|
||||
int v_total, dispend, v_syncstart, split,
|
||||
h_disp, h_disp_old, h_total, h_disp_time, rowoffset,
|
||||
@@ -107,5 +108,6 @@ typedef struct ibm8514_t {
|
||||
int blitter_busy;
|
||||
uint64_t blitter_time;
|
||||
uint64_t status_time;
|
||||
int pitch;
|
||||
} ibm8514_t;
|
||||
#endif /*VIDEO_8514A_H*/
|
||||
|
||||
@@ -184,6 +184,13 @@ extern int vga_on, ibm8514_on;
|
||||
|
||||
extern void ibm8514_poll(ibm8514_t *dev, svga_t *svga);
|
||||
extern void ibm8514_recalctimings(svga_t *svga);
|
||||
extern uint8_t ibm8514_ramdac_in(uint16_t port, void *p);
|
||||
extern void ibm8514_ramdac_out(uint16_t port, uint8_t val, void *p);
|
||||
extern int ibm8514_cpu_src(svga_t *svga);
|
||||
extern int ibm8514_cpu_dest(svga_t *svga);
|
||||
extern void ibm8514_accel_out_pixtrans(svga_t *svga, uint16_t port, uint16_t val, int len);
|
||||
extern void ibm8514_short_stroke_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, uint8_t ssv, int len);
|
||||
extern void ibm8514_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, int len);
|
||||
|
||||
extern void xga_poll(xga_t *xga, svga_t *svga);
|
||||
extern void xga_recalctimings(svga_t *svga);
|
||||
|
||||
Reference in New Issue
Block a user