8 #define MAX_NUM_MAPPED_ITEMS 8
10 #define SIZE_MEGA (1024 * 1024)
11 #define SIZE_GIGA (1024 * 1024 * 1024)
53 struct emulator_config {
54 unsigned int cpu_type;
56 unsigned char map_type[MAX_NUM_MAPPED_ITEMS];
57 long map_offset[MAX_NUM_MAPPED_ITEMS];
58 long map_high[MAX_NUM_MAPPED_ITEMS];
59 unsigned int map_size[MAX_NUM_MAPPED_ITEMS];
60 unsigned int rom_size[MAX_NUM_MAPPED_ITEMS];
61 unsigned char *map_data[MAX_NUM_MAPPED_ITEMS];
62 int map_mirror[MAX_NUM_MAPPED_ITEMS];
63 char *map_id[MAX_NUM_MAPPED_ITEMS];
65 struct platform_config *platform;
69 char mouse_toggle_key, keyboard_toggle_key;
70 unsigned char mouse_enabled, keyboard_enabled;
72 unsigned int loop_cycles;
73 unsigned int mapped_low, mapped_high;
74 unsigned int custom_low, custom_high;
77 struct platform_config {
81 int (*custom_read)(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
82 int (*custom_write)(struct emulator_config *cfg, unsigned int addr, unsigned int val, unsigned char type);
84 int (*register_read)(unsigned int addr, unsigned char type, unsigned int *val);
85 int (*register_write)(unsigned int addr, unsigned int value, unsigned char type);
87 int (*platform_initial_setup)(struct emulator_config *cfg);
88 void (*handle_reset)(struct emulator_config *cfg);
89 void (*shutdown)(struct emulator_config *cfg);
90 void (*setvar)(struct emulator_config *cfg, char *var, char *val);
93 unsigned int get_m68k_cpu_type(char *name);
94 struct emulator_config *load_config_file(char *filename);
96 int handle_mapped_read(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
97 int handle_mapped_write(struct emulator_config *cfg, unsigned int addr, unsigned int value, unsigned char type);
98 int get_named_mapped_item(struct emulator_config *cfg, char *name);
99 int get_mapped_item_by_address(struct emulator_config *cfg, uint32_t address);
100 unsigned int get_int(char *str);
102 #endif /* _CONFIG_FILE_H */