Merge remote-tracking branch 'origin/master' into c&t_69000
This commit is contained in:
@@ -59,8 +59,7 @@ extern "C" {
|
||||
#define VEN_VIA 0x01106
|
||||
#define VEN_VIA_596B 0x11106
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct acpi_regs_t {
|
||||
uint8_t acpitst;
|
||||
uint8_t auxen;
|
||||
uint8_t auxsts;
|
||||
@@ -111,8 +110,7 @@ typedef struct
|
||||
uint32_t pad0;
|
||||
} acpi_regs_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct acpi_t {
|
||||
acpi_regs_t regs;
|
||||
uint8_t gpireg2_default;
|
||||
uint8_t pad[3];
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct apm_t {
|
||||
uint8_t cmd;
|
||||
uint8_t stat;
|
||||
uint8_t do_smi;
|
||||
|
||||
@@ -114,7 +114,7 @@ static const struct {
|
||||
/* To shut up the GCC compilers. */
|
||||
struct cdrom;
|
||||
|
||||
typedef struct {
|
||||
typedef struct subchannel_t {
|
||||
uint8_t attr;
|
||||
uint8_t track;
|
||||
uint8_t index;
|
||||
@@ -126,7 +126,7 @@ typedef struct {
|
||||
uint8_t rel_f;
|
||||
} subchannel_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct track_info_t {
|
||||
int number;
|
||||
uint8_t attr;
|
||||
uint8_t m;
|
||||
@@ -135,7 +135,7 @@ typedef struct {
|
||||
} track_info_t;
|
||||
|
||||
/* Define the various CD-ROM drive operations (ops). */
|
||||
typedef struct {
|
||||
typedef struct cdrom_ops_t {
|
||||
void (*get_tracks)(struct cdrom *dev, int *first, int *last);
|
||||
void (*get_track_info)(struct cdrom *dev, uint32_t track, int end, track_info_t *ti);
|
||||
void (*get_subchannel)(struct cdrom *dev, uint32_t lba, subchannel_t *subc);
|
||||
|
||||
@@ -27,7 +27,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
typedef struct {
|
||||
typedef struct storage_cfg_t {
|
||||
uint8_t id;
|
||||
uint8_t bus_type; /* Bus type: IDE, SCSI, etc. */
|
||||
uint8_t bus, : 4; /* ID of the bus (for example, for IDE,
|
||||
@@ -47,7 +47,7 @@ typedef struct {
|
||||
uint32_t tracks;
|
||||
} storage_cfg_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct config_t {
|
||||
/* General configuration */
|
||||
int vid_resize; /* Window is resizable or not */
|
||||
int vid_renderer; /* Renderer */
|
||||
|
||||
@@ -21,15 +21,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct ddma_channel_t {
|
||||
uint16_t io_base;
|
||||
int channel;
|
||||
int enable;
|
||||
} ddma_channel_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct ddma_t {
|
||||
ddma_channel_t channels[8];
|
||||
} ddma_t;
|
||||
|
||||
|
||||
@@ -86,12 +86,12 @@ enum {
|
||||
#define BIOS_INTERLEAVED_INVERT 8
|
||||
#define BIOS_HIGH_BIT_INVERT 16
|
||||
|
||||
typedef struct {
|
||||
typedef struct device_config_selection_t {
|
||||
const char *description;
|
||||
int value;
|
||||
} device_config_selection_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct device_config_bios_t {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
int bios_type;
|
||||
@@ -103,13 +103,13 @@ typedef struct {
|
||||
const char *files[9];
|
||||
} device_config_bios_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct device_config_spinner_t {
|
||||
int16_t min;
|
||||
int16_t max;
|
||||
int16_t step;
|
||||
} device_config_spinner_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct device_config_t {
|
||||
const char *name;
|
||||
const char *description;
|
||||
int type;
|
||||
@@ -144,7 +144,7 @@ typedef struct _device_ {
|
||||
const device_config_t *config;
|
||||
} device_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct device_context_t {
|
||||
const device_t *dev;
|
||||
char name[2048];
|
||||
int instance;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
typedef struct disk_size_t {
|
||||
int hole;
|
||||
int sides;
|
||||
int data_rate;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#define DMA_OVER 0x10000
|
||||
#define DMA_VERIFY 0x20000
|
||||
|
||||
typedef struct {
|
||||
typedef struct dma_t {
|
||||
uint8_t m;
|
||||
uint8_t mode;
|
||||
uint8_t page;
|
||||
|
||||
@@ -56,7 +56,7 @@ extern int fdc_type;
|
||||
#define FDC_FLAG_TER 0x2000 /* Is Tertiary */
|
||||
#define FDC_FLAG_QUA 0x3000 /* Is Quaternary */
|
||||
|
||||
typedef struct {
|
||||
typedef struct fdc_t {
|
||||
uint8_t dor;
|
||||
uint8_t stat;
|
||||
uint8_t command;
|
||||
|
||||
@@ -65,7 +65,7 @@ extern int fdd_get_from_internal_name(char *s);
|
||||
|
||||
extern int fdd_current_track(int drive);
|
||||
|
||||
typedef struct {
|
||||
typedef struct DRIVE {
|
||||
int id;
|
||||
|
||||
void (*seek)(int drive, int track);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef EMU_FIFO8_H
|
||||
#define EMU_FIFO8_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct Fifo8 {
|
||||
/* All fields are private */
|
||||
uint8_t *data;
|
||||
uint32_t capacity;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#define GAMEPORT_SIO 0x1000000
|
||||
|
||||
typedef struct {
|
||||
typedef struct plat_joystick_t {
|
||||
char name[260];
|
||||
|
||||
int a[8];
|
||||
@@ -68,7 +68,7 @@ typedef struct {
|
||||
int nr_sliders;
|
||||
} plat_joystick_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct joystick_t {
|
||||
int axis[8];
|
||||
int button[32];
|
||||
int pov[4];
|
||||
@@ -79,7 +79,7 @@ typedef struct {
|
||||
int pov_mapping[4][2];
|
||||
} joystick_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct joystick_if_t {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#ifndef EMU_HDC_IDE_SFF8038I_H
|
||||
#define EMU_HDC_IDE_SFF8038I_H
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct sff8038i_t {
|
||||
uint8_t command;
|
||||
uint8_t status;
|
||||
uint8_t ptr0;
|
||||
|
||||
@@ -87,7 +87,7 @@ enum {
|
||||
#define HDD_MAX_ZONES 16
|
||||
#define HDD_MAX_CACHE_SEG 16
|
||||
|
||||
typedef struct {
|
||||
typedef struct hdd_preset_t {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
uint32_t zones;
|
||||
@@ -101,7 +101,7 @@ typedef struct {
|
||||
double track_seek_ms;
|
||||
} hdd_preset_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct hdd_cache_seg_t {
|
||||
uint32_t id;
|
||||
uint32_t lba_addr;
|
||||
uint32_t ra_addr;
|
||||
@@ -110,7 +110,7 @@ typedef struct {
|
||||
uint8_t valid;
|
||||
} hdd_cache_seg_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct hdd_cache_t {
|
||||
// Read cache
|
||||
hdd_cache_seg_t segments[HDD_MAX_CACHE_SEG];
|
||||
uint32_t num_segments;
|
||||
@@ -126,7 +126,7 @@ typedef struct {
|
||||
uint64_t write_start_time;
|
||||
} hdd_cache_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct hdd_zone_t {
|
||||
uint32_t cylinders;
|
||||
uint32_t sectors_per_track;
|
||||
double sector_time_usec;
|
||||
@@ -136,7 +136,7 @@ typedef struct {
|
||||
} hdd_zone_t;
|
||||
|
||||
/* Define the virtual Hard Disk. */
|
||||
typedef struct {
|
||||
typedef struct hard_disk_t {
|
||||
uint8_t id;
|
||||
union {
|
||||
uint8_t channel; /* Needed for Settings to reduce the number of if's */
|
||||
|
||||
@@ -31,25 +31,25 @@ enum {
|
||||
ISAPNP_CARD_NO_KEY = 3 /* cheat code for Crystal CS423x */
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct isapnp_device_config_t {
|
||||
uint8_t activate;
|
||||
struct {
|
||||
struct pnp_mem_t {
|
||||
uint32_t base : 24;
|
||||
uint32_t size : 24;
|
||||
} mem[4];
|
||||
struct {
|
||||
struct pnp_mem32_t {
|
||||
uint32_t base;
|
||||
uint32_t size;
|
||||
} mem32[4];
|
||||
struct {
|
||||
struct pnp_io_t {
|
||||
uint16_t base;
|
||||
} io[8];
|
||||
struct {
|
||||
struct pnp_irq_t {
|
||||
uint8_t irq : 4;
|
||||
uint8_t level : 1;
|
||||
uint8_t type : 1;
|
||||
} irq[2];
|
||||
struct {
|
||||
struct pnp_dma_t {
|
||||
uint8_t dma : 3;
|
||||
} dma[2];
|
||||
} isapnp_device_config_t;
|
||||
|
||||
@@ -39,7 +39,7 @@ enum {
|
||||
};
|
||||
|
||||
/* Used by the AT / PS/2 keyboard controller, common device, keyboard, and mouse. */
|
||||
typedef struct {
|
||||
typedef struct kbc_at_port_t {
|
||||
uint8_t wantcmd;
|
||||
uint8_t dat;
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef struct {
|
||||
} kbc_at_port_t;
|
||||
|
||||
/* Used by the AT / PS/2 common device, keyboard, and mouse. */
|
||||
typedef struct {
|
||||
typedef struct atkbc_dev_t {
|
||||
const char *name; /* name of this device */
|
||||
|
||||
uint8_t type;
|
||||
@@ -88,7 +88,7 @@ typedef struct {
|
||||
kbc_at_port_t *port;
|
||||
} atkbc_dev_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct scancode {
|
||||
const uint8_t mk[4];
|
||||
const uint8_t brk[4];
|
||||
} scancode;
|
||||
@@ -228,11 +228,13 @@ extern const device_t keyboard_xt_olivetti_device;
|
||||
extern const device_t keyboard_xt_zenith_device;
|
||||
extern const device_t keyboard_xtclone_device;
|
||||
extern const device_t keyboard_at_device;
|
||||
extern const device_t keyboard_at_siemens_device;
|
||||
extern const device_t keyboard_at_ami_device;
|
||||
extern const device_t keyboard_at_tg_ami_device;
|
||||
extern const device_t keyboard_at_toshiba_device;
|
||||
extern const device_t keyboard_at_olivetti_device;
|
||||
extern const device_t keyboard_at_ncr_device;
|
||||
extern const device_t keyboard_at_compaq_device;
|
||||
extern const device_t keyboard_ps2_device;
|
||||
extern const device_t keyboard_ps2_ps1_device;
|
||||
extern const device_t keyboard_ps2_ps1_pci_device;
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
#define LPT6_IRQ 5
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct lpt_device_t {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
|
||||
|
||||
@@ -30,14 +30,16 @@
|
||||
#define MACHINE_BUS_CARTRIDGE 0x00000004 /* sys has two cartridge bays */
|
||||
#define MACHINE_BUS_ISA16 0x00000008 /* sys has ISA16 bus - PC/AT architecture */
|
||||
#define MACHINE_BUS_CBUS 0x00000010 /* sys has C-BUS bus */
|
||||
#define MACHINE_BUS_PS2 0x00000020 /* system has PS/2 keyboard and mouse ports */
|
||||
#define MACHINE_BUS_EISA 0x00000040 /* sys has EISA bus */
|
||||
#define MACHINE_BUS_VLB 0x00000080 /* sys has VL bus */
|
||||
#define MACHINE_BUS_MCA 0x00000100 /* sys has MCA bus */
|
||||
#define MACHINE_BUS_PCI 0x00000200 /* sys has PCI bus */
|
||||
#define MACHINE_BUS_PCMCIA 0x00000400 /* sys has PCMCIA bus */
|
||||
#define MACHINE_BUS_AGP 0x00000800 /* sys has AGP bus */
|
||||
#define MACHINE_BUS_AC97 0x00001000 /* sys has AC97 bus (ACR/AMR/CNR slot) */
|
||||
#define MACHINE_BUS_PS2_LATCH 0x00000020 /* system has PS/2 keyboard controller IRQ latch */
|
||||
#define MACHINE_BUS_PS2_PORTS 0x00000040 /* system has PS/2 keyboard and mouse ports */
|
||||
#define MACHINE_BUS_PS2 (MACHINE_BUS_PS2_LATCH | MACHINE_BUS_PS2_PORTS)
|
||||
#define MACHINE_BUS_EISA 0x00000080 /* sys has EISA bus */
|
||||
#define MACHINE_BUS_VLB 0x00000100 /* sys has VL bus */
|
||||
#define MACHINE_BUS_MCA 0x00000200 /* sys has MCA bus */
|
||||
#define MACHINE_BUS_PCI 0x00000400 /* sys has PCI bus */
|
||||
#define MACHINE_BUS_PCMCIA 0x00000800 /* sys has PCMCIA bus */
|
||||
#define MACHINE_BUS_AGP 0x00001000 /* sys has AGP bus */
|
||||
#define MACHINE_BUS_AC97 0x00002000 /* sys has AC97 bus (ACR/AMR/CNR slot) */
|
||||
/* Aliases. */
|
||||
#define MACHINE_CASSETTE (MACHINE_BUS_CASSETTE) /* sys has cassette port */
|
||||
#define MACHINE_CARTRIDGE (MACHINE_BUS_CARTRIDGE) /* sys has two cartridge bays */
|
||||
@@ -98,19 +100,20 @@
|
||||
#define MACHINE_AV (MACHINE_VIDEO | MACHINE_SOUND) /* sys has video and sound */
|
||||
#define MACHINE_AG (MACHINE_SOUND | MACHINE_GAMEPORT) /* sys has sound and game port */
|
||||
/* Feature flags for internal storage controllers. */
|
||||
#define MACHINE_HDC 0x03FE0000 /* sys has int HDC */
|
||||
#define MACHINE_MFM 0x00020000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x00040000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x00080000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x00100000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x00200000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x00400000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x00800000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI_PRI 0x01000000 /* sys has int pri SCSI */
|
||||
#define MACHINE_SCSI_SEC 0x02000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB_PRI 0x04000000 /* sys has int pri USB */
|
||||
#define MACHINE_USB_SEC 0x08000000 /* sys has int sec USB */
|
||||
#define MACHINE_COREBOOT 0x10000000 /* sys has coreboot BIOS */
|
||||
#define MACHINE_HDC 0x03FE0000 /* sys has int HDC */
|
||||
#define MACHINE_MFM 0x00020000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x00040000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x00080000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x00100000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x00200000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x00400000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x00800000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI_PRI 0x01000000 /* sys has int pri SCSI */
|
||||
#define MACHINE_SCSI_SEC 0x02000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB_PRI 0x04000000 /* sys has int pri USB */
|
||||
#define MACHINE_USB_SEC 0x08000000 /* sys has int sec USB */
|
||||
#define MACHINE_COREBOOT 0x10000000 /* sys has coreboot BIOS */
|
||||
#define MACHINE_SOFTFLOAT_ONLY 0x20000000 /* sys requires softfloat FPU */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_IDE (MACHINE_IDE_PRI) /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
|
||||
@@ -541,9 +544,8 @@ extern int machine_at_cmdpc_init(const machine_t *);
|
||||
extern int machine_at_portableii_init(const machine_t *);
|
||||
extern int machine_at_portableiii_init(const machine_t *);
|
||||
extern int machine_at_portableiii386_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(USE_DESKPRO386)
|
||||
extern int machine_at_deskpro386_init(const machine_t *);
|
||||
#endif
|
||||
extern int machine_at_deskpro386_01_1988_init(const machine_t *);
|
||||
|
||||
/* m_at_socket4.c */
|
||||
extern void machine_at_premiere_common_init(const machine_t *, int);
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#ifndef EMU_MACHINE_STATUS_H
|
||||
#define EMU_MACHINE_STATUS_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct dev_status_empty_active_t {
|
||||
atomic_bool_t empty;
|
||||
atomic_bool_t active;
|
||||
} dev_status_empty_active_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct dev_status_active_t {
|
||||
atomic_bool_t active;
|
||||
} dev_status_active_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct dev_status_empty_t {
|
||||
atomic_bool_t empty;
|
||||
} dev_status_empty_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct machine_status_t {
|
||||
dev_status_empty_active_t fdd[FDD_NUM];
|
||||
dev_status_empty_active_t cdrom[CDROM_NUM];
|
||||
dev_status_empty_active_t zip[ZIP_NUM];
|
||||
|
||||
@@ -158,20 +158,21 @@
|
||||
#define mem_set_access_smram_bus(smm, base, size, is_smram) \
|
||||
mem_set_access((smm ? ACCESS_BUS_SMM : ACCESS_BUS), 1, base, size, is_smram)
|
||||
|
||||
typedef struct {
|
||||
typedef struct state_t {
|
||||
uint16_t x : 5;
|
||||
uint16_t w : 5;
|
||||
uint16_t r : 5;
|
||||
uint16_t pad : 1;
|
||||
} state_t;
|
||||
|
||||
typedef union {
|
||||
typedef union mem_state_t {
|
||||
uint16_t vals[4];
|
||||
state_t states[4];
|
||||
} mem_state_t;
|
||||
|
||||
typedef struct _mem_mapping_ {
|
||||
struct _mem_mapping_ *prev, *next;
|
||||
struct _mem_mapping_ *prev;
|
||||
struct _mem_mapping_ *next;
|
||||
|
||||
int enable;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#define MO_TIME 10.0
|
||||
|
||||
typedef struct {
|
||||
typedef struct mo_type_t {
|
||||
uint32_t sectors;
|
||||
uint16_t bytes_per_sector;
|
||||
} mo_type_t;
|
||||
@@ -48,8 +48,7 @@ static const mo_type_t mo_types[KNOWN_MO_TYPES] = {
|
||||
{ 637041, 1024},
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct mo_drive_type_t {
|
||||
const char vendor[9];
|
||||
const char model[16];
|
||||
const char revision[5];
|
||||
@@ -89,7 +88,7 @@ enum {
|
||||
MO_BUS_USB = 7
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct mo_drive_t {
|
||||
uint8_t id;
|
||||
|
||||
union {
|
||||
@@ -121,7 +120,7 @@ typedef struct {
|
||||
|
||||
} mo_drive_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct mo_t {
|
||||
mode_sense_pages_t ms_pages_saved;
|
||||
|
||||
mo_drive_t *drv;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#define DP8390_FLAG_CHECK_CR 0x02
|
||||
#define DP8390_FLAG_CLEAR_IRQ 0x04
|
||||
|
||||
typedef struct {
|
||||
typedef struct dp8390_t {
|
||||
/* Page 0 */
|
||||
|
||||
/* Command Register - 00h read/write */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef EMU_NET_EVENT_H
|
||||
#define EMU_NET_EVENT_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct net_evt_t {
|
||||
#ifdef _WIN32
|
||||
HANDLE handle;
|
||||
#else
|
||||
|
||||
@@ -93,7 +93,7 @@ enum {
|
||||
NET_QUEUE_TX_HOST = 2
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct netcard_conf_t {
|
||||
uint16_t device_num;
|
||||
int net_type;
|
||||
char host_dev_name[128];
|
||||
@@ -111,7 +111,7 @@ typedef struct netpkt {
|
||||
int len;
|
||||
} netpkt_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct netqueue_t {
|
||||
netpkt_t packets[NET_QUEUE_LEN];
|
||||
int head;
|
||||
int tail;
|
||||
|
||||
@@ -91,13 +91,30 @@ enum {
|
||||
|
||||
typedef union {
|
||||
uint32_t addr;
|
||||
uint8_t addr_regs[4];
|
||||
uint8_t addr_regs[4];
|
||||
} bar_t;
|
||||
|
||||
|
||||
#define PCI_IO_ON 0x01
|
||||
#define PCI_IO_DEV0 0x02
|
||||
|
||||
|
||||
extern int pci_burst_time;
|
||||
extern int agp_burst_time;
|
||||
extern int pci_nonburst_time;
|
||||
extern int agp_nonburst_time;
|
||||
extern int pci_take_over_io;
|
||||
|
||||
extern uint32_t pci_base;
|
||||
extern uint32_t pci_size;
|
||||
|
||||
|
||||
extern void pci_type2_write(uint16_t port, uint8_t val, void *priv);
|
||||
extern void pci_type2_writew(uint16_t port, uint16_t val, void *priv);
|
||||
extern void pci_type2_writel(uint16_t port, uint32_t val, void *priv);
|
||||
extern uint8_t pci_type2_read(uint16_t port, void *priv);
|
||||
extern uint16_t pci_type2_readw(uint16_t port, void *priv);
|
||||
extern uint32_t pci_type2_readl(uint16_t port, void *priv);
|
||||
|
||||
extern void pci_set_irq_routing(int pci_int, int irq);
|
||||
extern void pci_set_irq_level(int pci_int, int level);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef EMU_PIT_H
|
||||
#define EMU_PIT_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct ctr_t {
|
||||
uint8_t m;
|
||||
uint8_t ctrl;
|
||||
uint8_t read_status;
|
||||
@@ -44,13 +44,13 @@ typedef struct {
|
||||
int do_read_status;
|
||||
|
||||
union {
|
||||
int count;
|
||||
int32_t count;
|
||||
struct {
|
||||
int units : 4;
|
||||
int tens : 4;
|
||||
int hundreds : 4;
|
||||
int thousands : 4;
|
||||
int myriads : 4;
|
||||
int32_t units : 4;
|
||||
int32_t tens : 4;
|
||||
int32_t hundreds : 4;
|
||||
int32_t thousands : 4;
|
||||
int32_t myriads : 4;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ enum {
|
||||
PIT_8254_FAST = 3
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct pit_intf_t {
|
||||
uint8_t (*read)(uint16_t addr, void *priv);
|
||||
void (*write)(uint16_t addr, uint8_t val, void *priv);
|
||||
/* Gets a counter's count. */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef EMU_PIT_FAST_H
|
||||
#define EMU_PIT_FAST_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct ctrf_t {
|
||||
uint8_t m;
|
||||
uint8_t ctrl;
|
||||
uint8_t read_status;
|
||||
@@ -45,13 +45,13 @@ typedef struct {
|
||||
int rereadlatch;
|
||||
|
||||
union {
|
||||
int count;
|
||||
int32_t count;
|
||||
struct {
|
||||
int units : 4;
|
||||
int tens : 4;
|
||||
int hundreds : 4;
|
||||
int thousands : 4;
|
||||
int myriads : 4;
|
||||
int32_t units : 4;
|
||||
int32_t tens : 4;
|
||||
int32_t hundreds : 4;
|
||||
int32_t thousands : 4;
|
||||
int32_t myriads : 4;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct {
|
||||
void (*out_func)(int new_out, int old_out);
|
||||
} ctrf_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct pitf_t {
|
||||
int flags;
|
||||
ctrf_t counters[3];
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ struct dirent {
|
||||
};
|
||||
# define d_namlen d_reclen
|
||||
|
||||
typedef struct {
|
||||
typedef struct DIR_t {
|
||||
short flags; /* internal flags */
|
||||
short offset; /* offset of entry into dir */
|
||||
long handle; /* open handle to Win32 system */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef PLAT_DYNLD_H
|
||||
#define PLAT_DYNLD_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct dllimp_t {
|
||||
const char *name;
|
||||
void *func;
|
||||
} dllimp_t;
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#define EMU_PORT_6X_H
|
||||
|
||||
#ifdef _TIMER_H_
|
||||
typedef struct
|
||||
{
|
||||
typedef struct port_6x_t {
|
||||
uint8_t refresh;
|
||||
uint8_t flags;
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#define EMU_PORT_92_H
|
||||
|
||||
#ifdef _TIMER_H_
|
||||
typedef struct
|
||||
{
|
||||
typedef struct port_92_t {
|
||||
uint8_t reg;
|
||||
uint8_t flags;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define bios_load_interleavedr(a, b, c, d, e) bios_load(a, b, c, d, e, FLAG_INT | FLAG_REP)
|
||||
#define bios_load_aux_interleaved(a, b, c, d, e) bios_load(a, b, c, d, e, FLAG_INT | FLAG_AUX)
|
||||
|
||||
typedef struct {
|
||||
typedef struct rom_t {
|
||||
uint8_t *rom;
|
||||
int sz;
|
||||
uint32_t mask;
|
||||
|
||||
46
src/include/86box/row.h
Normal file
46
src/include/86box/row.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Definitions for the SMRAM interface.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_ROW_H
|
||||
# define EMU_ROW_H
|
||||
|
||||
typedef struct _row_
|
||||
{
|
||||
struct _smram_ *prev;
|
||||
struct _smram_ *next;
|
||||
|
||||
uint8_t *buf;
|
||||
|
||||
mem_mapping_t mapping;
|
||||
|
||||
uint32_t host_base;
|
||||
uint32_t host_size;
|
||||
uint32_t ram_base;
|
||||
uint32_t ram_size;
|
||||
uint32_t ram_mask;
|
||||
uint32_t boundary;
|
||||
} row_t;
|
||||
|
||||
|
||||
extern void row_disable(uint8_t row_id);
|
||||
extern void row_set_boundary(uint8_t row_id, uint32_t boundary);
|
||||
|
||||
|
||||
extern device_t row_device;
|
||||
|
||||
|
||||
#endif /*EMU_ROW_H*/
|
||||
@@ -22,7 +22,7 @@
|
||||
#define CDROM_TIME 10.0
|
||||
|
||||
#ifdef SCSI_DEVICE_H
|
||||
typedef struct {
|
||||
typedef struct scsi_cdrom_t {
|
||||
/* Common block. */
|
||||
mode_sense_pages_t ms_pages_saved;
|
||||
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
#define MODE_SELECT_PHASE_PAGE_HEADER 3
|
||||
#define MODE_SELECT_PHASE_PAGE 4
|
||||
|
||||
typedef struct {
|
||||
typedef struct mode_sense_pages_t {
|
||||
uint8_t pages[0x40][0x40];
|
||||
} mode_sense_pages_t;
|
||||
|
||||
@@ -384,7 +384,7 @@ typedef struct scsi_common_s {
|
||||
double callback;
|
||||
} scsi_common_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct scsi_device_t {
|
||||
int32_t buffer_length;
|
||||
|
||||
uint8_t status;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef SCSI_DISK_H
|
||||
#define SCSI_DISK_H
|
||||
|
||||
typedef struct {
|
||||
typedef struct scsi_disk_t {
|
||||
mode_sense_pages_t ms_pages_saved;
|
||||
|
||||
hard_disk_t *drv;
|
||||
|
||||
@@ -203,13 +203,13 @@ typedef struct addr24_s {
|
||||
} addr24_t;
|
||||
|
||||
/* Structure for the INQUIRE_SETUP_INFORMATION reply. */
|
||||
typedef struct {
|
||||
typedef struct ReplyInquireSetupInformationSynchronousValue_t {
|
||||
uint8_t uOffset : 4;
|
||||
uint8_t uTransferPeriod : 3;
|
||||
uint8_t fSynchronous : 1;
|
||||
} ReplyInquireSetupInformationSynchronousValue;
|
||||
|
||||
typedef struct {
|
||||
typedef struct ReplyInquireSetupInformation_t {
|
||||
uint8_t fSynchronousInitiationEnabled : 1;
|
||||
uint8_t fParityCheckingEnabled : 1;
|
||||
uint8_t uReserved1 : 6;
|
||||
@@ -223,24 +223,24 @@ typedef struct {
|
||||
uint8_t VendorSpecificData[28];
|
||||
} ReplyInquireSetupInformation;
|
||||
|
||||
typedef struct {
|
||||
typedef struct MailboxInit_t {
|
||||
uint8_t Count;
|
||||
addr24_t Address;
|
||||
} MailboxInit_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct Mailbox_t {
|
||||
uint8_t CmdStatus;
|
||||
addr24_t CCBPointer;
|
||||
} Mailbox_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct Mailbox32_t {
|
||||
uint32_t CCBPointer;
|
||||
union {
|
||||
struct {
|
||||
struct out_t {
|
||||
uint8_t Reserved[3];
|
||||
uint8_t ActionCode;
|
||||
} out;
|
||||
struct {
|
||||
struct in_t {
|
||||
uint8_t HostStatus;
|
||||
uint8_t TargetStatus;
|
||||
uint8_t Reserved;
|
||||
@@ -255,7 +255,7 @@ typedef struct {
|
||||
Bytes 16 and 17 Reserved (must be 0)
|
||||
Bytes 18 through 18+n-1, where n=size of CDB Command Descriptor Block */
|
||||
|
||||
typedef struct {
|
||||
typedef struct CCB32_t {
|
||||
uint8_t Opcode;
|
||||
uint8_t Reserved1 : 3,
|
||||
ControlByte : 2,
|
||||
@@ -277,7 +277,7 @@ typedef struct {
|
||||
uint32_t SensePointer;
|
||||
} CCB32;
|
||||
|
||||
typedef struct {
|
||||
typedef struct CCB_t {
|
||||
uint8_t Opcode;
|
||||
uint8_t Lun : 3;
|
||||
uint8_t ControlByte : 2;
|
||||
@@ -294,7 +294,7 @@ typedef struct {
|
||||
uint8_t Cdb[12];
|
||||
} CCB;
|
||||
|
||||
typedef struct {
|
||||
typedef struct CCBC_t {
|
||||
uint8_t Opcode;
|
||||
uint8_t Pad1 : 3,
|
||||
ControlByte : 2,
|
||||
@@ -309,7 +309,7 @@ typedef struct {
|
||||
uint8_t Cdb[12];
|
||||
} CCBC;
|
||||
|
||||
typedef union {
|
||||
typedef union CCBU_t {
|
||||
CCB32 new;
|
||||
CCB old;
|
||||
CCBC common;
|
||||
@@ -320,26 +320,25 @@ typedef struct {
|
||||
uint8_t *RequestSenseBuffer;
|
||||
uint32_t CCBPointer;
|
||||
int Is24bit;
|
||||
uint8_t TargetID,
|
||||
LUN,
|
||||
HostStatus,
|
||||
TargetStatus,
|
||||
MailboxCompletionCode;
|
||||
uint8_t TargetID;
|
||||
uint8_t LUN;
|
||||
uint8_t HostStatus;
|
||||
uint8_t TargetStatus;
|
||||
uint8_t MailboxCompletionCode;
|
||||
} Req_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct BIOSCMD_t {
|
||||
uint8_t command;
|
||||
uint8_t lun : 3,
|
||||
reserved : 2,
|
||||
id : 3;
|
||||
union {
|
||||
struct {
|
||||
struct chs_t {
|
||||
uint16_t cyl;
|
||||
uint8_t head;
|
||||
uint8_t sec;
|
||||
} chs;
|
||||
struct {
|
||||
struct lba_t {
|
||||
uint8_t lba0; /* MSB */
|
||||
uint8_t lba1;
|
||||
uint8_t lba2;
|
||||
@@ -350,12 +349,12 @@ typedef struct
|
||||
addr24_t dma_address;
|
||||
} BIOSCMD;
|
||||
|
||||
typedef struct {
|
||||
typedef struct SGE32_t {
|
||||
uint32_t Segment;
|
||||
uint32_t SegmentPointer;
|
||||
} SGE32;
|
||||
|
||||
typedef struct {
|
||||
typedef struct SGE_t {
|
||||
addr24_t Segment;
|
||||
addr24_t SegmentPointer;
|
||||
} SGE;
|
||||
@@ -368,92 +367,111 @@ typedef struct {
|
||||
#define X54X_MBX_24BIT 16
|
||||
#define X54X_ISAPNP 32
|
||||
|
||||
typedef struct {
|
||||
typedef struct x54x_t {
|
||||
/* 32 bytes */
|
||||
char vendor[16], /* name of device vendor */
|
||||
name[16]; /* name of device */
|
||||
char vendor[16]; /* name of device vendor */
|
||||
char name[16]; /* name of device */
|
||||
|
||||
/* 24 bytes */
|
||||
int8_t type, /* type of device */
|
||||
IrqEnabled, Irq,
|
||||
DmaChannel,
|
||||
HostID;
|
||||
int8_t type; /* type of device */
|
||||
int8_t IrqEnabled;
|
||||
int8_t Irq;
|
||||
int8_t DmaChannel;
|
||||
int8_t HostID;
|
||||
|
||||
uint8_t callback_phase : 4,
|
||||
callback_sub_phase : 4,
|
||||
scsi_cmd_phase, bus,
|
||||
sync,
|
||||
parity, shram_mode,
|
||||
Geometry, Control,
|
||||
Command, CmdParam,
|
||||
BusOnTime, BusOffTime,
|
||||
ATBusSpeed, setup_info_len,
|
||||
max_id, pci_slot,
|
||||
temp_cdb[12];
|
||||
uint8_t callback_phase : 4;
|
||||
uint8_t callback_sub_phase : 4;
|
||||
uint8_t scsi_cmd_phase;
|
||||
uint8_t bus;
|
||||
uint8_t sync;
|
||||
uint8_t parity;
|
||||
uint8_t shram_mode;
|
||||
uint8_t Geometry;
|
||||
uint8_t Control;
|
||||
uint8_t Command;
|
||||
uint8_t CmdParam;
|
||||
uint8_t BusOnTime;
|
||||
uint8_t BusOffTime;
|
||||
uint8_t ATBusSpeed;
|
||||
uint8_t setup_info_len;
|
||||
uint8_t max_id;
|
||||
uint8_t pci_slot;
|
||||
uint8_t temp_cdb[12];
|
||||
|
||||
volatile uint8_t /* for multi-threading, keep */
|
||||
Status,
|
||||
Interrupt, /* these volatile */
|
||||
MailboxIsBIOS, ToRaise,
|
||||
flags;
|
||||
/* for multi-threading, keep these volatile */
|
||||
volatile uint8_t Status;
|
||||
volatile uint8_t Interrupt;
|
||||
volatile uint8_t MailboxIsBIOS;
|
||||
volatile uint8_t ToRaise;
|
||||
volatile uint8_t flags;
|
||||
|
||||
/* 65928 bytes */
|
||||
uint8_t pos_regs[8], /* MCA */
|
||||
CmdBuf[128],
|
||||
DataBuf[65536],
|
||||
shadow_ram[128],
|
||||
dma_buffer[128],
|
||||
cmd_33_buf[4096];
|
||||
uint8_t pos_regs[8]; /* MCA */
|
||||
uint8_t CmdBuf[128];
|
||||
uint8_t DataBuf[65536];
|
||||
uint8_t shadow_ram[128];
|
||||
uint8_t dma_buffer[128];
|
||||
uint8_t cmd_33_buf[4096];
|
||||
|
||||
/* 16 bytes */
|
||||
char *fw_rev; /* The 4 bytes of the revision command information + 2 extra bytes for BusLogic */
|
||||
|
||||
uint8_t *rom1, /* main BIOS image */
|
||||
*rom2, /* SCSI-Select image */
|
||||
*nvr; /* EEPROM buffer */
|
||||
uint8_t *rom1; /* main BIOS image */
|
||||
uint8_t *rom2; /* SCSI-Select image */
|
||||
uint8_t *nvr; /* EEPROM buffer */
|
||||
|
||||
/* 6 words = 12 bytes */
|
||||
uint16_t DataReply, DataReplyLeft,
|
||||
rom_ioaddr, /* offset in BIOS of I/O addr */
|
||||
rom_shram, /* index to shared RAM */
|
||||
rom_shramsz, /* size of shared RAM */
|
||||
rom_fwhigh, /* offset in BIOS of ver ID */
|
||||
pnp_len, /* length of the PnP ROM */
|
||||
pnp_offset, /* offset in the microcode ROM of the PnP ROM */
|
||||
cmd_33_len, /* length of the SCSISelect code decompressor program */
|
||||
cmd_33_offset; /* offset in the microcode ROM of the SCSISelect code decompressor program */
|
||||
uint16_t DataReply;
|
||||
uint16_t DataReplyLeft;
|
||||
uint16_t rom_ioaddr; /* offset in BIOS of I/O addr */
|
||||
uint16_t rom_shram; /* index to shared RAM */
|
||||
uint16_t rom_shramsz; /* size of shared RAM */
|
||||
uint16_t rom_fwhigh; /* offset in BIOS of ver ID */
|
||||
uint16_t pnp_len; /* length of the PnP ROM */
|
||||
uint16_t pnp_offset; /* offset in the microcode ROM of the PnP ROM */
|
||||
uint16_t cmd_33_len; /* length of the SCSISelect code decompressor program */
|
||||
uint16_t cmd_33_offset; /* offset in the microcode ROM of the SCSISelect code decompressor program */
|
||||
|
||||
/* 16 + 20 + 52 = 88 bytes */
|
||||
volatile int
|
||||
MailboxOutInterrupts,
|
||||
PendingInterrupt, Lock,
|
||||
target_data_len, pad0;
|
||||
volatile int MailboxOutInterrupts;
|
||||
volatile int PendingInterrupt;
|
||||
volatile int Lock;
|
||||
volatile int target_data_len;
|
||||
volatile int pad0;
|
||||
|
||||
uint32_t Base, fdc_address, rom_addr, /* address of BIOS ROM */
|
||||
CmdParamLeft, Outgoing,
|
||||
transfer_size;
|
||||
uint32_t Base;
|
||||
uint32_t fdc_address;
|
||||
uint32_t rom_addr; /* address of BIOS ROM */
|
||||
uint32_t CmdParamLeft;
|
||||
uint32_t Outgoing;
|
||||
uint32_t transfer_size;
|
||||
|
||||
volatile uint32_t
|
||||
MailboxInit,
|
||||
MailboxCount,
|
||||
MailboxOutAddr, MailboxOutPosCur,
|
||||
MailboxInAddr, MailboxInPosCur,
|
||||
MailboxReq,
|
||||
BIOSMailboxInit, BIOSMailboxCount,
|
||||
BIOSMailboxOutAddr, BIOSMailboxOutPosCur,
|
||||
BIOSMailboxReq,
|
||||
Residue, card_bus; /* Basically a copy of device flags */
|
||||
volatile uint32_t MailboxInit;
|
||||
volatile uint32_t MailboxCount;
|
||||
volatile uint32_t MailboxOutAddr;
|
||||
volatile uint32_t MailboxOutPosCur;
|
||||
volatile uint32_t MailboxInAddr;
|
||||
volatile uint32_t MailboxInPosCur;
|
||||
volatile uint32_t MailboxReq;
|
||||
volatile uint32_t BIOSMailboxInit;
|
||||
volatile uint32_t BIOSMailboxCount;
|
||||
volatile uint32_t BIOSMailboxOutAddr;
|
||||
volatile uint32_t BIOSMailboxOutPosCur;
|
||||
volatile uint32_t BIOSMailboxReq;
|
||||
volatile uint32_t Residue;
|
||||
volatile uint32_t card_bus; /* Basically a copy of device flags */
|
||||
|
||||
/* 8 bytes */
|
||||
uint64_t temp_period;
|
||||
|
||||
/* 16 bytes */
|
||||
double media_period, ha_bps; /* bytes per second */
|
||||
double media_period;
|
||||
double ha_bps; /* bytes per second */
|
||||
|
||||
/* 8 bytes */
|
||||
char *bios_path, /* path to BIOS image file */
|
||||
*mcode_path, /* path to microcode image file, needed by the AHA-1542CP */
|
||||
*nvr_path; /* path to NVR image file */
|
||||
char *bios_path; /* path to BIOS image file */
|
||||
char *mcode_path; /* path to microcode image file, needed by the AHA-1542CP */
|
||||
char *nvr_path; /* path to NVR image file */
|
||||
|
||||
/* 56 bytes */
|
||||
/* Pointer to a structure of vendor-specific data that only the vendor-specific code can understand */
|
||||
@@ -486,12 +504,13 @@ typedef struct {
|
||||
/* Pointer to a function that resets vendor-specific data */
|
||||
void (*ven_reset)(void *p);
|
||||
|
||||
rom_t bios, /* BIOS memory descriptor */
|
||||
uppersck; /* BIOS memory descriptor */
|
||||
rom_t bios; /* BIOS memory descriptor */
|
||||
rom_t uppersck; /* BIOS memory descriptor */
|
||||
|
||||
mem_mapping_t mmio_mapping;
|
||||
|
||||
pc_timer_t timer, ResetCB;
|
||||
pc_timer_t timer;
|
||||
pc_timer_t ResetCB;
|
||||
|
||||
Req_t Req;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ typedef struct serial_device_s {
|
||||
serial_t *serial;
|
||||
} serial_device_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct serial_port_s {
|
||||
uint8_t enabled;
|
||||
} serial_port_t;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ enum {
|
||||
SMBUS_VIA = 1
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct smbus_piix4_t {
|
||||
uint32_t local;
|
||||
uint16_t io_base;
|
||||
int clock;
|
||||
@@ -47,7 +47,7 @@ typedef struct {
|
||||
void *i2c;
|
||||
} smbus_piix4_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct smbus_ali7101_t {
|
||||
uint32_t local;
|
||||
uint16_t io_base;
|
||||
uint8_t stat;
|
||||
|
||||
@@ -103,21 +103,21 @@ enum {
|
||||
AC97_CODEC_AK4540 = 7
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct ac97_vendor_reg_t {
|
||||
const uint16_t index;
|
||||
const uint16_t value;
|
||||
const uint16_t write_mask;
|
||||
} ac97_vendor_reg_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t vendor_id;
|
||||
uint32_t min_rate;
|
||||
uint32_t max_rate;
|
||||
uint32_t misc_flags;
|
||||
uint16_t reset_flags;
|
||||
uint16_t extid_flags;
|
||||
uint16_t powerdown_mask;
|
||||
uint16_t regs[64];
|
||||
typedef struct ac97_codec_t {
|
||||
uint32_t vendor_id;
|
||||
uint32_t min_rate;
|
||||
uint32_t max_rate;
|
||||
uint32_t misc_flags;
|
||||
uint16_t reset_flags;
|
||||
uint16_t extid_flags;
|
||||
uint16_t powerdown_mask;
|
||||
uint16_t regs[64];
|
||||
uint8_t codec_id;
|
||||
uint8_t vendor_reg_page_max;
|
||||
const ac97_vendor_reg_t *vendor_regs;
|
||||
|
||||
@@ -30,7 +30,7 @@ enum {
|
||||
AD1848_TYPE_CS4236 = 4
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct ad1848_t {
|
||||
uint8_t type;
|
||||
uint8_t index;
|
||||
uint8_t xindex;
|
||||
|
||||
@@ -31,7 +31,7 @@ enum fm_driver {
|
||||
FM_DRV_MAX = 2
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct fm_drv_t {
|
||||
uint8_t (*read)(uint16_t port, void *priv);
|
||||
void (*write)(uint16_t port, uint8_t val, void *priv);
|
||||
int32_t *(*update)(void *priv);
|
||||
|
||||
@@ -56,16 +56,14 @@ typedef struct usb_params_t
|
||||
void* parent_priv;
|
||||
} usb_params_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
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
|
||||
{
|
||||
typedef struct usb_t {
|
||||
uint8_t uhci_io[32];
|
||||
ohci_mmio_t ohci_mmio[1024];
|
||||
uint16_t uhci_io_base;
|
||||
@@ -88,14 +86,12 @@ typedef struct usb_t
|
||||
#pragma pack(push, 1)
|
||||
|
||||
/* Base USB descriptor struct. */
|
||||
typedef struct usb_desc_base_t
|
||||
{
|
||||
typedef struct usb_desc_base_t {
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
} usb_desc_base_t;
|
||||
|
||||
enum usb_desc_setup_req_types
|
||||
{
|
||||
enum usb_desc_setup_req_types {
|
||||
USB_SETUP_TYPE_DEVICE = 0x0,
|
||||
USB_SETUP_TYPE_INTERFACE = 0x1,
|
||||
USB_SETUP_TYPE_ENDPOING = 0x2,
|
||||
@@ -106,8 +102,7 @@ enum usb_desc_setup_req_types
|
||||
|
||||
#define USB_SETUP_DEV_TO_HOST 0x80
|
||||
|
||||
typedef struct usb_desc_setup_t
|
||||
{
|
||||
typedef struct usb_desc_setup_t {
|
||||
uint8_t bmRequestType;
|
||||
uint8_t bRequest;
|
||||
uint16_t wValue;
|
||||
@@ -115,8 +110,7 @@ typedef struct usb_desc_setup_t
|
||||
uint16_t wLength;
|
||||
} usb_desc_setup_t;
|
||||
|
||||
typedef struct usb_desc_endpoint_t
|
||||
{
|
||||
typedef struct usb_desc_endpoint_t {
|
||||
usb_desc_base_t base;
|
||||
uint8_t bEndpointAddress;
|
||||
uint8_t bmAttributes;
|
||||
@@ -124,8 +118,7 @@ typedef struct usb_desc_endpoint_t
|
||||
uint8_t bInterval;
|
||||
} usb_desc_endpoint_t;
|
||||
|
||||
typedef struct usb_desc_hid_t
|
||||
{
|
||||
typedef struct usb_desc_hid_t {
|
||||
usb_desc_base_t base;
|
||||
|
||||
uint16_t bcdHID;
|
||||
@@ -135,8 +128,7 @@ typedef struct usb_desc_hid_t
|
||||
uint16_t wDescriptorLength;
|
||||
} usb_desc_hid_t;
|
||||
|
||||
typedef struct usb_desc_interface_t
|
||||
{
|
||||
typedef struct usb_desc_interface_t {
|
||||
usb_desc_base_t base;
|
||||
|
||||
uint8_t bInterfaceNumber;
|
||||
@@ -148,14 +140,12 @@ typedef struct usb_desc_interface_t
|
||||
uint8_t iInterface;
|
||||
} usb_desc_interface_t;
|
||||
|
||||
typedef struct usb_desc_string_t
|
||||
{
|
||||
typedef struct usb_desc_string_t {
|
||||
usb_desc_base_t base;
|
||||
uint16_t bString[];
|
||||
} usb_desc_string_t;
|
||||
|
||||
typedef struct usb_desc_conf_t
|
||||
{
|
||||
typedef struct usb_desc_conf_t {
|
||||
usb_desc_base_t base;
|
||||
|
||||
uint16_t wTotalLength;
|
||||
@@ -166,8 +156,7 @@ typedef struct usb_desc_conf_t
|
||||
uint8_t bMaxPower;
|
||||
} usb_desc_conf_t;
|
||||
|
||||
typedef struct usb_desc_device_t
|
||||
{
|
||||
typedef struct usb_desc_device_t {
|
||||
usb_desc_base_t base;
|
||||
|
||||
uint16_t bcdUSB;
|
||||
@@ -187,8 +176,7 @@ typedef struct usb_desc_device_t
|
||||
#pragma pack(pop)
|
||||
|
||||
/* USB endpoint device struct. Incomplete and unused. */
|
||||
typedef struct usb_device_t
|
||||
{
|
||||
typedef struct usb_device_t {
|
||||
usb_desc_device_t device_desc;
|
||||
struct {
|
||||
usb_desc_conf_t conf_desc;
|
||||
|
||||
@@ -24,6 +24,8 @@ typedef struct ibm8514_t {
|
||||
|
||||
int force_old_addr;
|
||||
int type;
|
||||
int local;
|
||||
int bpp;
|
||||
|
||||
uint32_t vram_size;
|
||||
uint32_t vram_mask;
|
||||
@@ -32,6 +34,7 @@ typedef struct ibm8514_t {
|
||||
uint8_t dac_mask, dac_status;
|
||||
uint32_t *map8;
|
||||
int dac_addr, dac_pos, dac_r, dac_g;
|
||||
int internal_pitch;
|
||||
|
||||
struct {
|
||||
uint16_t subsys_cntl;
|
||||
@@ -58,7 +61,7 @@ typedef struct ibm8514_t {
|
||||
uint8_t pix_trans[2];
|
||||
int poly_draw;
|
||||
int ssv_state;
|
||||
int x1, x2, y1, y2;
|
||||
int16_t x1, x2, x3, y1, y2;
|
||||
int sys_cnt, sys_cnt2;
|
||||
int temp_cnt;
|
||||
int16_t cx, cy, oldcy;
|
||||
@@ -80,6 +83,7 @@ typedef struct ibm8514_t {
|
||||
|
||||
uint16_t scratch;
|
||||
int fill_state, xdir, ydir;
|
||||
uint32_t ge_offset;
|
||||
} accel;
|
||||
|
||||
uint16_t test;
|
||||
@@ -90,7 +94,7 @@ typedef struct ibm8514_t {
|
||||
dispon, hdisp_on, linecountff,
|
||||
vc, linepos, oddeven, cursoron, blink, scrollcache,
|
||||
firstline, lastline, firstline_draw, lastline_draw,
|
||||
displine, fullchange, x_add, y_add;
|
||||
displine, fullchange;
|
||||
uint32_t ma, maback;
|
||||
|
||||
uint8_t *vram, *changedvram, linedbl;
|
||||
@@ -103,11 +107,13 @@ typedef struct ibm8514_t {
|
||||
int disp_cntl, interlace;
|
||||
uint8_t subsys_cntl, subsys_stat;
|
||||
|
||||
volatile int force_busy, force_busy2;
|
||||
atomic_int force_busy, force_busy2;
|
||||
|
||||
int blitter_busy;
|
||||
uint64_t blitter_time;
|
||||
uint64_t status_time;
|
||||
int pitch;
|
||||
int ext_pitch;
|
||||
int ext_crt_pitch;
|
||||
} ibm8514_t;
|
||||
#endif /*VIDEO_8514A_H*/
|
||||
|
||||
@@ -43,6 +43,7 @@ typedef struct ati_eeprom_t {
|
||||
} ati_eeprom_t;
|
||||
|
||||
void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type);
|
||||
void ati_eeprom_load_mach8(ati_eeprom_t *eeprom, char *fn);
|
||||
void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat);
|
||||
int ati_eeprom_read(ati_eeprom_t *eeprom);
|
||||
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
# define FLAG_NOSKEW 16
|
||||
# define FLAG_ADDR_BY16 32
|
||||
# define FLAG_RAMDAC_SHIFT 64
|
||||
# define FLAG_128K_MASK 128
|
||||
|
||||
# define FLAG_ATI 128
|
||||
# define FLAG_S3_911_16BIT 256
|
||||
# define FLAG_512K_MASK 512
|
||||
struct monitor_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -36,6 +36,7 @@ typedef struct xga_t {
|
||||
mem_mapping_t linear_mapping;
|
||||
mem_mapping_t video_mapping;
|
||||
rom_t bios_rom;
|
||||
rom_t vga_bios_rom;
|
||||
xga_hwcursor_t hwcursor, hwcursor_latch;
|
||||
PALETTE extpal;
|
||||
|
||||
@@ -57,7 +58,7 @@ typedef struct xga_t {
|
||||
uint8_t clk_sel_1, clk_sel_2;
|
||||
uint8_t hwc_control;
|
||||
uint8_t bus_arb;
|
||||
uint8_t select_pos_isa;
|
||||
uint8_t isa_pos_enable;
|
||||
uint8_t hwcursor_oddeven;
|
||||
uint8_t cfg_reg_instance;
|
||||
uint8_t rowcount;
|
||||
@@ -70,6 +71,8 @@ typedef struct xga_t {
|
||||
uint8_t sprite_data[1024];
|
||||
uint8_t scrollcache;
|
||||
uint8_t direct_color;
|
||||
uint8_t dma_channel;
|
||||
uint8_t instance_isa, instance_num, ext_mem_addr;
|
||||
uint8_t *vram, *changedvram;
|
||||
|
||||
int16_t hwc_pos_x;
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
|
||||
#ifndef VIDEO_XGA_DEVICE_H
|
||||
#define VIDEO_XGA_DEVICE_H
|
||||
extern int xga_has_vga;
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t xga_device;
|
||||
extern const device_t xga_isa_device;
|
||||
extern const device_t inmos_isa_device;
|
||||
#endif
|
||||
#endif /*VIDEO_XGA_DEVICE_H*/
|
||||
|
||||
@@ -60,50 +60,59 @@ enum {
|
||||
#define VIDEO_FLAG_TYPE_CGA 0
|
||||
#define VIDEO_FLAG_TYPE_MDA 1
|
||||
#define VIDEO_FLAG_TYPE_SPECIAL 2
|
||||
#define VIDEO_FLAG_TYPE_NONE 3
|
||||
#define VIDEO_FLAG_TYPE_MASK 3
|
||||
#define VIDEO_FLAG_TYPE_8514 3
|
||||
#define VIDEO_FLAG_TYPE_XGA 4
|
||||
#define VIDEO_FLAG_TYPE_NONE 5
|
||||
#define VIDEO_FLAG_TYPE_MASK 7
|
||||
|
||||
typedef struct {
|
||||
typedef struct video_timings_t {
|
||||
int type;
|
||||
int write_b, write_w, write_l;
|
||||
int read_b, read_w, read_l;
|
||||
int write_b;
|
||||
int write_w;
|
||||
int write_l;
|
||||
int read_b;
|
||||
int read_w;
|
||||
int read_l;
|
||||
} video_timings_t;
|
||||
|
||||
typedef struct {
|
||||
int w, h;
|
||||
typedef struct bitmap_t {
|
||||
int w;
|
||||
int h;
|
||||
uint32_t *dat;
|
||||
uint32_t *line[2112];
|
||||
} bitmap_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t r, g, b;
|
||||
typedef struct rgb_t {
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} rgb_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct dbcs_font_t {
|
||||
uint8_t chr[32];
|
||||
} dbcs_font_t;
|
||||
|
||||
struct blit_data_struct;
|
||||
|
||||
typedef struct monitor_t {
|
||||
char name[512];
|
||||
int mon_xsize;
|
||||
int mon_ysize;
|
||||
int mon_scrnsz_x;
|
||||
int mon_scrnsz_y;
|
||||
int mon_efscrnsz_y;
|
||||
int mon_unscaled_size_x;
|
||||
int mon_unscaled_size_y;
|
||||
int mon_res_x;
|
||||
int mon_res_y;
|
||||
int mon_bpp;
|
||||
bitmap_t *target_buffer;
|
||||
int mon_video_timing_read_b,
|
||||
mon_video_timing_read_w,
|
||||
mon_video_timing_read_l;
|
||||
int mon_video_timing_write_b,
|
||||
mon_video_timing_write_w,
|
||||
mon_video_timing_write_l;
|
||||
char name[512];
|
||||
int mon_xsize;
|
||||
int mon_ysize;
|
||||
int mon_scrnsz_x;
|
||||
int mon_scrnsz_y;
|
||||
int mon_efscrnsz_y;
|
||||
int mon_unscaled_size_x;
|
||||
int mon_unscaled_size_y;
|
||||
int mon_res_x;
|
||||
int mon_res_y;
|
||||
int mon_bpp;
|
||||
bitmap_t *target_buffer;
|
||||
int mon_video_timing_read_b;
|
||||
int mon_video_timing_read_w;
|
||||
int mon_video_timing_read_l;
|
||||
int mon_video_timing_write_b;
|
||||
int mon_video_timing_write_w;
|
||||
int mon_video_timing_write_l;
|
||||
int mon_overscan_x;
|
||||
int mon_overscan_y;
|
||||
int mon_force_resize;
|
||||
@@ -137,10 +146,14 @@ extern int video_fullscreen_scale_maximized;
|
||||
|
||||
typedef rgb_t PALETTE[256];
|
||||
|
||||
// extern int changeframecount;
|
||||
#if 0
|
||||
extern int changeframecount;
|
||||
#endif
|
||||
|
||||
extern volatile int screenshots;
|
||||
// extern bitmap_t *buffer32;
|
||||
#if 0
|
||||
extern bitmap_t *buffer32;
|
||||
#endif
|
||||
#define buffer32 (monitors[monitor_index_global].target_buffer)
|
||||
#define pal_lookup (monitors[monitor_index_global].mon_pal_lookup)
|
||||
#define overscan_x (monitors[monitor_index_global].mon_overscan_x)
|
||||
@@ -163,12 +176,14 @@ extern volatile int screenshots;
|
||||
#define efscrnsz_y (monitors[monitor_index_global].mon_efscrnsz_y)
|
||||
#define unscaled_size_x (monitors[monitor_index_global].mon_unscaled_size_x)
|
||||
#define unscaled_size_y (monitors[monitor_index_global].mon_unscaled_size_y)
|
||||
extern PALETTE cgapal;
|
||||
extern PALETTE cgapal_mono[6];
|
||||
// extern uint32_t pal_lookup[256];
|
||||
extern int video_fullscreen;
|
||||
extern int video_fullscreen_scale;
|
||||
extern int video_fullscreen_first;
|
||||
extern PALETTE cgapal;
|
||||
extern PALETTE cgapal_mono[6];
|
||||
#if 0
|
||||
extern uint32_t pal_lookup[256];
|
||||
#endif
|
||||
extern int video_fullscreen;
|
||||
extern int video_fullscreen_scale;
|
||||
extern int video_fullscreen_first;
|
||||
extern uint8_t fontdat[2048][8];
|
||||
extern uint8_t fontdatm[2048][16];
|
||||
extern uint8_t fontdatw[512][32];
|
||||
@@ -176,23 +191,24 @@ extern uint8_t fontdat8x12[256][16];
|
||||
extern uint8_t fontdat12x18[256][36];
|
||||
extern dbcs_font_t *fontdatksc5601;
|
||||
extern dbcs_font_t *fontdatksc5601_user;
|
||||
extern uint32_t *video_6to8,
|
||||
*video_8togs,
|
||||
*video_8to32,
|
||||
*video_15to32,
|
||||
*video_16to32;
|
||||
extern int enable_overscan;
|
||||
extern int force_43;
|
||||
extern int vid_resize;
|
||||
extern int herc_blend;
|
||||
extern int vid_cga_contrast;
|
||||
extern int video_grayscale;
|
||||
extern int video_graytype;
|
||||
extern uint32_t *video_6to8;
|
||||
extern uint32_t *video_8togs;
|
||||
extern uint32_t *video_8to32;
|
||||
extern uint32_t *video_15to32;
|
||||
extern uint32_t *video_16to32;
|
||||
extern int enable_overscan;
|
||||
extern int force_43;
|
||||
extern int vid_resize;
|
||||
extern int herc_blend;
|
||||
extern int vid_cga_contrast;
|
||||
extern int video_grayscale;
|
||||
extern int video_graytype;
|
||||
|
||||
extern double cpuclock;
|
||||
extern int emu_fps;
|
||||
extern int frames;
|
||||
extern int readflash;
|
||||
extern int ibm8514_has_vga;
|
||||
|
||||
/* Function handler pointers. */
|
||||
extern void (*video_recalctimings)(void);
|
||||
@@ -219,6 +235,8 @@ extern int video_card_get_flags(int card);
|
||||
extern int video_is_mda(void);
|
||||
extern int video_is_cga(void);
|
||||
extern int video_is_ega_vga(void);
|
||||
extern int video_is_8514(void);
|
||||
extern int video_is_xga(void);
|
||||
extern void video_inform_monitor(int type, const video_timings_t *ptr, int monitor_index);
|
||||
extern int video_get_type_monitor(int monitor_index);
|
||||
|
||||
@@ -277,8 +295,12 @@ extern uint32_t video_color_transform(uint32_t color);
|
||||
/* IBM XGA */
|
||||
extern void xga_device_add(void);
|
||||
|
||||
/* IBM 8514/A and generic clones*/
|
||||
/* IBM 8514/A and clones*/
|
||||
extern void ibm8514_device_add(void);
|
||||
extern const device_t mach8_isa_device;
|
||||
extern const device_t mach32_isa_device;
|
||||
extern const device_t mach32_vlb_device;
|
||||
extern const device_t mach32_pci_device;
|
||||
|
||||
/* ATi Mach64 */
|
||||
extern const device_t mach64gx_isa_device;
|
||||
|
||||
Reference in New Issue
Block a user