8 #define MAX_NUM_MAPPED_ITEMS 8
10 #define SIZE_MEGA (1024 * 1024)
11 #define SIZE_GIGA (1024 * 1024 * 1024)
54 struct emulator_config {
55 unsigned int cpu_type;
57 unsigned char map_type[MAX_NUM_MAPPED_ITEMS];
58 unsigned long map_offset[MAX_NUM_MAPPED_ITEMS];
59 unsigned long map_high[MAX_NUM_MAPPED_ITEMS];
60 unsigned int map_size[MAX_NUM_MAPPED_ITEMS];
61 unsigned int rom_size[MAX_NUM_MAPPED_ITEMS];
62 unsigned char *map_data[MAX_NUM_MAPPED_ITEMS];
63 unsigned int map_mirror[MAX_NUM_MAPPED_ITEMS];
64 char *map_id[MAX_NUM_MAPPED_ITEMS];
66 struct platform_config *platform;
68 char *mouse_file, *keyboard_file;
70 char mouse_toggle_key, keyboard_toggle_key;
71 unsigned char mouse_enabled, keyboard_enabled;
73 unsigned int loop_cycles;
74 unsigned int mapped_low, mapped_high;
75 unsigned int custom_low, custom_high;
78 struct platform_config {
82 int (*custom_read)(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
83 int (*custom_write)(struct emulator_config *cfg, unsigned int addr, unsigned int val, unsigned char type);
85 int (*register_read)(unsigned int addr, unsigned char type, unsigned int *val);
86 int (*register_write)(unsigned int addr, unsigned int value, unsigned char type);
88 int (*platform_initial_setup)(struct emulator_config *cfg);
89 void (*handle_reset)(struct emulator_config *cfg);
90 void (*shutdown)(struct emulator_config *cfg);
91 void (*setvar)(struct emulator_config *cfg, char *var, char *val);
94 unsigned int get_m68k_cpu_type(char *name);
95 struct emulator_config *load_config_file(char *filename);
97 int handle_mapped_read(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
98 int handle_mapped_write(struct emulator_config *cfg, unsigned int addr, unsigned int value, unsigned char type);
99 int get_named_mapped_item(struct emulator_config *cfg, char *name);
100 int get_mapped_item_by_address(struct emulator_config *cfg, uint32_t address);
101 unsigned int get_int(char *str);
103 #endif /* _CONFIG_FILE_H */