2 CASIO PV-2000 Emulator 'EmuGaki'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "CASIO PV-2000"
14 #define CONFIG_NAME "pv2000"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 60
18 #define LINES_PER_FRAME 262
19 #define CPU_CLOCKS 3579545
20 #define SCREEN_WIDTH 256
21 #define SCREEN_HEIGHT 192
22 #define TMS9918A_VRAM_SIZE 0x4000
23 //#define TMS9918A_LIMIT_SPRITES
24 #define MEMORY_ADDR_MAX 0x10000
25 #define MEMORY_BANK_SIZE 0x1000
27 // device informations for win32
30 #define TAPE_BINARY_ONLY
31 #define NOTIFY_KEY_DOWN
32 #define USE_ALT_F10_KEY
33 #define USE_AUTO_KEY 5
34 #define USE_AUTO_KEY_RELEASE 6
35 #define USE_AUTO_KEY_CAPS
39 #include "../../common.h"
40 #include "../../fileio.h"
75 uint8 ipl[0x4000]; // ipl (16k)
76 uint8 ram[0x1000]; // ram (4k)
77 uint8 ext[0x4000]; // ext ram/rom (16k)
78 uint8 cart[0x4000]; // cartridge (16k)
82 // ----------------------------------------
84 // ----------------------------------------
89 // ----------------------------------------
90 // for emulation class
91 // ----------------------------------------
93 // drive virtual machine
99 DEVICE *get_cpu(int index);
106 void initialize_sound(int rate, int samples);
107 uint16* create_sound(int* extra_frames);
108 int sound_buffer_ptr();
111 void key_down(int code, bool repeat);
112 void key_up(int code);
115 void open_cart(int drv, _TCHAR* file_path);
116 void close_cart(int drv);
117 bool cart_inserted(int drv);
118 void play_tape(_TCHAR* file_path);
119 void rec_tape(_TCHAR* file_path);
121 bool tape_inserted();
124 void update_config();
125 void save_state(FILEIO* state_fio);
126 bool load_state(FILEIO* state_fio);
128 // ----------------------------------------
130 // ----------------------------------------
133 DEVICE* get_device(int id);
135 DEVICE* first_device;