2 SONY SMC-777 Emulator 'eSMC-777'
4 Author : Takeda.Toshiya
14 #define DEVICE_NAME "SONY SMC-70"
15 #define CONFIG_NAME "smc70"
16 #elif defined(_SMC777)
17 #define DEVICE_NAME "SONY SMC-777"
18 #define CONFIG_NAME "smc777"
21 // device informations for virtual machine
22 #define FRAMES_PER_SEC 60
23 #define LINES_PER_FRAME 262
24 #define CHARS_PER_LINE 128
25 #define HD46505_HORIZ_FREQ 15734
26 #define CPU_CLOCKS 4027975
27 #define SCREEN_WIDTH 640
28 #define SCREEN_HEIGHT 400
30 #define MB8877_NO_BUSY_AFTER_SEEK
31 #define SUPPORT_MEDIA_TYPE_1DD
32 #define IO_ADDR_MAX 0x10000
33 #define SUPPORT_VARIABLE_TIMING
35 // device informations for win32
36 #define USE_SPECIAL_RESET
40 #define USE_TAPE_BUTTON
41 #define NOTIFY_KEY_DOWN
42 //#define USE_SHIFT_NUMPAD_KEY
43 #define USE_ALT_F10_KEY
44 #define USE_AUTO_KEY 8
45 #define USE_AUTO_KEY_RELEASE 10
47 #define USE_VM_AUTO_KEY_TABLE
48 #define USE_CRT_FILTER
50 #define USE_ACCESS_LAMP
54 static const int vm_autokey_table_base[][2] = {
57 {0xa1, 0x300 | 0xbf}, // '¡' -> '/'
58 {0xa2, 0x300 | 0xba}, // '¢' -> ':'
59 {0xa3, 0x300 | 0xdd}, // '£' -> ']'
60 {0xa4, 0x300 | 0xbe}, // '¤' -> '.'
61 {0xa5, 0x300 | 0xe2}, // '¥' -> '_'
62 {0xa6, 0x200 | 0xbf}, // '¦' -> '/'
63 {0xa7, 0x300 | 0x31}, // '§' -> '1'
64 {0xa8, 0x300 | 0x32}, // '¨' -> '2'
65 {0xa9, 0x300 | 0x33}, // '©' -> '3'
66 {0xaa, 0x300 | 0x34}, // 'ª' -> '4'
67 {0xab, 0x300 | 0x35}, // '«' -> '5'
68 {0xac, 0x300 | 0x4e}, // '¬' -> 'N'
69 {0xad, 0x300 | 0x4d}, // '' -> 'M'
70 {0xae, 0x300 | 0xbc}, // '®' -> ','
71 {0xaf, 0x300 | 0x43}, // '¯' -> 'C'
72 {0xb0, 0x300 | 0xdb}, // '°' -> '['
73 {0xb1, 0x200 | 0x31}, // '±' -> '1'
74 {0xb2, 0x200 | 0x32}, // '²' -> '2'
75 {0xb3, 0x200 | 0x33}, // '³' -> '3'
76 {0xb4, 0x200 | 0x34}, // '´' -> '4'
77 {0xb5, 0x200 | 0x35}, // 'µ' -> '5'
78 {0xb6, 0x200 | 0x51}, // '¶' -> 'Q'
79 {0xb7, 0x200 | 0x57}, // '·' -> 'W'
80 {0xb8, 0x200 | 0x45}, // '¸' -> 'E'
81 {0xb9, 0x200 | 0x52}, // '¹' -> 'R'
82 {0xba, 0x200 | 0x54}, // 'º' -> 'T'
83 {0xbb, 0x200 | 0x41}, // '»' -> 'A'
84 {0xbc, 0x200 | 0x53}, // '¼' -> 'S'
85 {0xbd, 0x200 | 0x44}, // '½' -> 'D'
86 {0xbe, 0x200 | 0x46}, // '¾' -> 'F'
87 {0xbf, 0x200 | 0x47}, // '¿' -> 'G'
88 {0xc0, 0x200 | 0x5a}, // 'À' -> 'Z'
89 {0xc1, 0x200 | 0x58}, // 'Á' -> 'X'
90 {0xc2, 0x200 | 0x43}, // 'Â' -> 'C'
91 {0xc3, 0x200 | 0x56}, // 'Ã' -> 'V'
92 {0xc4, 0x200 | 0x42}, // 'Ä' -> 'B'
93 {0xc5, 0x200 | 0x36}, // 'Å' -> '6'
94 {0xc6, 0x200 | 0x37}, // 'Æ' -> '7'
95 {0xc7, 0x200 | 0x38}, // 'Ç' -> '8'
96 {0xc8, 0x200 | 0x39}, // 'È' -> '9'
97 {0xc9, 0x200 | 0x30}, // 'É' -> '0'
98 {0xca, 0x200 | 0x59}, // 'Ê' -> 'Y'
99 {0xcb, 0x200 | 0x55}, // 'Ë' -> 'U'
100 {0xcc, 0x200 | 0x49}, // 'Ì' -> 'I'
101 {0xcd, 0x200 | 0x4f}, // 'Í' -> 'O'
102 {0xce, 0x200 | 0x50}, // 'Î' -> 'P'
103 {0xcf, 0x200 | 0x48}, // 'Ï' -> 'H'
104 {0xd0, 0x200 | 0x4a}, // 'Ð' -> 'J'
105 {0xd1, 0x200 | 0x4b}, // 'Ñ' -> 'K'
106 {0xd2, 0x200 | 0x4c}, // 'Ò' -> 'L'
107 {0xd3, 0x200 | 0xbb}, // 'Ó' -> ';'
108 {0xd4, 0x200 | 0x4e}, // 'Ô' -> 'N'
109 {0xd5, 0x200 | 0x4d}, // 'Õ' -> 'M'
110 {0xd6, 0x200 | 0xbc}, // 'Ö' -> ','
111 {0xd7, 0x200 | 0xbd}, // '×' -> '-'
112 {0xd8, 0x200 | 0xde}, // 'Ø' -> '^'
113 {0xd9, 0x200 | 0xdc}, // 'Ù' -> '\'
114 {0xda, 0x200 | 0xc0}, // 'Ú' -> '@'
115 {0xdb, 0x200 | 0xdb}, // 'Û' -> '['
116 {0xdc, 0x200 | 0xbe}, // 'Ü' -> '.'
117 {0xdd, 0x200 | 0xe2}, // 'Ý' -> '_'
118 {0xde, 0x200 | 0xba}, // 'Þ' -> ':'
119 {0xdf, 0x200 | 0xdd}, // 'ß' -> ']'
123 #include "../../common.h"
124 #include "../../fileio.h"
157 // ----------------------------------------
159 // ----------------------------------------
164 // ----------------------------------------
165 // for emulation class
166 // ----------------------------------------
168 // drive virtual machine
170 void special_reset();
176 DEVICE *get_cpu(int index);
184 void initialize_sound(int rate, int samples);
185 uint16* create_sound(int* extra_frames);
186 int sound_buffer_ptr();
189 void key_down(int code, bool repeat);
190 void key_up(int code);
193 void open_disk(int drv, const _TCHAR* file_path, int bank);
194 void close_disk(int drv);
195 bool disk_inserted(int drv);
196 void set_disk_protected(int drv, bool value);
197 bool get_disk_protected(int drv);
198 void play_tape(const _TCHAR* file_path);
199 void rec_tape(const _TCHAR* file_path);
201 bool tape_inserted();
204 void push_fast_forward();
205 void push_fast_rewind();
206 void push_apss_forward() {}
207 void push_apss_rewind() {}
208 bool get_tape_play(void);
211 void update_config();
212 void save_state(FILEIO* state_fio);
213 bool load_state(FILEIO* state_fio);
215 // ----------------------------------------
217 // ----------------------------------------
220 DEVICE* get_device(int id);
222 DEVICE* first_device;