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"
42 #include "../vm_template.h"
44 #ifdef USE_SOUND_VOLUME
45 static const _TCHAR *sound_device_caption[] = {
46 _T("Beep"), _T("CMT (Signal)"), _T("Noise (CMT)"),
60 class VM : public VM_TEMPLATE
64 //csp_state_utils *state_entry;
75 // ----------------------------------------
77 // ----------------------------------------
82 // ----------------------------------------
83 // for emulation class
84 // ----------------------------------------
86 // drive virtual machine
90 double get_frame_rate();
94 DEVICE *get_cpu(int index);
101 void initialize_sound(int rate, int samples);
102 uint16_t* create_sound(int* extra_frames);
103 int get_sound_buffer_ptr();
104 #ifdef USE_SOUND_VOLUME
105 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
109 void key_down(int code, bool repeat);
110 void key_up(int code);
113 void play_tape(int drv, const _TCHAR* file_path);
114 void rec_tape(int drv, const _TCHAR* file_path);
115 void close_tape(int drv);
116 bool is_tape_inserted(int drv);
117 bool is_tape_playing(int drv);
118 bool is_tape_recording(int drv);
119 int get_tape_position(int drv);
120 const _TCHAR* get_tape_message(int drv);
121 void push_play(int drv);
122 void push_stop(int drv);
123 void push_fast_forward(int drv);
124 void push_fast_rewind(int drv);
125 void push_apss_forward(int drv) {}
126 void push_apss_rewind(int drv) {}
127 bool is_frame_skippable();
129 void update_config();
130 bool process_state(FILEIO* state_fio, bool loading);
132 // ----------------------------------------
134 // ----------------------------------------
137 DEVICE* get_device(int id);
139 //DEVICE* first_device;
140 //DEVICE* last_device;