2 NEC PC-8801MA Emulator 'ePC-8801MA'
\r
3 NEC PC-8001mkIISR Emulator 'ePC-8001mkIISR'
\r
5 Author : Takeda.Toshiya
\r
14 #if defined(_PC8801MA)
\r
15 #define DEVICE_NAME "NEC PC-8801MA"
\r
16 #define CONFIG_NAME "pc8801ma"
\r
17 #elif defined(_PC8001SR)
\r
18 #define DEVICE_NAME "NEC PC-8001mkIISR"
\r
19 #define CONFIG_NAME "pc8001mk2sr"
\r
22 #if defined(_PC8001SR)
\r
23 #define MODE_PC80_V1 0
\r
24 #define MODE_PC80_V2 1
\r
25 #define MODE_PC80_N 2
\r
27 #define MODE_PC88_V1S 0
\r
28 #define MODE_PC88_V1H 1
\r
29 #define MODE_PC88_V2 2
\r
30 #define MODE_PC88_N 3
\r
33 #if defined(_PC8801MA)
\r
34 #define SUPPORT_PC88_DICTIONARY
\r
35 #define SUPPORT_PC88_HIGH_CLOCK
\r
36 #define SUPPORT_PC88_OPNA
\r
37 #define PC88_EXRAM_BANKS 4
\r
38 #define HAS_UPD4990A
\r
40 #define SUPPORT_PC88_JOYSTICK
\r
41 #define SUPPORT_PC88_PCG8100
\r
43 // device informations for virtual machine
\r
44 #define FRAMES_PER_SEC 62.422
\r
45 #define LINES_PER_FRAME 260
\r
46 #define CPU_CLOCKS 3993624
\r
47 #define SCREEN_WIDTH 640
\r
48 #define SCREEN_HEIGHT 400
\r
50 #define UPD765A_NO_ST1_EN_OR_FOR_RESULT7
\r
51 #ifdef SUPPORT_PC88_OPNA
\r
54 #define Z80_MEMORY_WAIT
\r
55 #define PCM1BIT_HIGH_QUALITY
\r
56 #define OVERRIDE_SOUND_FREQ_48000HZ 55467
\r
57 #define SUPPORT_VARIABLE_TIMING
\r
59 // device informations for win32
\r
60 #if defined(_PC8001SR)
\r
61 #define USE_BOOT_MODE 3
\r
63 #define USE_BOOT_MODE 4
\r
65 #define USE_CPU_TYPE 2
\r
66 #define USE_DIPSWITCH
\r
67 #define USE_DEVICE_TYPE 2
\r
71 #define NOTIFY_KEY_DOWN
\r
72 #define USE_SHIFT_NUMPAD_KEY
\r
73 #define USE_ALT_F10_KEY
\r
74 // slow enough for N88-
\93ú
\96{
\8cêBASIC
\r
75 #define USE_AUTO_KEY 8
\r
76 #define USE_AUTO_KEY_RELEASE 10
\r
77 #define USE_MONITOR_TYPE 2
\r
78 #define USE_CRT_FILTER
\r
79 #define USE_SCANLINE
\r
80 #define USE_ACCESS_LAMP
\r
81 #define USE_DEBUGGER
\r
84 #include "../../common.h"
\r
101 #ifdef SUPPORT_PC88_PCG8100
\r
126 I8255* pc88pio_sub;
\r
127 UPD765A* pc88fdc_sub;
\r
130 #ifdef SUPPORT_PC88_PCG8100
\r
142 // ----------------------------------------
\r
144 // ----------------------------------------
\r
146 VM(EMU* parent_emu);
\r
149 // ----------------------------------------
\r
150 // for emulation class
\r
151 // ----------------------------------------
\r
153 // drive virtual machine
\r
156 double frame_rate();
\r
158 #ifdef USE_DEBUGGER
\r
160 DEVICE *get_cpu(int index);
\r
164 void draw_screen();
\r
167 // sound generation
\r
168 void initialize_sound(int rate, int samples);
\r
169 uint16* create_sound(int* extra_frames);
\r
170 int sound_buffer_ptr();
\r
173 void key_down(int code, bool repeat);
\r
174 void key_up(int code);
\r
177 void open_disk(int drv, _TCHAR* file_path, int offset);
\r
178 void close_disk(int drv);
\r
179 bool disk_inserted(int drv);
\r
180 void write_protect_fd(int drv, bool flag);
\r
181 bool is_write_protect_fd(int drv);
\r
182 void play_tape(_TCHAR* file_path);
\r
183 void rec_tape(_TCHAR* file_path);
\r
185 bool tape_inserted();
\r
188 void update_config();
\r
189 void save_state(FILEIO* state_fio);
\r
190 bool load_state(FILEIO* state_fio);
\r
192 // ----------------------------------------
\r
194 // ----------------------------------------
\r
197 DEVICE* get_device(int id);
\r
199 DEVICE* first_device;
\r
200 DEVICE* last_device;
\r