2 SHINKO SANGYO YS-6464A Emulator 'eYS-6464A'
4 Author : Takeda.Toshiya
13 #define DEVICE_NAME "SHINKO SANGYO YS-6464A"
14 #define CONFIG_NAME "ys6464a"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 30
18 #define LINES_PER_FRAME 256
19 #define CPU_CLOCKS 4000000
20 #define SCREEN_WIDTH 640
21 #define SCREEN_HEIGHT 357
23 // device informations for win32
24 #define ONE_BOARD_MICRO_COMPUTER
25 #define MAX_BUTTONS 21
26 #define MAX_DRAW_RANGES 6
27 #define USE_BINARY_FILE 1
32 #include "../../common.h"
33 #include "../../fileio.h"
34 #include "../vm_template.h"
41 {342 + 59 * 0, 287 - 59 * 0, 46, 46, 0x30}, // 0
42 {342 + 59 * 1, 287 - 59 * 0, 46, 46, 0x31}, // 1
43 {342 + 59 * 2, 287 - 59 * 0, 46, 46, 0x32}, // 2
44 {342 + 59 * 3, 287 - 59 * 0, 46, 46, 0x33}, // 3
45 {342 + 59 * 0, 287 - 59 * 1, 46, 46, 0x34}, // 4
46 {342 + 59 * 1, 287 - 59 * 1, 46, 46, 0x35}, // 5
47 {342 + 59 * 2, 287 - 59 * 1, 46, 46, 0x36}, // 6
48 {342 + 59 * 3, 287 - 59 * 1, 46, 46, 0x37}, // 7
49 {342 + 59 * 0, 287 - 59 * 2, 46, 46, 0x38}, // 8
50 {342 + 59 * 1, 287 - 59 * 2, 46, 46, 0x39}, // 9
51 {342 + 59 * 2, 287 - 59 * 2, 46, 46, 0x41}, // A
52 {342 + 59 * 3, 287 - 59 * 2, 46, 46, 0x42}, // B
53 {342 + 59 * 0, 287 - 59 * 3, 46, 46, 0x43}, // C
54 {342 + 59 * 1, 287 - 59 * 3, 46, 46, 0x44}, // D
55 {342 + 59 * 2, 287 - 59 * 3, 46, 46, 0x45}, // E
56 {342 + 59 * 3, 287 - 59 * 3, 46, 46, 0x46}, // F
57 {342 + 59 * 4, 287 - 59 * 0, 46, 46, 0x70}, // WRITE INC
58 {342 + 59 * 4, 287 - 59 * 1, 46, 46, 0x71}, // READ DEC
59 {342 + 59 * 4, 287 - 59 * 2, 46, 46, 0x72}, // READ INC
60 {342 + 59 * 4, 287 - 59 * 3, 46, 46, 0x73}, // ADR RUN
61 {262 , 287 , 46, 46, 0x00}, // RESET
90 class VM : public VM_TEMPLATE
104 YS6464A::DISPLAY* display;
105 YS6464A::KEYBOARD* keyboard;
112 // ----------------------------------------
114 // ----------------------------------------
116 VM(EMU_TEMPLATE* parent_emu);
119 // ----------------------------------------
120 // for emulation class
121 // ----------------------------------------
123 // drive virtual machine
129 DEVICE *get_cpu(int index);
136 void initialize_sound(int rate, int samples);
137 uint16_t* create_sound(int* extra_frames);
138 int get_sound_buffer_ptr();
141 void load_binary(int drv, const _TCHAR* file_path);
142 void save_binary(int drv, const _TCHAR* file_path);
143 bool is_frame_skippable();
145 double get_current_usec();
146 uint64_t get_current_clock_uint64();
148 void update_config();
149 bool process_state(FILEIO* state_fio, bool loading);
151 // ----------------------------------------
153 // ----------------------------------------
156 DEVICE* get_device(int id);
158 //DEVICE* first_device;
159 //DEVICE* last_device;