commit 0509b956c5aaafb386f7758935dc3d7257f99fed
parent c681240b71a13e009b985064b14094d28492c138
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sat, 20 Apr 2024 02:56:22 +0200
ignore invalid bytes sent by DSP for sysex messages
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/source/virusLib/hdi08TxParser.cpp b/source/virusLib/hdi08TxParser.cpp
@@ -54,6 +54,7 @@ namespace virusLib
LOG("Begin reading sysex");
m_state = State::Sysex;
m_sysexData.push_back(byte);
+ m_sysexReceiveIndex = 1;
}
else
{
@@ -120,6 +121,11 @@ namespace virusLib
return append(_data);
}
+ // TI seems to send 3 valid bytes and then a fourth invalid one, no idea what this is good for, drop it
+ ++m_sysexReceiveIndex;
+ if(m_mc.getROM().isTIFamily() && (m_sysexReceiveIndex & 3) == 0)
+ return true;
+
m_sysexData.push_back(byte);
if(byte == 0xf7)
diff --git a/source/virusLib/hdi08TxParser.h b/source/virusLib/hdi08TxParser.h
@@ -58,6 +58,7 @@ namespace virusLib
std::vector<uint8_t> m_presetData;
std::vector<dsp56k::TWord> m_dspStatus;
+ uint32_t m_sysexReceiveIndex = 0;
uint32_t m_remainingPresetBytes = 0;
uint32_t m_remainingStatusBytes = 0;