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 NOTIFY_KEY_DOWN
32 #define USE_ALT_F10_KEY
33 #define USE_AUTO_KEY 5
34 #define USE_AUTO_KEY_RELEASE 6
35 #define USE_AUTO_KEY_CAPS
36 #define USE_SOUND_VOLUME 2
40 #include "../../common.h"
41 #include "../../fileio.h"
43 #ifdef USE_SOUND_VOLUME
44 static const _TCHAR *sound_device_caption[] = {
45 _T("Beep"), _T("CMT"),
47 static const bool sound_device_monophonic[] = {
89 // ----------------------------------------
91 // ----------------------------------------
96 // ----------------------------------------
97 // for emulation class
98 // ----------------------------------------
100 // drive virtual machine
106 DEVICE *get_cpu(int index);
113 void initialize_sound(int rate, int samples);
114 uint16* create_sound(int* extra_frames);
115 int sound_buffer_ptr();
116 #ifdef USE_SOUND_VOLUME
117 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
121 void key_down(int code, bool repeat);
122 void key_up(int code);
125 void play_tape(const _TCHAR* file_path);
126 void rec_tape(const _TCHAR* file_path);
128 bool tape_inserted();
130 bool tape_recording();
134 void update_config();
135 void save_state(FILEIO* state_fio);
136 bool load_state(FILEIO* state_fio);
138 // ----------------------------------------
140 // ----------------------------------------
143 DEVICE* get_device(int id);
145 DEVICE* first_device;