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 #define MZ1P17_SW1_4_ON
52 // device informations for win32
56 #define USE_BOOT_MODE 2
59 //#define USE_TAPE_PTR
60 #define USE_TAPE_BUTTON
61 #if defined(_MZ800) || defined(_MZ1500)
66 #define USE_SHIFT_NUMPAD_KEY
67 #define USE_ALT_F10_KEY
68 #define USE_AUTO_KEY 5
69 #define USE_AUTO_KEY_RELEASE 6
70 #define USE_AUTO_KEY_CAPS
72 #define USE_MONITOR_TYPE 2
74 #define USE_CRT_FILTER
76 //#if defined(_MZ1500)
77 #define USE_SCREEN_ROTATE
79 #if defined(_MZ800) || defined(_MZ1500)
80 #define USE_ACCESS_LAMP
81 //#define USE_DISK_WRITE_PROTECT
84 #define USE_SOUND_VOLUME 2
86 #define USE_SOUND_VOLUME 3
87 #elif defined(_MZ1500)
88 #define USE_SOUND_VOLUME 4
92 #define USE_PRINTER_TYPE 4
97 #define USE_CRT_MONITOR_4_3 1
99 #include "../../common.h"
100 #include "../../fileio.h"
102 #ifdef USE_SOUND_VOLUME
103 static const _TCHAR *sound_device_caption[] = {
106 #elif defined(_MZ1500)
107 _T("PSG #1"), _T("PSG #2"),
109 _T("Beep"), _T("CMT"),
111 static const bool sound_device_monophonic[] = {
114 #elif defined(_MZ1500)
140 #if defined(_MZ800) || defined(_MZ1500)
176 #if defined(_MZ800) || defined(_MZ1500)
182 #elif defined(_MZ1500)
190 Z80SIO* sio_rs; // RS-232C
191 Z80SIO* sio_qd; // QD
205 // ----------------------------------------
207 // ----------------------------------------
212 // ----------------------------------------
213 // for emulation class
214 // ----------------------------------------
216 // drive virtual machine
222 DEVICE *get_cpu(int index);
227 #if defined(_MZ800) || defined(_MZ1500)
232 void initialize_sound(int rate, int samples);
233 uint16* create_sound(int* extra_frames);
234 int sound_buffer_ptr();
235 #ifdef USE_SOUND_VOLUME
236 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
240 void play_tape(const _TCHAR* file_path);
241 void rec_tape(const _TCHAR* file_path);
243 bool tape_inserted();
245 bool tape_recording();
249 void push_fast_forward();
250 void push_fast_rewind();
251 void push_apss_forward() {}
252 void push_apss_rewind() {}
253 #if defined(_MZ800) || defined(_MZ1500)
254 void open_quickdisk(int drv, const _TCHAR* file_path);
255 void close_quickdisk(int drv);
256 bool quickdisk_inserted(int drv);
257 void open_disk(int drv, const _TCHAR* file_path, int bank);
258 void close_disk(int drv);
259 bool disk_inserted(int drv);
260 void set_disk_protected(int drv, bool value);
261 bool get_disk_protected(int drv);
265 void update_config();
266 void save_state(FILEIO* state_fio);
267 bool load_state(FILEIO* state_fio);
269 // ----------------------------------------
271 // ----------------------------------------
274 DEVICE* get_device(int id);
276 DEVICE* first_device;