2 NEC PC-100 Emulator 'ePC-100'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "NEC PC-100"
14 #define CONFIG_NAME "pc100"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 55.4
18 #define LINES_PER_FRAME 544
19 #define CPU_CLOCKS 6988800
20 #define SCREEN_WIDTH 720
21 #define SCREEN_HEIGHT 512
22 #define WINDOW_HEIGHT_ASPECT 540
26 #define I8259_MAX_CHIPS 1
27 #define MSM58321_START_DAY -9
28 #define MSM58321_START_YEAR 1980
29 #define UPD765A_NO_ST0_AT_FOR_SEEK
30 #define MEMORY_ADDR_MAX 0x100000
31 #define MEMORY_BANK_SIZE 0x8000
32 #define IO_ADDR_MAX 0x10000
34 // device informations for win32
35 #define USE_DRIVE_TYPE 2
36 #define USE_FLOPPY_DISK 2
37 #define NOTIFY_KEY_DOWN
38 #define USE_KEY_LOCKED
39 #define USE_SHIFT_NUMPAD_KEY
40 #define USE_ALT_F10_KEY
41 #define USE_AUTO_KEY 5
42 #define USE_AUTO_KEY_RELEASE 6
43 #define USE_AUTO_KEY_NUMPAD
44 #define USE_MONITOR_TYPE 2
45 #define USE_SCREEN_FILTER
46 #define USE_SOUND_VOLUME 3
52 #include "../../common.h"
53 #include "../../fileio.h"
54 #include "../vm_template.h"
56 #ifdef USE_SOUND_VOLUME
57 static const _TCHAR *sound_device_caption[] = {
58 _T("Beep #1"), _T("Beep #2"), _T("Noise (FDD)"),
62 class csp_state_utils;
85 class VM : public VM_TEMPLATE
89 //csp_state_utils *state_entry;
99 I8259* pic; // includes 2chips
108 PC100::IOCTRL* ioctrl;
112 uint8_t ram[0xc0000]; // Main RAM 768KB
113 uint8_t ipl[0x8000]; // IPL 32KB
116 // ----------------------------------------
118 // ----------------------------------------
123 // ----------------------------------------
124 // for emulation class
125 // ----------------------------------------
127 // drive virtual machine
133 DEVICE *get_cpu(int index);
140 void initialize_sound(int rate, int samples);
141 uint16_t* create_sound(int* extra_frames);
142 int get_sound_buffer_ptr();
143 #ifdef USE_SOUND_VOLUME
144 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
148 void key_down(int code, bool repeat);
149 void key_up(int code);
150 bool get_caps_locked();
151 bool get_kana_locked();
154 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
155 void close_floppy_disk(int drv);
156 bool is_floppy_disk_inserted(int drv);
157 void is_floppy_disk_protected(int drv, bool value);
158 bool is_floppy_disk_protected(int drv);
159 uint32_t is_floppy_disk_accessed();
160 bool is_frame_skippable();
162 void update_config();
163 bool process_state(FILEIO* state_fio, bool loading);
165 // ----------------------------------------
167 // ----------------------------------------
170 DEVICE* get_device(int id);
172 //DEVICE* first_device;
173 //DEVICE* last_device;