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 USE_SHIFT_NUMPAD_KEY
86 #define USE_ALT_F10_KEY
87 #define USE_AUTO_KEY 6
88 #define USE_AUTO_KEY_RELEASE 10
89 #define USE_AUTO_KEY_CAPS
91 #define USE_CRT_FILTER
94 #define USE_ACCESS_LAMP
99 #define USE_CRT_MONITOR_4_3 1
102 #include "../../common.h"
103 #include "../../fileio.h"
128 #if defined(_PC6601) || defined(_PC6601SR)
157 #if defined(_PC6601) || defined(_PC6601SR)
173 UPD765A* fdc_pc80s31k;
176 bool support_sub_cpu;
177 bool support_pc80s31k;
180 // ----------------------------------------
182 // ----------------------------------------
187 // ----------------------------------------
188 // for emulation class
189 // ----------------------------------------
191 // drive virtual machine
197 DEVICE *get_cpu(int index);
203 void initialize_sound(int rate, int samples);
204 uint16* create_sound(int* extra_frames);
205 int sound_buffer_ptr();
208 void open_cart(int drv, const _TCHAR* file_path);
209 void close_cart(int drv);
210 bool cart_inserted(int drv);
212 void open_disk(int drv, const _TCHAR* file_path, int bank);
213 void close_disk(int drv);
214 bool disk_inserted(int drv);
215 void set_disk_protected(int drv, bool value);
216 bool get_disk_protected(int drv);
217 void play_tape(const _TCHAR* file_path);
218 void rec_tape(const _TCHAR* file_path);
220 bool tape_inserted();
222 bool tape_recording();
226 void update_config();
227 void save_state(FILEIO* state_fio);
228 bool load_state(FILEIO* state_fio);
230 // ----------------------------------------
232 // ----------------------------------------
235 DEVICE* get_device(int id);
237 DEVICE* first_device;