mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
Merge pull request #4133 from cartifanwlr/feature/socket6
Add support for the Socket 6 platform (PC-98x1 branch)
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
/* Recently used images */
|
||||
#define MAX_PREV_IMAGES 4
|
||||
#define MAX_IMAGE_PATH_LEN 256
|
||||
#define MAX_IMAGE_PATH_LEN 2048
|
||||
|
||||
/* Default language 0xFFFF = from system, 0x409 = en-US */
|
||||
#define DEFAULT_LANGUAGE 0x0409
|
||||
@@ -125,6 +125,7 @@ extern int gfxcard[2]; /* (C) graphics/video card */
|
||||
extern char video_shader[512]; /* (C) video */
|
||||
extern int bugger_enabled; /* (C) enable ISAbugger */
|
||||
extern int postcard_enabled; /* (C) enable POST card */
|
||||
extern int unittester_enabled; /* (C) enable unit tester device */
|
||||
extern int isamem_type[]; /* (C) enable ISA mem cards */
|
||||
extern int isartc_type; /* (C) enable ISA RTC card */
|
||||
extern int sound_is_float; /* (C) sound uses FP values */
|
||||
|
||||
@@ -244,6 +244,7 @@ typedef struct cdrom {
|
||||
int prev_host_drive;
|
||||
int cd_buflen;
|
||||
int audio_op;
|
||||
int audio_muted_soft;
|
||||
int sony_msf;
|
||||
|
||||
const cdrom_ops_t *ops;
|
||||
|
||||
@@ -174,6 +174,8 @@ extern const device_t vlsi_scamp_device;
|
||||
extern const device_t wd76c10_device;
|
||||
|
||||
/* Miscellaneous Hardware */
|
||||
extern const device_t nec_mate_unk_device;
|
||||
|
||||
extern const device_t phoenix_486_jumper_device;
|
||||
extern const device_t phoenix_486_jumper_pci_device;
|
||||
|
||||
|
||||
@@ -41,23 +41,41 @@
|
||||
#ifndef EMU_DEVICE_H
|
||||
#define EMU_DEVICE_H
|
||||
|
||||
#define CONFIG_END -1
|
||||
#define CONFIG_STRING 0
|
||||
#define CONFIG_INT 1
|
||||
#define CONFIG_BINARY 2
|
||||
#define CONFIG_SELECTION 3
|
||||
#define CONFIG_MIDI_OUT 4
|
||||
#define CONFIG_FNAME 5
|
||||
#define CONFIG_SPINNER 6
|
||||
#define CONFIG_HEX16 7
|
||||
#define CONFIG_HEX20 8
|
||||
#define CONFIG_MAC 9
|
||||
#define CONFIG_MIDI_IN 10
|
||||
#define CONFIG_BIOS 11
|
||||
#define CONFIG_SERPORT 12
|
||||
#define CONFIG_END -1 /* N/A */
|
||||
|
||||
#define CONFIG_ONBOARD 256 /* only avaialble on the on-board variant */
|
||||
#define CONFIG_STANDALONE 257 /* not available on the on-board variant */
|
||||
#define CONFIG_SHIFT 4
|
||||
|
||||
#define CONFIG_TYPE_INT (0 << CONFIG_SHIFT)
|
||||
#define CONFIG_TYPE_STRING (1 << CONFIG_SHIFT)
|
||||
#define CONFIG_TYPE_HEX16 (2 << CONFIG_SHIFT)
|
||||
#define CONFIG_TYPE_HEX20 (3 << CONFIG_SHIFT)
|
||||
#define CONFIG_TYPE_MAC (4 << CONFIG_SHIFT)
|
||||
|
||||
#define CONFIG_INT (0 | CONFIG_TYPE_INT) /* config_get_int() */
|
||||
#define CONFIG_BINARY (1 | CONFIG_TYPE_INT) /* config_get_int() */
|
||||
#define CONFIG_SELECTION (2 | CONFIG_TYPE_INT) /* config_get_int() */
|
||||
#define CONFIG_MIDI_OUT (3 | CONFIG_TYPE_INT) /* config_get_int() */
|
||||
#define CONFIG_SPINNER (4 | CONFIG_TYPE_INT) /* config_get_int() */
|
||||
#define CONFIG_MIDI_IN (5 | CONFIG_TYPE_INT) /* config_get_int() */
|
||||
|
||||
#define CONFIG_STRING (0 | CONFIG_TYPE_STRING) /* config_get_string() */
|
||||
#define CONFIG_FNAME (1 | CONFIG_TYPE_STRING) /* config_get_string() */
|
||||
#define CONFIG_SERPORT (2 | CONFIG_TYPE_STRING) /* config_get_string() */
|
||||
#define CONFIG_BIOS (3 | CONFIG_TYPE_STRING) /* config_get_string() */
|
||||
|
||||
#define CONFIG_HEX16 (0 | CONFIG_TYPE_HEX16) /* config_get_hex16() */
|
||||
|
||||
#define CONFIG_HEX20 (0 | CONFIG_TYPE_HEX20) /* config_get_hex20() */
|
||||
|
||||
#define CONFIG_MAC (0 | CONFIG_TYPE_MAC) /* N/A */
|
||||
|
||||
#define CONFIG_SUBTYPE_MASK (CONFIG_IS_STRING - 1)
|
||||
|
||||
#define CONFIG_DEP (16 << CONFIG_SHIFT)
|
||||
#define CONFIG_TYPE_MASK (CONFIG_DEP - 1)
|
||||
|
||||
// #define CONFIG_ONBOARD 256 /* only avaialble on the on-board variant */
|
||||
// #define CONFIG_STANDALONE 257 /* not available on the on-board variant */
|
||||
|
||||
enum {
|
||||
DEVICE_PCJR = 2, /* requires an IBM PCjr */
|
||||
@@ -100,38 +118,49 @@ enum {
|
||||
#define BIOS_INTERLEAVED_INVERT 8
|
||||
#define BIOS_HIGH_BIT_INVERT 16
|
||||
|
||||
#define device_common_config_t \
|
||||
const char *name; \
|
||||
const char *description; \
|
||||
int type; \
|
||||
const char *default_string; \
|
||||
int default_int; \
|
||||
const char *file_filter; \
|
||||
const device_config_spinner_t spinner; \
|
||||
const device_config_selection_t selection[32]
|
||||
|
||||
typedef struct device_config_selection_t {
|
||||
const char *description;
|
||||
int value;
|
||||
} device_config_selection_t;
|
||||
|
||||
typedef struct device_config_bios_t {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
int bios_type;
|
||||
int files_no;
|
||||
uint32_t local;
|
||||
uint32_t size;
|
||||
void *dev1;
|
||||
void *dev2;
|
||||
const char *files[9];
|
||||
} device_config_bios_t;
|
||||
|
||||
typedef struct device_config_spinner_t {
|
||||
int16_t min;
|
||||
int16_t max;
|
||||
int16_t step;
|
||||
} device_config_spinner_t;
|
||||
|
||||
typedef struct device_config_t {
|
||||
const char *name;
|
||||
const char *description;
|
||||
int type;
|
||||
const char *default_string;
|
||||
int default_int;
|
||||
const char *file_filter;
|
||||
const device_config_spinner_t spinner;
|
||||
const device_config_selection_t selection[32];
|
||||
typedef struct _device_dep_config_ {
|
||||
device_common_config_t;
|
||||
} device_dep_config_t;
|
||||
|
||||
typedef struct device_config_bios_t {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
int bios_type;
|
||||
int files_no;
|
||||
uint32_t local;
|
||||
uint32_t size;
|
||||
void *dev1;
|
||||
void *dev2;
|
||||
const char *files[9];
|
||||
/* Configuration options that depend on the device variant.
|
||||
To prevent excessive nesting, there is no CONFIG_BIOS
|
||||
option a dep_config struct */
|
||||
const device_dep_config_t *dep_config;
|
||||
} device_config_bios_t;
|
||||
|
||||
typedef struct _device_config_ {
|
||||
device_common_config_t;
|
||||
const device_config_bios_t bios[32];
|
||||
} device_config_t;
|
||||
|
||||
@@ -202,6 +231,8 @@ extern const char *device_get_bios_file(const device_t *dev, const char *interna
|
||||
|
||||
extern int device_is_valid(const device_t *, int m);
|
||||
|
||||
extern const device_t* device_context_get_device(void);
|
||||
|
||||
extern int device_get_config_int(const char *name);
|
||||
extern int device_get_config_int_ex(const char *s, int dflt_int);
|
||||
extern int device_get_config_hex16(const char *name);
|
||||
|
||||
@@ -65,76 +65,85 @@ typedef struct fdc_t {
|
||||
uint8_t st0;
|
||||
uint8_t swap;
|
||||
uint8_t dtl;
|
||||
|
||||
uint8_t swwp;
|
||||
uint8_t disable_write;
|
||||
uint8_t st5;
|
||||
uint8_t st6;
|
||||
uint8_t error;
|
||||
uint8_t params[8];
|
||||
uint8_t res[11];
|
||||
uint8_t specify[2];
|
||||
uint8_t config;
|
||||
uint8_t pretrk;
|
||||
uint8_t power_down;
|
||||
|
||||
uint8_t head;
|
||||
uint8_t lastdrive;
|
||||
uint8_t sector;
|
||||
uint8_t drive;
|
||||
uint8_t rate;
|
||||
uint8_t tc;
|
||||
uint8_t pnum;
|
||||
uint8_t ptot;
|
||||
|
||||
uint8_t reset_stat;
|
||||
uint8_t seek_dir;
|
||||
uint8_t perp;
|
||||
uint8_t format_state;
|
||||
uint8_t format_n;
|
||||
uint8_t step;
|
||||
uint8_t noprec;
|
||||
uint8_t data_ready;
|
||||
|
||||
uint8_t paramstogo;
|
||||
uint8_t enh_mode;
|
||||
uint8_t dma;
|
||||
uint8_t densel_polarity;
|
||||
uint8_t densel_force;
|
||||
uint8_t fifo;
|
||||
uint8_t tfifo;
|
||||
uint8_t fifobufpos;
|
||||
|
||||
uint8_t drv2en;
|
||||
uint8_t gap;
|
||||
uint8_t enable_3f1;
|
||||
uint8_t format_sectors;
|
||||
uint8_t mfm;
|
||||
uint8_t deleted;
|
||||
uint8_t wrong_am;
|
||||
uint8_t sc;
|
||||
|
||||
uint8_t fintr;
|
||||
uint8_t rw_drive;
|
||||
|
||||
uint8_t lock;
|
||||
uint8_t specify[2];
|
||||
|
||||
uint8_t res[11];
|
||||
|
||||
uint8_t eot[4];
|
||||
uint8_t rwc[4];
|
||||
uint8_t params[8];
|
||||
uint8_t fifobuf[16];
|
||||
|
||||
uint16_t pcn[4];
|
||||
|
||||
uint16_t base_address;
|
||||
uint16_t rw_track;
|
||||
|
||||
int head;
|
||||
int sector;
|
||||
int drive;
|
||||
int lastdrive;
|
||||
int pcn[4];
|
||||
int eot[4];
|
||||
int rw_track;
|
||||
int pos;
|
||||
int pnum;
|
||||
int ptot;
|
||||
int rate;
|
||||
int reset_stat;
|
||||
int lock;
|
||||
int perp;
|
||||
int format_state;
|
||||
int format_n;
|
||||
int step;
|
||||
int seek_dir;
|
||||
int tc;
|
||||
int noprec;
|
||||
int bit_rate; /* Should be 250 at start. */
|
||||
|
||||
int data_ready;
|
||||
int inread;
|
||||
int bitcell_period;
|
||||
int enh_mode;
|
||||
int rwc[4];
|
||||
int drvrate[4];
|
||||
int boot_drive;
|
||||
int dma;
|
||||
int densel_polarity;
|
||||
int densel_force;
|
||||
int fifo;
|
||||
int tfifo;
|
||||
int fifobufpos;
|
||||
int drv2en;
|
||||
|
||||
int gap;
|
||||
int enable_3f1;
|
||||
int format_sectors;
|
||||
int max_track;
|
||||
int mfm;
|
||||
int deleted;
|
||||
int wrong_am;
|
||||
int sc;
|
||||
int satisfying_sectors;
|
||||
int fintr;
|
||||
int rw_drive;
|
||||
|
||||
int flags;
|
||||
int interrupt;
|
||||
|
||||
int irq; /* Should be 6 by default. */
|
||||
int dma_ch; /* Should be 2 by default. */
|
||||
int irq; /* Should be 6 by default. */
|
||||
int dma_ch; /* Should be 2 by default. */
|
||||
|
||||
int bit_rate; /* Should be 250 at start. */
|
||||
int paramstogo;
|
||||
int drvrate[4];
|
||||
|
||||
sector_id_t read_track_sector;
|
||||
sector_id_t format_sector_id;
|
||||
@@ -183,6 +192,7 @@ extern int fdc_get_compare_condition(fdc_t *fdc);
|
||||
extern int fdc_is_deleted(fdc_t *fdc);
|
||||
extern int fdc_is_sk(fdc_t *fdc);
|
||||
extern void fdc_set_wrong_am(fdc_t *fdc);
|
||||
extern void fdc_set_power_down(fdc_t *fdc, uint8_t power_down);
|
||||
extern int fdc_get_drive(fdc_t *fdc);
|
||||
extern int fdc_get_perp(fdc_t *fdc);
|
||||
extern int fdc_get_format_n(fdc_t *fdc);
|
||||
|
||||
@@ -60,4 +60,6 @@ extern const device_t sst_flash_49lf080_device;
|
||||
extern const device_t sst_flash_49lf016_device;
|
||||
extern const device_t sst_flash_49lf160_device;
|
||||
|
||||
extern const device_t amd_flash_29f020a_device;
|
||||
|
||||
#endif /*EMU_FLASH_H*/
|
||||
|
||||
@@ -60,6 +60,9 @@ extern const device_t ide_vlb_2ch_device; /* vlb_ide_2ch */
|
||||
extern const device_t ide_pci_device; /* pci_ide */
|
||||
extern const device_t ide_pci_2ch_device; /* pci_ide_2ch */
|
||||
|
||||
extern const device_t ide_ali1489_device; /* ALi M1489 */
|
||||
extern const device_t ide_ali5213_device; /* ALi M5213 */
|
||||
|
||||
extern const device_t ide_cmd640_vlb_device; /* CMD PCI-640B VLB */
|
||||
extern const device_t ide_cmd640_vlb_178_device; /* CMD PCI-640B VLB (Port 178h) */
|
||||
extern const device_t ide_cmd640_vlb_pri_device; /* CMD PCI-640B VLB (Only primary channel) */
|
||||
@@ -86,9 +89,7 @@ extern const device_t xta_wdxt150_device; /* xta_wdxt150 */
|
||||
extern const device_t xta_hd20_device; /* EuroPC internal */
|
||||
|
||||
extern const device_t xtide_device; /* xtide_xt */
|
||||
extern const device_t xtide_plus_device; /* xtide_xt_plus */
|
||||
extern const device_t xtide_at_device; /* xtide_at */
|
||||
extern const device_t xtide_at_386_device; /* xtide_at_386 */
|
||||
extern const device_t xtide_acculogic_device; /* xtide_ps2 */
|
||||
extern const device_t xtide_at_ps2_device; /* xtide_at_ps2 */
|
||||
|
||||
|
||||
@@ -188,6 +188,8 @@ extern void ide_atapi_attach(ide_t *dev);
|
||||
extern void *ide_xtide_init(void);
|
||||
extern void ide_xtide_close(void);
|
||||
|
||||
extern void ide_drives_set_shadow(void);
|
||||
|
||||
extern void ide_writew(uint16_t addr, uint16_t val, void *priv);
|
||||
extern void ide_write_devctl(uint16_t addr, uint8_t val, void *priv);
|
||||
extern void ide_writeb(uint16_t addr, uint8_t val, void *priv);
|
||||
|
||||
@@ -159,8 +159,8 @@ typedef struct hard_disk_t {
|
||||
char fn[1024]; /* Name of current image file */
|
||||
char vhd_parent[1041]; /* Differential VHD parent file */
|
||||
|
||||
uint32_t res0;
|
||||
uint32_t pad1;
|
||||
uint32_t seek_pos;
|
||||
uint32_t seek_len;
|
||||
uint32_t base;
|
||||
uint32_t spt;
|
||||
uint32_t hpc; /* Physical geometry parameters */
|
||||
|
||||
@@ -79,6 +79,7 @@ typedef struct atkbc_dev_t {
|
||||
int y;
|
||||
int z;
|
||||
int b;
|
||||
int ignore;
|
||||
|
||||
int *scan;
|
||||
|
||||
|
||||
@@ -83,6 +83,8 @@ extern lpt_port_t lpt_ports[PARALLEL_MAX];
|
||||
extern void lpt_write(uint16_t port, uint8_t val, void *priv);
|
||||
extern uint8_t lpt_read(uint16_t port, void *priv);
|
||||
|
||||
extern uint8_t lpt_read_port(int port, uint16_t reg);
|
||||
|
||||
extern uint8_t lpt_read_status(int port);
|
||||
extern void lpt_irq(void *priv, int raise);
|
||||
|
||||
|
||||
@@ -49,37 +49,38 @@
|
||||
#define MACHINE_BUS_AGP 0x00080000 /* sys has AGP bus */
|
||||
#define MACHINE_BUS_AC97 0x00100000 /* 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 */
|
||||
#define MACHINE_CASSETTE (MACHINE_BUS_CASSETTE) /* sys has cassette port */
|
||||
#define MACHINE_CARTRIDGE (MACHINE_BUS_CARTRIDGE) /* sys has two cartridge bays */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_PC (MACHINE_BUS_ISA) /* sys is PC/XT-compatible (ISA) */
|
||||
#define MACHINE_AT (MACHINE_BUS_ISA | MACHINE_BUS_ISA16) /* sys is AT-compatible (ISA + ISA16) */
|
||||
#define MACHINE_PC98 (MACHINE_BUS_CBUS) /* sys is NEC PC-98x1 series */
|
||||
#define MACHINE_EISA (MACHINE_BUS_EISA | MACHINE_AT) /* sys is AT-compatible with EISA */
|
||||
#define MACHINE_VLB (MACHINE_BUS_VLB | MACHINE_AT) /* sys is AT-compatible with VLB */
|
||||
#define MACHINE_VLB98 (MACHINE_BUS_VLB | MACHINE_PC98) /* sys is NEC PC-98x1 series with VLB (did that even exist?) */
|
||||
#define MACHINE_VLBE (MACHINE_BUS_VLB | MACHINE_EISA) /* sys is AT-compatible with EISA and VLB */
|
||||
#define MACHINE_MCA (MACHINE_BUS_MCA) /* sys is MCA */
|
||||
#define MACHINE_PCI (MACHINE_BUS_PCI | MACHINE_AT) /* sys is AT-compatible with PCI */
|
||||
#define MACHINE_PCI98 (MACHINE_BUS_PCI | MACHINE_PC98) /* sys is NEC PC-98x1 series with PCI */
|
||||
#define MACHINE_PCIE (MACHINE_BUS_PCI | MACHINE_EISA) /* sys is AT-compatible with PCI, and EISA */
|
||||
#define MACHINE_PCIV (MACHINE_BUS_PCI | MACHINE_VLB) /* sys is AT-compatible with PCI and VLB */
|
||||
#define MACHINE_PCIVE (MACHINE_BUS_PCI | MACHINE_VLBE) /* sys is AT-compatible with PCI, VLB, and EISA */
|
||||
#define MACHINE_PCMCIA (MACHINE_BUS_PCMCIA | MACHINE_AT) /* sys is AT-compatible laptop with PCMCIA */
|
||||
#define MACHINE_AGP (MACHINE_BUS_AGP | MACHINE_PCI) /* sys is AT-compatible with AGP */
|
||||
#define MACHINE_AGP98 (MACHINE_BUS_AGP | MACHINE_PCI98) /* sys is NEC PC-98x1 series with AGP (did that even exist?) */
|
||||
#define MACHINE_PC (MACHINE_BUS_ISA) /* sys is PC/XT-compatible (ISA) */
|
||||
#define MACHINE_AT (MACHINE_BUS_ISA | MACHINE_BUS_ISA16) /* sys is AT-compatible (ISA + ISA16) */
|
||||
#define MACHINE_PC98 (MACHINE_BUS_CBUS) /* sys is NEC PC-98x1 series */
|
||||
#define MACHINE_EISA (MACHINE_BUS_EISA | MACHINE_AT) /* sys is AT-compatible with EISA */
|
||||
#define MACHINE_VLB (MACHINE_BUS_VLB | MACHINE_AT) /* sys is AT-compatible with VLB */
|
||||
#define MACHINE_VLB98 (MACHINE_BUS_VLB | MACHINE_PC98) /* sys is NEC PC-98x1 series with VLB (did that even exist?) */
|
||||
#define MACHINE_VLBE (MACHINE_BUS_VLB | MACHINE_EISA) /* sys is AT-compatible with EISA and VLB */
|
||||
#define MACHINE_MCA (MACHINE_BUS_MCA) /* sys is MCA */
|
||||
#define MACHINE_PCI (MACHINE_BUS_PCI | MACHINE_AT) /* sys is AT-compatible with PCI */
|
||||
#define MACHINE_PCI98 (MACHINE_BUS_PCI | MACHINE_PC98) /* sys is NEC PC-98x1 series with PCI */
|
||||
#define MACHINE_PCIE (MACHINE_BUS_PCI | MACHINE_EISA) /* sys is AT-compatible with PCI, and EISA */
|
||||
#define MACHINE_PCIV (MACHINE_BUS_PCI | MACHINE_VLB) /* sys is AT-compatible with PCI and VLB */
|
||||
#define MACHINE_PCIVE (MACHINE_BUS_PCI | MACHINE_VLBE) /* sys is AT-compatible with PCI, VLB, and EISA */
|
||||
#define MACHINE_PCMCIA (MACHINE_BUS_PCMCIA | MACHINE_AT) /* sys is AT-compatible laptop with PCMCIA */
|
||||
#define MACHINE_AGP (MACHINE_BUS_AGP | MACHINE_PCI) /* sys is AT-compatible with AGP */
|
||||
#define MACHINE_AGP98 (MACHINE_BUS_AGP | MACHINE_PCI98) /* sys is NEC PC-98x1 series with AGP (did that even exist?) */
|
||||
|
||||
#define MACHINE_PC5150 (MACHINE_PC | MACHINE_CASSETTE) /* sys is IBM PC 5150 */
|
||||
#define MACHINE_PCJR (MACHINE_PC | MACHINE_CASSETTE | MACHINE_CARTRIDGE) /* sys is PCjr */
|
||||
#define MACHINE_PS2 (MACHINE_AT | MACHINE_BUS_PS2) /* sys is PS/2 */
|
||||
#define MACHINE_PS2_MCA (MACHINE_MCA | MACHINE_BUS_PS2) /* sys is MCA PS/2 */
|
||||
#define MACHINE_PS2_VLB (MACHINE_VLB | MACHINE_BUS_PS2) /* sys is VLB PS/2 */
|
||||
#define MACHINE_PS2_PCI (MACHINE_PCI | MACHINE_BUS_PS2) /* sys is PCI PS/2 */
|
||||
#define MACHINE_PS2_PCIV (MACHINE_PCIV | MACHINE_BUS_PS2) /* sys is VLB/PCI PS/2 */
|
||||
#define MACHINE_PS2_AGP (MACHINE_AGP | MACHINE_BUS_PS2) /* sys is AGP PS/2 */
|
||||
#define MACHINE_PS2_A97 (MACHINE_PS2_AGP | MACHINE_BUS_AC97) /* sys is AGP/AC97 PS/2 */
|
||||
#define MACHINE_PS2_NOISA (MACHINE_PS2_AGP & ~MACHINE_AT) /* sys is AGP PS/2 without ISA */
|
||||
#define MACHINE_PS2_NOI97 (MACHINE_PS2_A97 & ~MACHINE_AT) /* sys is AGP/AC97 PS/2 without ISA */
|
||||
#define MACHINE_PC5150 (MACHINE_PC | MACHINE_CASSETTE) /* sys is IBM PC 5150 */
|
||||
#define MACHINE_PCJR (MACHINE_PC | MACHINE_CASSETTE | MACHINE_CARTRIDGE) /* sys is PCjr */
|
||||
#define MACHINE_PS2 (MACHINE_AT | MACHINE_BUS_PS2) /* sys is PS/2 */
|
||||
#define MACHINE_PS2_MCA (MACHINE_MCA | MACHINE_BUS_PS2) /* sys is MCA PS/2 */
|
||||
#define MACHINE_PS2_VLB (MACHINE_VLB | MACHINE_BUS_PS2) /* sys is VLB PS/2 */
|
||||
#define MACHINE_PS2_PCI (MACHINE_PCI | MACHINE_BUS_PS2) /* sys is PCI PS/2 */
|
||||
#define MACHINE_PS2_PCIV (MACHINE_PCIV | MACHINE_BUS_PS2) /* sys is VLB/PCI PS/2 */
|
||||
#define MACHINE_PS2_AGP (MACHINE_AGP | MACHINE_BUS_PS2) /* sys is AGP PS/2 */
|
||||
#define MACHINE_PS2_A97 (MACHINE_PS2_AGP | MACHINE_BUS_AC97) /* sys is AGP/AC97 PS/2 */
|
||||
#define MACHINE_PS2_NOISA (MACHINE_PS2_AGP & ~MACHINE_AT) /* sys is AGP PS/2 without ISA */
|
||||
#define MACHINE_PS2_PCIONLY (MACHINE_PS2_NOISA & ~MACHINE_BUS_AGP) /* sys is PCI PS/2 without ISA */
|
||||
#define MACHINE_PS2_NOI97 (MACHINE_PS2_A97 & ~MACHINE_AT) /* sys is AGP/AC97 PS/2 without ISA */
|
||||
/* Feature flags for miscellaneous internal devices. */
|
||||
#define MACHINE_FLAGS_NONE 0x00000000 /* sys has no int devices */
|
||||
#define MACHINE_SOFTFLOAT_ONLY 0x00000001 /* sys requires SoftFloat FPU */
|
||||
@@ -471,6 +472,7 @@ extern int machine_at_wd76c10_init(const machine_t *);
|
||||
extern int machine_at_arb1374_init(const machine_t *);
|
||||
extern int machine_at_sbc350a_init(const machine_t *);
|
||||
extern int machine_at_flytech386_init(const machine_t *);
|
||||
extern int machine_at_325ax_init(const machine_t *);
|
||||
extern int machine_at_mr1217_init(const machine_t *);
|
||||
extern int machine_at_pja511m_init(const machine_t *);
|
||||
extern int machine_at_prox1332_init(const machine_t *);
|
||||
@@ -485,6 +487,7 @@ extern int machine_at_asus386_init(const machine_t *);
|
||||
extern int machine_at_ecs386_init(const machine_t *);
|
||||
extern int machine_at_spc6000a_init(const machine_t *);
|
||||
extern int machine_at_micronics386_init(const machine_t *);
|
||||
extern int machine_at_ecs386v_init(const machine_t *);
|
||||
|
||||
extern int machine_at_rycleopardlx_init(const machine_t *);
|
||||
|
||||
@@ -504,6 +507,7 @@ extern int machine_at_winbios1429_init(const machine_t *);
|
||||
extern int machine_at_opti495_init(const machine_t *);
|
||||
extern int machine_at_opti495_ami_init(const machine_t *);
|
||||
extern int machine_at_opti495_mr_init(const machine_t *);
|
||||
extern int machine_at_exp4349_init(const machine_t *);
|
||||
|
||||
extern int machine_at_vect486vl_init(const machine_t *);
|
||||
extern int machine_at_d824_init(const machine_t *);
|
||||
@@ -511,6 +515,8 @@ extern int machine_at_d824_init(const machine_t *);
|
||||
extern int machine_at_403tg_init(const machine_t *);
|
||||
extern int machine_at_403tg_d_init(const machine_t *);
|
||||
extern int machine_at_403tg_d_mr_init(const machine_t *);
|
||||
extern int machine_at_pb450_init(const machine_t *);
|
||||
extern int machine_at_pb450_init(const machine_t *);
|
||||
extern int machine_at_pc330_6573_init(const machine_t *);
|
||||
extern int machine_at_mvi486_init(const machine_t *);
|
||||
|
||||
@@ -524,16 +530,23 @@ extern int machine_at_ami471_init(const machine_t *);
|
||||
extern int machine_at_dtk486_init(const machine_t *);
|
||||
extern int machine_at_px471_init(const machine_t *);
|
||||
extern int machine_at_win471_init(const machine_t *);
|
||||
extern int machine_at_pci400ca_init(const machine_t *);
|
||||
extern int machine_at_vi15g_init(const machine_t *);
|
||||
extern int machine_at_greenb_init(const machine_t *);
|
||||
extern int machine_at_4gpv5_init(const machine_t *);
|
||||
|
||||
extern int machine_at_r418_init(const machine_t *);
|
||||
extern int machine_at_ls486e_init(const machine_t *);
|
||||
extern int machine_at_4dps_init(const machine_t *);
|
||||
extern int machine_at_ms4144_init(const machine_t *);
|
||||
extern int machine_at_4saw2_init(const machine_t *);
|
||||
extern int machine_at_m4li_init(const machine_t *);
|
||||
extern int machine_at_alfredo_init(const machine_t *);
|
||||
extern int machine_at_amis76_init(const machine_t *);
|
||||
extern int machine_at_ninja_init(const machine_t *);
|
||||
extern int machine_at_bat4ip3e_init(const machine_t *);
|
||||
extern int machine_at_486pi_init(const machine_t *);
|
||||
extern int machine_at_sb486p_init(const machine_t *);
|
||||
extern int machine_at_486sp3_init(const machine_t *);
|
||||
extern int machine_at_486sp3c_init(const machine_t *);
|
||||
extern int machine_at_486sp3g_init(const machine_t *);
|
||||
@@ -545,6 +558,7 @@ extern int machine_at_win486pci_init(const machine_t *);
|
||||
extern int machine_at_ms4145_init(const machine_t *);
|
||||
extern int machine_at_sbc490_init(const machine_t *);
|
||||
extern int machine_at_tf486_init(const machine_t *);
|
||||
extern int machine_at_arb1476_init(const machine_t *);
|
||||
|
||||
extern int machine_at_pci400cb_init(const machine_t *);
|
||||
extern int machine_at_g486ip_init(const machine_t *);
|
||||
@@ -552,18 +566,24 @@ extern int machine_at_g486ip_init(const machine_t *);
|
||||
extern int machine_at_itoxstar_init(const machine_t *);
|
||||
extern int machine_at_arb1423c_init(const machine_t *);
|
||||
extern int machine_at_arb1479_init(const machine_t *);
|
||||
extern int machine_at_iach488_init(const machine_t *);
|
||||
extern int machine_at_pcm9340_init(const machine_t *);
|
||||
extern int machine_at_pcm5330_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ecs486_init(const machine_t *);
|
||||
extern int machine_at_hot433_init(const machine_t *);
|
||||
extern int machine_at_hot433a_init(const machine_t *);
|
||||
extern int machine_at_atc1415_init(const machine_t *);
|
||||
extern int machine_at_actionpc2600_init(const machine_t *);
|
||||
extern int machine_at_actiontower8400_init(const machine_t *);
|
||||
extern int machine_at_m919_init(const machine_t *);
|
||||
extern int machine_at_spc7700plw_init(const machine_t *);
|
||||
extern int machine_at_ms4134_init(const machine_t *);
|
||||
extern int machine_at_tg486gp_init(const machine_t *);
|
||||
extern int machine_at_tg486g_init(const machine_t *);
|
||||
extern int machine_at_dvent4xx_init(const machine_t *);
|
||||
extern int machine_at_ecsal486_init(const machine_t *);
|
||||
extern int machine_at_ap4100aa_init(const machine_t *);
|
||||
extern int machine_at_atc1762_init(const machine_t *);
|
||||
|
||||
/* m_at_commodore.c */
|
||||
extern int machine_at_cmdpc_init(const machine_t *);
|
||||
@@ -588,7 +608,7 @@ extern int machine_at_opti560l_init(const machine_t *);
|
||||
extern int machine_at_ambradp60_init(const machine_t *);
|
||||
extern int machine_at_valuepointp60_init(const machine_t *);
|
||||
extern int machine_at_revenge_init(const machine_t *);
|
||||
extern int machine_at_586mc1_init(const machine_t *);
|
||||
extern int machine_at_586is_init(const machine_t *);
|
||||
extern int machine_at_pb520r_init(const machine_t *);
|
||||
|
||||
extern int machine_at_excalibur_init(const machine_t *);
|
||||
@@ -602,17 +622,20 @@ extern int machine_at_p5sp4_init(const machine_t *);
|
||||
extern int machine_at_plato_init(const machine_t *);
|
||||
extern int machine_at_dellplato_init(const machine_t *);
|
||||
extern int machine_at_ambradp90_init(const machine_t *);
|
||||
extern int machine_at_430nx_init(const machine_t *);
|
||||
extern int machine_at_586ip_init(const machine_t *);
|
||||
extern int machine_at_tek932_init(const machine_t *);
|
||||
|
||||
extern int machine_at_acerv30_init(const machine_t *);
|
||||
extern int machine_at_apollo_init(const machine_t *);
|
||||
extern int machine_at_zappa_init(const machine_t *);
|
||||
extern int machine_at_powermatev_init(const machine_t *);
|
||||
extern int machine_at_hawk_init(const machine_t *);
|
||||
extern int machine_at_pt2000_init(const machine_t *);
|
||||
|
||||
extern int machine_at_pat54pv_init(const machine_t *);
|
||||
|
||||
extern int machine_at_hot543_init(const machine_t *);
|
||||
extern int machine_at_ncselp90_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p54sp4_init(const machine_t *);
|
||||
extern int machine_at_sq588_init(const machine_t *);
|
||||
@@ -638,10 +661,12 @@ extern int machine_at_8500tuc_init(const machine_t *);
|
||||
extern int machine_at_p55t2s_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p5vxb_init(const machine_t *);
|
||||
extern int machine_at_dellhannibalp_init(const machine_t *);
|
||||
extern int machine_at_gw2kte_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ap5s_init(const machine_t *);
|
||||
extern int machine_at_ms5124_init(const machine_t *);
|
||||
extern int machine_at_amis727_init(const machine_t *);
|
||||
extern int machine_at_vectra54_init(const machine_t *);
|
||||
|
||||
/* m_at_socket7.c */
|
||||
@@ -654,6 +679,7 @@ extern int machine_at_cu430hx_init(const machine_t *);
|
||||
extern int machine_at_equium5200_init(const machine_t *);
|
||||
extern int machine_at_pcv90_init(const machine_t *);
|
||||
extern int machine_at_p65up5_cp55t2d_init(const machine_t *);
|
||||
extern int machine_at_epc2102_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ap5vm_init(const machine_t *);
|
||||
extern int machine_at_p55tvp4_init(const machine_t *);
|
||||
@@ -678,6 +704,8 @@ extern int machine_at_thunderbolt_init(const machine_t *);
|
||||
extern int machine_at_mb540n_init(const machine_t *);
|
||||
extern int machine_at_56a5_init(const machine_t *);
|
||||
extern int machine_at_p5mms98_init(const machine_t *);
|
||||
extern int machine_at_richmond_init(const machine_t *);
|
||||
extern int machine_at_tomahawk_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ficva502_init(const machine_t *);
|
||||
|
||||
@@ -685,6 +713,7 @@ extern int machine_at_ficpa2012_init(const machine_t *);
|
||||
|
||||
extern int machine_at_r534f_init(const machine_t *);
|
||||
extern int machine_at_ms5146_init(const machine_t *);
|
||||
extern int machine_at_cb52xsi_init(const machine_t *);
|
||||
|
||||
extern int machine_at_m560_init(const machine_t *);
|
||||
extern int machine_at_ms5164_init(const machine_t *);
|
||||
@@ -692,6 +721,7 @@ extern int machine_at_ms5164_init(const machine_t *);
|
||||
/* m_at_sockets7.c */
|
||||
extern int machine_at_p5a_init(const machine_t *);
|
||||
extern int machine_at_m579_init(const machine_t *);
|
||||
extern int machine_at_gwlucas_init(const machine_t *);
|
||||
extern int machine_at_5aa_init(const machine_t *);
|
||||
extern int machine_at_5ax_init(const machine_t *);
|
||||
|
||||
@@ -701,11 +731,12 @@ extern int machine_at_ficva503a_init(const machine_t *);
|
||||
extern int machine_at_5emapro_init(const machine_t *);
|
||||
|
||||
/* m_at_socket8.c */
|
||||
extern int machine_at_ap61_init(const machine_t *);
|
||||
extern int machine_at_p6rp4_init(const machine_t *);
|
||||
extern int machine_at_aurora_init(const machine_t *);
|
||||
|
||||
extern int machine_at_686nx_init(const machine_t *);
|
||||
extern int machine_at_acerv60n_init(const machine_t *);
|
||||
extern int machine_at_lgibmx61_init(const machine_t *);
|
||||
extern int machine_at_vs440fx_init(const machine_t *);
|
||||
extern int machine_at_gw2kvenus_init(const machine_t *);
|
||||
extern int machine_at_ap440fx_init(const machine_t *);
|
||||
@@ -726,9 +757,12 @@ extern int machine_at_kn97_init(const machine_t *);
|
||||
extern int machine_at_lx6_init(const machine_t *);
|
||||
extern int machine_at_spitfire_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ma30d_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p6i440e2_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p2bls_init(const machine_t *);
|
||||
extern int machine_at_lgibmx7g_init(const machine_t *);
|
||||
extern int machine_at_p3bf_init(const machine_t *);
|
||||
extern int machine_at_bf6_init(const machine_t *);
|
||||
extern int machine_at_ax6bc_init(const machine_t *);
|
||||
@@ -846,6 +880,7 @@ extern int machine_xt_pc700_init(const machine_t *);
|
||||
extern int machine_xt_pc500_init(const machine_t *);
|
||||
extern int machine_xt_vendex_init(const machine_t *);
|
||||
extern int machine_xt_znic_init(const machine_t *);
|
||||
extern int machine_xt_glabios_init(const machine_t *);
|
||||
extern int machine_xt_super16t_init(const machine_t *);
|
||||
extern int machine_xt_super16te_init(const machine_t *);
|
||||
extern int machine_xt_top88_init(const machine_t *);
|
||||
|
||||
@@ -398,6 +398,7 @@ extern void mem_mapping_disable(mem_mapping_t *);
|
||||
extern void mem_mapping_enable(mem_mapping_t *);
|
||||
extern void mem_mapping_recalc(uint64_t base, uint64_t size);
|
||||
|
||||
extern void mem_set_wp(uint64_t base, uint64_t size, uint8_t flags, uint8_t wp);
|
||||
extern void mem_set_access(uint8_t bitmap, int mode, uint32_t base, uint32_t size, uint16_t access);
|
||||
|
||||
extern uint8_t mem_readb_phys(uint32_t addr);
|
||||
@@ -439,6 +440,8 @@ extern void mem_reset_page_blocks(void);
|
||||
extern void flushmmucache(void);
|
||||
extern void flushmmucache_nopc(void);
|
||||
|
||||
extern void mem_debug_check_addr(uint32_t addr, int write);
|
||||
|
||||
extern void mem_a20_init(void);
|
||||
extern void mem_a20_recalc(void);
|
||||
|
||||
@@ -447,6 +450,8 @@ extern void mem_close(void);
|
||||
extern void mem_reset(void);
|
||||
extern void mem_remap_top(int kb);
|
||||
|
||||
extern void umc_smram_recalc(uint32_t start, int set);
|
||||
|
||||
extern mem_mapping_t *read_mapping[MEM_MAPPINGS_NO];
|
||||
extern mem_mapping_t *write_mapping[MEM_MAPPINGS_NO];
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ extern void mouse_scale_x(int x);
|
||||
extern void mouse_scale_y(int y);
|
||||
extern void mouse_scalef(double x, double y);
|
||||
extern void mouse_scale(int x, int y);
|
||||
extern void mouse_scale_axis(int axis, int val);
|
||||
extern void mouse_set_z(int z);
|
||||
extern void mouse_clear_z(void);
|
||||
extern void mouse_subtract_z(int *delta_z, int min, int max, int invert);
|
||||
|
||||
@@ -36,5 +36,6 @@ extern const device_t pcnet_am79c960_vlb_device;
|
||||
extern const device_t pcnet_am79c961_device;
|
||||
extern const device_t pcnet_am79c970a_device;
|
||||
extern const device_t pcnet_am79c973_device;
|
||||
extern const device_t pcnet_am79c973_onboard_device;
|
||||
|
||||
#endif /*NET_PCNET_H*/
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
extern const device_t dec_tulip_device;
|
||||
extern const device_t dec_tulip_21140_device;
|
||||
extern const device_t dec_tulip_21140_vpc_device;
|
||||
extern const device_t dec_tulip_21040_device;
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
#define FLAG_CONFIG_M1_IO_ON 0x00000020
|
||||
#define FLAG_NO_IRQ_STEERING 0x00000040
|
||||
#define FLAG_NO_BRIDGES 0x00000080
|
||||
#define FLAG_TRC_CONTROLS_CPURST 0x00000100
|
||||
|
||||
#define FLAG_MECHANISM_MASK FLAG_MECHANISM_1 | FLAG_MECHANISM_2
|
||||
#define FLAG_MASK 0x0000007f
|
||||
|
||||
@@ -149,6 +149,7 @@ extern uint32_t plat_language_code(char *langcode);
|
||||
extern void plat_language_code_r(uint32_t lcid, char *outbuf, int len);
|
||||
extern void plat_get_cpu_string(char *outbuf, uint8_t len);
|
||||
extern double plat_get_dpi(void);
|
||||
extern void plat_set_thread_name(void *thread, const char *name);
|
||||
|
||||
/* Resource management. */
|
||||
extern void set_language(uint32_t id);
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
#ifndef PRINTER_H
|
||||
#define PRINTER_H
|
||||
|
||||
#define FONT_FILE_DOTMATRIX "dotmatrix.ttf"
|
||||
#define FONT_FILE_DOTMATRIX "dotmatrix.otf"
|
||||
#define FONT_FILE_DOTMATRIX_ITALIC "dotmatrix_italic.otf"
|
||||
|
||||
#define FONT_FILE_ROMAN "roman.ttf"
|
||||
#define FONT_FILE_SANSSERIF "sansserif.ttf"
|
||||
|
||||
@@ -79,10 +79,10 @@
|
||||
#define IDT_JOYSTICK 1718 /* Joystick: */
|
||||
|
||||
/* DLG_CFG_SOUND */
|
||||
#define IDT_SOUND1 1719 /* Sound card 1: */
|
||||
#define IDT_SOUND2 1720 /* Sound card 2: */
|
||||
#define IDT_SOUND3 1721 /* Sound card 3: */
|
||||
#define IDT_SOUND4 1722 /* Sound card 4: */
|
||||
#define IDT_SOUND1 1719 /* Sound card #1: */
|
||||
#define IDT_SOUND2 1720 /* Sound card #2: */
|
||||
#define IDT_SOUND3 1721 /* Sound card #3: */
|
||||
#define IDT_SOUND4 1722 /* Sound card #4: */
|
||||
#define IDT_MIDI_OUT 1723 /* MIDI Out Device: */
|
||||
#define IDT_MIDI_IN 1724 /* MIDI In Device: */
|
||||
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
#define SCSI_PCSCSI_H
|
||||
|
||||
extern const device_t dc390_pci_device;
|
||||
extern const device_t ncr53c90_mca_device;
|
||||
extern const device_t ncr53c90a_mca_device;
|
||||
|
||||
#endif /*SCSI_BUSLOGIC_H*/
|
||||
|
||||
@@ -124,11 +124,11 @@ extern void serial_set_next_inst(int ni);
|
||||
extern void serial_standalone_init(void);
|
||||
extern void serial_set_clock_src(serial_t *dev, double clock_src);
|
||||
extern void serial_reset_port(serial_t *dev);
|
||||
extern uint8_t serial_read(uint16_t addr, void *priv);
|
||||
extern void serial_device_timeout(void *priv);
|
||||
|
||||
extern void serial_set_cts(serial_t *dev, uint8_t enabled);
|
||||
extern void serial_set_dsr(serial_t *dev, uint8_t enabled);
|
||||
extern void serial_set_dcd(serial_t *dev, uint8_t enabled);
|
||||
extern void serial_set_cts(serial_t *dev, uint8_t enabled);
|
||||
extern void serial_set_dsr(serial_t *dev, uint8_t enabled);
|
||||
extern void serial_set_dcd(serial_t *dev, uint8_t enabled);
|
||||
|
||||
extern const device_t ns8250_device;
|
||||
extern const device_t ns8250_pcjr_device;
|
||||
|
||||
@@ -19,17 +19,21 @@
|
||||
extern void vt82c686_sio_write(uint8_t addr, uint8_t val, void *priv);
|
||||
|
||||
extern const device_t acc3221_device;
|
||||
extern const device_t ali5105_device;
|
||||
extern const device_t ali5123_device;
|
||||
extern const device_t f82c710_device;
|
||||
extern const device_t f82c606_device;
|
||||
extern const device_t fdc37c651_device;
|
||||
extern const device_t fdc37c651_ide_device;
|
||||
extern const device_t fdc37c661_device;
|
||||
extern const device_t fdc37c661_ide_device;
|
||||
extern const device_t fdc37c661_ide_sec_device;
|
||||
extern const device_t fdc37c663_device;
|
||||
extern const device_t fdc37c663_ide_device;
|
||||
extern const device_t fdc37c665_device;
|
||||
extern const device_t fdc37c665_ide_device;
|
||||
extern const device_t fdc37c665_ide_pri_device;
|
||||
extern const device_t fdc37c665_ide_sec_device;
|
||||
extern const device_t fdc37c666_device;
|
||||
extern const device_t fdc37c67x_device;
|
||||
extern const device_t fdc37c669_device;
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
# define event_t plat_event_t
|
||||
# define mutex_t plat_mutex_t
|
||||
|
||||
# define thread_create plat_thread_create
|
||||
# define thread_create_named plat_thread_create_named
|
||||
# define thread_wait plat_thread_wait
|
||||
# define thread_create_event plat_thread_create_event
|
||||
# define thread_set_event plat_thread_set_event
|
||||
@@ -48,7 +48,8 @@ typedef void thread_t;
|
||||
typedef void event_t;
|
||||
typedef void mutex_t;
|
||||
|
||||
extern thread_t *thread_create(void (*thread_func)(void *param), void *param);
|
||||
#define thread_create(thread_func, param) thread_create_named((thread_func), (param), #thread_func)
|
||||
extern thread_t *thread_create_named(void (*thread_func)(void *param), void *param, const char *name);
|
||||
extern int thread_wait(thread_t *arg);
|
||||
extern event_t *thread_create_event(void);
|
||||
extern void thread_set_event(event_t *arg);
|
||||
|
||||
37
src/include/86box/unittester.h
Normal file
37
src/include/86box/unittester.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Debug device for assisting in unit testing.
|
||||
* See doc/specifications/86box-unit-tester.md for more info.
|
||||
* If modifying the protocol, you MUST modify the specification
|
||||
* and increment the version number.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: GreaseMonkey, <thematrixeatsyou+86b@gmail.com>
|
||||
*
|
||||
* Copyright 2024 GreaseMonkey.
|
||||
*/
|
||||
|
||||
#ifndef UNITTESTER_H
|
||||
#define UNITTESTER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Global variables. */
|
||||
extern const device_t unittester_device;
|
||||
|
||||
/* Functions. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*UNITTESTER_H*/
|
||||
@@ -33,6 +33,8 @@ typedef struct hwcursor8514_t {
|
||||
} hwcursor8514_t;
|
||||
|
||||
typedef struct ibm8514_t {
|
||||
rom_t bios_rom;
|
||||
rom_t bios_rom2;
|
||||
hwcursor8514_t hwcursor;
|
||||
hwcursor8514_t hwcursor_latch;
|
||||
uint8_t pos_regs[8];
|
||||
@@ -60,20 +62,24 @@ typedef struct ibm8514_t {
|
||||
int dac_b;
|
||||
int internal_pitch;
|
||||
int hwcursor_on;
|
||||
int modechange;
|
||||
|
||||
uint64_t dispontime;
|
||||
uint64_t dispofftime;
|
||||
|
||||
struct {
|
||||
uint16_t subsys_cntl;
|
||||
uint16_t setup_md;
|
||||
uint16_t advfunc_cntl;
|
||||
uint8_t ext_advfunc_cntl;
|
||||
uint16_t cur_y;
|
||||
uint16_t cur_y_bitres;
|
||||
uint16_t cur_x;
|
||||
uint16_t cur_x_bitres;
|
||||
int16_t destx;
|
||||
int16_t desty;
|
||||
int16_t desty_axstp;
|
||||
int16_t destx_distp;
|
||||
int16_t err_term;
|
||||
int16_t maj_axis_pcnt;
|
||||
int16_t maj_axis_pcnt_no_limit;
|
||||
uint16_t cmd;
|
||||
uint16_t cmd_back;
|
||||
uint16_t short_stroke;
|
||||
@@ -100,7 +106,9 @@ typedef struct ibm8514_t {
|
||||
int sys_cnt2;
|
||||
int temp_cnt;
|
||||
int16_t cx;
|
||||
int16_t cx_back;
|
||||
int16_t cy;
|
||||
int16_t oldcx;
|
||||
int16_t oldcy;
|
||||
int16_t sx;
|
||||
int16_t sy;
|
||||
@@ -133,19 +141,29 @@ typedef struct ibm8514_t {
|
||||
int fill_state;
|
||||
int xdir;
|
||||
int ydir;
|
||||
int linedraw;
|
||||
uint32_t ge_offset;
|
||||
} accel;
|
||||
|
||||
uint16_t test;
|
||||
int ibm_mode;
|
||||
int vendor_mode[2];
|
||||
int h_blankstart;
|
||||
int h_blank_end_val;
|
||||
int hblankstart;
|
||||
int hblank_end_val;
|
||||
int hblankend;
|
||||
int hblank_ext;
|
||||
int hblank_sub;
|
||||
|
||||
int v_total_reg;
|
||||
int v_total;
|
||||
int dispend;
|
||||
int v_sync_start;
|
||||
int v_syncstart;
|
||||
int split;
|
||||
int h_disp;
|
||||
int h_disp_old;
|
||||
int h_total;
|
||||
int h_sync_width;
|
||||
int h_disp_time;
|
||||
int rowoffset;
|
||||
int dispon;
|
||||
@@ -172,20 +190,17 @@ typedef struct ibm8514_t {
|
||||
|
||||
uint8_t data_available;
|
||||
uint8_t data_available2;
|
||||
uint8_t scanmodulos;
|
||||
uint8_t rowcount;
|
||||
int hsync_start;
|
||||
int hsync_width;
|
||||
int htotal;
|
||||
int hdisp;
|
||||
int vtadj;
|
||||
int vdadj;
|
||||
int vsadj;
|
||||
int hdisped;
|
||||
int sc;
|
||||
int vtb;
|
||||
int vdb;
|
||||
int vsb;
|
||||
int vsyncstart;
|
||||
int vsyncwidth;
|
||||
int vtotal;
|
||||
int v_disp;
|
||||
int vdisp;
|
||||
int disp_cntl;
|
||||
int interlace;
|
||||
@@ -201,6 +216,7 @@ typedef struct ibm8514_t {
|
||||
int pitch;
|
||||
int ext_pitch;
|
||||
int ext_crt_pitch;
|
||||
int extensions;
|
||||
} ibm8514_t;
|
||||
|
||||
#endif /*VIDEO_8514A_H*/
|
||||
|
||||
162
src/include/86box/vid_ati_mach8.h
Normal file
162
src/include/86box/vid_ati_mach8.h
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Emulation of the 8514/A-compatible Mach8 and Mach32 graphics
|
||||
* chips from ATI for the ISA/VLB/MCA/PCI buses.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: TheCollector1995.
|
||||
*
|
||||
* Copyright 2022-2024 TheCollector1995.
|
||||
*/
|
||||
#ifndef VIDEO_ATI_MACH8_H
|
||||
#define VIDEO_ATI_MACH8_H
|
||||
|
||||
typedef struct mach_t {
|
||||
ati_eeprom_t eeprom;
|
||||
svga_t svga;
|
||||
|
||||
rom_t bios_rom;
|
||||
rom_t bios_rom2;
|
||||
mem_mapping_t mmio_linear_mapping;
|
||||
|
||||
int mca_bus;
|
||||
int pci_bus;
|
||||
int vlb_bus;
|
||||
int has_bios;
|
||||
|
||||
uint8_t regs[256];
|
||||
uint8_t pci_regs[256];
|
||||
uint8_t int_line;
|
||||
uint8_t pci_slot;
|
||||
uint8_t irq_state;
|
||||
|
||||
int index;
|
||||
int ramdac_type;
|
||||
int old_mode;
|
||||
|
||||
uint32_t memory;
|
||||
|
||||
uint16_t config1;
|
||||
uint16_t config2;
|
||||
|
||||
uint8_t pos_regs[8];
|
||||
uint8_t pci_cntl_reg;
|
||||
uint8_t cursor_col_0;
|
||||
uint8_t cursor_col_1;
|
||||
uint8_t ext_cur_col_0_r;
|
||||
uint8_t ext_cur_col_1_r;
|
||||
uint8_t ext_cur_col_0_g;
|
||||
uint8_t ext_cur_col_1_g;
|
||||
uint16_t cursor_col_0_rg;
|
||||
uint16_t cursor_col_1_rg;
|
||||
uint16_t cursor_col_b;
|
||||
uint16_t cursor_offset_lo;
|
||||
uint16_t cursor_offset_lo_reg;
|
||||
uint16_t cursor_offset_hi;
|
||||
uint16_t cursor_offset_hi_reg;
|
||||
uint16_t cursor_vh_offset;
|
||||
uint16_t cursor_x;
|
||||
uint16_t cursor_y;
|
||||
uint16_t misc;
|
||||
uint16_t memory_aperture;
|
||||
uint16_t local_cntl;
|
||||
uint32_t linear_base;
|
||||
uint8_t ap_size;
|
||||
uint8_t bank_w;
|
||||
uint8_t bank_r;
|
||||
uint16_t shadow_set;
|
||||
uint16_t shadow_cntl;
|
||||
int ext_on[2];
|
||||
int compat_mode;
|
||||
|
||||
struct {
|
||||
uint8_t line_idx;
|
||||
int16_t line_array[6];
|
||||
uint8_t patt_idx;
|
||||
uint8_t patt_len;
|
||||
uint8_t pix_trans[2];
|
||||
uint8_t eeprom_control;
|
||||
uint16_t dest_x_end;
|
||||
uint16_t dest_x_start;
|
||||
uint16_t dest_y_end;
|
||||
uint16_t src_x_end;
|
||||
uint16_t src_x_start;
|
||||
uint16_t src_x;
|
||||
uint16_t src_y;
|
||||
int16_t bres_count;
|
||||
uint16_t clock_sel;
|
||||
uint16_t crt_pitch;
|
||||
uint16_t ge_pitch;
|
||||
uint16_t dest_cmp_fn;
|
||||
uint16_t dp_config;
|
||||
uint16_t ext_ge_config;
|
||||
uint16_t ge_offset_lo;
|
||||
uint16_t ge_offset_hi;
|
||||
uint16_t linedraw_opt;
|
||||
uint16_t max_waitstates;
|
||||
uint8_t patt_data_idx;
|
||||
uint8_t patt_data[0x18];
|
||||
uint16_t scan_to_x;
|
||||
uint16_t scratch0;
|
||||
uint16_t scratch1;
|
||||
uint16_t test;
|
||||
uint16_t pattern;
|
||||
uint16_t test2;
|
||||
int src_y_dir;
|
||||
int cmd_type;
|
||||
int block_write_mono_pattern_enable;
|
||||
int mono_pattern_enable;
|
||||
int16_t cx_end_line;
|
||||
int16_t cy_end_line;
|
||||
int16_t cx;
|
||||
int16_t cx_end;
|
||||
int16_t cy_end;
|
||||
int16_t dx;
|
||||
int16_t dx_end;
|
||||
int16_t dy;
|
||||
int16_t dy_end;
|
||||
int16_t dx_start;
|
||||
int16_t dy_start;
|
||||
int16_t cy;
|
||||
int16_t sx_start;
|
||||
int16_t sx_end;
|
||||
int16_t sx;
|
||||
int16_t x_count;
|
||||
int16_t xx_count;
|
||||
int16_t xxx_count;
|
||||
int16_t sy;
|
||||
int16_t y_count;
|
||||
int16_t err;
|
||||
int16_t width;
|
||||
int16_t src_width;
|
||||
int16_t height;
|
||||
int16_t bleft, bright, btop, bbottom;
|
||||
int poly_src;
|
||||
int temp_cnt;
|
||||
int stepx;
|
||||
int stepy;
|
||||
int src_stepx;
|
||||
uint8_t color_pattern[16];
|
||||
uint8_t color_pattern_full[32];
|
||||
uint16_t color_pattern_word[8];
|
||||
int mono_pattern[8][8];
|
||||
uint32_t ge_offset;
|
||||
uint32_t crt_offset;
|
||||
uint32_t patt_len_reg;
|
||||
int poly_fill;
|
||||
uint16_t dst_clr_cmp_mask;
|
||||
int clip_overrun;
|
||||
int color_pattern_idx;
|
||||
} accel;
|
||||
|
||||
atomic_int force_busy;
|
||||
} mach_t;
|
||||
|
||||
#endif /*VIDEO_ATI_MACH8_H*/
|
||||
@@ -66,6 +66,7 @@ typedef struct cga_t {
|
||||
int composite;
|
||||
int snow_enabled;
|
||||
int rgb_type;
|
||||
int double_type;
|
||||
} cga_t;
|
||||
|
||||
void cga_init(cga_t *cga);
|
||||
|
||||
@@ -56,6 +56,8 @@ typedef struct ega_t {
|
||||
|
||||
uint8_t *vram;
|
||||
|
||||
uint16_t light_pen;
|
||||
|
||||
int vidclock;
|
||||
int fast;
|
||||
int extvram;
|
||||
@@ -109,6 +111,8 @@ typedef struct ega_t {
|
||||
int bpp;
|
||||
int index;
|
||||
int remap_required;
|
||||
int actual_type;
|
||||
int chipset;
|
||||
|
||||
uint32_t charseta;
|
||||
uint32_t charsetb;
|
||||
@@ -143,7 +147,7 @@ typedef struct ega_t {
|
||||
extern const device_t ega_device;
|
||||
extern const device_t cpqega_device;
|
||||
extern const device_t sega_device;
|
||||
extern const device_t atiega_device;
|
||||
extern const device_t atiega800p_device;
|
||||
extern const device_t iskra_ega_device;
|
||||
extern const device_t et2000_device;
|
||||
#endif
|
||||
|
||||
@@ -118,16 +118,18 @@ typedef struct svga_t {
|
||||
int vram_display_mask;
|
||||
int vidclock;
|
||||
int dots_per_clock;
|
||||
int hblank_ext;
|
||||
int hwcursor_on;
|
||||
int dac_hwcursor_on;
|
||||
int overlay_on;
|
||||
int set_override;
|
||||
int hblankstart;
|
||||
int hblankend;
|
||||
int hblank_sub;
|
||||
int hblank_end_val;
|
||||
int hblank_end_len;
|
||||
int hblank_end_mask;
|
||||
int hblank_sub;
|
||||
int packed_4bpp;
|
||||
int ati_4color;
|
||||
|
||||
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
|
||||
0MB-1MB - VRAM
|
||||
@@ -164,8 +166,10 @@ typedef struct svga_t {
|
||||
latch_t latch;
|
||||
|
||||
pc_timer_t timer;
|
||||
pc_timer_t timer8514;
|
||||
|
||||
double clock;
|
||||
double clock8514;
|
||||
|
||||
hwcursor_t hwcursor;
|
||||
hwcursor_t hwcursor_latch;
|
||||
@@ -231,6 +235,7 @@ typedef struct svga_t {
|
||||
uint8_t dac_status;
|
||||
uint8_t dpms;
|
||||
uint8_t dpms_ui;
|
||||
uint8_t color_2bpp;
|
||||
uint8_t ksc5601_sbyte_mask;
|
||||
uint8_t ksc5601_udc_area_msb[2];
|
||||
|
||||
@@ -246,6 +251,11 @@ typedef struct svga_t {
|
||||
addresses are shifted to match*/
|
||||
int packed_chain4;
|
||||
|
||||
/*Disable 8bpp blink mode - some cards support it, some don't, it's a weird mode
|
||||
If mode 13h appears in a reddish-brown background (0x88) with dark green text (0x8F),
|
||||
you should set this flag when entering that mode*/
|
||||
int disable_blink;
|
||||
|
||||
/*Force CRTC to dword mode, regardless of CR14/CR17. Required for S3 enhanced mode*/
|
||||
int force_dword_mode;
|
||||
|
||||
@@ -263,22 +273,39 @@ typedef struct svga_t {
|
||||
/* Pointer to monitor */
|
||||
monitor_t *monitor;
|
||||
|
||||
/* Enable LUT mapping of >= 24 bpp modes. */
|
||||
int lut_map;
|
||||
|
||||
/* Override the horizontal blanking stuff. */
|
||||
int hoverride;
|
||||
|
||||
/* Return a 32 bpp color from a 15/16 bpp color. */
|
||||
uint32_t (*conv_16to32)(struct svga_t *svga, uint16_t color, uint8_t bpp);
|
||||
|
||||
void * dev8514;
|
||||
void * ext8514;
|
||||
void * xga;
|
||||
} svga_t;
|
||||
|
||||
extern int vga_on;
|
||||
|
||||
extern void ibm8514_poll(void *priv, svga_t *svga);
|
||||
extern void ibm8514_poll(void *priv);
|
||||
extern void ibm8514_recalctimings(svga_t *svga);
|
||||
extern uint8_t ibm8514_ramdac_in(uint16_t port, void *priv);
|
||||
extern void ibm8514_ramdac_out(uint16_t port, uint8_t val, void *priv);
|
||||
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_accel_out_pixtrans(svga_t *svga, uint16_t port, uint32_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);
|
||||
|
||||
#ifdef ATI_8514_ULTRA
|
||||
extern void ati8514_recalctimings(svga_t *svga);
|
||||
extern uint8_t ati8514_mca_read(int port, void *priv);
|
||||
extern void ati8514_mca_write(int port, uint8_t val, void *priv);
|
||||
extern void ati8514_init(svga_t *svga, void *ext8514, void *dev8514);
|
||||
#endif
|
||||
|
||||
extern void xga_poll(void *priv, svga_t *svga);
|
||||
extern void xga_recalctimings(svga_t *svga);
|
||||
|
||||
@@ -329,6 +356,8 @@ enum {
|
||||
RAMDAC_8BIT
|
||||
};
|
||||
|
||||
uint32_t svga_lookup_lut_ram(svga_t* svga, uint32_t val);
|
||||
|
||||
/* We need a way to add a device with a pointer to a parent device so it can attach itself to it, and
|
||||
possibly also a second ATi 68860 RAM DAC type that auto-sets SVGA render on RAM DAC render change. */
|
||||
extern void ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga);
|
||||
@@ -388,11 +417,13 @@ extern float stg_getclock(int clock, void *priv);
|
||||
extern void tkd8001_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga);
|
||||
extern uint8_t tkd8001_ramdac_in(uint16_t addr, void *priv, svga_t *svga);
|
||||
|
||||
extern void tvp3026_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, void *priv, svga_t *svga);
|
||||
extern uint8_t tvp3026_ramdac_in(uint16_t addr, int rs2, int rs3, void *priv, svga_t *svga);
|
||||
extern void tvp3026_recalctimings(void *priv, svga_t *svga);
|
||||
extern void tvp3026_hwcursor_draw(svga_t *svga, int displine);
|
||||
extern float tvp3026_getclock(int clock, void *priv);
|
||||
extern void tvp3026_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, void *priv, svga_t *svga);
|
||||
extern uint8_t tvp3026_ramdac_in(uint16_t addr, int rs2, int rs3, void *priv, svga_t *svga);
|
||||
extern uint32_t tvp3026_conv_16to32(svga_t* svga, uint16_t color, uint8_t bpp);
|
||||
extern void tvp3026_recalctimings(void *priv, svga_t *svga);
|
||||
extern void tvp3026_hwcursor_draw(svga_t *svga, int displine);
|
||||
extern float tvp3026_getclock(int clock, void *priv);
|
||||
extern void tvp3026_gpio(uint8_t (*read)(uint8_t cntl, void *priv), void (*write)(uint8_t cntl, uint8_t data, void *priv), void *cb_priv, void *priv);
|
||||
|
||||
# ifdef EMU_DEVICE_H
|
||||
extern const device_t ati68860_ramdac_device;
|
||||
|
||||
@@ -53,6 +53,7 @@ extern void svga_render_4bpp_lowres(svga_t *svga);
|
||||
extern void svga_render_4bpp_highres(svga_t *svga);
|
||||
extern void svga_render_8bpp_lowres(svga_t *svga);
|
||||
extern void svga_render_8bpp_highres(svga_t *svga);
|
||||
extern void svga_render_8bpp_clone_highres(svga_t *svga);
|
||||
extern void svga_render_8bpp_tseng_lowres(svga_t *svga);
|
||||
extern void svga_render_8bpp_tseng_highres(svga_t *svga);
|
||||
extern void svga_render_8bpp_gs_lowres(svga_t *svga);
|
||||
@@ -74,6 +75,7 @@ extern void svga_render_ABGR8888_highres(svga_t *svga);
|
||||
extern void svga_render_RGBA8888_lowres(svga_t *svga);
|
||||
extern void svga_render_RGBA8888_highres(svga_t *svga);
|
||||
|
||||
extern void ibm8514_render_blank(svga_t *svga);
|
||||
extern void ibm8514_render_8bpp(svga_t *svga);
|
||||
extern void ibm8514_render_15bpp(svga_t *svga);
|
||||
extern void ibm8514_render_16bpp(svga_t *svga);
|
||||
|
||||
@@ -32,6 +32,9 @@ using atomic_int = std::atomic_int;
|
||||
|
||||
#define makecol(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
|
||||
#define makecol32(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
|
||||
#define getcolr(color) (((color) >> 16) & 0xFF)
|
||||
#define getcolg(color) (((color) >> 8) & 0xFF)
|
||||
#define getcolb(color) ((color) & 0xFF)
|
||||
|
||||
enum {
|
||||
VID_NONE = 0,
|
||||
@@ -303,7 +306,7 @@ extern void xga_device_add(void);
|
||||
|
||||
/* IBM 8514/A and clones*/
|
||||
extern void ibm8514_device_add(void);
|
||||
extern const device_t mach8_isa_device;
|
||||
extern const device_t mach8_vga_isa_device;
|
||||
extern const device_t mach32_isa_device;
|
||||
extern const device_t mach32_vlb_device;
|
||||
extern const device_t mach32_mca_device;
|
||||
@@ -345,6 +348,7 @@ extern const device_t gd5426_diamond_speedstar_pro_a1_isa_device;
|
||||
extern const device_t gd5426_vlb_device;
|
||||
extern const device_t gd5426_onboard_device;
|
||||
extern const device_t gd5428_isa_device;
|
||||
extern const device_t gd5428_vlb_onboard_device;
|
||||
extern const device_t gd5428_vlb_device;
|
||||
extern const device_t gd5428_diamond_speedstar_pro_b1_vlb_device;
|
||||
extern const device_t gd5428_boca_isa_device;
|
||||
@@ -431,12 +435,12 @@ extern const device_t ht216_32_standalone_device;
|
||||
extern const device_t im1024_device;
|
||||
extern const device_t pgc_device;
|
||||
|
||||
# if defined(DEV_BRANCH) && defined(USE_MGA)
|
||||
/* Matrox MGA */
|
||||
extern const device_t millennium_device;
|
||||
extern const device_t mystique_device;
|
||||
extern const device_t mystique_220_device;
|
||||
# endif
|
||||
extern const device_t millennium_ii_device;
|
||||
extern const device_t productiva_g100_device;
|
||||
|
||||
/* Oak OTI-0x7 */
|
||||
extern const device_t oti037c_device;
|
||||
@@ -455,6 +459,7 @@ extern const device_t paradise_wd90c11_device;
|
||||
extern const device_t paradise_wd90c30_device;
|
||||
|
||||
/* Realtek (S)VGA */
|
||||
extern const device_t realtek_rtg3105_device;
|
||||
extern const device_t realtek_rtg3106_device;
|
||||
|
||||
/* S3 9XX/8XX/Vision/Trio */
|
||||
@@ -475,7 +480,9 @@ extern const device_t s3_bahamas64_vlb_device;
|
||||
extern const device_t s3_bahamas64_pci_device;
|
||||
extern const device_t s3_9fx_vlb_device;
|
||||
extern const device_t s3_9fx_pci_device;
|
||||
extern const device_t s3_phoenix_trio32_onboard_vlb_device;
|
||||
extern const device_t s3_phoenix_trio32_vlb_device;
|
||||
extern const device_t s3_phoenix_trio32_onboard_pci_device;
|
||||
extern const device_t s3_phoenix_trio32_pci_device;
|
||||
extern const device_t s3_diamond_stealth_se_vlb_device;
|
||||
extern const device_t s3_diamond_stealth_se_pci_device;
|
||||
@@ -485,6 +492,7 @@ extern const device_t s3_phoenix_trio64_onboard_pci_device;
|
||||
extern const device_t s3_phoenix_trio64_pci_device;
|
||||
extern const device_t s3_phoenix_trio64vplus_pci_device;
|
||||
extern const device_t s3_phoenix_trio64vplus_onboard_pci_device;
|
||||
extern const device_t s3_cardex_trio64vplus_pci_device;
|
||||
extern const device_t s3_mirocrystal_20sv_964_vlb_device;
|
||||
extern const device_t s3_mirocrystal_20sv_964_pci_device;
|
||||
extern const device_t s3_mirocrystal_20sd_864_vlb_device;
|
||||
|
||||
Reference in New Issue
Block a user