2 EPSON HC-20 Emulator 'eHC-20'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "EPSON HC-20"
14 #define CONFIG_NAME "hc20"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 72
18 #define LINES_PER_FRAME 64
19 #define CPU_CLOCKS 614400
20 #define SCREEN_WIDTH 120
21 #define SCREEN_HEIGHT 32
26 // device informations for win32
27 #define WINDOW_MODE_BASE 3
29 #define DIPSWITCH_DEFAULT 0x0f
30 #define USE_FLOPPY_DISK 2
32 #define TAPE_BINARY_ONLY
33 #define NOTIFY_KEY_DOWN
34 #define USE_ALT_F10_KEY
35 #define USE_AUTO_KEY 6
36 #define USE_AUTO_KEY_RELEASE 12
37 #define USE_AUTO_KEY_CAPS
38 #define DONT_KEEEP_KEY_PRESSED
39 #define USE_NOTIFY_POWER_OFF
40 #define USE_SOUND_VOLUME 2
43 #define USE_CPU_HD6301
46 #include "../../common.h"
47 #include "../../fileio.h"
49 #ifdef USE_SOUND_VOLUME
50 static const _TCHAR *sound_device_caption[] = {
51 _T("Beep"), _T("Noise (FDD)"),
55 class csp_state_utils;
76 csp_state_utils *state_entry;
95 // ----------------------------------------
97 // ----------------------------------------
102 // ----------------------------------------
103 // for emulation class
104 // ----------------------------------------
106 // drive virtual machine
108 void notify_power_off();
113 DEVICE *get_cpu(int index);
120 void initialize_sound(int rate, int samples);
121 uint16_t* create_sound(int* extra_frames);
122 int get_sound_buffer_ptr();
123 #ifdef USE_SOUND_VOLUME
124 void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
128 void key_down(int code, bool repeat);
129 void key_up(int code);
132 void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
133 void close_floppy_disk(int drv);
134 bool is_floppy_disk_inserted(int drv);
135 void is_floppy_disk_protected(int drv, bool value);
136 bool is_floppy_disk_protected(int drv);
137 uint32_t is_floppy_disk_accessed();
138 void play_tape(int drv, const _TCHAR* file_path);
139 void rec_tape(int drv, const _TCHAR* file_path);
140 void close_tape(int drv);
141 bool is_tape_inserted(int drv);
142 bool is_frame_skippable();
144 void update_config();
146 void save_state(FILEIO* state_fio);
147 bool load_state(FILEIO* state_fio);
149 // ----------------------------------------
151 // ----------------------------------------
154 DEVICE* get_device(int id);
156 DEVICE* first_device;