2 NEC PC-2001 Emulator 'ePC-2001'
5 Author : Takeda.Toshiya
14 #define DEVICE_NAME "NEC PC-2001"
15 #define CONFIG_NAME "pc2001"
17 // device informations for virtual machine
18 #define FRAMES_PER_SEC 60
19 #define LINES_PER_FRAME 24
20 #define CPU_CLOCKS (4000000 / 4)
21 #define SCREEN_WIDTH 240
22 #define SCREEN_HEIGHT 24
24 #define MEMORY_ADDR_MAX 0x10000
25 #define MEMORY_BANK_SIZE 0x1000
27 // device informations for win32
28 #define WINDOW_MODE_BASE 2
30 #define USE_ALT_F10_KEY
31 #define USE_AUTO_KEY 6
32 #define USE_AUTO_KEY_RELEASE 10
33 #define USE_AUTO_KEY_CAPS_LOCK (0xf2 | 0x100)
34 #define DONT_KEEEP_KEY_PRESSED
35 #define USE_SOUND_VOLUME 3
39 #include "../../common.h"
41 #ifdef USE_SOUND_VOLUME
42 static const _TCHAR *sound_device_caption[] = {
43 _T("Beep"), _T("CMT (Signal)"), _T("Noise (CMT)"),
60 #include "../../fileio.h"
85 // ----------------------------------------
87 // ----------------------------------------
92 // ----------------------------------------
93 // for emulation class
94 // ----------------------------------------
96 // drive virtual machine
102 DEVICE *get_cpu(int index);
109 void initialize_sound(int rate, int samples);
110 uint16_t* create_sound(int* extra_frames);
111 int get_sound_buffer_ptr();
112 #ifdef USE_SOUND_VOLUME
113 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
117 void play_tape(const _TCHAR* file_path);
118 void rec_tape(const _TCHAR* file_path);
120 bool is_tape_inserted();
121 bool is_tape_playing();
122 bool is_tape_recording();
123 int get_tape_position();
124 const _TCHAR* get_tape_message();
125 bool is_frame_skippable();
127 void update_config();
128 void save_state(FILEIO* state_fio);
129 bool load_state(FILEIO* state_fio);
131 // ----------------------------------------
133 // ----------------------------------------
136 DEVICE* get_device(int id);
138 DEVICE* first_device;