2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2001-12-22 23:58:25 +03:00
|
|
|
// $Id: siminterface.h,v 1.31 2001-12-22 20:58:25 vruppert Exp $
|
2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2001-06-08 11:20:07 +04:00
|
|
|
/*
|
|
|
|
* gui/siminterface.h
|
2001-12-22 23:58:25 +03:00
|
|
|
* $Id: siminterface.h,v 1.31 2001-12-22 20:58:25 vruppert Exp $
|
2001-06-08 11:20:07 +04:00
|
|
|
*
|
|
|
|
* Interface to the simulator, currently only used by control.cc.
|
|
|
|
* The base class bx_simulator_interface_c, contains only virtual functions
|
|
|
|
* and it defines the interface that control.cc is allowed to use.
|
|
|
|
* In siminterface.cc, a class called bx_real_sim_c is defined with
|
|
|
|
* bx_simulator_interface_c as its parent class. Bx_real_sim_c
|
|
|
|
* implements each of the functions. The separation into parent class
|
|
|
|
* and child class leaves the possibility of making a different child
|
|
|
|
* class that talks to the simulator in a different way (networking
|
|
|
|
* for example).
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2001-06-18 18:11:55 +04:00
|
|
|
#define BX_UI_TEXT 1
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////
|
2001-06-16 03:52:34 +04:00
|
|
|
|
|
|
|
typedef enum {
|
2001-06-18 18:11:55 +04:00
|
|
|
BXP_NULL = 101,
|
|
|
|
BXP_IPS,
|
2001-06-16 03:52:34 +04:00
|
|
|
BXP_VGA_UPDATE_INTERVAL,
|
|
|
|
BXP_MOUSE_ENABLED,
|
2001-06-16 23:29:59 +04:00
|
|
|
BXP_MEM_SIZE,
|
|
|
|
BXP_ROM_PATH,
|
2001-06-17 17:50:52 +04:00
|
|
|
BXP_ROM_ADDRESS,
|
2001-06-18 18:11:55 +04:00
|
|
|
BXP_VGA_ROM_PATH,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_KBD_SERIAL_DELAY,
|
2001-12-12 13:38:39 +03:00
|
|
|
BXP_KBD_TYPE,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_FLOPPY_CMD_DELAY,
|
|
|
|
BXP_FLOPPYA_PATH,
|
|
|
|
BXP_FLOPPYA_TYPE,
|
|
|
|
BXP_FLOPPYA_STATUS,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_FLOPPYA,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_FLOPPYB_PATH,
|
|
|
|
BXP_FLOPPYB_TYPE,
|
|
|
|
BXP_FLOPPYB_STATUS,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_FLOPPYB,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_DISKC_PRESENT,
|
|
|
|
BXP_DISKC_PATH,
|
|
|
|
BXP_DISKC_CYLINDERS,
|
|
|
|
BXP_DISKC_HEADS,
|
|
|
|
BXP_DISKC_SPT,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_DISKC,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_DISKD_PRESENT,
|
|
|
|
BXP_DISKD_PATH,
|
|
|
|
BXP_DISKD_CYLINDERS,
|
|
|
|
BXP_DISKD_HEADS,
|
|
|
|
BXP_DISKD_SPT,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_DISKD,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_CDROM_PRESENT,
|
|
|
|
BXP_CDROM_PATH,
|
|
|
|
BXP_CDROM_INSERTED,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_CDROMD,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_PRIVATE_COLORMAP,
|
2001-08-16 00:17:19 +04:00
|
|
|
BXP_FULLSCREEN,
|
2001-08-16 06:00:31 +04:00
|
|
|
BXP_SCREENMODE,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_I440FX_SUPPORT,
|
|
|
|
BXP_NEWHARDDRIVESUPPORT,
|
|
|
|
BXP_LOG_FILENAME,
|
|
|
|
BXP_CMOS_PATH,
|
|
|
|
BXP_CMOS_IMAGE,
|
|
|
|
BXP_CMOS_TIME0,
|
|
|
|
BXP_LOAD32BITOS_WHICH,
|
|
|
|
BXP_LOAD32BITOS_PATH,
|
|
|
|
BXP_LOAD32BITOS_IOLOG,
|
|
|
|
BXP_LOAD32BITOS_INITRD,
|
2001-06-21 23:57:21 +04:00
|
|
|
BXP_LOAD32BITOS,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXP_BOOTDRIVE,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_MENU_MAIN,
|
|
|
|
BXP_MENU_MEMORY,
|
|
|
|
BXP_MENU_INTERFACE,
|
|
|
|
BXP_MENU_DISK,
|
2001-11-12 05:35:09 +03:00
|
|
|
BXP_MENU_PARALLEL,
|
2001-06-21 18:37:55 +04:00
|
|
|
BXP_MENU_SOUND,
|
|
|
|
BXP_MENU_MISC,
|
|
|
|
BXP_MENU_RUNTIME,
|
2001-06-21 20:59:56 +04:00
|
|
|
BXP_SYSTEM_CLOCK_SYNC,
|
|
|
|
BXP_MAX_IPS,
|
2001-06-21 22:34:50 +04:00
|
|
|
BXP_NE2K_VALID,
|
|
|
|
BXP_NE2K_IOADDR,
|
|
|
|
BXP_NE2K_IRQ,
|
|
|
|
BXP_NE2K_MACADDR,
|
|
|
|
BXP_NE2K_ETHMOD,
|
|
|
|
BXP_NE2K_ETHDEV,
|
|
|
|
BXP_NE2K,
|
|
|
|
BXP_SB16_PRESENT,
|
|
|
|
BXP_SB16_MIDIFILE,
|
|
|
|
BXP_SB16_WAVEFILE,
|
|
|
|
BXP_SB16_LOGFILE,
|
|
|
|
BXP_SB16_MIDIMODE,
|
|
|
|
BXP_SB16_WAVEMODE,
|
|
|
|
BXP_SB16_LOGLEVEL,
|
|
|
|
BXP_SB16_DMATIMER,
|
|
|
|
BXP_SB16,
|
2001-11-12 05:35:09 +03:00
|
|
|
BXP_PARPORT1_ENABLE,
|
|
|
|
BXP_PARPORT1_OUTFILE,
|
|
|
|
BXP_PARPORT2_ENABLE,
|
|
|
|
BXP_PARPORT2_OUTFILE,
|
2001-12-14 20:56:37 +03:00
|
|
|
BXP_KEYBOARD_USEMAPPING,
|
|
|
|
BXP_KEYBOARD_MAP,
|
|
|
|
BXP_KEYBOARD,
|
2001-06-18 18:11:55 +04:00
|
|
|
BXP_THIS_IS_THE_LAST // used to determine length of list
|
2001-06-16 03:52:34 +04:00
|
|
|
} bx_id;
|
|
|
|
|
|
|
|
typedef enum {
|
2001-06-17 03:08:32 +04:00
|
|
|
BXT_OBJECT = 201,
|
2001-06-16 03:52:34 +04:00
|
|
|
BXT_NODE,
|
|
|
|
BXT_PARAM,
|
2001-06-17 03:08:32 +04:00
|
|
|
BXT_PARAM_NUM,
|
2001-06-20 18:01:39 +04:00
|
|
|
BXT_PARAM_BOOL,
|
|
|
|
BXT_PARAM_ENUM,
|
2001-06-18 18:11:55 +04:00
|
|
|
BXT_PARAM_STRING,
|
|
|
|
BXT_LIST
|
2001-06-16 03:52:34 +04:00
|
|
|
} bx_objtype;
|
|
|
|
|
2001-06-16 23:29:59 +04:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2001-06-16 03:52:34 +04:00
|
|
|
class bx_object_c {
|
|
|
|
private:
|
|
|
|
bx_id id;
|
|
|
|
Bit8u type;
|
|
|
|
protected:
|
|
|
|
void set_type (Bit8u type);
|
|
|
|
public:
|
|
|
|
bx_object_c (bx_id id);
|
|
|
|
bx_id get_id () { return id; }
|
|
|
|
Bit8u get_type () { return type; }
|
|
|
|
};
|
|
|
|
|
|
|
|
class bx_param_c : public bx_object_c {
|
2001-06-21 18:37:55 +04:00
|
|
|
protected:
|
2001-06-16 03:52:34 +04:00
|
|
|
char *name;
|
|
|
|
char *description;
|
2001-06-18 18:11:55 +04:00
|
|
|
char *text_format; // printf format string. %d for ints, %s for strings, etc.
|
|
|
|
char *ask_format; // format string for asking for a new value
|
|
|
|
int runtime_param;
|
2001-06-21 18:37:55 +04:00
|
|
|
int enabled;
|
2001-06-16 03:52:34 +04:00
|
|
|
public:
|
|
|
|
bx_param_c (bx_id id,
|
|
|
|
char *name,
|
|
|
|
char *description);
|
2001-06-18 18:11:55 +04:00
|
|
|
void set_format (char *format) {text_format = format;}
|
|
|
|
char *get_format () {return text_format;}
|
|
|
|
void set_ask_format (char *format) {ask_format = format; }
|
|
|
|
char *get_ask_format () {return ask_format;}
|
|
|
|
void set_runtime_param (int val) { runtime_param = val; }
|
2001-06-16 03:52:34 +04:00
|
|
|
char *get_name () { return name; }
|
|
|
|
char *get_description () { return description; }
|
2001-06-21 18:37:55 +04:00
|
|
|
int get_enabled () { return enabled; }
|
|
|
|
void set_enabled (int enabled) { this->enabled = enabled; }
|
2001-06-16 03:52:34 +04:00
|
|
|
void reset () {}
|
2001-06-16 23:29:59 +04:00
|
|
|
int getint () {return -1;}
|
2001-06-18 18:11:55 +04:00
|
|
|
#if BX_UI_TEXT
|
|
|
|
virtual void text_print (FILE *fp) {}
|
2001-06-22 17:37:08 +04:00
|
|
|
virtual int text_ask (FILE *fpin, FILE *fpout) {return -1;}
|
2001-06-18 18:11:55 +04:00
|
|
|
#endif
|
2001-06-16 23:29:59 +04:00
|
|
|
};
|
|
|
|
|
2001-06-17 03:08:32 +04:00
|
|
|
typedef Bit32s (*param_event_handler)(class bx_param_c *, int set, Bit32s val);
|
2001-06-16 03:52:34 +04:00
|
|
|
|
|
|
|
class bx_param_num_c : public bx_param_c {
|
2001-06-20 18:01:39 +04:00
|
|
|
protected:
|
2001-06-16 03:52:34 +04:00
|
|
|
Bit32s min, max, val, initial_val;
|
2001-06-17 03:08:32 +04:00
|
|
|
param_event_handler handler;
|
2001-06-18 18:11:55 +04:00
|
|
|
int base;
|
2001-06-16 03:52:34 +04:00
|
|
|
public:
|
|
|
|
bx_param_num_c (bx_id id,
|
|
|
|
char *name,
|
|
|
|
char *description,
|
|
|
|
Bit32s min, Bit32s max, Bit32s initial_val);
|
|
|
|
void reset ();
|
2001-06-21 18:37:55 +04:00
|
|
|
void set_handler (param_event_handler handler);
|
2001-06-16 03:52:34 +04:00
|
|
|
Bit32s get ();
|
2001-06-16 23:29:59 +04:00
|
|
|
void set (Bit32s val);
|
2001-06-18 18:11:55 +04:00
|
|
|
void set_base (int base) { this->base = base; }
|
|
|
|
#if BX_UI_TEXT
|
|
|
|
virtual void text_print (FILE *fp);
|
|
|
|
virtual int text_ask (FILE *fpin, FILE *fpout);
|
|
|
|
#endif
|
2001-06-16 23:29:59 +04:00
|
|
|
};
|
|
|
|
|
2001-06-20 18:01:39 +04:00
|
|
|
class bx_param_bool_c : public bx_param_num_c {
|
|
|
|
public:
|
|
|
|
bx_param_bool_c (bx_id id,
|
|
|
|
char *name,
|
|
|
|
char *description,
|
|
|
|
Bit32s initial_val);
|
|
|
|
#if BX_UI_TEXT
|
|
|
|
virtual void text_print (FILE *fp);
|
|
|
|
virtual int text_ask (FILE *fpin, FILE *fpout);
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
class bx_param_enum_c : public bx_param_num_c {
|
|
|
|
char **choices;
|
|
|
|
public:
|
|
|
|
bx_param_enum_c (bx_id id,
|
|
|
|
char *name,
|
|
|
|
char *description,
|
|
|
|
char **choices,
|
|
|
|
Bit32s initial_val,
|
|
|
|
Bit32s value_base = 0);
|
|
|
|
#if BX_UI_TEXT
|
2001-06-21 18:37:55 +04:00
|
|
|
virtual void text_print (FILE *fp);
|
|
|
|
virtual int text_ask (FILE *fpin, FILE *fpout);
|
2001-06-20 18:01:39 +04:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2001-06-21 18:37:55 +04:00
|
|
|
typedef char* (*param_string_event_handler)(class bx_param_string_c *, int set, char *val, int maxlen);
|
2001-06-16 23:29:59 +04:00
|
|
|
|
|
|
|
class bx_param_string_c : public bx_param_c {
|
|
|
|
int maxsize;
|
|
|
|
char *val, *initial_val;
|
|
|
|
param_string_event_handler handler;
|
2001-06-21 23:27:05 +04:00
|
|
|
bx_param_num_c *options;
|
|
|
|
char separator;
|
2001-06-16 23:29:59 +04:00
|
|
|
public:
|
2001-06-21 23:27:05 +04:00
|
|
|
enum {
|
|
|
|
BX_RAW_BYTES = 1,
|
|
|
|
} bx_string_opt_bits;
|
2001-06-16 23:29:59 +04:00
|
|
|
bx_param_string_c (bx_id id,
|
|
|
|
char *name,
|
|
|
|
char *description,
|
2001-06-18 18:11:55 +04:00
|
|
|
char *initial_val,
|
|
|
|
int maxsize=-1);
|
2001-12-22 23:58:25 +03:00
|
|
|
virtual ~bx_param_string_c ();
|
2001-06-16 23:29:59 +04:00
|
|
|
void reset ();
|
2001-06-21 18:37:55 +04:00
|
|
|
void set_handler (param_string_event_handler handler);
|
2001-06-16 23:29:59 +04:00
|
|
|
Bit32s get (char *buf, int len);
|
|
|
|
char *getptr () {return val; }
|
|
|
|
void set (char *buf);
|
2001-06-21 23:27:05 +04:00
|
|
|
bx_param_num_c *get_options () { return options; }
|
|
|
|
void set_separator (char sep) {separator = sep; }
|
2001-06-18 18:11:55 +04:00
|
|
|
#if BX_UI_TEXT
|
|
|
|
virtual void text_print (FILE *fp);
|
|
|
|
virtual int text_ask (FILE *fpin, FILE *fpout);
|
|
|
|
#endif
|
2001-06-16 03:52:34 +04:00
|
|
|
};
|
|
|
|
|
2001-06-18 18:11:55 +04:00
|
|
|
class bx_list_c : public bx_param_c {
|
2001-06-16 03:52:34 +04:00
|
|
|
private:
|
2001-06-18 18:11:55 +04:00
|
|
|
// just a list of bx_param_c objects. size tells current number of
|
|
|
|
// objects in the list, and maxsize tells how many list items are
|
|
|
|
// allocated in the constructor.
|
|
|
|
bx_param_c **list;
|
|
|
|
int size, maxsize;
|
|
|
|
// options is a bit field whose bits are defined by bx_listopt_bits ORed
|
|
|
|
// together. Options is a bx_param so that if necessary the bx_list could
|
|
|
|
// install a handler to cause get/set of options to have side effects.
|
|
|
|
bx_param_num_c *options;
|
|
|
|
// for a menu, the value of choice before the call to "ask" is default.
|
|
|
|
// After ask, choice holds the value that the user chose. Choice defaults
|
|
|
|
// to 1 in the constructor.
|
|
|
|
bx_param_num_c *choice;
|
|
|
|
// title of the menu or series
|
|
|
|
bx_param_string_c *title;
|
|
|
|
// if the menu shows a "return to previous menu" type of choice,
|
|
|
|
// this controls where that choice will go.
|
|
|
|
bx_param_c *parent;
|
|
|
|
void init ();
|
2001-06-16 03:52:34 +04:00
|
|
|
public:
|
2001-06-18 18:11:55 +04:00
|
|
|
enum {
|
|
|
|
// When a bx_list_c is displayed as a menu, SHOW_PARENT controls whether or
|
|
|
|
// not the menu shows "0. Return to previous menu" or not.
|
|
|
|
BX_SHOW_PARENT = (1<<0),
|
|
|
|
// Some lists are best displayed shown as menus, others as a series of
|
|
|
|
// related questions.
|
|
|
|
BX_SERIES_ASK = (1<<1)
|
|
|
|
} bx_listopt_bits;
|
2001-06-21 18:37:55 +04:00
|
|
|
//bx_list_c (bx_id id, int maxsize);
|
|
|
|
bx_list_c (bx_id id, char *name, char *description, bx_param_c **init_list);
|
2001-12-22 23:58:25 +03:00
|
|
|
virtual ~bx_list_c();
|
2001-06-18 18:11:55 +04:00
|
|
|
void add (bx_param_c *param);
|
|
|
|
bx_param_c *get (int index);
|
|
|
|
bx_param_num_c *get_options () { return options; }
|
|
|
|
bx_param_num_c *get_choice () { return choice; }
|
|
|
|
bx_param_string_c *get_title () { return title; }
|
|
|
|
void set_parent (bx_param_c *parent);
|
|
|
|
#if BX_UI_TEXT
|
|
|
|
virtual void text_print (FILE *);
|
|
|
|
virtual int text_ask (FILE *fpin, FILE *fpout);
|
|
|
|
#endif
|
2001-06-16 03:52:34 +04:00
|
|
|
};
|
2001-06-18 18:11:55 +04:00
|
|
|
|
2001-06-20 18:01:39 +04:00
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#define BX_FLOPPY_NONE 10 // floppy not present
|
|
|
|
#define BX_FLOPPY_1_2 11 // 1.2M 5.25"
|
|
|
|
#define BX_FLOPPY_1_44 12 // 1.44M 3.5"
|
|
|
|
#define BX_FLOPPY_2_88 13 // 2.88M 3.5"
|
|
|
|
#define BX_FLOPPY_720K 14 // 720K 3.5"
|
|
|
|
#define BX_FLOPPY_LAST 14 // last legal value of floppy type
|
|
|
|
#define BX_FLOPPY_GUESS 20 // decide based on image size
|
|
|
|
|
|
|
|
extern char *floppy_type_names[];
|
|
|
|
extern int n_floppy_type_names;
|
|
|
|
extern char *floppy_status_names[];
|
|
|
|
extern int n_floppy_status_names;
|
2001-06-21 18:37:55 +04:00
|
|
|
extern char *floppy_bootdisk_names[];
|
|
|
|
extern int n_floppy_bootdisk_names;
|
2001-06-21 23:57:21 +04:00
|
|
|
extern char *loader_os_names[];
|
|
|
|
extern int n_loader_os_names;
|
2001-12-12 13:38:39 +03:00
|
|
|
extern char *keyboard_type_names[];
|
|
|
|
extern int n_keyboard_type_names;
|
2001-06-20 18:01:39 +04:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bx_param_string_c *Opath;
|
|
|
|
bx_param_enum_c *Otype;
|
|
|
|
bx_param_enum_c *Oinitial_status;
|
|
|
|
} bx_floppy_options;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bx_param_bool_c *Opresent;
|
|
|
|
bx_param_string_c *Opath;
|
|
|
|
bx_param_num_c *Ocylinders;
|
|
|
|
bx_param_num_c *Oheads;
|
|
|
|
bx_param_num_c *Ospt;
|
|
|
|
} bx_disk_options;
|
|
|
|
|
|
|
|
struct bx_cdrom_options
|
|
|
|
{
|
|
|
|
bx_param_bool_c *Opresent;
|
|
|
|
bx_param_string_c *Opath;
|
2001-06-21 18:37:55 +04:00
|
|
|
bx_param_enum_c *Oinserted;
|
2001-06-20 18:01:39 +04:00
|
|
|
};
|
|
|
|
|
2001-06-18 18:11:55 +04:00
|
|
|
|
2001-06-16 23:29:59 +04:00
|
|
|
////////////////////////////////////////////////////////////////////
|
2001-06-10 00:01:12 +04:00
|
|
|
|
2001-06-08 11:20:07 +04:00
|
|
|
class bx_simulator_interface_c {
|
|
|
|
public:
|
|
|
|
bx_simulator_interface_c ();
|
2001-06-18 18:11:55 +04:00
|
|
|
virtual int get_init_done () { return -1; }
|
|
|
|
virtual int set_init_done (int n) {return -1;}
|
|
|
|
virtual int register_param (bx_id id, bx_param_c *it) {return -1;}
|
2001-06-16 23:29:59 +04:00
|
|
|
virtual bx_param_c *get_param (bx_id id) {return NULL;}
|
|
|
|
virtual bx_param_num_c *get_param_num (bx_id id) {return NULL;}
|
2001-06-17 03:08:32 +04:00
|
|
|
virtual bx_param_string_c *get_param_string (bx_id id) {return NULL;}
|
2001-06-08 11:20:07 +04:00
|
|
|
virtual int get_n_log_modules () {return -1;}
|
|
|
|
virtual char *get_prefix (int mod) {return 0;}
|
|
|
|
virtual int get_log_action (int mod, int level) {return -1;}
|
|
|
|
virtual void set_log_action (int mod, int level, int action) {}
|
|
|
|
virtual char *get_action_name (int action) {return 0;}
|
2001-11-14 03:23:08 +03:00
|
|
|
virtual const char *get_log_level_name (int level) {return 0;}
|
2001-06-08 11:20:07 +04:00
|
|
|
virtual int get_max_log_level () {return -1;}
|
2001-06-10 00:01:12 +04:00
|
|
|
virtual void quit_sim (int clean) {}
|
2001-06-12 00:27:23 +04:00
|
|
|
virtual int get_default_rc (char *path, int len) {return -1;}
|
2001-06-10 00:01:12 +04:00
|
|
|
virtual int read_rc (char *path) {return -1;}
|
2001-06-11 10:35:18 +04:00
|
|
|
virtual int write_rc (char *rc, int overwrite) {return -1;}
|
2001-06-12 00:27:23 +04:00
|
|
|
virtual int get_log_file (char *path, int len) {return -1;}
|
2001-06-10 00:01:12 +04:00
|
|
|
virtual int set_log_file (char *path) {return -1;}
|
|
|
|
virtual int get_floppy_options (int drive, bx_floppy_options *out) {return -1;}
|
|
|
|
virtual int get_cdrom_options (int drive, bx_cdrom_options *out) {return -1;}
|
|
|
|
virtual char *get_floppy_type_name (int type) {return NULL;}
|
2001-06-11 18:03:35 +04:00
|
|
|
typedef int (*sim_interface_callback_t)(int code);
|
|
|
|
virtual void set_notify_callback (sim_interface_callback_t func) {}
|
|
|
|
virtual int notify_return (int retcode) {return -1;}
|
|
|
|
// methods marked LOCAL should only be called by the simulator, not
|
|
|
|
// from the control panel.
|
|
|
|
#define NOTIFY_CODE_LOGMSG 0x101
|
2001-06-12 00:27:23 +04:00
|
|
|
virtual int LOCAL_notify (int code) {return -1;}
|
2001-11-14 03:23:08 +03:00
|
|
|
virtual int LOCAL_log_msg (const char *prefix, int level, char *msg) {return -1;}
|
2001-06-11 18:03:35 +04:00
|
|
|
virtual int log_msg_2 (char *prefix, int *level, char *msg, int len) {return -1;}
|
2001-06-22 01:24:05 +04:00
|
|
|
virtual int get_enabled () {return -1;}
|
|
|
|
virtual void set_enabled (int enabled) {}
|
2001-06-08 11:20:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
extern bx_simulator_interface_c *SIM;
|
|
|
|
|
|
|
|
extern void init_siminterface ();
|