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
43 #include "../../common.h"
44 #include "../../fileio.h"
45 #include "../vm_template.h"
47 #ifdef USE_SOUND_VOLUME
48 static const _TCHAR *sound_device_caption[] = {
49 _T("PSG"), _T("CD-DA"), _T("ADPCM")
53 #ifdef USE_JOY_BUTTON_CAPTIONS
54 static const _TCHAR *joy_button_captions[] = {
70 class csp_state_utils;
81 class VM : public VM_TEMPLATE
85 //csp_state_utils* state_entry;
93 SCSI_CDROM* scsi_cdrom;
97 // ----------------------------------------
99 // ----------------------------------------
104 // ----------------------------------------
105 // for emulation class
106 // ----------------------------------------
108 // drive virtual machine
111 double get_frame_rate();
115 DEVICE *get_cpu(int index);
122 void initialize_sound(int rate, int samples);
123 uint16_t* create_sound(int* extra_frames);
124 int get_sound_buffer_ptr();
125 #ifdef USE_SOUND_VOLUME
126 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
130 void open_cart(int drv, const _TCHAR* file_path);
131 void close_cart(int drv);
132 bool is_cart_inserted(int drv);
133 void open_compact_disc(int drv, const _TCHAR* file_path);
134 void close_compact_disc(int drv);
135 bool is_compact_disc_inserted(int drv);
136 uint32_t is_compact_disc_accessed();
137 bool is_frame_skippable()
141 void update_config();
142 bool process_state(FILEIO* state_fio, bool loading);
144 // ----------------------------------------
146 // ----------------------------------------
149 DEVICE* get_device(int id);
151 //DEVICE* first_device;
152 //DEVICE* last_device;