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
26 #define SUPPORT_TV_RENDER
28 #define USE_TAPE_BUTTON
29 #define NOTIFY_KEY_DOWN
30 #define USE_ALT_F10_KEY
31 #define USE_AUTO_KEY 8
32 #define USE_AUTO_KEY_RELEASE 10
33 //#define USE_SCREEN_FILTER
34 //#define USE_SCANLINE
35 #define USE_SOUND_VOLUME 3
38 #define USE_CPU_MC6800
40 #include "../../common.h"
41 #include "../../fileio.h"
43 #ifdef USE_SOUND_VOLUME
44 static const _TCHAR *sound_device_caption[] = {
45 _T("Beep"), _T("CMT (Signal)"), _T("Noise (CMT)"),
49 class csp_state_utils;
65 csp_state_utils *state_entry;
76 // ----------------------------------------
78 // ----------------------------------------
83 // ----------------------------------------
84 // for emulation class
85 // ----------------------------------------
87 // drive virtual machine
91 double get_frame_rate();
95 DEVICE *get_cpu(int index);
102 void initialize_sound(int rate, int samples);
103 uint16_t* create_sound(int* extra_frames);
104 int get_sound_buffer_ptr();
105 #ifdef USE_SOUND_VOLUME
106 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
110 void key_down(int code, bool repeat);
111 void key_up(int code);
114 void play_tape(int drv, const _TCHAR* file_path);
115 void rec_tape(int drv, const _TCHAR* file_path);
116 void close_tape(int drv);
117 bool is_tape_inserted(int drv);
118 bool is_tape_playing(int drv);
119 bool is_tape_recording(int drv);
120 int get_tape_position(int drv);
121 const _TCHAR* get_tape_message(int drv);
122 void push_play(int drv);
123 void push_stop(int drv);
124 void push_fast_forward(int drv);
125 void push_fast_rewind(int drv);
126 void push_apss_forward(int drv) {}
127 void push_apss_rewind(int drv) {}
128 bool is_frame_skippable();
130 void update_config();
132 void save_state(FILEIO* state_fio);
133 bool load_state(FILEIO* state_fio);
135 // ----------------------------------------
137 // ----------------------------------------
140 DEVICE* get_device(int id);
142 DEVICE* first_device;