-
Notifications
You must be signed in to change notification settings - Fork 1
/
console_command.h
54 lines (46 loc) · 2.02 KB
/
console_command.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// *** WARNING ***
// This file is generated by genconsole.rb
// Keep untouched or ruin the abstraction
#pragma once
#include "utils.h"
#include "console_internal.h"
typedef enum console_command_break_int_type {
CONSOLE_COMMAND_BREAK_INT_TYPE_NMI,
CONSOLE_COMMAND_BREAK_INT_TYPE_IRQ,
CONSOLE_COMMAND_BREAK_INT_TYPE_RST,
} console_command_break_int_type_t;
typedef enum console_command_toggle_sound_target {
CONSOLE_COMMAND_TOGGLE_SOUND_TARGET_NOISE,
CONSOLE_COMMAND_TOGGLE_SOUND_TARGET_PULSE1,
CONSOLE_COMMAND_TOGGLE_SOUND_TARGET_PULSE2,
CONSOLE_COMMAND_TOGGLE_SOUND_TARGET_DMC,
CONSOLE_COMMAND_TOGGLE_SOUND_TARGET_TRIANGLE,
} console_command_toggle_sound_target_t;
typedef enum console_command_set_flag {
CONSOLE_COMMAND_SET_FLAG_EVENT_TRACE,
CONSOLE_COMMAND_SET_FLAG_EVENT_LOG,
} console_command_set_flag_t;
typedef enum console_command_unset_flag {
CONSOLE_COMMAND_UNSET_FLAG_EVENT_TRACE,
CONSOLE_COMMAND_UNSET_FLAG_EVENT_LOG,
} console_command_unset_flag_t;
typedef enum console_command_type {
CONSOLE_COMMAND_TYPE_QUIT,
CONSOLE_COMMAND_TYPE_RESET,
CONSOLE_COMMAND_TYPE_BREAK,
CONSOLE_COMMAND_TYPE_BREAK_INT,
CONSOLE_COMMAND_TYPE_BREAK_SCANLINE,
CONSOLE_COMMAND_TYPE_TOGGLE_SOUND,
CONSOLE_COMMAND_TYPE_SET,
CONSOLE_COMMAND_TYPE_UNSET,
} console_command_type_t;
void console_command_quit(console_ref self);
void console_command_reset(console_ref self);
void console_command_break(console_ref self, int phys);
void console_command_break_int(console_ref self, console_command_break_int_type_t type);
void console_command_break_scanline(console_ref self, int line, int dot);
void console_command_toggle_sound(console_ref self, console_command_toggle_sound_target_t target);
void console_command_set(console_ref self, console_command_set_flag_t flag);
void console_command_unset(console_ref self, console_command_unset_flag_t flag);
void console_command_break_on_cursor(console_ref self);
void console_exec_command(console_ref self, const char *command, int argc, char **argv);