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 WINDOW_HEIGHT_ASPECT 480
43 #define IO_ADDR_MAX 0x100
44 #define Z80_MEMORY_WAIT
45 #if defined(_MZ800) || defined(_MZ1500)
50 #define MZ1P17_SW1_4_ON
53 // device informations for win32
57 #define USE_BOOT_MODE 2
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_SCREEN_FILTER
77 #define USE_SOUND_VOLUME 3
79 #define USE_SOUND_VOLUME 5
80 //#define USE_SOUND_FILES_QD
81 #elif defined(_MZ1500)
82 #define USE_SOUND_VOLUME 6
86 #define USE_PRINTER_TYPE 4
88 #define SUPPORT_ROMA_KANA_CONVERSION
89 #define SUPPORT_TV_RENDER
93 #include "../../common.h"
94 #include "../../fileio.h"
96 #ifdef USE_SOUND_VOLUME
97 static const _TCHAR *sound_device_caption[] = {
100 #elif defined(_MZ1500)
101 _T("PSG #1"), _T("PSG #2"),
103 _T("Beep"), _T("CMT (Signal)"),
104 #if defined(_MZ800) || defined(_MZ1500)
130 #if defined(_MZ800) || defined(_MZ1500)
166 #if defined(_MZ800) || defined(_MZ1500)
172 #elif defined(_MZ1500)
180 Z80SIO* sio_rs; // RS-232C
181 Z80SIO* sio_qd; // QD
195 // ----------------------------------------
197 // ----------------------------------------
202 // ----------------------------------------
203 // for emulation class
204 // ----------------------------------------
206 // drive virtual machine
212 DEVICE *get_cpu(int index);
219 void initialize_sound(int rate, int samples);
220 uint16_t* create_sound(int* extra_frames);
221 int get_sound_buffer_ptr();
222 #ifdef USE_SOUND_VOLUME
223 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
227 void play_tape(int drv, const _TCHAR* file_path);
228 void rec_tape(int drv, const _TCHAR* file_path);
229 void close_tape(int drv);
230 bool is_tape_inserted(int drv);
231 bool is_tape_playing(int drv);
232 bool is_tape_recording(int drv);
233 int get_tape_position(int drv);
234 const _TCHAR* get_tape_message(int drv);
235 void push_play(int drv);
236 void push_stop(int drv);
237 void push_fast_forward(int drv);
238 void push_fast_rewind(int drv);
239 void push_apss_forward(int drv) {}
240 void push_apss_rewind(int drv) {}
241 #if defined(_MZ800) || defined(_MZ1500)
242 void open_quick_disk(int drv, const _TCHAR* file_path);
243 void close_quick_disk(int drv);
244 bool is_quick_disk_inserted(int drv);
245 uint32_t is_quick_disk_accessed();
246 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
247 void close_floppy_disk(int drv);
248 bool is_floppy_disk_inserted(int drv);
249 void is_floppy_disk_protected(int drv, bool value);
250 bool is_floppy_disk_protected(int drv);
251 uint32_t is_floppy_disk_accessed();
253 bool is_frame_skippable();
255 void update_config();
256 void save_state(FILEIO* state_fio);
257 bool load_state(FILEIO* state_fio);
259 // ----------------------------------------
261 // ----------------------------------------
264 DEVICE* get_device(int id);
266 DEVICE* first_device;