commit 0eef761c1b85c8e71af9d188859ec72c8f48c8eb
parent 15224dab63299dec2a5d1afad00a045fb8c27036
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sun, 6 Oct 2024 16:15:13 +0200
remove obsolete build config switch that toggles if TI is supported
Diffstat:
12 files changed, 3 insertions(+), 74 deletions(-)
diff --git a/source/virusIntegrationTest/integrationTest.cpp b/source/virusIntegrationTest/integrationTest.cpp
@@ -13,7 +13,7 @@
#include "synthLib/wavReader.h"
#include "synthLib/os.h"
-#include "virusLib/buildconfig.h"
+
#include "virusLib/romloader.h"
namespace synthLib
@@ -119,25 +119,6 @@ int main(int _argc, char* _argv[])
return -1;
}
-#if !VIRUS_SUPPORT_TI
- if(romFile.find("firmware") != std::string::npos)
- {
- auto* hFile = fopen(romFile.c_str(), "rb");
- size_t size = 0;
- if(hFile)
- {
- fseek(hFile, 0, SEEK_END);
- size = ftell(hFile);
- fclose(hFile);
- }
- if(size > virusLib::ROMFile::getRomSizeModelABC())
- {
- std::cout << "Ignoring TI verification tests, TI is not supported" << std::endl;
- continue;
- }
- }
-#endif
-
std::vector<std::string> presets;
std::ifstream ss;
diff --git a/source/virusLib/CMakeLists.txt b/source/virusLib/CMakeLists.txt
@@ -3,17 +3,7 @@ project(virusLib)
add_library(virusLib STATIC)
-if(${CMAKE_PROJECT_NAME}_SYNTH_OSTIRUS)
- set(VIRUS_SUPPORT_TI on)
-else()
- set(VIRUS_SUPPORT_TI off)
-endif()
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildconfig.h.in ${CMAKE_CURRENT_SOURCE_DIR}/buildconfig.h)
-
set(SOURCES
- buildconfig.h
- buildconfig.h.in
demoplayback.cpp demoplayback.h
demoplaybackTI.cpp demoplaybackTI.h
device.cpp device.h
diff --git a/source/virusLib/buildconfig.h b/source/virusLib/buildconfig.h
@@ -1,3 +0,0 @@
-#pragma once
-
-#define VIRUS_SUPPORT_TI 1
diff --git a/source/virusLib/buildconfig.h.in b/source/virusLib/buildconfig.h.in
@@ -1,3 +0,0 @@
-#pragma once
-
-#cmakedefine01 VIRUS_SUPPORT_TI
diff --git a/source/virusLib/device.cpp b/source/virusLib/device.cpp
@@ -455,7 +455,6 @@ namespace virusLib
void Device::createDspInstances(DspSingle*& _dspA, DspSingle*& _dspB, const ROMFile& _rom, const float _samplerate)
{
-#if VIRUS_SUPPORT_TI
if(_rom.getModel() == DeviceModel::Snow)
{
_dspA = new DspSingleSnow();
@@ -467,7 +466,6 @@ namespace virusLib
_dspB = &dsp->getDSP2();
}
else
-#endif
{
_dspA = new DspSingle(_rom.isTIFamily() ? 0x100000 : 0x040000, _rom.isTIFamily(), nullptr, _rom.getModel() == DeviceModel::A);
}
diff --git a/source/virusLib/dspMultiTI.cpp b/source/virusLib/dspMultiTI.cpp
@@ -1,7 +1,5 @@
#include "dspMultiTI.h"
-#if VIRUS_SUPPORT_TI
-
namespace virusLib
{
constexpr uint32_t g_esai1TxBlockSize = 6 * 3 * 2; // 6 = number of TX pins, 3 = number of slots per frame, 2 = double data rate
@@ -212,5 +210,3 @@ namespace virusLib
processAudioTI(*this, m_dsp2, m_bufferI, _inputs, _outputs, _samples, _latency);
}
}
-
-#endif
-\ No newline at end of file
diff --git a/source/virusLib/dspMultiTI.h b/source/virusLib/dspMultiTI.h
@@ -1,9 +1,5 @@
#pragma once
-#include "buildconfig.h"
-
-#if VIRUS_SUPPORT_TI
-
#include "dspSingle.h"
#include "synthLib/audiobuffer.h"
@@ -60,5 +56,3 @@ namespace virusLib
EsaiBufs<dsp56k::TWord> m_bufferI;
};
}
-
-#endif
diff --git a/source/virusLib/dspSingleSnow.cpp b/source/virusLib/dspSingleSnow.cpp
@@ -1,7 +1,5 @@
#include "dspSingleSnow.h"
-#if VIRUS_SUPPORT_TI
-
namespace virusLib
{
DspSingleSnow::DspSingleSnow() : DspSingle(0x100000, true)
@@ -53,5 +51,3 @@ namespace virusLib
processAudioSnow(*this, _inputs, _outputs, _samples, _latency, m_dummyBufferInI, m_dummyBufferOutI);
}
}
-
-#endif
-\ No newline at end of file
diff --git a/source/virusLib/dspSingleSnow.h b/source/virusLib/dspSingleSnow.h
@@ -1,9 +1,5 @@
#pragma once
-#include "buildconfig.h"
-
-#if VIRUS_SUPPORT_TI
-
#include "dspSingle.h"
namespace virusLib
@@ -17,5 +13,3 @@ namespace virusLib
void processAudio(const synthLib::TAudioInputsInt& _inputs, const synthLib::TAudioOutputsInt& _outputs, size_t _samples, uint32_t _latency) override;
};
}
-
-#endif
diff --git a/source/virusLib/romfile.cpp b/source/virusLib/romfile.cpp
@@ -36,7 +36,6 @@ bool ROMFile::initialize()
{
std::unique_ptr<std::istream> dsp(new imemstream(reinterpret_cast<std::vector<char>&>(m_romFileData)));
-#if VIRUS_SUPPORT_TI
ROMUnpacker::Firmware fw;
// Check if we are dealing with a TI installer file, if so, unpack it first
@@ -52,7 +51,7 @@ bool ROMFile::initialize()
// Wrap into a stream so we can pass it into readChunks
dsp.reset(new imemstream(fw.DSP));
}
-#endif
+
const auto chunks = readChunks(*dsp);
if (chunks.empty())
@@ -81,7 +80,6 @@ bool ROMFile::initialize()
printf("Program BootROM offset = 0x%x\n", m_bootRom.offset);
printf("Program CommandStream size = 0x%x\n", static_cast<uint32_t>(m_commandStream.size()));
-#if VIRUS_SUPPORT_TI
if(isTIFamily())
{
if (!fw.Presets.empty())
@@ -166,7 +164,7 @@ bool ROMFile::initialize()
loadFirmwarePresets(DeviceModel::TI2);
loadFirmwarePresets(DeviceModel::Snow);
}
-#endif
+
return true;
}
diff --git a/source/virusLib/unpacker.cpp b/source/virusLib/unpacker.cpp
@@ -1,7 +1,5 @@
#include "unpacker.h"
-#if VIRUS_SUPPORT_TI
-
#include "utils.h"
#include "dsp56kEmu/logging.h"
@@ -194,5 +192,3 @@ namespace virusLib
return content;
}
}
-
-#endif
diff --git a/source/virusLib/unpacker.h b/source/virusLib/unpacker.h
@@ -1,10 +1,7 @@
#pragma once
-#include "buildconfig.h"
#include "deviceModel.h"
-#if VIRUS_SUPPORT_TI
-
#include <vector>
#include "dsp56kEmu/types.h"
@@ -46,5 +43,3 @@ namespace virusLib
};
}
-
-#endif
-\ No newline at end of file