From 6d52cd370a487f291847f53b1ef642e575a5cde8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 18 Jan 2026 16:38:38 -0500 Subject: [PATCH] .ftm import: convert wave pos to nibbles --- src/engine/fileOps/ftm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/fileOps/ftm.cpp b/src/engine/fileOps/ftm.cpp index 92ad2b925..f67f6ac4c 100644 --- a/src/engine/fileOps/ftm.cpp +++ b/src/engine/fileOps/ftm.cpp @@ -1944,10 +1944,14 @@ bool DivEngine::loadFTM(unsigned char* file, size_t len, bool dnft, bool dnft_si if (pat->newData[row][DIV_PAT_FX(j)] == 0x12) { pat->newData[row][DIV_PAT_FX(j)] = 0x110; // N163 wave change (we'll map this later) } else if (pat->newData[row][DIV_PAT_FX(j)] == 0x11) { - // wave position (a value of 7F has special meaning) + // wave position: + // - in FamiTracker this is in bytes + // - a value of 7F has special meaning if (pat->newData[row][DIV_PAT_FXVAL(j)]==0x7f) { pat->newData[row][DIV_PAT_FX(j)]=-1; pat->newData[row][DIV_PAT_FXVAL(j)]=-1; + } else { + pat->newData[row][DIV_PAT_FXVAL(j)]=MIN(pat->newData[row][DIV_PAT_FXVAL(j)]<<1,0xff); } } }