2 SHARP MZ-3500 Emulator 'EmuZ-3500'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "SHARP MZ-3500"
14 #define CONFIG_NAME "mz3500"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 47.3
18 #define LINES_PER_FRAME 441
19 #define CPU_CLOCKS 4000000
20 #define SCREEN_WIDTH 640
21 #define SCREEN_HEIGHT 400
22 #define WINDOW_HEIGHT_ASPECT 480
24 #define UPD765A_WAIT_RESULT7
25 #define UPD765A_EXT_DRVSEL
26 #define UPD7220_HORIZ_FREQ 20920
27 #define IO_ADDR_MAX 0x100
28 #define PRINTER_STROBE_RISING_EDGE
29 #define SUPPORT_VARIABLE_TIMING
31 // device informations for win32
32 #define USE_SPECIAL_RESET
34 #define DIPSWITCH_DEFAULT 0x1fd
35 #define USE_FLOPPY_DISK 4
36 #define NOTIFY_KEY_DOWN
37 #define USE_KEY_LOCKED
38 #define USE_SHIFT_NUMPAD_KEY
39 #define USE_ALT_F10_KEY
40 #define USE_AUTO_KEY 5
41 #define USE_AUTO_KEY_RELEASE 6
42 #define USE_AUTO_KEY_NUMPAD
43 #define USE_MONITOR_TYPE 4
44 #define USE_SCREEN_FILTER
46 #define USE_SOUND_VOLUME 2
48 #define USE_PRINTER_TYPE 4
53 #include "../../common.h"
54 #include "../../fileio.h"
55 #include "../vm_template.h"
57 #ifdef USE_SOUND_VOLUME
58 static const _TCHAR *sound_device_caption[] = {
59 _T("Beep"), _T("Noise (FDD)"),
63 class csp_state_utils;
84 class VM : public VM_TEMPLATE
88 //csp_state_utils *state_entry;
126 // ----------------------------------------
128 // ----------------------------------------
133 // ----------------------------------------
134 // for emulation class
135 // ----------------------------------------
137 // drive virtual machine
139 void special_reset();
141 double get_frame_rate();
145 DEVICE *get_cpu(int index);
152 void initialize_sound(int rate, int samples);
153 uint16_t* create_sound(int* extra_frames);
154 int get_sound_buffer_ptr();
155 #ifdef USE_SOUND_VOLUME
156 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
160 void key_down(int code, bool repeat);
161 void key_up(int code);
162 bool get_caps_locked();
163 bool get_kana_locked();
166 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
167 void close_floppy_disk(int drv);
168 bool is_floppy_disk_inserted(int drv);
169 void is_floppy_disk_protected(int drv, bool value);
170 bool is_floppy_disk_protected(int drv);
171 uint32_t is_floppy_disk_accessed();
172 bool is_frame_skippable();
174 void update_config();
176 void save_state(FILEIO* state_fio);
177 bool load_state(FILEIO* state_fio);
179 // ----------------------------------------
181 // ----------------------------------------
184 DEVICE* get_device(int id);
186 //DEVICE* first_device;
187 //DEVICE* last_device;