2 NEC PC-8201 Emulator 'ePC-8201'
4 Author : Takeda.Toshiya
14 #define DEVICE_NAME "NEC PC-8201A"
15 #define CONFIG_NAME "pc8201a"
17 #define DEVICE_NAME "NEC PC-8201"
18 #define CONFIG_NAME "pc8201"
21 // device informations for virtual machine
22 #define FRAMES_PER_SEC 60
23 #define LINES_PER_FRAME 64
24 #define CPU_CLOCKS 2457600
25 #define SCREEN_WIDTH 240
26 #define SCREEN_HEIGHT 64
29 // device informations for win32
31 #define USE_TAPE_BUTTON
32 #define NOTIFY_KEY_DOWN
33 #define USE_KEY_LOCKED
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_SOUND_VOLUME 3
43 #include "../../common.h"
44 #include "../../fileio.h"
45 #include "../vm_template.h"
47 #ifdef USE_SOUND_VOLUME
48 static const _TCHAR *sound_device_caption[] = {
49 _T("Beep"), _T("CMT (Signal)"), _T("Noise (CMT)"),
53 class csp_state_utils;
71 class VM :public VM_TEMPLATE
75 //csp_state_utils *state_entry;
90 PC8201_MEMORY* memory;
93 // ----------------------------------------
95 // ----------------------------------------
100 // ----------------------------------------
101 // for emulation class
102 // ----------------------------------------
104 // drive virtual machine
110 DEVICE *get_cpu(int index);
117 void initialize_sound(int rate, int samples);
118 uint16_t* create_sound(int* extra_frames);
119 int get_sound_buffer_ptr();
120 #ifdef USE_SOUND_VOLUME
121 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
125 void key_down(int code, bool repeat);
126 void key_up(int code);
127 bool get_caps_locked();
128 bool get_kana_locked();
131 void play_tape(int drv, const _TCHAR* file_path);
132 void rec_tape(int drv, const _TCHAR* file_path);
133 void close_tape(int drv);
134 bool is_tape_inserted(int drv);
135 bool is_tape_playing(int drv);
136 bool is_tape_recording(int drv);
137 int get_tape_position(int drv);
138 const _TCHAR* get_tape_message(int drv);
139 void push_play(int drv);
140 void push_stop(int drv);
141 void push_fast_forward(int drv);
142 void push_fast_rewind(int drv);
143 void push_apss_forward(int drv) {}
144 void push_apss_rewind(int drv) {}
145 bool is_frame_skippable();
147 void update_config();
148 bool process_state(FILEIO* state_fio, bool loading);
150 // ----------------------------------------
152 // ----------------------------------------
155 DEVICE* get_device(int id);
157 //DEVICE* first_device;
158 //DEVICE* last_device;