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"
50 #include "../vm_template.h"
52 #ifdef USE_SOUND_VOLUME
53 static const _TCHAR *sound_device_caption[] = {
54 _T("PSG"), _T("CMT (Signal)"), _T("Noise (CMT)"),
58 class csp_state_utils;
77 class VM : public VM_TEMPLATE
81 //csp_state_utils* state_entry;
100 // ----------------------------------------
102 // ----------------------------------------
107 // ----------------------------------------
108 // for emulation class
109 // ----------------------------------------
111 // drive virtual machine
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 play_tape(int drv, const _TCHAR* file_path);
133 void rec_tape(int drv, const _TCHAR* file_path);
134 void close_tape(int drv);
135 bool is_tape_inserted(int drv);
136 bool is_tape_playing(int drv);
137 bool is_tape_recording(int drv);
138 int get_tape_position(int drv);
139 const _TCHAR* get_tape_message(int drv);
140 void push_play(int drv);
141 void push_stop(int drv);
142 void push_fast_forward(int drv);
143 void push_fast_rewind(int drv);
144 void push_apss_forward(int drv) {}
145 void push_apss_rewind(int drv) {}
146 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;