yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
asm_follow_service.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_AGENT_ASM_FOLLOW_SERVICE_H_
2#define YAZE_APP_EDITOR_AGENT_ASM_FOLLOW_SERVICE_H_
3
4#include <atomic>
5#include <cstdint>
6#include <functional>
7#include <string>
8
10
11namespace yaze {
12namespace editor {
13
18 public:
20 ~AsmFollowService() = default;
21
22 void Update();
23
24 void SetEnabled(bool enabled) { enabled_ = enabled; }
25 bool IsEnabled() const { return enabled_; }
26
27 // Callback signature: void OnSourceLocationChanged(const std::string& location)
28 // location format: "file:line"
29 using LocationCallback = std::function<void(const std::string&)>;
30 void SetLocationCallback(LocationCallback callback) { callback_ = std::move(callback); }
31
32 private:
34 std::atomic<bool> enabled_{false};
35 uint32_t last_pc_ = 0xFFFFFF;
37 double last_poll_time_ = 0.0;
38};
39
40} // namespace editor
41} // namespace yaze
42
43#endif // YAZE_APP_EDITOR_AGENT_ASM_FOLLOW_SERVICE_H_
Service that synchronizes Mesen's Program Counter with ASM source files.
emu::debug::SymbolProvider * symbol_provider_
std::function< void(const std::string &)> LocationCallback
void SetLocationCallback(LocationCallback callback)
AsmFollowService(emu::debug::SymbolProvider *symbol_provider)
Provider for symbol (label) resolution in disassembly.