2 NEC PC-8801MA Emulator 'ePC-8801MA'
3 NEC PC-8001mkIISR Emulator 'ePC-8001mkIISR'
5 Author : Takeda.Toshiya
14 #if defined(_PC8801MA)
15 #define DEVICE_NAME "NEC PC-8801MA"
16 #define CONFIG_NAME "pc8801ma"
17 #elif defined(_PC8001SR)
18 #define DEVICE_NAME "NEC PC-8001mkIISR"
19 #define CONFIG_NAME "pc8001mk2sr"
22 #if defined(_PC8001SR)
23 #define MODE_PC80_V1 0
24 #define MODE_PC80_V2 1
27 #define MODE_PC88_V1S 0
28 #define MODE_PC88_V1H 1
29 #define MODE_PC88_V2 2
33 #if defined(_PC8801MA)
34 #define SUPPORT_PC88_DICTIONARY
35 #define SUPPORT_PC88_HIGH_CLOCK
36 # ifndef _CONFIGURE_WITH_CMAKE
37 # define SUPPORT_PC88_SB2
38 # define SUPPORT_PC88_OPNA
39 # define PC88_EXRAM_BANKS 4
43 #define SUPPORT_PC88_JOYSTICK
44 # ifndef _CONFIGURE_WITH_CMAKE
45 # define SUPPORT_PC88_PCG8100
47 // device informations for virtual machine
48 #define FRAMES_PER_SEC 62.422
49 #define LINES_PER_FRAME 260
50 #define CPU_CLOCKS 3993624
51 #define SCREEN_WIDTH 640
52 #define SCREEN_HEIGHT 400
54 #define UPD765A_NO_ST1_EN_OR_FOR_RESULT7
55 #if defined(_PC8801MA)
56 #define PC80S31K_NO_WAIT
58 #ifdef SUPPORT_PC88_OPNA
61 #define Z80_MEMORY_WAIT
62 #define OVERRIDE_SOUND_FREQ_48000HZ 55467
63 #define SUPPORT_VARIABLE_TIMING
66 #define SCREEN_WIDTH_ASPECT 640
67 #define SCREEN_HEIGHT_ASPECT 400
68 #define WINDOW_WIDTH_ASPECT 640
69 #define WINDOW_HEIGHT_ASPECT 480
70 // device informations for win32
71 // device informations for win32
72 #if defined(_PC8001SR)
73 #define USE_BOOT_MODE 3
74 #define USE_CPU_TYPE 2
76 #define USE_BOOT_MODE 4
77 #define USE_CPU_TYPE 3
79 #if defined(_PC8801MA)
81 #define BOOT_MODE_DEFAULT 2
82 #define CPU_TYPE_DEFAULT 1
85 #define USE_DEVICE_TYPE 2
90 #define TAPE_BINARY_ONLY
91 #define NOTIFY_KEY_DOWN
92 #define USE_SHIFT_NUMPAD_KEY
93 #define USE_ALT_F10_KEY
94 // slow enough for N88-
\93ú
\96{
\8cêBASIC
95 #define USE_AUTO_KEY 8
96 #define USE_AUTO_KEY_RELEASE 10
97 #define USE_MONITOR_TYPE 2
98 #define USE_CRT_FILTER
100 #define USE_ACCESS_LAMP
101 #define USE_DISK_WRITE_PROTECT
103 #ifdef SUPPORT_PC88_SB2
104 # define USE_SOUND_DEVICE_TYPE 3
105 #elif defined(SUPPORT_PC88_OPNA)
106 # define USE_SOUND_DEVICE_TYPE 2
109 #if defined(DATAREC_SOUND)
110 # if defined(SUPPORT_PC88_OPNA)
111 # define USE_MULTIPLE_SOUNDCARDS 3
113 # define USE_MULTIPLE_SOUNDCARDS 2
116 # if defined(SUPPORT_PC88_OPNA)
117 # define USE_MULTIPLE_SOUNDCARDS 2
119 # define USE_MULTIPLE_SOUNDCARDS 1
122 //#define USE_DEBUGGER
125 #include "../../common.h"
126 #include "../../fileio.h"
142 #ifdef SUPPORT_PC88_PCG8100
161 #ifdef SUPPORT_PC88_SB2
169 UPD765A* pc88fdc_sub;
172 #ifdef SUPPORT_PC88_PCG8100
184 // ----------------------------------------
186 // ----------------------------------------
191 // ----------------------------------------
192 // for emulation class
193 // ----------------------------------------
195 // drive virtual machine
202 DEVICE *get_cpu(int index);
210 void initialize_sound(int rate, int samples);
211 uint16* create_sound(int* extra_frames);
212 int sound_buffer_ptr();
215 void key_down(int code, bool repeat);
216 void key_up(int code);
219 void open_disk(int drv, _TCHAR* file_path, int bank);
220 void close_disk(int drv);
221 bool disk_inserted(int drv);
222 void play_tape(_TCHAR* file_path);
223 void rec_tape(_TCHAR* file_path);
225 bool tape_inserted();
228 void update_config();
229 void save_state(FILEIO* state_fio);
230 bool load_state(FILEIO* state_fio);
231 #if defined(USE_TAPE_PTR)
234 #if defined(USE_DISK_WRITE_PROTECT)
235 void write_protect_fd(int drv, bool flag);
236 bool is_write_protect_fd(int drv);
238 // ----------------------------------------
240 // ----------------------------------------
243 DEVICE* get_device(int id);
245 DEVICE* first_device;