2 SHARP MZ-5500 Emulator 'EmuZ-5500'
4 Author : Takeda.Toshiya
14 #define DEVICE_NAME "SHARP MZ-5500"
15 #define CONFIG_NAME "mz5500"
16 #elif defined(_MZ6500)
17 #define DEVICE_NAME "SHARP MZ-6500"
18 #define CONFIG_NAME "mz6500"
19 #elif defined(_MZ6550)
20 #define DEVICE_NAME "SHARP MZ-6550"
21 #define CONFIG_NAME "mz6550"
24 // device informations for virtual machine
25 #define FRAMES_PER_SEC 55.49
26 #define LINES_PER_FRAME 448
28 #define CPU_CLOCKS 4915200
29 #elif defined(_MZ6500) || defined(_MZ6550)
30 #define CPU_CLOCKS 8000000
32 #define SCREEN_WIDTH 640
33 #define SCREEN_HEIGHT 400
34 #define WINDOW_HEIGHT_ASPECT 480
41 #define I8259_MAX_CHIPS 2
42 #define UPD7220_HORIZ_FREQ 24860
43 #define Z80CTC_CLOCKS 2457600
44 #define SINGLE_MODE_DMA
45 #define IO_ADDR_MAX 0x400
47 #define PRINTER_STROBE_RISING_EDGE
48 #define SUPPORT_VARIABLE_TIMING
50 // device informations for win32
51 #define USE_SPECIAL_RESET
56 #define NOTIFY_KEY_DOWN
57 #define USE_SHIFT_NUMPAD_KEY
58 #define USE_ALT_F10_KEY
59 #define USE_AUTO_KEY 5
60 #define USE_AUTO_KEY_RELEASE 6
61 #define USE_CRT_FILTER
63 #define USE_ACCESS_LAMP
64 #define USE_SOUND_VOLUME 1
67 #define USE_PRINTER_TYPE 4
73 #include "../../common.h"
74 #include "../../fileio.h"
76 #ifdef USE_SOUND_VOLUME
77 static const _TCHAR *sound_device_caption[] = {
116 I8259* pic; // includes 2chips
134 #if defined(_MZ6500) || defined(_MZ6550)
145 // ----------------------------------------
147 // ----------------------------------------
152 // ----------------------------------------
153 // for emulation class
154 // ----------------------------------------
156 // drive virtual machine
158 void special_reset();
160 double get_frame_rate();
164 DEVICE *get_cpu(int index);
169 uint32_t get_access_lamp_status();
172 void initialize_sound(int rate, int samples);
173 uint16_t* create_sound(int* extra_frames);
174 int get_sound_buffer_ptr();
175 #ifdef USE_SOUND_VOLUME
176 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
180 void key_down(int code, bool repeat);
181 void key_up(int code);
184 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
185 void close_floppy_disk(int drv);
186 bool is_floppy_disk_inserted(int drv);
187 void is_floppy_disk_protected(int drv, bool value);
188 bool is_floppy_disk_protected(int drv);
189 bool is_frame_skippable();
191 void update_config();
192 void save_state(FILEIO* state_fio);
193 bool load_state(FILEIO* state_fio);
195 // ----------------------------------------
197 // ----------------------------------------
200 DEVICE* get_device(int id);
202 DEVICE* first_device;