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
28 #define SUPPORT_TV_RENDER
31 #define TAPE_BINARY_ONLY
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
37 #define USE_SOUND_VOLUME 1
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[] = {
54 class csp_state_utils;
70 class VM : public VM_TEMPLATE
74 //csp_state_utils* state_entry;
90 uint8_t ipl[0x4000]; // ipl (16k)
91 uint8_t ram[0x1000]; // ram (4k)
92 uint8_t ext[0x4000]; // ext ram/rom (16k)
93 uint8_t cart[0x4000]; // cartridge (16k)
97 // ----------------------------------------
99 // ----------------------------------------
104 // ----------------------------------------
105 // for emulation class
106 // ----------------------------------------
108 // drive virtual machine
114 DEVICE *get_cpu(int index);
121 void initialize_sound(int rate, int samples);
122 uint16_t* create_sound(int* extra_frames);
123 int get_sound_buffer_ptr();
124 #ifdef USE_SOUND_VOLUME
125 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
129 void key_down(int code, bool repeat);
130 void key_up(int code);
133 void open_cart(int drv, const _TCHAR* file_path);
134 void close_cart(int drv);
135 bool is_cart_inserted(int drv);
136 void play_tape(int drv, const _TCHAR* file_path);
137 void rec_tape(int drv, const _TCHAR* file_path);
138 void close_tape(int drv);
139 bool is_tape_inserted(int drv);
140 bool is_frame_skippable();
142 void update_config();
144 void save_state(FILEIO* state_fio);
145 bool load_state(FILEIO* state_fio);
147 // ----------------------------------------
149 // ----------------------------------------
152 DEVICE* get_device(int id);
154 //DEVICE* first_device;
155 //DEVICE* last_device;