2 CASIO FP-1100 Emulator 'eFP-1100'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "CASIO FP-1100"
14 #define CONFIG_NAME "fp1100"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 59.77
18 #define LINES_PER_FRAME 261
19 #define CHARS_PER_LINE 128
20 #define HD46505_CHAR_CLOCK 998400
21 #define CPU_CLOCKS 3993600
22 #define SUB_CPU_CLOCKS 1996800
23 //#define Z80_MEMORY_WAIT
25 #define SCREEN_WIDTH 640
26 #define SCREEN_HEIGHT 400
27 #define WINDOW_HEIGHT_ASPECT 480
29 #define SUPPORT_VARIABLE_TIMING
31 // device informations for win32
32 #define SUPPORT_TV_RENDER
40 #define NOTIFY_KEY_DOWN
41 #define USE_SHIFT_NUMPAD_KEY
42 #define USE_ALT_F10_KEY
43 #define USE_AUTO_KEY_SHIFT 2
44 #define USE_AUTO_KEY 5
45 #define USE_AUTO_KEY_RELEASE 6
46 #define USE_AUTO_KEY_CAPS
47 #define USE_AUTO_KEY_NUMPAD
48 #define USE_SCREEN_FILTER
50 #define USE_SOUND_VOLUME 4
54 #include "../../common.h"
55 #include "../../fileio.h"
57 #ifdef USE_SOUND_VOLUME
58 static const _TCHAR *sound_device_caption[] = {
59 _T("Beep"), _T("CMT (Signal)"), _T("Noise (FDD)"), _T("Noise (CMT)"),
107 // ----------------------------------------
109 // ----------------------------------------
114 // ----------------------------------------
115 // for emulation class
116 // ----------------------------------------
118 // drive virtual machine
121 double get_frame_rate();
125 DEVICE *get_cpu(int index);
132 void initialize_sound(int rate, int samples);
133 uint16_t* create_sound(int* extra_frames);
134 int get_sound_buffer_ptr();
135 #ifdef USE_SOUND_VOLUME
136 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
140 void key_down(int code, bool repeat);
141 void key_up(int code);
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 void play_tape(int drv, const _TCHAR* file_path);
151 void rec_tape(int drv, const _TCHAR* file_path);
152 void close_tape(int drv);
153 bool is_tape_inserted(int drv);
154 bool is_tape_playing(int drv);
155 bool is_tape_recording(int drv);
156 int get_tape_position(int drv);
157 const _TCHAR* get_tape_message(int drv);
158 bool is_frame_skippable();
160 void update_config();
161 void save_state(FILEIO* state_fio);
162 bool load_state(FILEIO* state_fio);
164 // ----------------------------------------
166 // ----------------------------------------
169 DEVICE* get_device(int id);
171 DEVICE* first_device;