2 NEC PC-6001 Emulator 'yaPC-6001'
\r
3 NEC PC-6001mkII Emulator 'yaPC-6201'
\r
4 NEC PC-6001mkIISR Emulator 'yaPC-6401'
\r
5 NEC PC-6601 Emulator 'yaPC-6601'
\r
6 NEC PC-6601SR Emulator 'yaPC-6801'
\r
17 #if defined(_PC6001)
\r
18 #define DEVICE_NAME "NEC PC-6001"
\r
19 #define CONFIG_NAME "pc6001"
\r
20 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.60"
\r
21 #define SCREEN_WIDTH 256
\r
22 #define SCREEN_HEIGHT 192
\r
23 #define CPU_CLOCKS 3993600
\r
24 #define HAS_AY_3_8910
\r
25 #elif defined(_PC6001MK2)
\r
26 #define DEVICE_NAME "NEC PC-6001mkII"
\r
27 #define CONFIG_NAME "pc6001mk2"
\r
28 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.62"
\r
29 #define SCREEN_WIDTH 640
\r
30 #define SCREEN_HEIGHT 400
\r
31 #define CPU_CLOCKS 4000000
\r
32 #define HAS_AY_3_8910
\r
33 #elif defined(_PC6001MK2SR)
\r
34 #define DEVICE_NAME "NEC PC-6001mkIISR"
\r
35 #define CONFIG_NAME "pc6001mk2sr"
\r
36 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.68"
\r
37 #define SCREEN_WIDTH 640
\r
38 #define SCREEN_HEIGHT 400
\r
39 #define CPU_CLOCKS 3580000
\r
40 #elif defined(_PC6601)
\r
41 #define DEVICE_NAME "NEC PC-6601"
\r
42 #define CONFIG_NAME "pc6601"
\r
43 #define SUB_CPU_ROM_FILE_NAME "SUBCPU.66"
\r
44 #define SCREEN_WIDTH 640
\r
45 #define SCREEN_HEIGHT 400
\r
46 #define CPU_CLOCKS 4000000
\r
47 #define HAS_AY_3_8910
\r
48 #elif defined(_PC6601SR)
\r
49 #define DEVICE_NAME "NEC PC-6601SR"
\r
50 #define CONFIG_NAME "pc6601sr"
\r
51 #define SUB_CPU_1_ROM_FILE_NAME "SUBCPU1.68"
\r
52 #define SUB_CPU_2_ROM_FILE_NAME "SUBCPU2.68"
\r
53 #define SUB_CPU_3_ROM_FILE_NAME "SUBCPU3.68"
\r
54 #define SCREEN_WIDTH 640
\r
55 #define SCREEN_HEIGHT 400
\r
56 #define CPU_CLOCKS 3580000
\r
59 // device informations for virtual machine
\r
60 #define FRAMES_PER_SEC 60
\r
61 #define LINES_PER_FRAME 262
\r
63 #define MC6847_ATTR_OFS 0
\r
64 #define MC6847_VRAM_OFS 0x200
\r
65 #define MC6847_ATTR_AG 0x80
\r
66 #define MC6847_ATTR_AS 0x40
\r
67 #define MC6847_ATTR_INTEXT 0x20
\r
68 #define MC6847_ATTR_GM0 0x10
\r
69 #define MC6847_ATTR_GM1 0x08
\r
70 #define MC6847_ATTR_GM2 0x04
\r
71 #define MC6847_ATTR_CSS 0x02
\r
72 #define MC6847_ATTR_INV 0x01
\r
74 // device informations for win32
\r
78 #if defined(_PC6601) || defined(_PC6601SR)
\r
84 #define USE_ALT_F10_KEY
\r
85 #define USE_AUTO_KEY 6
\r
86 #define USE_AUTO_KEY_RELEASE 10
\r
87 #define USE_AUTO_KEY_CAPS
\r
88 #if !defined(_PC6001)
\r
89 #define USE_CRT_FILTER
\r
90 #define USE_SCANLINE
\r
92 #define USE_ACCESS_LAMP
\r
93 #define USE_DEBUGGER
\r
95 #include "../../common.h"
\r
120 #if defined(_PC6601) || defined(_PC6601SR)
\r
149 #if defined(_PC6601) || defined(_PC6601SR)
\r
152 JOYSTICK* joystick;
\r
164 I8255* pio_pc80s31k;
\r
165 PC80S31K *pc80s31k;
\r
166 UPD765A* fdc_pc80s31k;
\r
169 bool support_sub_cpu;
\r
170 bool support_pc80s31k;
\r
173 // ----------------------------------------
\r
175 // ----------------------------------------
\r
177 VM(EMU* parent_emu);
\r
180 // ----------------------------------------
\r
181 // for emulation class
\r
182 // ----------------------------------------
\r
184 // drive virtual machine
\r
188 #ifdef USE_DEBUGGER
\r
190 DEVICE *get_cpu(int index);
\r
194 void draw_screen();
\r
195 // sound generation
\r
196 void initialize_sound(int rate, int samples);
\r
197 uint16* create_sound(int* extra_frames);
\r
198 int sound_buffer_ptr();
\r
201 void open_cart(int drv,_TCHAR* file_path);
\r
202 void close_cart(int drv);
\r
203 bool cart_inserted(int drv);
\r
205 void open_disk(int drv, _TCHAR* file_path, int offset);
\r
206 void close_disk(int drv);
\r
207 bool disk_inserted(int drv);
\r
208 void play_tape(_TCHAR* file_path);
\r
209 void rec_tape(_TCHAR* file_path);
\r
211 bool tape_inserted();
\r
214 void update_config();
\r
216 // ----------------------------------------
\r
218 // ----------------------------------------
\r
221 DEVICE* get_device(int id);
\r
223 DEVICE* first_device;
\r
224 DEVICE* last_device;
\r