2 FUJITSU FM7 Emulator 'eFM7'
14 #define USE_SOUND_DEVICE_TYPE 8
17 #define USE_BOOT_MODE 4
19 #define USE_SPECIAL_RESET
21 #define SUPPORT_YM2203_PORT
22 //#define HAS_AY_3_8910
24 #define SCREEN_WIDTH_ASPECT 400
25 #define SCREEN_HEIGHT_ASPECT 300
27 #define NOTIFY_KEY_DOWN
29 #define USE_ALT_F10_KEY
30 #define USE_AUTO_KEY 5
31 #define USE_AUTO_KEY_RELEASE 6
32 #define USE_ACCESS_LAMP
33 //#define USE_DEBUGGER
36 #define DEVICE_NAME "FUJITSU FM8"
37 #define CONFIG_NAME "fm8"
41 #define DEVICE_NAME "FUJITSU FM7"
42 #define CONFIG_NAME "fm7"
45 #elif defined(_FM77L4)
46 #define DEVICE_NAME "FUJITSU FM77L4"
47 #define CONFIG_NAME "fm77l4"
49 #define HAS_400LINECARD
52 #define HAS_CYCLESTEAL
54 #define CAPABLE_KANJI_CLASS2
55 #define USE_DRIVE_TYPE
57 #elif defined(_FM77AV)
58 #define DEVICE_NAME "FUJITSU FM77AV"
59 #define CONFIG_NAME "fm77av"
60 #define _FM77AV_VARIANTS
62 #define HAS_CYCLESTEAL
64 #elif defined(_FM77AV20)
65 #define DEVICE_NAME "FUJITSU FM77AV"
66 #define CONFIG_NAME "fm77av20"
67 #define _FM77AV_VARIANTS
70 #define HAS_CYCLESTEAL
71 #define USE_DRIVE_TYPE
73 #elif defined(_FM77AV40)
74 #define DEVICE_NAME "FUJITSU FM77AV"
75 #define CONFIG_NAME "fm77av40"
76 #define _FM77AV_VARIANTS
79 #define HAS_CYCLESTEAL
80 #define CAPABLE_KANJI_CLASS2
81 #define USE_DRIVE_TYPE
85 // device informations for virtual machine
87 // TODO: check refresh rate
88 #define FRAMES_PER_SEC 60
89 #define LINES_PER_FRAME 400
90 #define CPU_CLOCKS 2000000
91 #define SCREEN_WIDTH 640
92 #define SCREEN_HEIGHT 400
95 #define MB8877_MAX_CHIPS 1
96 //#define IO_ADDR_MAX 0x10000
98 // device informations for win32
117 //#define ENABLE_OPENCL // If OpenCL renderer is enabled, define here.
119 #include "../../config.h"
120 #include "../../common.h"
121 #include "../../fileio.h"
154 FM7_MAINMEM* mainmem;
159 YM2203* psg; // Is right? AY-3-8910 is right device.
168 DEVICE* inteli_mouse;
177 KANJIROM *kanjiclass1;
178 #ifdef CAPABLE_KANJI_CLASS2
179 KANJIROM *kanjiclass2;
181 int machine_version; // 0 = FM8 / 1 = FM7 / 2 = FM77AV / 3 = FM77AV40, etc...
183 Uint32 connected_opns;
188 Uint32 mainfreq_high;
190 Uint32 mainfreq_high_mmr;
192 Uint32 fdd_type[MAX_DRIVE];
193 BOOL fdd_connect[MAX_DRIVE];
196 bool cmt_enabled; // 77AV40SX is disabled.
205 // ----------------------------------------
207 // ----------------------------------------
212 // ----------------------------------------
213 // for emulation class
214 // ----------------------------------------
216 // drive virtual machine
218 void special_reset();
224 DEVICE *get_cpu(int index);
226 void initialize(void);
227 void connect_bus(void);
229 void update_dipswitch(void);
235 void initialize_sound(int rate, int samples);
236 uint16* create_sound(int* extra_frames);
237 int sound_buffer_ptr();
240 void key_down(int code, bool repeat);
241 void key_up(int code);
244 void open_disk(int drv, _TCHAR* file_path, int offset);
245 void close_disk(int drv);
246 bool disk_inserted(int drv);
247 void write_protect_fd(int drv, bool flag);
248 bool is_write_protect_fd(int drv);
250 void play_tape(_TCHAR* file_path);
251 void rec_tape(_TCHAR* file_path);
253 bool tape_inserted();
255 int get_tape_ptr(void);
257 void update_config();
258 //void save_state(FILEIO* state_fio);
259 //bool load_state(FILEIO* state_fio);
261 // ----------------------------------------
263 // ----------------------------------------
264 void set_cpu_clock(DEVICE *cpu, uint32 clocks);
266 DEVICE* get_device(int id);
268 DEVICE* first_device;