2 NEC-HE PC Engine Emulator 'ePCEngine'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "NEC-HE PC Engine"
14 #define CONFIG_NAME "pcengine"
16 #define FRAMES_PER_SEC 60
17 #define LINES_PER_FRAME 262
18 #define CPU_CLOCKS 7159090
19 #define SCREEN_WIDTH 352
20 #define SCREEN_HEIGHT 240
21 // pixel aspect should be 8:7
22 #define WINDOW_HEIGHT_ASPECT 210
24 #define SUPPORT_SUPER_GFX
25 #define SUPPORT_BACKUP_RAM
27 //#define SCSI_HOST_AUTO_ACK
28 #define SCSI_DEV_IMMEDIATE_SELECT
30 // device informations for win32
31 #define SOUND_RATE_DEFAULT 5 // 44100Hz
32 #define SUPPORT_TV_RENDER
34 #define USE_COMPACT_DISC 1
35 #define USE_SOUND_VOLUME 3
37 #define USE_JOYSTICK_TYPE 4
38 #define JOYSTICK_TYPE_DEFAULT 0
39 #define USE_JOY_BUTTON_CAPTIONS
42 //#define USE_SEPARATED_ADPCM
44 #include "../../common.h"
45 #include "../../fileio.h"
46 #include "../vm_template.h"
48 #ifdef USE_SOUND_VOLUME
49 static const _TCHAR *sound_device_caption[] = {
50 _T("PSG"), _T("CD-DA"), _T("ADPCM")
54 #ifdef USE_JOY_BUTTON_CAPTIONS
55 static const _TCHAR *joy_button_captions[] = {
82 #ifdef USE_SEPARATED_ADPCM
86 class VM : public VM_TEMPLATE
90 //csp_state_utils* state_entry;
98 SCSI_CDROM* scsi_cdrom;
100 #ifdef USE_SEPARATED_ADPCM
101 PCEDEV::ADPCM* pce_adpcm;
104 // ----------------------------------------
106 // ----------------------------------------
111 // ----------------------------------------
112 // for emulation class
113 // ----------------------------------------
115 // drive virtual machine
118 double get_frame_rate();
122 DEVICE *get_cpu(int index);
129 void initialize_sound(int rate, int samples);
130 uint16_t* create_sound(int* extra_frames);
131 int get_sound_buffer_ptr();
132 #ifdef USE_SOUND_VOLUME
133 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
137 void open_cart(int drv, const _TCHAR* file_path);
138 void close_cart(int drv);
139 bool is_cart_inserted(int drv);
140 void open_compact_disc(int drv, const _TCHAR* file_path);
141 void close_compact_disc(int drv);
142 bool is_compact_disc_inserted(int drv);
143 uint32_t is_compact_disc_accessed();
144 bool is_frame_skippable()
148 void update_config();
149 bool process_state(FILEIO* state_fio, bool loading);
151 // ----------------------------------------
153 // ----------------------------------------
156 DEVICE* get_device(int id);
158 //DEVICE* first_device;
159 //DEVICE* last_device;