2 SHARP MZ-80B Emulator 'EmuZ-80B'
3 SHARP MZ-2200 Emulator 'EmuZ-2200'
5 Author : Takeda.Toshiya
15 #define DEVICE_NAME "SHARP MZ-80B"
16 #define CONFIG_NAME "mz80b"
17 #elif defined(_MZ2000)
18 #define DEVICE_NAME "SHARP MZ-2000"
19 #define CONFIG_NAME "mz2000"
21 #define DEVICE_NAME "SHARP MZ-2200"
22 #define CONFIG_NAME "mz2200"
26 #define SUPPORT_QUICK_DISK
27 #define SUPPORT_16BIT_BOARD
30 // device informations for virtual machine
31 #define FRAMES_PER_SEC 60
32 #define LINES_PER_FRAME 262
33 #define CPU_CLOCKS 4000000
34 #define SCREEN_WIDTH 640
35 #define SCREEN_HEIGHT 400
36 #define WINDOW_HEIGHT_ASPECT 480
39 #ifdef SUPPORT_QUICK_DISK
41 #ifdef SUPPORT_16BIT_BOARD
43 #define I8259_MAX_CHIPS 1
45 #define PRINTER_STROBE_RISING_EDGE
48 #define Z80_MEMORY_WAIT
51 // device informations for win32
52 #define USE_SPECIAL_RESET
57 #ifdef SUPPORT_QUICK_DISK
61 #define USE_TAPE_BUTTON
62 #define USE_SHIFT_NUMPAD_KEY
63 #define USE_ALT_F10_KEY
64 #define USE_AUTO_KEY 5
65 #define USE_AUTO_KEY_RELEASE 6
66 #define USE_AUTO_KEY_CAPS
67 #define USE_AUTO_KEY_NUMPAD
68 #define USE_MONITOR_TYPE 4
70 #define USE_SCREEN_FILTER
73 #define USE_SOUND_VOLUME 4
75 #define USE_PRINTER_TYPE 4
79 #include "../../common.h"
80 #include "../../fileio.h"
82 #ifdef USE_SOUND_VOLUME
83 static const _TCHAR *sound_device_caption[] = {
84 _T("Beep"), _T("CMT (Signal)"), _T("Noise (FDD)"), _T("Noise (CMT)"),
110 #ifdef SUPPORT_QUICK_DISK
115 #ifdef SUPPORT_16BIT_BOARD
147 #ifdef SUPPORT_QUICK_DISK
152 #ifdef SUPPORT_16BIT_BOARD
160 // ----------------------------------------
162 // ----------------------------------------
167 // ----------------------------------------
168 // for emulation class
169 // ----------------------------------------
171 // drive virtual machine
173 void special_reset();
178 DEVICE *get_cpu(int index);
185 void initialize_sound(int rate, int samples);
186 uint16_t* create_sound(int* extra_frames);
187 int get_sound_buffer_ptr();
188 #ifdef USE_SOUND_VOLUME
189 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
193 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
194 void close_floppy_disk(int drv);
195 bool is_floppy_disk_inserted(int drv);
196 void is_floppy_disk_protected(int drv, bool value);
197 bool is_floppy_disk_protected(int drv);
198 uint32_t is_floppy_disk_accessed();
199 #ifdef SUPPORT_QUICK_DISK
200 void open_quick_disk(int drv, const _TCHAR* file_path);
201 void close_quick_disk(int drv);
202 bool is_quick_disk_inserted(int drv);
203 uint32_t is_quick_disk_accessed();
205 void play_tape(int drv, const _TCHAR* file_path);
206 void rec_tape(int drv, const _TCHAR* file_path);
207 void close_tape(int drv);
208 bool is_tape_inserted(int drv);
209 bool is_tape_playing(int drv);
210 bool is_tape_recording(int drv);
211 int get_tape_position(int drv);
212 const _TCHAR* get_tape_message(int drv);
213 void push_play(int drv);
214 void push_stop(int drv);
215 void push_fast_forward(int drv);
216 void push_fast_rewind(int drv);
217 void push_apss_forward(int drv) {}
218 void push_apss_rewind(int drv) {}
219 bool is_frame_skippable();
221 void update_config();
222 void save_state(FILEIO* state_fio);
223 bool load_state(FILEIO* state_fio);
225 // ----------------------------------------
227 // ----------------------------------------
230 DEVICE* get_device(int id);
232 DEVICE* first_device;