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)
49 // device informations for win32
53 #define USE_BOOT_MODE 2
56 //#define USE_TAPE_PTR
57 #define USE_TAPE_BUTTON
58 #if defined(_MZ800) || defined(_MZ1500)
63 #define USE_SHIFT_NUMPAD_KEY
64 #define USE_ALT_F10_KEY
65 #define USE_AUTO_KEY 5
66 #define USE_AUTO_KEY_RELEASE 6
67 #define USE_AUTO_KEY_CAPS
69 #define USE_MONITOR_TYPE 2
71 #define USE_CRT_FILTER
73 //#if defined(_MZ1500)
74 #define USE_SCREEN_ROTATE
76 #if defined(_MZ800) || defined(_MZ1500)
77 #define USE_ACCESS_LAMP
78 //#define USE_DISK_WRITE_PROTECT
83 #include "../../common.h"
84 #include "../../fileio.h"
105 #if defined(_MZ800) || defined(_MZ1500)
143 #if defined(_MZ800) || defined(_MZ1500)
149 #elif defined(_MZ1500)
154 Z80SIO* sio_rs; // RS-232C
155 Z80SIO* sio_qd; // QD
169 // ----------------------------------------
171 // ----------------------------------------
176 // ----------------------------------------
177 // for emulation class
178 // ----------------------------------------
180 // drive virtual machine
186 DEVICE *get_cpu(int index);
191 #if defined(_MZ800) || defined(_MZ1500)
196 void initialize_sound(int rate, int samples);
197 uint16* create_sound(int* extra_frames);
198 int sound_buffer_ptr();
201 void play_tape(const _TCHAR* file_path);
202 void rec_tape(const _TCHAR* file_path);
204 bool tape_inserted();
206 bool tape_recording();
210 void push_fast_forward();
211 void push_fast_rewind();
212 void push_apss_forward() {}
213 void push_apss_rewind() {}
214 #if defined(_MZ800) || defined(_MZ1500)
215 void open_quickdisk(int drv, const _TCHAR* file_path);
216 void close_quickdisk(int drv);
217 bool quickdisk_inserted(int drv);
218 void open_disk(int drv, const _TCHAR* file_path, int bank);
219 void close_disk(int drv);
220 bool disk_inserted(int drv);
221 void set_disk_protected(int drv, bool value);
222 bool get_disk_protected(int drv);
226 void update_config();
227 void save_state(FILEIO* state_fio);
228 bool load_state(FILEIO* state_fio);
230 // ----------------------------------------
232 // ----------------------------------------
235 DEVICE* get_device(int id);
237 DEVICE* first_device;