3 #define MAX_NUM_MAPPED_ITEMS 8
5 #define SIZE_MEGA (1024 * 1024)
6 #define SIZE_GIGA (1024 * 1024 * 1024)
48 struct emulator_config {
49 unsigned int cpu_type;
51 unsigned char map_type[MAX_NUM_MAPPED_ITEMS];
52 long map_offset[MAX_NUM_MAPPED_ITEMS];
53 long map_high[MAX_NUM_MAPPED_ITEMS];
54 unsigned int map_size[MAX_NUM_MAPPED_ITEMS];
55 unsigned int rom_size[MAX_NUM_MAPPED_ITEMS];
56 unsigned char *map_data[MAX_NUM_MAPPED_ITEMS];
57 int map_mirror[MAX_NUM_MAPPED_ITEMS];
58 char *map_id[MAX_NUM_MAPPED_ITEMS];
60 struct platform_config *platform;
64 char mouse_toggle_key, keyboard_toggle_key;
65 unsigned char mouse_enabled, keyboard_enabled;
67 unsigned int loop_cycles;
68 unsigned int mapped_low, mapped_high;
69 unsigned int custom_low, custom_high;
72 struct platform_config {
76 int (*custom_read)(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
77 int (*custom_write)(struct emulator_config *cfg, unsigned int addr, unsigned int val, unsigned char type);
79 int (*register_read)(unsigned int addr, unsigned char type, unsigned int *val);
80 int (*register_write)(unsigned int addr, unsigned int value, unsigned char type);
82 int (*platform_initial_setup)(struct emulator_config *cfg);
83 void (*handle_reset)(struct emulator_config *cfg);
84 void (*shutdown)(struct emulator_config *cfg);
85 void (*setvar)(char *var, char *val);
88 unsigned int get_m68k_cpu_type(char *name);
89 struct emulator_config *load_config_file(char *filename);
91 int handle_mapped_read(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
92 int handle_mapped_write(struct emulator_config *cfg, unsigned int addr, unsigned int value, unsigned char type);
93 int get_named_mapped_item(struct emulator_config *cfg, char *name);
94 unsigned int get_int(char *str);