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)"),
76 class VM : public VM_TEMPLATE
99 N5200::DISPLAY* display;
100 N5200::FLOPPY* floppy;
101 N5200::KEYBOARD* keyboard;
102 N5200::MEMORY* memory;
103 N5200::SYSTEM* system;
106 // ----------------------------------------
108 // ----------------------------------------
113 // ----------------------------------------
114 // for emulation class
115 // ----------------------------------------
117 // drive virtual machine
123 DEVICE *get_cpu(int index);
130 void initialize_sound(int rate, int samples);
131 uint16_t* create_sound(int* extra_frames);
132 int get_sound_buffer_ptr();
133 #ifdef USE_SOUND_VOLUME
134 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
138 void key_down(int code, bool repeat);
139 void key_up(int code);
140 bool get_caps_locked();
141 bool get_kana_locked();
144 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
145 void close_floppy_disk(int drv);
146 bool is_floppy_disk_inserted(int drv);
147 void is_floppy_disk_protected(int drv, bool value);
148 bool is_floppy_disk_protected(int drv);
149 uint32_t is_floppy_disk_accessed();
150 bool is_frame_skippable();
152 void update_config();
153 bool process_state(FILEIO* state_fio, bool loading);
155 // ----------------------------------------
157 // ----------------------------------------
160 DEVICE* get_device(int id);
162 //DEVICE* first_device;
163 //DEVICE* last_device;