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_CRT_MONITOR_4_3 1
30 #define USE_ALT_F10_KEY
31 #define USE_AUTO_KEY 8
32 #define USE_AUTO_KEY_RELEASE 10
33 //#define USE_CRT_FILTER
34 //#define USE_SCANLINE
35 #define USE_SOUND_VOLUME 2
39 #include "../../common.h"
40 #include "../../fileio.h"
42 #ifdef USE_SOUND_VOLUME
43 static const _TCHAR *sound_device_caption[] = {
44 _T("Beep"), _T("CMT"),
73 // ----------------------------------------
75 // ----------------------------------------
80 // ----------------------------------------
81 // for emulation class
82 // ----------------------------------------
84 // drive virtual machine
88 double get_frame_rate();
92 DEVICE *get_cpu(int index);
97 // int get_access_lamp_status();
100 void initialize_sound(int rate, int samples);
101 uint16* create_sound(int* extra_frames);
102 int get_sound_buffer_ptr();
103 #ifdef USE_SOUND_VOLUME
104 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
108 void key_down(int code, bool repeat);
109 void key_up(int code);
112 void play_tape(const _TCHAR* file_path);
113 void rec_tape(const _TCHAR* file_path);
115 bool is_tape_inserted();
116 bool is_tape_playing();
117 bool is_tape_recording();
118 int get_tape_position();
121 void push_fast_forward();
122 void push_fast_rewind();
123 void push_apss_forward() {}
124 void push_apss_rewind() {}
125 bool is_frame_skippable();
127 void update_config();
128 void save_state(FILEIO* state_fio);
129 bool load_state(FILEIO* state_fio);
131 // ----------------------------------------
133 // ----------------------------------------
136 DEVICE* get_device(int id);
138 DEVICE* first_device;