2 HITACH BASIC Master Jr Emulator 'eBASICMasterJr'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "HITACHI BASIC Master Jr"
14 #define CONFIG_NAME "bmjr"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 60
18 #define LINES_PER_FRAME 262
19 #define CPU_CLOCKS 754560
20 #define SCREEN_WIDTH 256
21 #define SCREEN_HEIGHT 192
25 // device informations for win32
27 #define USE_TAPE_BUTTON
28 #define NOTIFY_KEY_DOWN
29 #define USE_ALT_F10_KEY
30 #define USE_AUTO_KEY 8
31 #define USE_AUTO_KEY_RELEASE 10
32 #define SUPPORT_ROMA_KANA_CONVERSION
33 //#define USE_CRT_FILTER
34 //#define USE_SCANLINE
35 #define USE_SOUND_FILES 2
36 //#define USE_SOUND_FILES_FDD
37 #define USE_SOUND_FILES_RELAY
38 #if defined(USE_SOUND_FILES)
39 #define USE_SOUND_VOLUME 3
41 #define USE_SOUND_VOLUME 2
46 #include "../../common.h"
47 #include "../../fileio.h"
49 #ifdef USE_SOUND_VOLUME
50 static const _TCHAR *sound_device_caption[] = {
51 _T("Beep"), _T("CMT"),
52 #if defined(USE_SOUND_FILES)
83 // ----------------------------------------
85 // ----------------------------------------
90 // ----------------------------------------
91 // for emulation class
92 // ----------------------------------------
94 // drive virtual machine
98 double get_frame_rate();
102 DEVICE *get_cpu(int index);
107 // uint32_t get_access_lamp_status();
110 void initialize_sound(int rate, int samples);
111 uint16_t* create_sound(int* extra_frames);
112 int get_sound_buffer_ptr();
113 #ifdef USE_SOUND_VOLUME
114 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
118 void key_down(int code, bool repeat);
119 void key_up(int code);
122 void play_tape(const _TCHAR* file_path);
123 void rec_tape(const _TCHAR* file_path);
125 bool is_tape_inserted();
126 bool is_tape_playing();
127 bool is_tape_recording();
128 int get_tape_position();
131 void push_fast_forward();
132 void push_fast_rewind();
133 void push_apss_forward() {}
134 void push_apss_rewind() {}
135 bool is_frame_skippable();
137 void update_config();
138 void save_state(FILEIO* state_fio);
139 bool load_state(FILEIO* state_fio);
141 // ----------------------------------------
143 // ----------------------------------------
146 DEVICE* get_device(int id);
148 DEVICE* first_device;