2 Nintendo Family BASIC Emulator 'eFamilyBASIC'
5 Author : Takeda.Toshiya
11 #ifndef _FAMILYBASIC_H_
12 #define _FAMILYBASIC_H_
14 #define DEVICE_NAME "Nintendo Family BASIC"
15 #define CONFIG_NAME "familybasic"
17 // device informations for virtual machine
18 #define FRAMES_PER_SEC 60
19 #define LINES_PER_FRAME 262
20 #define CPU_CLOCKS 1789772
21 #define SCREEN_WIDTH 256
22 #define SCREEN_HEIGHT 240
23 // pixel aspect should be 8:7
24 #define WINDOW_HEIGHT_ASPECT 210
27 // device informations for win32
28 #define USE_BOOT_MODE 3
30 #define USE_ALT_F10_KEY
31 #define USE_AUTO_KEY 5
32 #define USE_AUTO_KEY_RELEASE 6
33 #define USE_AUTO_KEY_NO_CAPS
34 #define USE_SOUND_VOLUME 2
36 #define USE_JOY_BUTTON_CAPTIONS
39 #include "../../common.h"
40 #include "../../fileio.h"
42 #ifdef USE_SOUND_VOLUME
43 static const _TCHAR *sound_device_caption[] = {
48 #ifdef USE_JOY_BUTTON_CAPTIONS
49 static const _TCHAR *joy_button_captions[] = {
90 // ----------------------------------------
92 // ----------------------------------------
97 // ----------------------------------------
98 // for emulation class
99 // ----------------------------------------
101 // drive virtual machine
109 void initialize_sound(int rate, int samples);
110 uint16_t* create_sound(int* extra_frames);
111 int get_sound_buffer_ptr();
112 #ifdef USE_SOUND_VOLUME
113 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
117 void play_tape(const _TCHAR* file_path);
118 void rec_tape(const _TCHAR* file_path);
120 bool is_tape_inserted();
121 bool is_tape_playing();
122 bool is_tape_recording();
123 int get_tape_position();
124 bool is_frame_skippable();
126 void update_config();
127 void save_state(FILEIO* state_fio);
128 bool load_state(FILEIO* state_fio);
130 // ----------------------------------------
132 // ----------------------------------------
135 DEVICE* get_device(int id);
137 DEVICE* first_device;