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;
86 class VM : public VM_TEMPLATE
90 //csp_state_utils *state_entry;
99 MZ3500::MAIN* mainbus;
123 MZ3500::KEYBOARD* kbd;
128 // ----------------------------------------
130 // ----------------------------------------
135 // ----------------------------------------
136 // for emulation class
137 // ----------------------------------------
139 // drive virtual machine
141 void special_reset();
143 double get_frame_rate();
147 DEVICE *get_cpu(int index);
154 void initialize_sound(int rate, int samples);
155 uint16_t* create_sound(int* extra_frames);
156 int get_sound_buffer_ptr();
157 #ifdef USE_SOUND_VOLUME
158 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
162 void key_down(int code, bool repeat);
163 void key_up(int code);
164 bool get_caps_locked();
165 bool get_kana_locked();
168 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
169 void close_floppy_disk(int drv);
170 bool is_floppy_disk_inserted(int drv);
171 void is_floppy_disk_protected(int drv, bool value);
172 bool is_floppy_disk_protected(int drv);
173 uint32_t is_floppy_disk_accessed();
174 bool is_frame_skippable();
176 void update_config();
177 bool process_state(FILEIO* state_fio, bool loading);
179 // ----------------------------------------
181 // ----------------------------------------
184 DEVICE* get_device(int id);
186 //DEVICE* first_device;
187 //DEVICE* last_device;