2 Systems Formulate BUBCOM80 Emulator 'eBUBCOM80'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "Systems Formulate BUBCOM80"
14 #define CONFIG_NAME "bubcom80"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 62.422
18 #define LINES_PER_FRAME 260
19 //#define CPU_CLOCKS 3993624
20 #define CPU_CLOCKS 4000000
21 #define SCREEN_WIDTH 640
22 #define SCREEN_HEIGHT 400
23 #define WINDOW_HEIGHT_ASPECT 480
25 #define MEMORY_ADDR_MAX 0x10000
26 #define MEMORY_BANK_SIZE 0x800
27 #define IO_ADDR_MAX 0x10000
28 #define SUPPORT_VARIABLE_TIMING
30 // device informations for win32
31 #define USE_FLOPPY_DISK 4
33 #define TAPE_BINARY_ONLY
35 #define USE_SHIFT_NUMPAD_KEY
36 #define USE_ALT_F10_KEY
37 #define USE_AUTO_KEY 5
38 #define USE_AUTO_KEY_RELEASE 6
39 #define USE_AUTO_KEY_NUMPAD
40 #define USE_SCREEN_FILTER
42 #define USE_SOUND_VOLUME 2
45 #define USE_PRINTER_TYPE 3
49 #include "../../common.h"
50 #include "../../fileio.h"
51 #include "../vm_template.h"
53 #ifdef USE_SOUND_VOLUME
54 static const _TCHAR *sound_device_caption[] = {
55 _T("Beep"), _T("Noise (FDD)"),
59 //class csp_state_utils;
81 class VM : public VM_TEMPLATE
88 //csp_state_utils *state_entry;
100 BUBBLECASETTE* bubblecasette[2];
110 // ----------------------------------------
112 // ----------------------------------------
117 // ----------------------------------------
118 // for emulation class
119 // ----------------------------------------
121 // drive virtual machine
124 double get_frame_rate();
128 DEVICE *get_cpu(int index);
135 void initialize_sound(int rate, int samples);
136 uint16_t* create_sound(int* extra_frames);
137 int get_sound_buffer_ptr();
138 #ifdef USE_SOUND_VOLUME
139 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
143 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
144 void close_floppy_disk(int drv);
145 bool is_floppy_disk_inserted(int drv);
146 void is_floppy_disk_protected(int drv, bool value);
147 bool is_floppy_disk_protected(int drv);
148 uint32_t is_floppy_disk_accessed();
149 void play_tape(int drv, const _TCHAR* file_path);
150 void rec_tape(int drv, const _TCHAR* file_path);
151 void close_tape(int drv);
152 bool is_tape_inserted(int drv);
153 void open_bubble_casette(int drv, const _TCHAR *path, int bank);
154 void close_bubble_casette(int drv);
155 bool is_bubble_casette_inserted(int drv);
156 bool is_bubble_casette_protected(int drv);
157 void is_bubble_casette_protected(int drv, bool flag);
158 bool is_frame_skippable();
160 void update_config();
162 void save_state(FILEIO* state_fio);
163 bool load_state(FILEIO* state_fio);
165 // ----------------------------------------
167 // ----------------------------------------
170 DEVICE* get_device(int id);
172 //DEVICE* first_device;
173 //DEVICE* last_device;