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