2 CASIO FP-200 Emulator 'eFP-200'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "CASIO FP-200"
14 #define CONFIG_NAME "fp200"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 64
18 #define LINES_PER_FRAME 64
19 #define CPU_CLOCKS 3072000
20 #define SCREEN_WIDTH 160
21 #define SCREEN_HEIGHT 64
23 #define I8080_MEMORY_WAIT
24 #define MEMORY_ADDR_MAX 0x10000
25 #define MEMORY_BANK_SIZE 0x2000
27 // device informations for win32
28 #define WINDOW_MODE_BASE 2
29 #define USE_BOOT_MODE 2
31 #define USE_TAPE_BUTTON
32 #define NOTIFY_KEY_DOWN
33 #define USE_ALT_F10_KEY
34 #define USE_AUTO_KEY 5
35 #define USE_AUTO_KEY_RELEASE 6
36 #define USE_AUTO_KEY_CAPS
38 #define USE_SOUND_VOLUME 2
43 #include "../../common.h"
44 #include "../../fileio.h"
45 #include "../vm_template.h"
47 #ifdef USE_SOUND_VOLUME
48 static const _TCHAR *sound_device_caption[] = {
49 _T("CMT (Signal)"), _T("Noise (CMT)"),
53 class csp_state_utils;
65 class VM : public VM_TEMPLATE
69 //csp_state_utils *state_entry;
86 // ----------------------------------------
88 // ----------------------------------------
93 // ----------------------------------------
94 // for emulation class
95 // ----------------------------------------
97 // drive virtual machine
103 DEVICE *get_cpu(int index);
110 void initialize_sound(int rate, int samples);
111 uint16_t* create_sound(int* extra_frames);
112 int get_sound_buffer_ptr();
113 #ifdef USE_SOUND_VOLUME
114 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
118 void key_down(int code, bool repeat);
119 void key_up(int code);
122 void play_tape(int drv, const _TCHAR* file_path);
123 void rec_tape(int drv, const _TCHAR* file_path);
124 void close_tape(int drv);
125 bool is_tape_inserted(int drv);
126 bool is_tape_playing(int drv);
127 bool is_tape_recording(int drv);
128 int get_tape_position(int drv);
129 const _TCHAR* get_tape_message(int drv);
130 void push_play(int drv);
131 void push_stop(int drv);
132 void push_fast_forward(int drv);
133 void push_fast_rewind(int drv);
134 void push_apss_forward(int drv) {}
135 void push_apss_rewind(int drv) {}
136 bool is_frame_skippable();
138 void update_config();
139 bool process_state(FILEIO* state_fio, bool loading);
141 // ----------------------------------------
143 // ----------------------------------------
146 DEVICE* get_device(int id);
148 //DEVICE* first_device;
149 //DEVICE* last_device;