Fix number of compile errors and warnings with GCC 14
[lsnes.git] / bsnes-patches / v085 / 0019-SA1-trace-hook-support.patch
blob7045b9408e40dbe9f772954832e3f12c423d1fdc
1 From f1106d3dffd27dab526a703aa434512495fbacea Mon Sep 17 00:00:00 2001
2 From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
3 Date: Mon, 14 Apr 2014 21:21:36 +0300
4 Subject: [PATCH 19/27] SA1 trace hook support
6 ---
7 snes/chip/sa1/sa1.cpp | 2 ++
8 snes/chip/sa1/sa1.hpp | 3 +++
9 snes/snes.hpp | 1 +
10 3 files changed, 6 insertions(+)
12 diff --git a/snes/chip/sa1/sa1.cpp b/snes/chip/sa1/sa1.cpp
13 index 30e00809..fdec362c 100755
14 --- a/snes/chip/sa1/sa1.cpp
15 +++ b/snes/chip/sa1/sa1.cpp
16 @@ -32,6 +32,8 @@ void SA1::enter() {
17 continue;
20 + if(__builtin_expect(trace_enabled ? 1 : 0, 0))
21 + step_event();
22 (this->*opcode_table[op_readpc()])();
25 diff --git a/snes/chip/sa1/sa1.hpp b/snes/chip/sa1/sa1.hpp
26 index 732b2a85..efd36376 100755
27 --- a/snes/chip/sa1/sa1.hpp
28 +++ b/snes/chip/sa1/sa1.hpp
29 @@ -15,6 +15,9 @@ public:
30 uint16 hcounter;
31 } status;
33 + bool trace_enabled;
34 + nall::function<void()> step_event;
36 static void Enter();
37 void enter();
38 void tick();
39 diff --git a/snes/snes.hpp b/snes/snes.hpp
40 index 27632bff..3bdca7e5 100755
41 --- a/snes/snes.hpp
42 +++ b/snes/snes.hpp
43 @@ -3,6 +3,7 @@
44 #define BSNES_SUPPORTS_ADV_BREAKPOINTS
45 #define BSNES_SUPPORTS_ADV_BREAKPOINTS_PPU
46 #define BSNES_SUPPORTS_ALT_TIMINGS
47 +#define BSNES_SUPPORTS_TRACE_SA1
49 namespace SNES {
50 namespace Info {
51 --
52 2.15.0.rc1