From 00f1c4ca8e12209d04b9f61c5473e54073a3dd70 Mon Sep 17 00:00:00 2001 From: RetroAntho Date: Sat, 4 Jan 2025 14:22:33 +0100 Subject: [PATCH] added module size in the soundbank header file generated to ease the debug --- tools/smconv/it2spc.cpp | 3 ++- tools/smconv/it2spc.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/smconv/it2spc.cpp b/tools/smconv/it2spc.cpp index 54249f0d9..83d7a7281 100644 --- a/tools/smconv/it2spc.cpp +++ b/tools/smconv/it2spc.cpp @@ -292,7 +292,7 @@ namespace IT2SPC // othersize += GetExportSize_Header(); u32 echosize = EchoDelay * 2048; - u32 totalsize = pattsize + sampsize + instrsize + envsize + echosize; + totalsize = pattsize + sampsize + instrsize + envsize + echosize; spc_ram_size = 65535 - module_base - header_size; u32 bytesfree = spc_ram_size - totalsize - header_size; totabanksize = totabanksize + totalsize; @@ -978,6 +978,7 @@ namespace IT2SPC if (!Modules[i]->id.empty()) { fprintf(f, "#define %-32s %i\n", Modules[i]->id.c_str(), i); + fprintf(f, "#define %-32s %i\n", std::string(Modules[i]->id + "_SIZE").c_str(), Modules[i]->totalsize); } } fprintf(f, "\n"); diff --git a/tools/smconv/it2spc.h b/tools/smconv/it2spc.h index 67c699197..4534a4e65 100644 --- a/tools/smconv/it2spc.h +++ b/tools/smconv/it2spc.h @@ -141,6 +141,7 @@ namespace IT2SPC { std::string id; std::vector SourceList; + u32 totalsize; int GetExportSize_Header() const { return 616;