2 SANYO PHC-25 Emulator 'ePHC-25'
3 SEIKO MAP-1010 Emulator 'eMAP-1010'
5 Author : Takeda.Toshiya
15 #define DEVICE_NAME "SEIKO MAP-1010"
16 #define CONFIG_NAME "map1010"
18 #define DEVICE_NAME "SANYO PHC-25"
19 #define CONFIG_NAME "phc25"
22 // device informations for virtual machine
23 #define FRAMES_PER_SEC 60
24 #define LINES_PER_FRAME 262
25 #define CPU_CLOCKS 4000000
26 #define SCREEN_WIDTH 256
27 #define SCREEN_HEIGHT 192
29 #define MC6847_ATTR_OFS 0x800
30 #define MC6847_ATTR_INV 0x01
31 #define MC6847_ATTR_AS 0x02
32 #define MC6847_ATTR_CSS 0x04
35 // device informations for win32
37 #define USE_TAPE_BUTTON
38 #define USE_ALT_F10_KEY
39 #define USE_AUTO_KEY 6
40 #define USE_AUTO_KEY_RELEASE 10
41 #define USE_AUTO_KEY_CAPS
42 #define USE_SOUND_VOLUME 3
48 #include "../../common.h"
49 #include "../../fileio.h"
51 #ifdef USE_SOUND_VOLUME
52 static const _TCHAR *sound_device_caption[] = {
53 _T("PSG"), _T("CMT (Signal)"), _T("Noise (CMT)"),
57 class csp_state_utils;
80 csp_state_utils* state_entry;
99 // ----------------------------------------
101 // ----------------------------------------
106 // ----------------------------------------
107 // for emulation class
108 // ----------------------------------------
110 // drive virtual machine
116 DEVICE *get_cpu(int index);
123 void initialize_sound(int rate, int samples);
124 uint16_t* create_sound(int* extra_frames);
125 int get_sound_buffer_ptr();
126 #ifdef USE_SOUND_VOLUME
127 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
131 void play_tape(int drv, const _TCHAR* file_path);
132 void rec_tape(int drv, const _TCHAR* file_path);
133 void close_tape(int drv);
134 bool is_tape_inserted(int drv);
135 bool is_tape_playing(int drv);
136 bool is_tape_recording(int drv);
137 int get_tape_position(int drv);
138 const _TCHAR* get_tape_message(int drv);
139 void push_play(int drv);
140 void push_stop(int drv);
141 void push_fast_forward(int drv);
142 void push_fast_rewind(int drv);
143 void push_apss_forward(int drv) {}
144 void push_apss_rewind(int drv) {}
145 bool is_frame_skippable();
147 void update_config();
149 void save_state(FILEIO* state_fio);
150 bool load_state(FILEIO* state_fio);
152 // ----------------------------------------
154 // ----------------------------------------
157 DEVICE* get_device(int id);
159 DEVICE* first_device;