2 Gijutsu-Hyoron-Sha Babbage-2nd Emulator 'eBabbage-2nd'
4 Author : Takeda.Toshiya
10 #ifndef _BABBAGE_2ND_H_
11 #define _BABBAGE_2ND_H_
13 #define DEVICE_NAME "GIJUTSU HYORON SHA Babbage-2nd"
14 #define CONFIG_NAME "babbage2nd"
16 // device informations for virtual machine
17 #define FRAMES_PER_SEC 30
18 #define LINES_PER_FRAME 256
19 #define CPU_CLOCKS 2500000
20 #define SCREEN_WIDTH 640
21 #define SCREEN_HEIGHT 483
22 #define MEMORY_ADDR_MAX 0x10000
23 #define MEMORY_BANK_SIZE 0x800
25 // device informations for win32
26 #define ONE_BOARD_MICRO_COMPUTER
27 #define MAX_BUTTONS 21
28 #define MAX_DRAW_RANGES 14
29 #define USE_BINARY_FILE 1
30 #define NOTIFY_KEY_DOWN
35 #include "../../common.h"
36 #include "../../fileio.h"
43 {353, 419, 49, 49, 0x30}, // 0
44 {407, 419, 49, 49, 0x31}, // 1
45 {461, 419, 49, 49, 0x32}, // 2
46 {515, 419, 49, 49, 0x33}, // 3
47 {353, 353, 49, 49, 0x34}, // 4
48 {407, 353, 49, 49, 0x35}, // 5
49 {461, 353, 49, 49, 0x36}, // 6
50 {515, 353, 49, 49, 0x37}, // 7
51 {353, 287, 49, 49, 0x38}, // 8
52 {407, 287, 49, 49, 0x39}, // 9
53 {461, 287, 49, 49, 0x41}, // A
54 {515, 287, 49, 49, 0x42}, // B
55 {353, 221, 49, 49, 0x43}, // C
56 {407, 221, 49, 49, 0x44}, // D
57 {461, 221, 49, 49, 0x45}, // E
58 {515, 221, 49, 49, 0x46}, // F
59 {575, 419, 49, 49, 0x70}, // INC
60 {575, 353, 49, 49, 0x71}, // DA
61 {575, 287, 49, 49, 0x72}, // AD
62 {575, 221, 49, 49, 0x73}, // GO
63 { 36, 18, 49, 49, 0x00}, // RES
85 class csp_state_utils;
103 csp_state_utils* state_entry;
123 // ----------------------------------------
125 // ----------------------------------------
130 // ----------------------------------------
131 // for emulation class
132 // ----------------------------------------
134 // drive virtual machine
140 DEVICE *get_cpu(int index);
147 void initialize_sound(int rate, int samples);
148 uint16_t* create_sound(int* extra_frames);
149 int get_sound_buffer_ptr();
152 void key_down(int code, bool repeat);
153 void key_up(int code);
156 void load_binary(int drv, const _TCHAR* file_path);
157 void save_binary(int drv, const _TCHAR* file_path);
158 bool is_frame_skippable();
160 void update_config();
162 void save_state(FILEIO* state_fio);
163 bool load_state(FILEIO* state_fio);
165 // ----------------------------------------
167 // ----------------------------------------
170 DEVICE* get_device(int id);
172 DEVICE* first_device;