2 National JR-800 Emulator 'eJR-800'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "National JR-800"
14 #define CONFIG_NAME "jr800"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 72
18 #define LINES_PER_FRAME 64
19 #define CPU_CLOCKS 491520
20 #define SCREEN_WIDTH 192
21 #define SCREEN_HEIGHT 64
23 #define MEMORY_ADDR_MAX 0x10000
24 #define MEMORY_BANK_SIZE 0x100
26 // device informations for win32
27 #define WINDOW_MODE_BASE 2
29 #define USE_TAPE_BUTTON
30 #define USE_AUTO_KEY 6
31 #define USE_AUTO_KEY_RELEASE 10
32 //#define USE_AUTO_KEY_CAPS
33 #define USE_SOUND_VOLUME 3
36 #define USE_CPU_HD6301
38 #include "../../common.h"
39 #include "../../fileio.h"
40 #include "../vm_template.h"
42 #ifdef USE_SOUND_VOLUME
43 static const _TCHAR *sound_device_caption[] = {
44 _T("Beep"), _T("CMT (Signal)"), _T("Noise (CMT)"),
48 class csp_state_utils;
62 class VM : public VM_TEMPLATE
66 //csp_state_utils *state_entry;
84 // ----------------------------------------
86 // ----------------------------------------
91 // ----------------------------------------
92 // for emulation class
93 // ----------------------------------------
95 // drive virtual machine
101 DEVICE *get_cpu(int index);
108 void initialize_sound(int rate, int samples);
109 uint16_t* create_sound(int* extra_frames);
110 int get_sound_buffer_ptr();
111 #ifdef USE_SOUND_VOLUME
112 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
116 void play_tape(int drv, const _TCHAR* file_path);
117 void rec_tape(int drv, const _TCHAR* file_path);
118 void close_tape(int drv);
119 bool is_tape_inserted(int drv);
120 bool is_tape_playing(int drv);
121 bool is_tape_recording(int drv);
122 int get_tape_position(int drv);
123 const _TCHAR* get_tape_message(int drv);
124 void push_play(int drv);
125 void push_stop(int drv);
126 void push_fast_forward(int drv);
127 void push_fast_rewind(int drv);
128 void push_apss_forward(int drv) {}
129 void push_apss_rewind(int drv) {}
130 bool is_frame_skippable();
132 void update_config();
134 void save_state(FILEIO* state_fio);
135 bool load_state(FILEIO* state_fio);
137 // ----------------------------------------
139 // ----------------------------------------
142 DEVICE* get_device(int id);
144 //DEVICE* first_device;
145 //DEVICE* last_device;