commit 0db6089bcb75022bf4b044792b4cf115382002b9
parent a1cd8107e3070238eb52f2bc89a2cc982ab719a7
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Mon, 7 Oct 2024 23:20:17 +0200
remember length and initial PC of boot code
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/source/hardwareLib/dspBootCode.cpp b/source/hardwareLib/dspBootCode.cpp
@@ -32,10 +32,12 @@ namespace hwLib
{
case State::Length:
m_remaining = _val;
+ m_length = _val;
m_state = State::Address;
return false;
case State::Address:
m_address = _val;
+ m_initialPC = _val;
LOG("DSP Boot: " << m_remaining << " words, initial PC " << HEX(m_address));
diff --git a/source/hardwareLib/dspBootCode.h b/source/hardwareLib/dspBootCode.h
@@ -26,11 +26,17 @@ namespace hwLib
bool finished() const { return m_state == State::Finished; }
+ auto getLength() const { return m_length; }
+ auto getInitialPC() const { return m_initialPC; }
+
private:
dsp56k::DSP& m_dsp;
State m_state = State::Length;
+ dsp56k::TWord m_length = 0;
+ dsp56k::TWord m_initialPC = 0;
+
dsp56k::TWord m_remaining = 0;
dsp56k::TWord m_address = 0;
};