yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
emulator_types.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EMU_EMULATOR_TYPES_H_
2#define YAZE_APP_EMU_EMULATOR_TYPES_H_
3
4// Native C++ domain types for the emulator interface.
5//
6// These replace direct proto type usage in IEmulator so the interface
7// compiles and is testable without gRPC/protobuf. The gRPC service layer
8// converts between these types and proto types in its own translation unit.
9
10#include <cstdint>
11#include <string>
12#include <vector>
13
14namespace yaze::emu {
15
16// ============================================================================
17// Input
18// ============================================================================
19
20enum class InputButton {
21 kUnspecified = 0,
22 kA = 1,
23 kB = 2,
24 kX = 3,
25 kY = 4,
26 kL = 5,
27 kR = 6,
28 kSelect = 7,
29 kStart = 8,
30 kUp = 9,
31 kDown = 10,
32 kLeft = 11,
33 kRight = 12,
34};
35
36// ============================================================================
37// Breakpoints
38// ============================================================================
39
40enum class BreakpointKind {
41 kUnspecified = 0,
42 kExecute = 1,
43 kRead = 2,
44 kWrite = 3,
45 kAccess = 4,
46 kConditional = 5,
47};
48
49enum class CpuKind {
50 kUnspecified = 0,
51 k65816 = 1,
52 kSpc700 = 2,
53};
54
62
64 uint32_t id = 0;
65 uint32_t address = 0;
68 bool enabled = true;
69 std::string condition;
70 std::string description;
71 uint32_t hit_count = 0;
72};
73
74// ============================================================================
75// CPU State
76// ============================================================================
77
79 uint32_t a = 0;
80 uint32_t x = 0;
81 uint32_t y = 0;
82 uint32_t sp = 0;
83 uint32_t pc = 0;
84 uint32_t db = 0;
85 uint32_t pb = 0;
86 uint32_t d = 0;
87 uint32_t status = 0;
88 bool flag_n = false;
89 bool flag_v = false;
90 bool flag_z = false;
91 bool flag_c = false;
92 uint64_t cycles = 0;
93};
94
95// ============================================================================
96// Game State (ALTTP-specific)
97// ============================================================================
98
100 uint32_t game_mode = 0;
101 uint32_t link_state = 0;
102 uint32_t link_pos_x = 0;
103 uint32_t link_pos_y = 0;
104 uint32_t link_health = 0;
105 std::vector<uint8_t> screenshot_png;
106};
107
108// ============================================================================
109// Breakpoint Hit Result
110// ============================================================================
111
117
118// ============================================================================
119// Feature Capability Query
120// ============================================================================
121
135
136} // namespace yaze::emu
137
138#endif // YAZE_APP_EMU_EMULATOR_TYPES_H_
SNES Emulation and debugging tools.
Definition editor.h:30
EmulatorFeature
Features that emulator backends may optionally support. Use with IEmulator::SupportsFeature() to quer...
std::vector< uint8_t > screenshot_png