2 SHARP MZ-80K/C Emulator 'EmuZ-80K'
3 SHARP MZ-1200 Emulator 'EmuZ-1200'
5 Author : Takeda.Toshiya
8 SHARP MZ-80A Emulator 'EmuZ-80A'
19 #define DEVICE_NAME "SHARP MZ-1200"
20 #define CONFIG_NAME "mz1200"
22 #define DEVICE_NAME "SHARP MZ-80A"
23 #define CONFIG_NAME "mz80a"
25 #define DEVICE_NAME "SHARP MZ-80K/C"
26 #define CONFIG_NAME "mz80k"
30 #define SUPPORT_MZ80AIF
32 #define SUPPORT_MZ80FIO
35 // device informations for virtual machine
36 #define FRAMES_PER_SEC 60
37 #define LINES_PER_FRAME 262
38 #define CPU_CLOCKS 2000000
39 #define SCREEN_WIDTH 320
40 #define SCREEN_HEIGHT 200
41 #define WINDOW_HEIGHT_ASPECT 240
42 #if defined(SUPPORT_MZ80AIF)
45 #elif defined(SUPPORT_MZ80FIO)
49 #define PRINTER_STROBE_RISING_EDGE
51 // device informations for win32
54 #define USE_TAPE_BUTTON
55 #define NOTIFY_KEY_DOWN
56 #define USE_SHIFT_NUMPAD_KEY
57 #define USE_ALT_F10_KEY
58 #define USE_AUTO_KEY 5
59 #define USE_AUTO_KEY_RELEASE 6
60 #define USE_AUTO_KEY_NO_CAPS
61 #define USE_SOUND_VOLUME 2
63 #define USE_PRINTER_TYPE 4
66 #if defined(SUPPORT_MZ80AIF) || defined(SUPPORT_MZ80FIO)
71 #define USE_ACCESS_LAMP
74 #define USE_MONITOR_TYPE 2
77 #include "../../common.h"
78 #include "../../fileio.h"
80 #ifdef USE_SOUND_VOLUME
81 static const _TCHAR *sound_device_caption[] = {
82 _T("Beep"), _T("CMT"),
90 #if defined(_MZ1200) || defined(_MZ80A)
104 #if defined(SUPPORT_MZ80AIF)
108 #elif defined(SUPPORT_MZ80FIO)
122 #if defined(_MZ1200) || defined(_MZ80A)
136 #if defined(SUPPORT_MZ80AIF)
140 #elif defined(SUPPORT_MZ80FIO)
147 // ----------------------------------------
149 // ----------------------------------------
154 // ----------------------------------------
155 // for emulation class
156 // ----------------------------------------
158 // drive virtual machine
164 DEVICE *get_cpu(int index);
169 #if defined(SUPPORT_MZ80AIF) || defined(SUPPORT_MZ80FIO)
170 uint32_t get_access_lamp_status();
174 void initialize_sound(int rate, int samples);
175 uint16_t* create_sound(int* extra_frames);
176 int get_sound_buffer_ptr();
177 #ifdef USE_SOUND_VOLUME
178 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
182 void key_down(int code, bool repeat);
183 void key_up(int code);
186 #if defined(SUPPORT_MZ80AIF) || defined(SUPPORT_MZ80FIO)
187 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
188 void close_floppy_disk(int drv);
189 bool is_floppy_disk_inserted(int drv);
190 void is_floppy_disk_protected(int drv, bool value);
191 bool is_floppy_disk_protected(int drv);
193 void play_tape(const _TCHAR* file_path);
194 void rec_tape(const _TCHAR* file_path);
196 bool is_tape_inserted();
197 bool is_tape_playing();
198 bool is_tape_recording();
199 int get_tape_position();
202 void push_fast_forward();
203 void push_fast_rewind();
204 void push_apss_forward() {}
205 void push_apss_rewind() {}
206 bool is_frame_skippable();
208 void update_config();
209 void save_state(FILEIO* state_fio);
210 bool load_state(FILEIO* state_fio);
212 // ----------------------------------------
214 // ----------------------------------------
217 DEVICE* get_device(int id);
219 DEVICE* first_device;