2 NEC N5200 Emulator 'eN5200'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "NEC N5200"
14 #define CONFIG_NAME "n5200"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 55.4
18 #define LINES_PER_FRAME 550
19 #define CPU_CLOCKS 16000000
20 #define SCREEN_WIDTH 640
21 #define SCREEN_HEIGHT 400
22 #define WINDOW_HEIGHT_ASPECT 480
25 #define I8259_MAX_CHIPS 2
26 #define IO_ADDR_MAX 0x10000
28 // device informations for win32
29 #define USE_FLOPPY_DISK 2
30 #define NOTIFY_KEY_DOWN
31 #define USE_KEY_LOCKED
32 #define USE_SHIFT_NUMPAD_KEY
33 #define USE_ALT_F10_KEY
34 #define USE_AUTO_KEY 5
35 #define USE_AUTO_KEY_RELEASE 6
36 #define USE_AUTO_KEY_NUMPAD
37 #define USE_SCREEN_FILTER
38 #define USE_SOUND_VOLUME 2
42 #include "../../common.h"
43 #include "../../fileio.h"
44 #include "../vm_template.h"
46 #ifdef USE_SOUND_VOLUME
47 static const _TCHAR *sound_device_caption[] = {
48 _T("Beep"), _T("Noise (FDD)"),
74 class VM : public VM_TEMPLATE
100 N5200_MEMORY* memory;
104 // ----------------------------------------
106 // ----------------------------------------
111 // ----------------------------------------
112 // for emulation class
113 // ----------------------------------------
115 // drive virtual machine
121 DEVICE *get_cpu(int index);
128 void initialize_sound(int rate, int samples);
129 uint16_t* create_sound(int* extra_frames);
130 int get_sound_buffer_ptr();
131 #ifdef USE_SOUND_VOLUME
132 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
136 void key_down(int code, bool repeat);
137 void key_up(int code);
138 bool get_caps_locked();
139 bool get_kana_locked();
142 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
143 void close_floppy_disk(int drv);
144 bool is_floppy_disk_inserted(int drv);
145 void is_floppy_disk_protected(int drv, bool value);
146 bool is_floppy_disk_protected(int drv);
147 uint32_t is_floppy_disk_accessed();
148 bool is_frame_skippable();
150 void update_config();
151 bool process_state(FILEIO* state_fio, bool loading);
153 // ----------------------------------------
155 // ----------------------------------------
158 DEVICE* get_device(int id);
160 //DEVICE* first_device;
161 //DEVICE* last_device;