WD76C10 rewrite, closes #238.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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,11 +118,31 @@ 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_spinner_t {
|
||||
int16_t min;
|
||||
int16_t max;
|
||||
int16_t step;
|
||||
} device_config_spinner_t;
|
||||
|
||||
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;
|
||||
@@ -115,23 +153,14 @@ typedef struct device_config_bios_t {
|
||||
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_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_config_ {
|
||||
device_common_config_t;
|
||||
const device_config_bios_t bios[32];
|
||||
} device_config_t;
|
||||
|
||||
|
@@ -124,8 +124,8 @@ 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);
|
||||
|
@@ -554,7 +554,7 @@ machine_at_wd76c10_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(¶dise_wd90c11_megapc_device);
|
||||
|
Reference in New Issue
Block a user