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"
52 #ifdef USE_SOUND_VOLUME
53 static const _TCHAR *sound_device_caption[] = {
54 _T("Beep"), _T("Noise (FDD)"),
58 class csp_state_utils;
87 csp_state_utils *state_entry;
99 BUBBLECASETTE* bubblecasette[2];
109 // ----------------------------------------
111 // ----------------------------------------
116 // ----------------------------------------
117 // for emulation class
118 // ----------------------------------------
120 // drive virtual machine
123 double get_frame_rate();
127 DEVICE *get_cpu(int index);
134 void initialize_sound(int rate, int samples);
135 uint16_t* create_sound(int* extra_frames);
136 int get_sound_buffer_ptr();
137 #ifdef USE_SOUND_VOLUME
138 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
142 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
143 void close_floppy_disk(int drv);
144 bool is_floppy_disk_inserted(int drv);
145 void is_floppy_disk_protected(int drv, bool value);
146 bool is_floppy_disk_protected(int drv);
147 uint32_t is_floppy_disk_accessed();
148 void play_tape(int drv, const _TCHAR* file_path);
149 void rec_tape(int drv, const _TCHAR* file_path);
150 void close_tape(int drv);
151 bool is_tape_inserted(int drv);
152 void open_bubble_casette(int drv, const _TCHAR *path, int bank);
153 void close_bubble_casette(int drv);
154 bool is_bubble_casette_inserted(int drv);
155 bool is_bubble_casette_protected(int drv);
156 void is_bubble_casette_protected(int drv, bool flag);
157 bool is_frame_skippable();
159 void update_config();
161 void save_state(FILEIO* state_fio);
162 bool load_state(FILEIO* state_fio);
164 // ----------------------------------------
166 // ----------------------------------------
169 DEVICE* get_device(int id);
171 DEVICE* first_device;