From 81150d96fa0ad9f636a3080b0db87e71848a2488 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 4 Apr 2022 04:57:38 -0500 Subject: [PATCH] FDS: add FDS ins type auto-detection on .dmf --- src/engine/fileOps.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/fileOps.cpp b/src/engine/fileOps.cpp index 976b2c32f..47975c426 100644 --- a/src/engine/fileOps.cpp +++ b/src/engine/fileOps.cpp @@ -623,6 +623,15 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) { } // instrument pat->data[k][2]=reader.readS(); + + // this is sad + if (ds.system[0]==DIV_SYSTEM_NES_FDS) { + if (i==5 && pat->data[k][2]!=-1) { + if (pat->data[k][2]>=0 && pat->data[k][2]data[k][2]]->type=DIV_INS_FDS; + } + } + } } } }