Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging DMA transfers to Debugger log #328

Open
jeffythedragonslayer opened this issue Jun 24, 2022 · 0 comments
Open

Logging DMA transfers to Debugger log #328

jeffythedragonslayer opened this issue Jun 24, 2022 · 0 comments

Comments

@jeffythedragonslayer
Copy link
Contributor

How could I get started logging more events to the log that's at the bottom of the Debugger window? I would like to make it easier to debug some of my DMAs, so I tried making this change:

--- a/bsnes/snes/cpu/dma/dma.cpp
+++ b/bsnes/snes/cpu/dma/dma.cpp
@@ -30,6 +30,10 @@ uint8 CPU::dma_read(uint32 abus) {
 }
 
 void CPU::dma_transfer(bool direction, uint8 bbus, uint32 abus) {
+#if defined(DEBUGGER)
+      debugger.echo(string() << "DMA Transfer started.  Direction=" << direction << " bbus: " << bbus << " abus: " << '\n');
+#endif
+

But got this error:

Compiling snes/cpu/cpu.cpp...
In file included from snes/cpu/cpu.cpp:16:
snes/cpu/dma/dma.cpp: In member function ‘void SNES::CPU::dma_transfer(bool, SNES::uint8, SNES::uint32)’:
snes/cpu/dma/dma.cpp:34:16: error: ‘class SNES::Debugger’ has no member named ‘echo’
   34 |       debugger.echo(string() << "DMA Transfer started.  Direction=" << direction << " bbus: " << bbus << " abus: " << '\n');
      |                ^~~~

What would be the correct way to go about implementing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant