2 COLECO ColecoVision Emulator 'yaCOLECOVISION'
10 #ifndef _COLECO_VISION_H_
11 #define _COLECO_VISION_H_
13 #define DEVICE_NAME "COLECO ColecoVision"
14 #define CONFIG_NAME "colecovision"
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
25 // device informations for win32
27 #define USE_SOUND_VOLUME 2
33 #include "../../common.h"
34 #include "../../fileio.h"
35 #include "../vm_template.h"
37 #ifdef USE_SOUND_VOLUME
38 static const _TCHAR *sound_device_caption[] = {
43 //class csp_state_utils;
56 class VM : public VM_TEMPLATE
60 //csp_state_utils *state_entry;
74 // ----------------------------------------
76 // ----------------------------------------
81 // ----------------------------------------
82 // for emulation class
83 // ----------------------------------------
85 // drive virtual machine
91 DEVICE *get_cpu(int index);
98 void initialize_sound(int rate, int samples);
99 uint16_t* create_sound(int* extra_frames);
100 int get_sound_buffer_ptr();
101 #ifdef USE_SOUND_VOLUME
102 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
106 void open_cart(int drv, const _TCHAR* file_path);
107 void close_cart(int drv);
108 bool is_cart_inserted(int drv);
109 bool is_frame_skippable();
111 void update_config();
112 bool process_state(FILEIO* state_fio, bool loading);
114 // ----------------------------------------
116 // ----------------------------------------
119 DEVICE* get_device(int id);
121 //DEVICE* first_device;
122 //DEVICE* last_device;