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;
83 class VM : public VM_TEMPLATE
87 //csp_state_utils* state_entry;
95 SCSI_CDROM* scsi_cdrom;
99 // ----------------------------------------
101 // ----------------------------------------
106 // ----------------------------------------
107 // for emulation class
108 // ----------------------------------------
110 // drive virtual machine
113 double get_frame_rate();
117 DEVICE *get_cpu(int index);
124 void initialize_sound(int rate, int samples);
125 uint16_t* create_sound(int* extra_frames);
126 int get_sound_buffer_ptr();
127 #ifdef USE_SOUND_VOLUME
128 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
132 void open_cart(int drv, const _TCHAR* file_path);
133 void close_cart(int drv);
134 bool is_cart_inserted(int drv);
135 void open_compact_disc(int drv, const _TCHAR* file_path);
136 void close_compact_disc(int drv);
137 bool is_compact_disc_inserted(int drv);
138 uint32_t is_compact_disc_accessed();
139 bool is_frame_skippable()
143 void update_config();
144 bool process_state(FILEIO* state_fio, bool loading);
146 // ----------------------------------------
148 // ----------------------------------------
151 DEVICE* get_device(int id);
153 //DEVICE* first_device;
154 //DEVICE* last_device;