2 NEC PC-6001 Emulator 'yaPC-6001'
3 NEC PC-6001mkII Emulator 'yaPC-6201'
4 NEC PC-6001mkIISR Emulator 'yaPC-6401'
5 NEC PC-6601 Emulator 'yaPC-6601'
6 NEC PC-6601SR Emulator 'yaPC-6801'
18 #define DEVICE_NAME "NEC PC-6001"
19 #define CONFIG_NAME "pc6001"
20 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.60"
21 #define SCREEN_WIDTH 256
22 #define SCREEN_HEIGHT 192
23 #define CPU_CLOCKS 3993600
25 #elif defined(_PC6001MK2)
26 #define DEVICE_NAME "NEC PC-6001mkII"
27 #define CONFIG_NAME "pc6001mk2"
28 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.62"
29 #define SCREEN_WIDTH 640
30 #define SCREEN_HEIGHT 400
31 #define CPU_CLOCKS 4000000
33 #elif defined(_PC6001MK2SR)
34 #define DEVICE_NAME "NEC PC-6001mkIISR"
35 #define CONFIG_NAME "pc6001mk2sr"
36 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.68"
37 #define SCREEN_WIDTH 640
38 #define SCREEN_HEIGHT 400
39 #define CPU_CLOCKS 3580000
40 #elif defined(_PC6601)
41 #define DEVICE_NAME "NEC PC-6601"
42 #define CONFIG_NAME "pc6601"
43 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.66"
44 #define SCREEN_WIDTH 640
45 #define SCREEN_HEIGHT 400
46 #define CPU_CLOCKS 4000000
48 #elif defined(_PC6601SR)
49 #define DEVICE_NAME "NEC PC-6601SR"
50 #define CONFIG_NAME "pc6601sr"
51 #define SUB_CPU_1_ROM_FILE_NAME "SUBCPU1.68"
52 #define SUB_CPU_2_ROM_FILE_NAME "SUBCPU2.68"
53 #define SUB_CPU_3_ROM_FILE_NAME "SUBCPU3.68"
54 #define SCREEN_WIDTH 640
55 #define SCREEN_HEIGHT 400
56 #define CPU_CLOCKS 3580000
59 // device informations for virtual machine
60 #define FRAMES_PER_SEC 60
61 #define LINES_PER_FRAME 262
63 #define MC6847_ATTR_OFS 0
64 #define MC6847_VRAM_OFS 0x200
65 #define MC6847_ATTR_AG 0x80
66 #define MC6847_ATTR_AS 0x40
67 #define MC6847_ATTR_INTEXT 0x20
68 #define MC6847_ATTR_GM0 0x10
69 #define MC6847_ATTR_GM1 0x08
70 #define MC6847_ATTR_GM2 0x04
71 #define MC6847_ATTR_CSS 0x02
72 #define MC6847_ATTR_INV 0x01
74 // device informations for win32
78 #if defined(_PC6601) || defined(_PC6601SR)
83 //#define USE_TAPE_PTR
85 #define NOTIFY_KEY_DOWN
86 #define USE_SHIFT_NUMPAD_KEY
87 #define USE_ALT_F10_KEY
88 #define USE_AUTO_KEY 6
89 #define USE_AUTO_KEY_RELEASE 10
90 #define USE_AUTO_KEY_CAPS
92 #define USE_CRT_FILTER
95 #define USE_ACCESS_LAMP
97 #define USE_SOUND_VOLUME 2
99 #define USE_SOUND_VOLUME 3
105 #define USE_CRT_MONITOR_4_3 1
108 #include "../../common.h"
109 #include "../../fileio.h"
111 #ifdef USE_SOUND_VOLUME
112 static const _TCHAR *sound_device_caption[] = {
114 #if !defined(_PC6001)
119 static const bool sound_device_monophonic[] = {
121 #if !defined(_PC6001)
151 #if defined(_PC6601) || defined(_PC6601SR)
180 #if defined(_PC6601) || defined(_PC6601SR)
196 UPD765A* fdc_pc80s31k;
199 bool support_sub_cpu;
200 bool support_pc80s31k;
203 // ----------------------------------------
205 // ----------------------------------------
210 // ----------------------------------------
211 // for emulation class
212 // ----------------------------------------
214 // drive virtual machine
220 DEVICE *get_cpu(int index);
227 void initialize_sound(int rate, int samples);
228 uint16* create_sound(int* extra_frames);
229 int sound_buffer_ptr();
230 #ifdef USE_SOUND_VOLUME
231 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
235 void key_down(int code, bool repeat);
236 void key_up(int code);
239 void open_cart(int drv, const _TCHAR* file_path);
240 void close_cart(int drv);
241 bool cart_inserted(int drv);
243 void open_disk(int drv, const _TCHAR* file_path, int bank);
244 void close_disk(int drv);
245 bool disk_inserted(int drv);
246 void set_disk_protected(int drv, bool value);
247 bool get_disk_protected(int drv);
248 void play_tape(const _TCHAR* file_path);
249 void rec_tape(const _TCHAR* file_path);
251 bool tape_inserted();
253 bool tape_recording();
257 void update_config();
258 void save_state(FILEIO* state_fio);
259 bool load_state(FILEIO* state_fio);
261 // ----------------------------------------
263 // ----------------------------------------
266 DEVICE* get_device(int id);
268 DEVICE* first_device;