From ef3dd21c9b4bff20bbf9e05ef0b6d6b1a2123948 Mon Sep 17 00:00:00 2001 From: Persune Date: Thu, 26 Dec 2024 23:55:36 +0800 Subject: [PATCH] Include actual .asm file name in auxiliary data Fixes #298. --- Source/ChunkRenderText.cpp | 7 +++++-- Source/PatternCompiler.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/ChunkRenderText.cpp b/Source/ChunkRenderText.cpp index 9fdfa065..f50d7faa 100644 --- a/Source/ChunkRenderText.cpp +++ b/Source/ChunkRenderText.cpp @@ -597,9 +597,12 @@ void CChunkRenderText::StoreNSFStub(unsigned char Expansion, vibrato_t VibratoSt str.Append("USE_LINEARPITCH = 1\n"); } - str.Append("\n.include \"driver/driver.s\"\t; path to NSF driver source\n"); + str.Append("\n; path to NSF driver source\n"); + str.Append(".include \"driver/driver.s\"\n"); - str.Append(".include \"music.asm\"\t\t; path to NSF export source\n"); + std::string asmfile = m_pFile->GetFileName(); + str.Append("; path to NSF export source\n"); + str.AppendFormat(".include \"%s\"\n", asmfile.c_str()); WriteFileString(str, m_pFileNSFStub); } diff --git a/Source/PatternCompiler.cpp b/Source/PatternCompiler.cpp index a436a3da..e7fba319 100644 --- a/Source/PatternCompiler.cpp +++ b/Source/PatternCompiler.cpp @@ -739,7 +739,7 @@ void CPatternCompiler::CompileData(int Track, int Pattern, int Channel) } // Volume command - if (Volume < 0x10) { + if (Volume < MAX_VOLUME) { WriteDuration(); WriteData(0xF0 | Volume); Action = true; // Terminate command