mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-12 18:28:30 +12:00
Initial DSP debugger work
This commit is contained in:
parent
f4e6a082bb
commit
415bf7b0a4
9 changed files with 309 additions and 5 deletions
|
@ -63,6 +63,8 @@ namespace Audio {
|
|||
|
||||
Samples& getSamples() { return sampleBuffer; }
|
||||
virtual void setAudioEnabled(bool enable) { audioEnabled = enable; }
|
||||
|
||||
virtual u32 getPC() { return 0; }
|
||||
};
|
||||
|
||||
std::unique_ptr<DSPCore> makeDSPCore(EmulatorConfig& config, Memory& mem, Scheduler& scheduler, DSPService& dspService);
|
||||
|
|
|
@ -90,6 +90,7 @@ namespace Audio {
|
|||
|
||||
void setAudioEnabled(bool enable) override;
|
||||
u8* getDspMemory() override { return teakra.GetDspMemory().data(); }
|
||||
u32 getPC() override;
|
||||
|
||||
u16 recvData(u32 regId) override { return teakra.RecvData(regId); }
|
||||
bool recvDataIsReady(u32 regId) override { return teakra.RecvDataIsReady(regId); }
|
||||
|
|
|
@ -126,6 +126,7 @@ class Emulator {
|
|||
Memory& getMemory() { return memory; }
|
||||
Kernel& getKernel() { return kernel; }
|
||||
Scheduler& getScheduler() { return scheduler; }
|
||||
Audio::DSPCore* getDSP() { return dsp.get(); }
|
||||
|
||||
EmulatorConfig& getConfig() { return config; }
|
||||
Cheats& getCheats() { return cheats; }
|
||||
|
|
45
include/panda_qt/dsp_debugger.hpp
Normal file
45
include/panda_qt/dsp_debugger.hpp
Normal file
|
@ -0,0 +1,45 @@
|
|||
#pragma once
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QScrollBar>
|
||||
#include <QWidget>
|
||||
|
||||
#include "capstone.hpp"
|
||||
#include "emulator.hpp"
|
||||
#include "panda_qt/disabled_widget_overlay.hpp"
|
||||
|
||||
class DSPDebugger : public QWidget {
|
||||
Q_OBJECT
|
||||
Emulator* emu;
|
||||
|
||||
QListWidget* disasmListWidget;
|
||||
QScrollBar* verticalScrollBar;
|
||||
QPlainTextEdit* registerTextEdit;
|
||||
QTimer* updateTimer;
|
||||
QLineEdit* addressInput;
|
||||
|
||||
DisabledWidgetOverlay* disabledOverlay;
|
||||
|
||||
bool enabled = false;
|
||||
bool followPC = false;
|
||||
Common::CapstoneDisassembler disassembler;
|
||||
|
||||
public:
|
||||
DSPDebugger(Emulator* emulator, QWidget* parent = nullptr);
|
||||
void enable();
|
||||
void disable();
|
||||
|
||||
private:
|
||||
// Update the state of the disassembler. Qt events should always call update, not updateDisasm/updateRegister
|
||||
// As update properly handles thread safety
|
||||
void update();
|
||||
void updateDisasm();
|
||||
void updateRegisters();
|
||||
void scrollToPC();
|
||||
|
||||
bool eventFilter(QObject* obj, QEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
};
|
|
@ -18,6 +18,7 @@
|
|||
#include "panda_qt/cheats_window.hpp"
|
||||
#include "panda_qt/config_window.hpp"
|
||||
#include "panda_qt/cpu_debugger.hpp"
|
||||
#include "panda_qt/dsp_debugger.hpp"
|
||||
#include "panda_qt/patch_window.hpp"
|
||||
#include "panda_qt/screen.hpp"
|
||||
#include "panda_qt/shader_editor.hpp"
|
||||
|
@ -112,6 +113,7 @@ class MainWindow : public QMainWindow {
|
|||
PatchWindow* patchWindow;
|
||||
ShaderEditorWindow* shaderEditor;
|
||||
CPUDebugger* cpuDebugger;
|
||||
DSPDebugger* dspDebugger;
|
||||
ThreadDebugger* threadDebugger;
|
||||
|
||||
// We use SDL's game controller API since it's the sanest API that supports as many controllers as possible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue