Skip to content

Commit

Permalink
added module size in the soundbank header file generated to ease the …
Browse files Browse the repository at this point in the history
…debug
  • Loading branch information
RetroAntho committed Jan 4, 2025
1 parent 4f02767 commit 00f1c4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/smconv/it2spc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions tools/smconv/it2spc.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ namespace IT2SPC {

std::string id;
std::vector<u16> SourceList;
u32 totalsize;

int GetExportSize_Header() const {
return 616;
Expand Down

0 comments on commit 00f1c4c

Please sign in to comment.