#ifdef _X1TURBO_FEATURE
#define SINGLE_MODE_DMA
#endif
-#define DATAREC_FF_REW_SPEED 16
+#define DATAREC_FAST_FWD_SPEED 16
+#define DATAREC_FAST_REW_SPEED 16
#define PRINTER_STROBE_RISING_EDGE
#define SUPPORT_VARIABLE_TIMING
// device informations for win32
#define USE_SPECIAL_RESET
#ifdef _X1TURBO_FEATURE
-#define USE_DEVICE_TYPE 2
+#define USE_KEYBOARD_TYPE 2
// Keyboard mode B
-#define DEVICE_TYPE_DEFAULT 1
-#define USE_DRIVE_TYPE 2
+#define KEYBOARD_TYPE_DEFAULT 1
+#define USE_DRIVE_TYPE 3
#endif
#define USE_FD1
#define USE_FD2
#define FD_BASE_NUMBER 0
-#define USE_TAPE
+#define USE_TAPE1
#define USE_TAPE_BUTTON
#ifdef _X1TWIN
#define USE_CART1
#endif
#define NOTIFY_KEY_DOWN
+#define USE_KEY_LOCKED
#define USE_SHIFT_NUMPAD_KEY
#define USE_ALT_F10_KEY
#define USE_AUTO_KEY 8
#define USE_AUTO_KEY_RELEASE 10
+#define USE_AUTO_KEY_NUMPAD
#define USE_MONITOR_TYPE 2
-#define USE_CRT_FILTER
+#define USE_SCREEN_FILTER
#define USE_SCANLINE
-#define USE_ACCESS_LAMP
-#define USE_SOUND_DEVICE_TYPE 3
+#define USE_SOUND_TYPE 3
+// ToDo
+//#define DATAREC_SOUND
// CZ-8BS1 x1
-#define SOUND_DEVICE_TYPE_DEFAULT 1
-#if defined(_X1TWIN)
-#define USE_SOUND_VOLUME 5
-#else
-#define USE_SOUND_VOLUME 4
-#endif
+#define SOUND_TYPE_DEFAULT 1
+# if defined(_X1TWIN)
+# define USE_SOUND_VOLUME 7
+# else
+# define USE_SOUND_VOLUME 6
+# endif
+#define SUPPORT_TV_RENDER
+#define USE_JOYSTICK
#ifdef _X1TWIN
-#define USE_JOY_BUTTON_CAPTIONS
+#define USE_JOYSTICK_TYPE 4
+#define JOYSTICK_TYPE_DEFAULT 0
#endif
+#define USE_JOY_BUTTON_CAPTIONS
+#define USE_MOUSE
#define USE_PRINTER
#define USE_PRINTER_TYPE 4
#define USE_DEBUGGER
#define USE_STATE
-#define USE_MOUSE
-#define USE_KEYBOARD
-#define USE_JOYSTICK
-#define USE_CRT_MONITOR_4_3 1
-
+#define USE_CPU_Z80
+#define USE_CPU_MCS48
#include "../../common.h"
#include "../../fileio.h"
#ifdef USE_SOUND_VOLUME
static const _TCHAR *sound_device_caption[] = {
- _T("PSG"), _T("CZ-8BS1 #1"), _T("CZ-8BS1 #2"), _T("CMT"),
+ _T("PSG"), _T("CZ-8BS1 #1"), _T("CZ-8BS1 #2"), _T("CMT (Signal)"), _T("Noise (FDD)"), _T("Noise (CMT)"),
#if defined(_X1TWIN)
- _T("Voice"),
+ _T("PC Engine PSG"),
#endif
};
#endif
#ifdef USE_JOY_BUTTON_CAPTIONS
+#ifdef _X1TWIN
static const _TCHAR *joy_button_captions[] = {
_T("Up"),
_T("Down"),
_T("Button #5"),
_T("Button #6"),
};
+#else // not X1 Twin
+static const _TCHAR *joy_button_captions[] = {
+ _T("Up"),
+ _T("Down"),
+ _T("Left"),
+ _T("Right"),
+ _T("Button #1"),
+ _T("Button #2"),
+};
+#endif
#endif
-
// from X-millenium
-static const uint16 ANKFONT7f_9f[0x21 * 8] = {
+static const uint16_t ANKFONT7f_9f[0x21 * 8] = {
0x0000, 0x3000, 0x247f, 0x6c24, 0x484c, 0xce4b, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff,
0x8080, 0x4040, 0x2020, 0x1010, 0x0808, 0x0404, 0x0202, 0x0101
};
-static const uint16 ANKFONTe0_ff[0x20 * 8] = {
+static const uint16_t ANKFONTe0_ff[0x20 * 8] = {
0x0000, 0x7e3c, 0xffff, 0xdbdb, 0xffff, 0xe7db, 0x7eff, 0x003c,
0x0000, 0x423c, 0x8181, 0xa5a5, 0x8181, 0x99a5, 0x4281, 0x003c,
0x0000, 0x3810, 0x7c7c, 0xfefe, 0xfefe, 0x106c, 0x7c38, 0x0000,
class IO;
class MB8877;
class YM2151;
-class YM2203;
+//class YM2203;
+class AY_3_891X;
class Z80;
class Z80CTC;
class Z80SIO;
#ifdef _X1TWIN
class HUC6280;
class PCE;
+#define USE_CPU_HUC6280
#endif
-
class VM
{
protected:
DEVICE* printer;
HD46505* crtc;
I8255* pio;
- IO *io;
+ IO* io;
MB8877* fdc;
YM2151* opm1;
YM2151* opm2;
- YM2203* psg;
+// YM2203* psg;
+ AY_3_891X* psg;
Z80* cpu;
Z80CTC* ctc;
Z80SIO* sio;
#ifdef _X1TURBO_FEATURE
Z80DMA* dma;
#endif
-
DISPLAY* display;
EMM* emm;
FLOPPY* floppy;
KEYBOARD* kbd;
bool pseudo_sub_cpu;
- int sound_device_type;
+ int sound_type;
#ifdef _X1TWIN
// device for pce
// draw screen
void draw_screen();
- int get_access_lamp_status();
// sound generation
void initialize_sound(int rate, int samples);
- uint16* create_sound(int* extra_frames);
+ uint16_t* create_sound(int* extra_frames);
int get_sound_buffer_ptr();
#ifdef USE_SOUND_VOLUME
void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
// notify key
void key_down(int code, bool repeat);
void key_up(int code);
+ bool get_caps_locked();
+ bool get_kana_locked();
// user interface
void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
bool is_floppy_disk_inserted(int drv);
void is_floppy_disk_protected(int drv, bool value);
bool is_floppy_disk_protected(int drv);
- void play_tape(const _TCHAR* file_path);
- void rec_tape(const _TCHAR* file_path);
- void close_tape();
- bool is_tape_inserted();
- bool is_tape_playing();
- bool is_tape_recording();
- int get_tape_position();
- void push_play();
- void push_stop();
- void push_fast_forward();
- void push_fast_rewind();
- void push_apss_forward();
- void push_apss_rewind();
+ uint32_t is_floppy_disk_accessed();
+ void play_tape(int drv, const _TCHAR* file_path);
+ void rec_tape(int drv, const _TCHAR* file_path);
+ void close_tape(int drv);
+ bool is_tape_inserted(int drv);
+ bool is_tape_playing(int drv);
+ bool is_tape_recording(int drv);
+ int get_tape_position(int drv);
+ const _TCHAR* get_tape_message(int drv);
+ void push_play(int drv);
+ void push_stop(int drv);
+ void push_fast_forward(int drv);
+ void push_fast_rewind(int drv);
+ void push_apss_forward(int drv);
+ void push_apss_rewind(int drv);
bool is_frame_skippable();
#ifdef _X1TWIN
void open_cart(int drv, const _TCHAR* file_path);