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_AUTO_KEY 6
38 #define USE_AUTO_KEY_RELEASE 10
39 #define USE_AUTO_KEY_CAPS
40 #define USE_SOUND_VOLUME 3
46 #include "../../common.h"
47 #include "../../fileio.h"
48 #include "../vm_template.h"
50 #ifdef USE_SOUND_VOLUME
51 static const _TCHAR *sound_device_caption[] = {
52 _T("PSG"), _T("CMT (Signal)"), _T("Noise (CMT)"),
75 class VM : public VM_TEMPLATE
79 //csp_state_utils* state_entry;
92 PHC25::JOYSTICK* joystick;
93 PHC25::KEYBOARD* keyboard;
94 PHC25::MEMORY* memory;
95 PHC25::SYSTEM* system;
98 // ----------------------------------------
100 // ----------------------------------------
102 VM(EMU_TEMPLATE* parent_emu);
105 // ----------------------------------------
106 // for emulation class
107 // ----------------------------------------
109 // drive virtual machine
112 double get_frame_rate()
114 return FRAMES_PER_SEC;
119 DEVICE *get_cpu(int index);
126 void initialize_sound(int rate, int samples);
127 uint16_t* create_sound(int* extra_frames);
128 int get_sound_buffer_ptr();
129 #ifdef USE_SOUND_VOLUME
130 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
134 void play_tape(int drv, const _TCHAR* file_path);
135 void rec_tape(int drv, const _TCHAR* file_path);
136 void close_tape(int drv);
137 bool is_tape_inserted(int drv);
138 bool is_tape_playing(int drv);
139 bool is_tape_recording(int drv);
140 int get_tape_position(int drv);
141 const _TCHAR* get_tape_message(int drv);
142 void push_play(int drv);
143 void push_stop(int drv);
144 void push_fast_forward(int drv);
145 void push_fast_rewind(int drv);
146 void push_apss_forward(int drv) {}
147 void push_apss_rewind(int drv) {}
148 bool is_frame_skippable();
150 double get_current_usec();
151 uint64_t get_current_clock_uint64();
153 void update_config();
154 bool process_state(FILEIO* state_fio, bool loading);
156 // ----------------------------------------
158 // ----------------------------------------
161 DEVICE* get_device(int id);
163 //DEVICE* first_device;
164 //DEVICE* last_device;