2 BANDAI RX-78 Emulator 'eRX-78'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "BANDAI RX-78"
14 #define CONFIG_NAME "rx78"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 60
18 #define LINES_PER_FRAME 262
19 #define CPU_CLOCKS 4090909
20 #define SCREEN_WIDTH 192
21 #define SCREEN_HEIGHT 184
22 #define WINDOW_WIDTH_ASPECT 288
24 // device informations for win32
27 #define USE_AUTO_KEY 6
28 #define USE_AUTO_KEY_RELEASE 10
29 #define USE_AUTO_KEY_CAPS
30 #define USE_SOUND_VOLUME 3
31 #define SUPPORT_TV_RENDER
37 #include "../../common.h"
38 #include "../../fileio.h"
39 #include "../vm_template.h"
41 #ifdef USE_SOUND_VOLUME
42 static const _TCHAR *sound_device_caption[] = {
43 _T("PSG"), _T("CMT (Signal)"), _T("Noise (CMT)"),
63 class VM : public VM_TEMPLATE
82 // ----------------------------------------
84 // ----------------------------------------
86 VM(EMU_TEMPLATE* parent_emu);
89 // ----------------------------------------
90 // for emulation class
91 // ----------------------------------------
93 // drive virtual machine
96 double get_frame_rate()
98 return FRAMES_PER_SEC;
103 DEVICE *get_cpu(int index);
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 open_cart(int drv, const _TCHAR* file_path);
119 void close_cart(int drv);
120 bool is_cart_inserted(int drv);
121 void play_tape(int drv, const _TCHAR* file_path);
122 void rec_tape(int drv, const _TCHAR* file_path);
123 void close_tape(int drv);
124 bool is_tape_inserted(int drv);
125 bool is_tape_playing(int drv);
126 bool is_tape_recording(int drv);
127 int get_tape_position(int drv);
128 const _TCHAR* get_tape_message(int drv);
129 void push_play(int drv);
130 void push_stop(int drv);
131 void push_fast_forward(int drv);
132 void push_fast_rewind(int drv);
133 void push_apss_forward(int drv) {}
134 void push_apss_rewind(int drv) {}
135 bool is_frame_skippable();
137 double get_current_usec();
138 uint64_t get_current_clock_uint64();
140 void update_config();
141 bool process_state(FILEIO* state_fio, bool loading);
143 // ----------------------------------------
145 // ----------------------------------------
148 DEVICE* get_device(int id);
150 //DEVICE* first_device;
151 //DEVICE* last_device;