2 Japan Electronics College MYCOMZ-80A Emulator 'eMYCOMZ-80A'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "Japan Electronics College MYCOMZ-80A"
14 #define CONFIG_NAME "mycomz80a"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 60.58
18 #define LINES_PER_FRAME 260
19 #define CHARS_PER_LINE 64
20 #define HD46505_CHAR_CLOCK 1008000
21 #define CPU_CLOCKS 2500000
22 #define SCREEN_WIDTH 640
23 #define SCREEN_HEIGHT 400
24 #define WINDOW_HEIGHT_ASPECT 480
25 #define SUPPORT_VARIABLE_TIMING
28 // device informations for win32
30 #define USE_TAPE_BUTTON
31 #define NOTIFY_KEY_DOWN
32 #define USE_KEY_LOCKED
33 #define USE_SHIFT_NUMPAD_KEY
34 #define USE_ALT_F10_KEY
35 #define USE_AUTO_KEY 5
36 #define USE_AUTO_KEY_RELEASE 6
37 #define USE_AUTO_KEY_CAPS
38 #define USE_AUTO_KEY_NUMPAD
39 #define USE_SCREEN_FILTER
42 #define USE_SOUND_VOLUME 3
43 #define SUPPORT_TV_RENDER
48 #include "../../common.h"
49 #include "../../fileio.h"
50 #include "../vm_template.h"
52 #ifdef USE_SOUND_VOLUME
53 static const _TCHAR *sound_device_caption[] = {
54 _T("PSG"), _T("CMT (Signal)"), _T("Noise (CMT)"),
58 class csp_state_utils;
75 class VM : public VM_TEMPLATE
79 //csp_state_utils *state_entry;
99 // ----------------------------------------
101 // ----------------------------------------
106 // ----------------------------------------
107 // for emulation class
108 // ----------------------------------------
110 // drive virtual machine
113 double get_frame_rate();
117 DEVICE *get_cpu(int index);
124 void initialize_sound(int rate, int samples);
125 uint16_t* create_sound(int* extra_frames);
126 int get_sound_buffer_ptr();
127 #ifdef USE_SOUND_VOLUME
128 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
132 void key_down(int code, bool repeat);
133 void key_up(int code);
134 bool get_caps_locked();
135 bool get_kana_locked();
138 void play_tape(int drv, const _TCHAR* file_path);
139 void rec_tape(int drv, const _TCHAR* file_path);
140 void close_tape(int drv);
141 bool is_tape_inserted(int drv);
142 bool is_tape_playing(int drv);
143 bool is_tape_recording(int drv);
144 int get_tape_position(int drv);
145 const _TCHAR* get_tape_message(int drv);
146 void push_play(int drv);
147 void push_stop(int drv);
148 void push_fast_forward(int drv);
149 void push_fast_rewind(int drv);
150 void push_apss_forward(int drv) {}
151 void push_apss_rewind(int drv) {}
152 bool is_frame_skippable();
154 void update_config();
156 void save_state(FILEIO* state_fio);
157 bool load_state(FILEIO* state_fio);
159 // ----------------------------------------
161 // ----------------------------------------
164 DEVICE* get_device(int id);
166 //DEVICE* first_device;
167 //DEVICE* last_device;