2 SHARP MZ-700 Emulator 'EmuZ-700'
3 SHARP MZ-800 Emulator 'EmuZ-800'
4 SHARP MZ-1500 Emulator 'EmuZ-1500'
6 Author : Takeda.Toshiya
16 #define DEVICE_NAME "SHARP MZ-700"
17 #define CONFIG_NAME "mz700"
19 #define DEVICE_NAME "SHARP MZ-800"
20 #define CONFIG_NAME "mz800"
21 #elif defined(_MZ1500)
22 #define DEVICE_NAME "SHARP MZ-1500"
23 #define CONFIG_NAME "mz1500"
26 // device informations for virtual machine
28 #define FRAMES_PER_SEC 50
29 #define LINES_PER_FRAME 312
30 //#define CPU_CLOCKS 3546900
32 #define CPU_CLOCKS 3556800
34 #define FRAMES_PER_SEC 60
35 #define LINES_PER_FRAME 262
36 //#define CPU_CLOCKS 3579545
38 #define CPU_CLOCKS 3584160
40 #define SCREEN_WIDTH 640
41 #define SCREEN_HEIGHT 400
42 #define IO_ADDR_MAX 0x100
43 #define Z80_MEMORY_WAIT
44 #if defined(_MZ800) || defined(_MZ1500)
48 #define SCREEN_WIDTH_ASPECT SCREEN_WIDTH
49 #define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
50 #define WINDOW_WIDTH_ASPECT 640
51 #define WINDOW_HEIGHT_ASPECT 480
53 // device informations for win32
57 #define USE_BOOT_MODE 2
61 #define USE_TAPE_BUTTON
62 #if defined(_MZ800) || defined(_MZ1500)
67 #define USE_SHIFT_NUMPAD_KEY
68 #define USE_ALT_F10_KEY
69 #define USE_AUTO_KEY 5
70 #define USE_AUTO_KEY_RELEASE 6
71 #define USE_AUTO_KEY_CAPS
73 #define USE_MONITOR_TYPE 2
75 #define USE_CRT_FILTER
77 //#if defined(_MZ1500)
78 #define USE_SCREEN_ROTATE
80 #if defined(_MZ800) || defined(_MZ1500)
81 #define USE_ACCESS_LAMP
82 #define USE_DISK_WRITE_PROTECT
87 #include "../../common.h"
88 #include "../../fileio.h"
109 #if defined(_MZ800) || defined(_MZ1500)
147 #if defined(_MZ800) || defined(_MZ1500)
153 #elif defined(_MZ1500)
158 Z80SIO* sio_rs; // RS-232C
159 Z80SIO* sio_qd; // QD
173 // ----------------------------------------
175 // ----------------------------------------
180 // ----------------------------------------
181 // for emulation class
182 // ----------------------------------------
184 // drive virtual machine
190 DEVICE *get_cpu(int index);
195 #if defined(_MZ800) || defined(_MZ1500)
200 void initialize_sound(int rate, int samples);
201 uint16* create_sound(int* extra_frames);
202 int sound_buffer_ptr();
205 void play_tape(const _TCHAR* file_path);
206 void rec_tape(const _TCHAR* file_path);
208 bool tape_inserted();
210 bool tape_recording();
214 void push_fast_forward();
215 void push_fast_rewind();
216 void push_apss_forward() {}
217 void push_apss_rewind() {}
218 #if defined(_MZ800) || defined(_MZ1500)
219 void open_quickdisk(int drv, const _TCHAR* file_path);
220 void close_quickdisk(int drv);
221 bool quickdisk_inserted(int drv);
222 void open_disk(int drv, const _TCHAR* file_path, int bank);
223 void close_disk(int drv);
224 bool disk_inserted(int drv);
225 void set_disk_protected(int drv, bool value);
226 bool get_disk_protected(int drv);
230 void update_config();
231 void save_state(FILEIO* state_fio);
232 bool load_state(FILEIO* state_fio);
234 // ----------------------------------------
236 // ----------------------------------------
239 DEVICE* get_device(int id);
241 DEVICE* first_device;