2 ASCII MSX1 Emulator 'yaMSX1'
3 ASCII MSX2 Emulator 'yaMSX2'
4 Pioneer PX-7 Emulator 'ePX-7'
9 modified by Takeda.Toshiya
19 #define DEVICE_NAME "PIONEER PX-7"
20 #define CONFIG_NAME "px7"
22 #define DEVICE_NAME "ASCII MSX1"
23 #define CONFIG_NAME "msx1"
25 #define DEVICE_NAME "ASCII MSX2"
26 #define CONFIG_NAME "msx2"
29 // device informations for virtual machine
30 #define FRAMES_PER_SEC 60
31 #define LINES_PER_FRAME 262
32 #define CPU_CLOCKS 3579545
34 #define SCREEN_WIDTH ((256 + 15)*2) // V99X8_WIDTH
35 #define SCREEN_HEIGHT ((212 + 15)*2) // V99X8_HEIGHT
37 #define SCREEN_WIDTH 512
38 #define SCREEN_HEIGHT 384
40 #define TMS9918A_VRAM_SIZE 0x4000
41 #define TMS9918A_LIMIT_SPRITES
43 #define TMS9918A_SUPER_IMPOSE
46 #define SUPPORT_MEDIA_TYPE_1DD
47 #define Z80_PSEUDO_BIOS
50 // for Flappy Limited '85
51 #define AY_3_891X_PORT_MODE 0x80
53 // device informations for win32
56 #define USE_TAPE_BUTTON
58 #define USE_LASER_DISC 1
59 #define USE_MOVIE_PLAYER
61 #define USE_FLOPPY_DISK 2
63 #define USE_ALT_F10_KEY
64 #define USE_AUTO_KEY 6
65 #define USE_AUTO_KEY_RELEASE 10
67 #define USE_SOUND_VOLUME 5
69 //#define USE_SOUND_VOLUME 5
70 #define USE_SOUND_VOLUME 4
72 #define SUPPORT_TV_RENDER
78 #include "../../common.h"
79 #include "../../fileio.h"
80 #include "../vm_template.h"
82 #ifdef USE_SOUND_VOLUME
83 static const _TCHAR *sound_device_caption[] = {
84 _T("PSG"), _T("Beep"), _T("CMT (Signal)"),
126 class VM : public VM_TEMPLATE
152 MSX::JOYSTICK* joystick;
153 MSX::KEYBOARD* keyboard;
164 // ----------------------------------------
166 // ----------------------------------------
171 // ----------------------------------------
172 // for emulation class
173 // ----------------------------------------
175 // drive virtual machine
181 DEVICE *get_cpu(int index);
188 void initialize_sound(int rate, int samples);
189 uint16_t* create_sound(int* extra_frames);
190 int get_sound_buffer_ptr();
192 void movie_sound_callback(uint8_t *buffer, long size);
194 #ifdef USE_SOUND_VOLUME
195 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
199 void open_cart(int drv, const _TCHAR* file_path);
200 void close_cart(int drv);
201 bool is_cart_inserted(int drv);
202 void play_tape(int drv, const _TCHAR* file_path);
203 void rec_tape(int drv, const _TCHAR* file_path);
204 void close_tape(int drv);
205 bool is_tape_inserted(int drv);
206 bool is_tape_playing(int drv);
207 bool is_tape_recording(int drv);
208 int get_tape_position(int drv);
209 const _TCHAR* get_tape_message(int drv);
210 void push_play(int drv);
211 void push_stop(int drv);
212 void push_fast_forward(int drv);
213 void push_fast_rewind(int drv);
214 void push_apss_forward(int drv) {}
215 void push_apss_rewind(int drv) {}
217 void open_laser_disc(int drv, const _TCHAR* file_path);
218 void close_laser_disc(int drv);
219 bool is_laser_disc_inserted(int drv);
220 uint32_t is_laser_disc_accessed();
222 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
223 void close_floppy_disk(int drv);
224 bool is_floppy_disk_inserted(int drv);
225 void is_floppy_disk_protected(int drv, bool value);
226 bool is_floppy_disk_protected(int drv);
227 uint32_t is_floppy_disk_accessed();
229 bool is_frame_skippable();
231 void update_config();
232 bool process_state(FILEIO* state_fio, bool loading);
234 // ----------------------------------------
236 // ----------------------------------------
239 DEVICE* get_device(int id);
241 //DEVICE* first_device;
242 //DEVICE* last_device;